summaryrefslogtreecommitdiff
path: root/board/raspberrypi/rpi/rpi.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/raspberrypi/rpi/rpi.c')
-rw-r--r--board/raspberrypi/rpi/rpi.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 50a699bb9e..96fe870645 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -165,6 +165,16 @@ static const struct {
"bcm2835-rpi-a-plus.dtb",
false,
},
+ [BCM2835_BOARD_REV_B_PLUS_13] = {
+ "Model B+",
+ "bcm2835-rpi-b-plus.dtb",
+ true,
+ },
+ [BCM2835_BOARD_REV_CM_14] = {
+ "Compute Module",
+ "bcm2835-rpi-cm.dtb",
+ false,
+ },
#endif
};
@@ -278,10 +288,17 @@ static void get_board_rev(void)
* https://github.com/pimoroni/RPi.version/blob/master/RPi/version.py
* http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=99293&p=690282
* (a few posts down)
+ *
+ * For the RPi 1, bit 24 is the "warranty bit", so we mask off just the
+ * lower byte to use as the board rev:
+ * http://www.raspberrypi.org/forums/viewtopic.php?f=63&t=98367&start=250
+ * http://www.raspberrypi.org/forums/viewtopic.php?f=31&t=20594
*/
rpi_board_rev = msg->get_board_rev.body.resp.rev;
if (rpi_board_rev & 0x800000)
rpi_board_rev = (rpi_board_rev >> 4) & 0xff;
+ else
+ rpi_board_rev &= 0xff;
if (rpi_board_rev >= ARRAY_SIZE(models)) {
printf("RPI: Board rev %u outside known range\n",
rpi_board_rev);