summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2018-04-06 08:30:10 -0400
committerTom Rini <trini@konsulko.com>2018-04-06 08:30:10 -0400
commit6074c3879c69a28cd8ace6ae03df5f9d4d2ef17f (patch)
tree60b9a6a5709f219f8ca3a4c9792145357863cb4a
parente294ba0678359bc32085c1714329af37e33e8f16 (diff)
parent91e1bc53c4b61cd7b871d485f4c136084245e9a2 (diff)
Merge tag 'signed-rpi-next' of git://github.com/agraf/u-boot
Patch queue for rpi - 2018-04-06 Highlights this time around: - Support for new RPi3 B+ model - Fix for some SD cards on newer RPi firmware
-rw-r--r--arch/arm/mach-bcm283x/include/mach/msg.h3
-rw-r--r--arch/arm/mach-bcm283x/msg.c4
-rw-r--r--board/raspberrypi/rpi/rpi.c35
-rw-r--r--configs/rpi_0_w_defconfig1
-rw-r--r--configs/rpi_2_defconfig1
-rw-r--r--configs/rpi_3_32b_defconfig2
-rw-r--r--configs/rpi_3_defconfig2
-rw-r--r--configs/rpi_defconfig1
-rw-r--r--drivers/mmc/bcm2835_sdhci.c2
-rw-r--r--drivers/mmc/bcm2835_sdhost.c3
10 files changed, 49 insertions, 5 deletions
diff --git a/arch/arm/mach-bcm283x/include/mach/msg.h b/arch/arm/mach-bcm283x/include/mach/msg.h
index 478b1f1c50..d055480ba1 100644
--- a/arch/arm/mach-bcm283x/include/mach/msg.h
+++ b/arch/arm/mach-bcm283x/include/mach/msg.h
@@ -18,9 +18,10 @@ int bcm2835_power_on_module(u32 module);
/**
* bcm2835_get_mmc_clock() - get the frequency of the MMC clock
*
+ * @clock_id: ID of clock to get frequency for
* @return clock frequency, or -ve on error
*/
-int bcm2835_get_mmc_clock(void);
+int bcm2835_get_mmc_clock(u32 clock_id);
/**
* bcm2835_get_video_size() - get the current display size
diff --git a/arch/arm/mach-bcm283x/msg.c b/arch/arm/mach-bcm283x/msg.c
index 92e93ad9e5..ad29f3be09 100644
--- a/arch/arm/mach-bcm283x/msg.c
+++ b/arch/arm/mach-bcm283x/msg.c
@@ -65,7 +65,7 @@ int bcm2835_power_on_module(u32 module)
return 0;
}
-int bcm2835_get_mmc_clock(void)
+int bcm2835_get_mmc_clock(u32 clock_id)
{
ALLOC_CACHE_ALIGN_BUFFER(struct msg_get_clock_rate, msg_clk, 1);
int ret;
@@ -76,7 +76,7 @@ int bcm2835_get_mmc_clock(void)
BCM2835_MBOX_INIT_HDR(msg_clk);
BCM2835_MBOX_INIT_TAG(&msg_clk->get_clock_rate, GET_CLOCK_RATE);
- msg_clk->get_clock_rate.body.req.clock_id = BCM2835_MBOX_CLOCK_ID_EMMC;
+ msg_clk->get_clock_rate.body.req.clock_id = clock_id;
ret = bcm2835_mbox_call_prop(BCM2835_MBOX_PROP_CHAN, &msg_clk->hdr);
if (ret) {
diff --git a/board/raspberrypi/rpi/rpi.c b/board/raspberrypi/rpi/rpi.c
index 177f4af265..de8e308f6c 100644
--- a/board/raspberrypi/rpi/rpi.c
+++ b/board/raspberrypi/rpi/rpi.c
@@ -91,11 +91,36 @@ static const struct rpi_model rpi_model_unknown = {
};
static const struct rpi_model rpi_models_new_scheme[] = {
+ [0x0] = {
+ "Model A",
+ DTB_DIR "bcm2835-rpi-a.dtb",
+ false,
+ },
+ [0x1] = {
+ "Model B",
+ DTB_DIR "bcm2835-rpi-b.dtb",
+ true,
+ },
+ [0x2] = {
+ "Model A+",
+ DTB_DIR "bcm2835-rpi-a-plus.dtb",
+ false,
+ },
+ [0x3] = {
+ "Model B+",
+ DTB_DIR "bcm2835-rpi-b-plus.dtb",
+ true,
+ },
[0x4] = {
"2 Model B",
DTB_DIR "bcm2836-rpi-2-b.dtb",
true,
},
+ [0x6] = {
+ "Compute Module",
+ DTB_DIR "bcm2835-rpi-cm.dtb",
+ false,
+ },
[0x8] = {
"3 Model B",
DTB_DIR "bcm2837-rpi-3-b.dtb",
@@ -106,11 +131,21 @@ static const struct rpi_model rpi_models_new_scheme[] = {
DTB_DIR "bcm2835-rpi-zero.dtb",
false,
},
+ [0xA] = {
+ "Compute Module 3",
+ DTB_DIR "bcm2837-rpi-cm3.dtb",
+ false,
+ },
[0xC] = {
"Zero W",
DTB_DIR "bcm2835-rpi-zero-w.dtb",
false,
},
+ [0xD] = {
+ "3 Model B+",
+ DTB_DIR "bcm2837-rpi-3-b-plus.dtb",
+ true,
+ },
};
static const struct rpi_model rpi_models_old_scheme[] = {
diff --git a/configs/rpi_0_w_defconfig b/configs/rpi_0_w_defconfig
index 04717d5e50..6e02cf34e9 100644
--- a/configs/rpi_0_w_defconfig
+++ b/configs/rpi_0_w_defconfig
@@ -34,3 +34,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_PHYS_TO_BUS=y
CONFIG_OF_LIBFDT_OVERLAY=y
+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
diff --git a/configs/rpi_2_defconfig b/configs/rpi_2_defconfig
index f8203c9d47..dd3c60cc93 100644
--- a/configs/rpi_2_defconfig
+++ b/configs/rpi_2_defconfig
@@ -34,3 +34,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_PHYS_TO_BUS=y
CONFIG_OF_LIBFDT_OVERLAY=y
+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
diff --git a/configs/rpi_3_32b_defconfig b/configs/rpi_3_32b_defconfig
index 317fc28f71..4e59c14fdf 100644
--- a/configs/rpi_3_32b_defconfig
+++ b/configs/rpi_3_32b_defconfig
@@ -36,3 +36,5 @@ CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_PHYS_TO_BUS=y
CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_PHYLIB=y
+CONFIG_USB_ETHER_LAN78XX=y
diff --git a/configs/rpi_3_defconfig b/configs/rpi_3_defconfig
index 0f3a54ec9a..810b60344f 100644
--- a/configs/rpi_3_defconfig
+++ b/configs/rpi_3_defconfig
@@ -36,3 +36,5 @@ CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_PHYS_TO_BUS=y
CONFIG_OF_LIBFDT_OVERLAY=y
+CONFIG_PHYLIB=y
+CONFIG_USB_ETHER_LAN78XX=y
diff --git a/configs/rpi_defconfig b/configs/rpi_defconfig
index d13d3d3e2e..2c0412d8ea 100644
--- a/configs/rpi_defconfig
+++ b/configs/rpi_defconfig
@@ -34,3 +34,4 @@ CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_CONSOLE_SCROLL_LINES=10
CONFIG_PHYS_TO_BUS=y
CONFIG_OF_LIBFDT_OVERLAY=y
+# CONFIG_REQUIRE_SERIAL_CONSOLE is not set
diff --git a/drivers/mmc/bcm2835_sdhci.c b/drivers/mmc/bcm2835_sdhci.c
index 3157354d2a..08bddd410e 100644
--- a/drivers/mmc/bcm2835_sdhci.c
+++ b/drivers/mmc/bcm2835_sdhci.c
@@ -183,7 +183,7 @@ static int bcm2835_sdhci_probe(struct udevice *dev)
if (base == FDT_ADDR_T_NONE)
return -EINVAL;
- ret = bcm2835_get_mmc_clock();
+ ret = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_EMMC);
if (ret < 0) {
debug("%s: Failed to set MMC clock (err=%d)\n", __func__, ret);
return ret;
diff --git a/drivers/mmc/bcm2835_sdhost.c b/drivers/mmc/bcm2835_sdhost.c
index 1bf52a3019..bccd182e50 100644
--- a/drivers/mmc/bcm2835_sdhost.c
+++ b/drivers/mmc/bcm2835_sdhost.c
@@ -35,6 +35,7 @@
#include <dm.h>
#include <mmc.h>
#include <asm/arch/msg.h>
+#include <asm/arch/mbox.h>
#include <asm/unaligned.h>
#include <linux/compat.h>
#include <linux/io.h>
@@ -941,7 +942,7 @@ static int bcm2835_probe(struct udevice *dev)
if (!host->ioaddr)
return -ENOMEM;
- host->max_clk = bcm2835_get_mmc_clock();
+ host->max_clk = bcm2835_get_mmc_clock(BCM2835_MBOX_CLOCK_ID_CORE);
bcm2835_add_host(host);