Re: [PATCH 7/7] ARM: rpi: Add device tree for Compute Module 3.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Tomaz,

On Thu, Feb 14, 2019 at 02:24:29PM +0100, Tomaz Solc wrote:
> Compute Module needs "no-sd" property on the MMC interface otherwise
> mci-bcm2835 hangs on SD card probe.
> 
> The switch to uart0 introduced in ab76f9d0 doesn't currently work on Compute
> Module.
> ---
>  arch/arm/boards/raspberry-pi/lowlevel.c | 10 ++++++++++
>  arch/arm/dts/Makefile                   |  1 +
>  arch/arm/dts/bcm2837-rpi-cm3.dts        | 26 ++++++++++++++++++++++++++
>  arch/arm/mach-bcm283x/Kconfig           |  6 ++++++
>  images/Makefile.bcm283x                 |  6 +++++-
>  5 files changed, 48 insertions(+), 1 deletion(-)
>  create mode 100644 arch/arm/dts/bcm2837-rpi-cm3.dts
> 
> diff --git a/arch/arm/boards/raspberry-pi/lowlevel.c b/arch/arm/boards/raspberry-pi/lowlevel.c
> index 34c935092..1a3d39421 100644
> --- a/arch/arm/boards/raspberry-pi/lowlevel.c
> +++ b/arch/arm/boards/raspberry-pi/lowlevel.c
> @@ -33,3 +33,13 @@ ENTRY_FUNCTION(start_raspberry_pi3, r0, r1, r2)
>  
>  	barebox_arm_entry(BCM2835_SDRAM_BASE, SZ_512M, fdt);
>  }
> +
> +extern char __dtb_bcm2837_rpi_cm3_start[];
> +ENTRY_FUNCTION(start_raspberry_pi_cm3, r0, r1, r2)
> +{
> +	void *fdt = __dtb_bcm2837_rpi_cm3_start + get_runtime_offset();
> +
> +	arm_cpu_lowlevel_init();
> +
> +	barebox_arm_entry(BCM2835_SDRAM_BASE, SZ_512M, fdt);
> +}
> diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
> index 3cdee1ffb..82595f9b7 100644
> --- a/arch/arm/dts/Makefile
> +++ b/arch/arm/dts/Makefile
> @@ -75,6 +75,7 @@ pbl-dtb-$(CONFIG_MACH_REALQ7) += imx6q-dmo-edmqmx6.dtb.o
>  pbl-dtb-$(CONFIG_MACH_RPI) += bcm2835-rpi.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_RPI_CM3) += bcm2837-rpi-cm3.dtb.o
>  pbl-dtb-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o
>  pbl-dtb-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o
>  pbl-dtb-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += imx6sx-sdb.dtb.o
> diff --git a/arch/arm/dts/bcm2837-rpi-cm3.dts b/arch/arm/dts/bcm2837-rpi-cm3.dts
> new file mode 100644
> index 000000000..636db9a1e
> --- /dev/null
> +++ b/arch/arm/dts/bcm2837-rpi-cm3.dts
> @@ -0,0 +1,26 @@
> +#include <arm64/broadcom/bcm2837-rpi-3-b.dts>

This upstream dts only includes arm/bcm2837-rpi-3-b.dts, and there is
also a arch/arm/boot/dts/bcm2837-rpi-cm3.dtsi that does more than just
arm/bcm2837-rpi-3-b.dts, maybe include that one instead?

> +
> +/ {
> +	chosen {
> +		stdout-path = &uart0;
> +	};
> +
> +	memory {
> +		reg = <0x0 0x0>;
> +	};
> +};
> +
> +&uart0 {
> +	status = "okay";
> +	/delete-node/ bluetooth;
> +};
> +
> +&sdhci {
> +	pinctrl-0 = <&emmc_gpio48>;
> +	no-sd;
> +	/delete-node/ wifi@1;
> +};
> +
> +&sdhost {
> +	status = "disabled";
> +};
> diff --git a/arch/arm/mach-bcm283x/Kconfig b/arch/arm/mach-bcm283x/Kconfig
> index af2f88c47..bb5f75dc9 100644
> --- a/arch/arm/mach-bcm283x/Kconfig
> +++ b/arch/arm/mach-bcm283x/Kconfig
> @@ -25,6 +25,12 @@ config MACH_RPI3
>  	select MACH_RPI_COMMON
>  	select ARM_SECURE_MONITOR
>  
> +config MACH_RPI_CM3
> +	bool "RaspberryPi Compute Module 3 (BCM2837/CORTEX-A53)"
> +	select CPU_V7
> +	select MACH_RPI_COMMON
> +	select ARM_SECURE_MONITOR
> +
>  endmenu
>  
>  config MACH_RPI_DEBUG_UART_BASE
> diff --git a/images/Makefile.bcm283x b/images/Makefile.bcm283x
> index 9199f153d..2189f266e 100644
> --- a/images/Makefile.bcm283x
> +++ b/images/Makefile.bcm283x
> @@ -12,4 +12,8 @@ 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
> +
> +pblb-$(CONFIG_MACH_RPI_CM3) += start_raspberry_pi_cm3
> +FILE_barebox-raspberry-pi-cm3.img = start_raspberry_pi_cm3.pblb
> +image-$(CONFIG_MACH_RPI_CM3) += barebox-raspberry-pi-cm3.img

Please re-add the missing newline at the end.

 - Roland

-- 
Roland Hieber                     | r.hieber@xxxxxxxxxxxxxx     |
Pengutronix e.K.                  | https://www.pengutronix.de/ |
Peiner Str. 6-8, 31137 Hildesheim | Phone: +49-5121-206917-5086 |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
barebox@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/barebox



[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux