The get board rev firmware API doesn't seem to return a useful value on
this platform, so we hard-code the board ID for now, since there's only
one bcm2836-based RPi board at present.
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.
HDMI is untested.
Signed-off-by: Stephen Warren swar...@wwwdotorg.org
---
arch/arm/Kconfig | 5 +
arch/arm/include/asm/arch-bcm2835/mbox.h | 4 +
board/raspberrypi/rpi/rpi.c | 26 -
board/raspberrypi/rpi_2/Kconfig | 15 +++
board/raspberrypi/rpi_2/MAINTAINERS | 6 ++
board/raspberrypi/rpi_2/Makefile | 7 ++
configs/rpi_2_defconfig | 2 +
include/configs/{rpi.h = rpi-common.h} | 16 ++-
include/configs/rpi.h| 175 +--
include/configs/rpi_2.h | 15 +++
10 files changed, 93 insertions(+), 178 deletions(-)
create mode 100644 board/raspberrypi/rpi_2/Kconfig
create mode 100644 board/raspberrypi/rpi_2/MAINTAINERS
create mode 100644 board/raspberrypi/rpi_2/Makefile
create mode 100644 configs/rpi_2_defconfig
copy include/configs/{rpi.h = rpi-common.h} (92%)
create mode 100644 include/configs/rpi_2.h
diff --git a/arch/arm/Kconfig b/arch/arm/Kconfig
index 47806f85dafa..b916eb0dd44c 100644
--- a/arch/arm/Kconfig
+++ b/arch/arm/Kconfig
@@ -413,6 +413,10 @@ config TARGET_RPI
bool Support rpi
select CPU_ARM1176
+config TARGET_RPI_2
+ bool Support rpi_2
+ select CPU_V7
+
config TARGET_TNETV107X_EVM
bool Support tnetv107x_evm
select CPU_ARM1176
@@ -958,6 +962,7 @@ source board/phytec/pcm051/Kconfig
source board/ppcag/bg0900/Kconfig
source board/pxa255_idp/Kconfig
source board/raspberrypi/rpi/Kconfig
+source board/raspberrypi/rpi_2/Kconfig
source board/ronetix/pm9261/Kconfig
source board/ronetix/pm9263/Kconfig
source board/ronetix/pm9g45/Kconfig
diff --git a/arch/arm/include/asm/arch-bcm2835/mbox.h
b/arch/arm/include/asm/arch-bcm2835/mbox.h
index c4bbacaf3c3f..8b7ff8165617 100644
--- a/arch/arm/include/asm/arch-bcm2835/mbox.h
+++ b/arch/arm/include/asm/arch-bcm2835/mbox.h
@@ -125,6 +125,9 @@ struct bcm2835_mbox_tag_hdr {
#define BCM2835_MBOX_TAG_GET_BOARD_REV 0x00010002
+#ifdef CONFIG_BCM2836
+#define BCM2836_BOARD_REV_2_B 0x1
+#else
/*
* 0x2..0xf from:
*
http://raspberryalphaomega.org.uk/2013/02/06/automatic-raspberry-pi-board-revision-detection-model-a-b1-and-b2/
@@ -145,6 +148,7 @@ struct bcm2835_mbox_tag_hdr {
#define BCM2835_BOARD_REV_B_PLUS 0x10
#define BCM2835_BOARD_REV_CM 0x11
#define BCM2835_BOARD_REV_A_PLUS 0x12
+#endif
struct bcm2835_mbox_tag_get_board_rev {
struct bcm2835_mbox_tag_hdr tag_hdr;
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 2185b1bd029a..314d1672f80a 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
*/
@@ -28,7 +28,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 = 300,
};
@@ -76,9 +80,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,
@@ -149,6 +164,7 @@ static const struct {
bcm2835-rpi-a-plus.dtb,
false,
},
+#endif
};
u32 rpi_board_rev = 0;
@@ -242,10 +258,15 @@ static int power_on_module(u32 module)
static void get_board_rev(void)
{
+#ifndef CONFIG_BCM2836
ALLOC_ALIGN_BUFFER(struct msg_get_board_rev, msg, 1, 16);
int ret;
+#endif
const char *name;
+#ifdef CONFIG_BCM2836
+ rpi_board_rev = BCM2836_BOARD_REV_2_B;
+#else
BCM2835_MBOX_INIT_HDR(msg);
BCM2835_MBOX_INIT_TAG(msg-get_board_rev, GET_BOARD_REV);
@@ -266,9 +287,10 @@ static void get_board_rev(void)
printf(RPI: Board rev %u unknown\n, rpi_board_rev);
rpi_board_rev = 0;
}
+#endif
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