mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH 1/1] ARM: dts: rpi4: add DT for CM4S
@ 2024-02-15 12:01 Pierre-Olivier Huard
  2024-02-16 12:01 ` Sascha Hauer
  0 siblings, 1 reply; 2+ messages in thread
From: Pierre-Olivier Huard @ 2024-02-15 12:01 UTC (permalink / raw)
  To: barebox; +Cc: sebastien.bourdelin, a.fatoum, oss-contrib, Pierre-Olivier Huard

CM4S is close to the CM4, and thus is herited from it, with some
minor changes:

* The uart1 node (mini UART) does not need the clock to be forced to
  500MHz.
* The compatible field needs to be updated to match the CM4S

There is still an issue with the dwc2 driver in timeout.

Boot log:
Board: Raspberry Pi Compute Module 4S IO Board
deep-probe: supported due to raspberrypi,4-compute-module-s
bcm2835_mci fe300000.mmc@7e300000.of: registered as mci0
WARNING: dwc2 fe980000.usb@7e980000.of: dwc2_core_reset: Timeout! Waiting for Core Soft Reset
ERROR: dwc2 fe980000.usb@7e980000.of: probe failed: Connection timed out
bcm2835_mci fe340000.mmc@7e340000.of: registered as mci1
malloc space: 0x1f17ca80 -> 0x3e2f94ff (size 497.5 MiB)
no /dev/disk0.0 or /dev/mmc0.0. using default env
no '/hat' node found in vc fdt
environment load /dev/env0: No such file or directory
Maybe you have to create the partition.

Hit any to stop autoboot:    3

Signed-off-by: Pierre-Olivier Huard <pierre-olivier.huard@rtone.fr>
---
 arch/arm/boards/raspberry-pi/lowlevel.c |  3 +++
 arch/arm/dts/Makefile                   |  2 +-
 arch/arm/dts/bcm2711-rpi-cm4s-io.dts    | 20 ++++++++++++++++++++
 3 files changed, 24 insertions(+), 1 deletion(-)
 create mode 100644 arch/arm/dts/bcm2711-rpi-cm4s-io.dts

diff --git a/arch/arm/boards/raspberry-pi/lowlevel.c b/arch/arm/boards/raspberry-pi/lowlevel.c
index a1e195d811..b3727d930f 100644
--- a/arch/arm/boards/raspberry-pi/lowlevel.c
+++ b/arch/arm/boards/raspberry-pi/lowlevel.c
@@ -73,6 +73,7 @@ extern char __dtb_z_bcm2837_rpi_cm3_start[];
 extern char __dtb_z_bcm2711_rpi_4_start[];
 extern char __dtb_z_bcm2711_rpi_400_start[];
 extern char __dtb_z_bcm2711_rpi_cm4_io_start[];
+extern char __dtb_z_bcm2711_rpi_cm4s_io_start[];
 
 RPI_ENTRY_FUNCTION(start_raspberry_pi1, SZ_128M, fdt)
 {
@@ -139,6 +140,8 @@ static void *rpi_get_board_fdt(int rev)
 		return DT_IF_ENABLED(__dtb_z_bcm2711_rpi_400_start, CONFIG_MACH_RPI4);
 	case BCM2711_BOARD_REV_CM4:
 		return DT_IF_ENABLED(__dtb_z_bcm2711_rpi_cm4_io_start, CONFIG_MACH_RPI4);
+	case BCM2711_BOARD_REV_CM4_S:
+		return DT_IF_ENABLED(__dtb_z_bcm2711_rpi_cm4s_io_start, CONFIG_MACH_RPI4);
 	}
 
 	return NULL;
diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile
index 04af3bd646..506716d806 100644
--- a/arch/arm/dts/Makefile
+++ b/arch/arm/dts/Makefile
@@ -123,7 +123,7 @@ lwl-$(CONFIG_MACH_RPI) += bcm2835-rpi.dtb.o
 lwl-$(CONFIG_MACH_RPI2) += bcm2836-rpi-2.dtb.o
 lwl-$(CONFIG_MACH_RPI3) += bcm2837-rpi-3.dtb.o
 lwl-$(CONFIG_MACH_RPI_CM3) += bcm2837-rpi-cm3.dtb.o
-lwl-$(CONFIG_MACH_RPI4) += bcm2711-rpi-4.dtb.o bcm2711-rpi-400.dtb.o bcm2711-rpi-cm4-io.dtb.o
+lwl-$(CONFIG_MACH_RPI4) += bcm2711-rpi-4.dtb.o bcm2711-rpi-400.dtb.o bcm2711-rpi-cm4-io.dtb.o bcm2711-rpi-cm4s-io.dtb.o
 lwl-$(CONFIG_MACH_SABRELITE) += imx6q-sabrelite.dtb.o imx6dl-sabrelite.dtb.o
 lwl-$(CONFIG_MACH_SABRESD) += imx6q-sabresd.dtb.o imx6qp-sabresd.dtb.o
 lwl-$(CONFIG_MACH_FREESCALE_IMX6SX_SABRESDB) += imx6sx-sdb.dtb.o
diff --git a/arch/arm/dts/bcm2711-rpi-cm4s-io.dts b/arch/arm/dts/bcm2711-rpi-cm4s-io.dts
new file mode 100644
index 0000000000..8302523e47
--- /dev/null
+++ b/arch/arm/dts/bcm2711-rpi-cm4s-io.dts
@@ -0,0 +1,20 @@
+// SPDX-License-Identifier: GPL-2.0
+
+#include "bcm2711-rpi-cm4-io.dts"
+
+&{/memory@0} {
+	reg = <0x0 0x0 0x0>;
+};
+
+/ {
+	compatible = "raspberrypi,4-compute-module-s", "brcm,bcm2711";
+	model = "Raspberry Pi Compute Module 4S IO Board";
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+};
+
+&uart1 {
+	/delete-property/ clock-frequency;
+};
-- 
2.43.0




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2024-02-16 12:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-15 12:01 [PATCH 1/1] ARM: dts: rpi4: add DT for CM4S Pierre-Olivier Huard
2024-02-16 12:01 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox