diff options
author | Roland Hieber <rhi@pengutronix.de> | 2019-01-16 11:02:58 +0100 |
---|---|---|
committer | Roland Hieber <rhi@pengutronix.de> | 2019-01-16 11:02:58 +0100 |
commit | ea174032d7545bcd1b52b8c589e6c8a72f386423 (patch) | |
tree | 6471a4a7e6c59e66eb9c52404afed61e43d3572f | |
parent | a5c768c1c900e4e9c771099d7226d2dac06dd34c (diff) | |
download | barebox-rhi/rpi-zero.tar.gz barebox-rhi/rpi-zero.tar.xz |
WIP: rpi zero supportrhi/rpi-zero
Signed-off-by: Roland Hieber <rhi@pengutronix.de>
-rw-r--r-- | arch/arm/boards/raspberry-pi/lowlevel.c | 10 | ||||
-rw-r--r-- | arch/arm/boards/raspberry-pi/rpi-common.c | 2 | ||||
-rw-r--r-- | arch/arm/dts/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/dts/bcm2835-rpi-zero.dts | 12 | ||||
-rw-r--r-- | images/Makefile.bcm283x | 6 |
5 files changed, 30 insertions, 1 deletions
diff --git a/arch/arm/boards/raspberry-pi/lowlevel.c b/arch/arm/boards/raspberry-pi/lowlevel.c index 34c935092..da92c8297 100644 --- a/arch/arm/boards/raspberry-pi/lowlevel.c +++ b/arch/arm/boards/raspberry-pi/lowlevel.c @@ -4,6 +4,16 @@ #include <linux/sizes.h> #include <mach/platform.h> +extern char __dtb_bcm2835_rpi_zero_start[]; +ENTRY_FUNCTION(start_raspberry_pi_zero, r0, r1, r2) +{ + void *fdt = __dtb_bcm2835_rpi_zero_start + get_runtime_offset(); + + arm_cpu_lowlevel_init(); + + barebox_arm_entry(BCM2835_SDRAM_BASE, SZ_128M, fdt); +} + extern char __dtb_bcm2835_rpi_start[]; ENTRY_FUNCTION(start_raspberry_pi1, r0, r1, r2) { diff --git a/arch/arm/boards/raspberry-pi/rpi-common.c b/arch/arm/boards/raspberry-pi/rpi-common.c index 44d3ef79d..c98b3e2e3 100644 --- a/arch/arm/boards/raspberry-pi/rpi-common.c +++ b/arch/arm/boards/raspberry-pi/rpi-common.c @@ -300,6 +300,7 @@ postconsole_initcall(rpi_clock_init); #define BCM2835_PL011_BASE 0x20201000 #define BCM2836_PL011_BASE 0x3f201000 +#define BCM2835_MINIUART_BASE 0x20215040 #define BCM2836_MINIUART_BASE 0x3f215040 static int rpi_console_clock_init(void) @@ -319,6 +320,7 @@ static int rpi_console_clock_init(void) if (IS_ERR(clk)) return PTR_ERR(clk); + clkdev_add_physbase(clk, BCM2835_MINIUART_BASE, NULL); clkdev_add_physbase(clk, BCM2836_MINIUART_BASE, NULL); clk = clk_fixed("bcm2835-cs", 1 * 1000 * 1000); diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index c08b35a10..777cd323f 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -72,6 +72,7 @@ pbl-dtb-$(CONFIG_MACH_RADXA_ROCK) += rk3188-radxarock.dtb.o pbl-dtb-$(CONFIG_MACH_PHYTEC_SOM_RK3288) += rk3288-phycore-som.dtb.o pbl-dtb-$(CONFIG_MACH_REALQ7) += imx6q-dmo-edmqmx6.dtb.o pbl-dtb-$(CONFIG_MACH_RPI) += bcm2835-rpi.dtb.o +pbl-dtb-$(CONFIG_MACH_RPI) += bcm2835-rpi-zero.dtb.o pbl-dtb-$(CONFIG_MACH_RPI2) += bcm2836-rpi-2.dtb.o pbl-dtb-$(CONFIG_MACH_RPI3) += bcm2837-rpi-3.dtb.o pbl-dtb-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o diff --git a/arch/arm/dts/bcm2835-rpi-zero.dts b/arch/arm/dts/bcm2835-rpi-zero.dts new file mode 100644 index 000000000..ca8494064 --- /dev/null +++ b/arch/arm/dts/bcm2835-rpi-zero.dts @@ -0,0 +1,12 @@ +#include <arm/bcm2835-rpi-zero.dts> + +/ { + chosen { + stdout-path = &uart1; + }; + + memory { + reg = <0x0 0x0>; + }; +}; + diff --git a/images/Makefile.bcm283x b/images/Makefile.bcm283x index 9199f153d..156ebe92e 100644 --- a/images/Makefile.bcm283x +++ b/images/Makefile.bcm283x @@ -2,6 +2,10 @@ # barebox image generation Makefile for BCM283x images # +pblb-$(CONFIG_MACH_RPI) += start_raspberry_pi_zero +FILE_barebox-raspberry-pi-zero.img = start_raspberry_pi_zero.pblb +image-$(CONFIG_MACH_RPI) += barebox-raspberry-pi-zero.img + pblb-$(CONFIG_MACH_RPI) += start_raspberry_pi1 FILE_barebox-raspberry-pi-1.img = start_raspberry_pi1.pblb image-$(CONFIG_MACH_RPI) += barebox-raspberry-pi-1.img @@ -12,4 +16,4 @@ image-$(CONFIG_MACH_RPI2) += barebox-raspberry-pi-2.img pblb-$(CONFIG_MACH_RPI3) += start_raspberry_pi3 FILE_barebox-raspberry-pi-3.img = start_raspberry_pi3.pblb -image-$(CONFIG_MACH_RPI3) += barebox-raspberry-pi-3.img
\ No newline at end of file +image-$(CONFIG_MACH_RPI3) += barebox-raspberry-pi-3.img |