Re: [PATCH 0/3] ARM: dts: bcm2711-rpi-cm4-io: Enable xHCI host

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

 



Hi Stefan,

Stefan Wahren <wahrenst@xxxxxxx> (2023-11-27):
> thanks for testing. Are you absolutely sure that you are using
> bcm2711-rpi-cm4-io.dtb from the mainline tree?

I'm pretty sure, yes.

Starting from the unpatched kernel:

    root@rpi4-20231108:~# md5sum /boot/firmware/bcm2711-rpi-cm4-io.dtb /usr/lib/linux-image-6.6.0+/broadcom/bcm2711-rpi-cm4-io.dtb
    5cbe07e9f85ddfefd21ffe98bf92f5ea  /boot/firmware/bcm2711-rpi-cm4-io.dtb
    5cbe07e9f85ddfefd21ffe98bf92f5ea  /usr/lib/linux-image-6.6.0+/broadcom/bcm2711-rpi-cm4-io.dtb

The second file is shipped by the linux-image package built via `make
bindeb-pkg`, and sync'd into /boot/firmware as the first one.

After deploying the patched kernel, I'm seeing both files getting
updated:

    root@rpi4-20231108:~# md5sum /boot/firmware/bcm2711-rpi-cm4-io.dtb /usr/lib/linux-image-6.6.0+/broadcom/bcm2711-rpi-cm4-io.dtb
    c6ea63f43dcdf8ecd66dda6c494f52e2  /boot/firmware/bcm2711-rpi-cm4-io.dtb
    c6ea63f43dcdf8ecd66dda6c494f52e2  /usr/lib/linux-image-6.6.0+/broadcom/bcm2711-rpi-cm4-io.dtb

Comparing a copy of the first set of files against the refreshed DTB,
I'm seeing the attached (dt)diff.

> I would expect the following hardware name: Raspberry Pi Compute
> Module 4 IO Board

I suppose this is an arm(32) vs. arm64 difference?

 - setup_arch() in arch/arm/kernel/setup.c does this:

        machine_desc = mdesc;
        machine_name = mdesc->name;
        dump_stack_set_arch_desc("%s", mdesc->name);

 - setup_machine_fdt() in arch/arm64/kernel/setup.c does that:

        name = of_flat_dt_get_machine_name();
        if (!name)
                return;

        pr_info("Machine model: %s\n", name);
        dump_stack_set_arch_desc("%s (DT)", name);

So I'd guess you're testing on arm(32) and seeing the name embedded in
the DTB while I'm testing on arm64 and seeing the name as filled by the
bootloader?

> Be aware the arm files has been moved into a broadcom subdirectory.

Thanks for mentioning that, but I've been working on arm64 exclusively,
and those files have always been shipped in that broadcom subdirectory
anyway.

With 64-bit capable hardware, I didn't think of mentioning I was testing
64-bit kernel and user space (Debian 12, arm64), sorry about that.


Cheers,
-- 
Cyril Brulebois (kibi@xxxxxxxxxx)            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant
--- /dev/fd/63	2023-11-27 11:39:50.018176449 +0000
+++ /dev/fd/62	2023-11-27 11:39:50.018176449 +0000
@@ -183,6 +183,7 @@
 		vchiq = "/soc/mailbox@7e00b840";
 		vec = "/soc/vec@7ec13000";
 		wifi_pwrseq = "/wifi-pwrseq";
+		xhci = "/scb/usb@7e9c0000";
 	};
 
 	aliases {
@@ -351,14 +352,14 @@
 
 	leds {
 		compatible = "gpio-leds";
-		phandle = <0xad>;
+		phandle = <0xae>;
 
 		led-act {
 			default-state = "keep";
 			gpios = <0x06 0x2a 0x00>;
 			label = "ACT";
 			linux,default-trigger = "heartbeat";
-			phandle = <0xae>;
+			phandle = <0xaf>;
 		};
 
 		led-pwr {
@@ -467,7 +468,7 @@
 			clocks = <0x11 0x05>;
 			compatible = "brcm,2711-v3d";
 			interrupts = <0x00 0x4a 0x04>;
-			phandle = <0xac>;
+			phandle = <0xad>;
 			power-domains = <0x27 0x01>;
 			reg = <0x00 0x7ec00000 0x4000 0x00 0x7ec04000 0x4000>;
 			reg-names = "hub\0core0";
@@ -492,6 +493,17 @@
 			ranges = <0x2000000 0x00 0xf8000000 0x06 0x00 0x00 0x4000000>;
 			reg = <0x00 0x7d500000 0x9310>;
 		};
+
+		usb@7e9c0000 {
+			#address-cells = <0x01>;
+			#size-cells = <0x00>;
+			compatible = "generic-xhci";
+			interrupts = <0x00 0xb0 0x04>;
+			phandle = <0xac>;
+			power-domains = <0x0c 0x06>;
+			reg = <0x00 0x7e9c0000 0x100000>;
+			status = "okay";
+		};
 	};
 
 	soc {
@@ -1889,13 +1901,13 @@
 			clock-names = "otg";
 			clocks = <0x13>;
 			compatible = "brcm,bcm2835-usb";
-			dr_mode = "host";
 			interrupts = <0x00 0x49 0x04>;
 			phandle = <0x8a>;
 			phy-names = "usb2-phy";
 			phys = <0x14>;
 			power-domains = <0x0c 0x06>;
 			reg = <0x7e980000 0x10000>;
+			status = "disabled";
 		};
 
 		vec@7ec13000 {

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Device Tree Compilter]     [Device Tree Spec]     [Linux Driver Backports]     [Video for Linux]     [Linux USB Devel]     [Linux PCI Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Yosemite Backpacking]


  Powered by Linux