summaryrefslogtreecommitdiffstats
path: root/board/raspberrypi
diff options
context:
space:
mode:
authorStephen Warren <swarren@wwwdotorg.org>2015-02-16 12:16:15 -0700
committerTom Rini <trini@ti.com>2015-02-21 08:28:16 -0500
commit46414296953410706e917cef9238926084e83a4b (patch)
treeffc3f305d13f7cf801eca71f57d5572f9c87464c /board/raspberrypi
parentdb75356f14646a4bca7b712f2128435e97f55c17 (diff)
downloadblackbird-obmc-uboot-46414296953410706e917cef9238926084e83a4b.tar.gz
blackbird-obmc-uboot-46414296953410706e917cef9238926084e83a4b.zip
rpi: add support for Raspberry Pi 2 model B
USB doesn't seem to work yet; the controller detects the on-board Hub/ Ethernet device but can't read the descriptors from it. I haven't investigated yet. Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
Diffstat (limited to 'board/raspberrypi')
-rw-r--r--board/raspberrypi/rpi/rpi.c28
-rw-r--r--board/raspberrypi/rpi_2/Kconfig15
-rw-r--r--board/raspberrypi/rpi_2/MAINTAINERS6
-rw-r--r--board/raspberrypi/rpi_2/Makefile7
4 files changed, 54 insertions, 2 deletions
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index fdbf87d6fa..50a699bb9e 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2012-2013 Stephen Warren
+ * (C) Copyright 2012-2013,2015 Stephen Warren
*
* SPDX-License-Identifier: GPL-2.0
*/
@@ -29,7 +29,11 @@ U_BOOT_DEVICE(bcm2835_gpios) = {
};
static const struct pl01x_serial_platdata serial_platdata = {
+#ifdef CONFIG_BCM2836
+ .base = 0x3f201000,
+#else
.base = 0x20201000,
+#endif
.type = TYPE_PL011,
.clock = 3000000,
};
@@ -77,9 +81,20 @@ static const struct {
} models[] = {
[0] = {
"Unknown model",
+#ifdef CONFIG_BCM2836
+ "bcm2836-rpi-other.dtb",
+#else
"bcm2835-rpi-other.dtb",
+#endif
false,
},
+#ifdef CONFIG_BCM2836
+ [BCM2836_BOARD_REV_2_B] = {
+ "2 Model B",
+ "bcm2836-rpi-2-b.dtb",
+ true,
+ },
+#else
[BCM2835_BOARD_REV_B_I2C0_2] = {
"Model B (no P5)",
"bcm2835-rpi-b-i2c0.dtb",
@@ -150,6 +165,7 @@ static const struct {
"bcm2835-rpi-a-plus.dtb",
false,
},
+#endif
};
u32 rpi_board_rev = 0;
@@ -257,7 +273,15 @@ static void get_board_rev(void)
return;
}
+ /*
+ * For details of old-vs-new scheme, see:
+ * 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)
+ */
rpi_board_rev = msg->get_board_rev.body.resp.rev;
+ if (rpi_board_rev & 0x800000)
+ rpi_board_rev = (rpi_board_rev >> 4) & 0xff;
if (rpi_board_rev >= ARRAY_SIZE(models)) {
printf("RPI: Board rev %u outside known range\n",
rpi_board_rev);
@@ -269,7 +293,7 @@ static void get_board_rev(void)
}
name = models[rpi_board_rev].name;
- printf("RPI model: %s\n", name);
+ printf("RPI %s\n", name);
}
int board_init(void)
diff --git a/board/raspberrypi/rpi_2/Kconfig b/board/raspberrypi/rpi_2/Kconfig
new file mode 100644
index 0000000000..032184d5ad
--- /dev/null
+++ b/board/raspberrypi/rpi_2/Kconfig
@@ -0,0 +1,15 @@
+if TARGET_RPI_2
+
+config SYS_BOARD
+ default "rpi_2"
+
+config SYS_VENDOR
+ default "raspberrypi"
+
+config SYS_SOC
+ default "bcm2835"
+
+config SYS_CONFIG_NAME
+ default "rpi_2"
+
+endif
diff --git a/board/raspberrypi/rpi_2/MAINTAINERS b/board/raspberrypi/rpi_2/MAINTAINERS
new file mode 100644
index 0000000000..85a480c9d1
--- /dev/null
+++ b/board/raspberrypi/rpi_2/MAINTAINERS
@@ -0,0 +1,6 @@
+RPI_2 BOARD
+M: Stephen Warren <swarren@wwwdotorg.org>
+S: Maintained
+F: board/raspberrypi/rpi_2/
+F: include/configs/rpi_2.h
+F: configs/rpi_2_defconfig
diff --git a/board/raspberrypi/rpi_2/Makefile b/board/raspberrypi/rpi_2/Makefile
new file mode 100644
index 0000000000..d82cd21f4c
--- /dev/null
+++ b/board/raspberrypi/rpi_2/Makefile
@@ -0,0 +1,7 @@
+#
+# (C) Copyright 2012,2015 Stephen Warren
+#
+# SPDX-License-Identifier: GPL-2.0
+#
+
+obj-y := ../rpi/rpi.o
OpenPOWER on IntegriCloud