public inbox for linux-usb@vger.kernel.org
 help / color / mirror / Atom feed
From: Cyril Brulebois <kibi@debian.org>
To: Stefan Wahren <wahrenst@gmx.net>
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Florian Fainelli <florian.fainelli@broadcom.com>,
	Mathias Nyman <mathias.nyman@intel.com>,
	bcm-kernel-feedback-list@broadcom.com, linux-usb@vger.kernel.org,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH 0/3] ARM: dts: bcm2711-rpi-cm4-io: Enable xHCI host
Date: Mon, 27 Nov 2023 12:55:38 +0100	[thread overview]
Message-ID: <20231127115538.npv23hhn7jfrk3fc@mraw.org> (raw)
In-Reply-To: <b1156fee-aa43-43b3-bb03-baaac49575f4@gmx.net>


[-- Attachment #1.1: Type: text/plain, Size: 2460 bytes --]

Hi Stefan,

Stefan Wahren <wahrenst@gmx.net> (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@debian.org)            <https://debamax.com/>
D-I release manager -- Release team member -- Freelance Consultant

[-- Attachment #1.2: bcm2711-rpi-cm4-io.dtb.diff --]
[-- Type: text/x-diff, Size: 1680 bytes --]

--- /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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2023-11-27 11:55 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-26  2:56 [PATCH 0/3] ARM: dts: bcm2711-rpi-cm4-io: Enable xHCI host Stefan Wahren
2023-11-26  2:56 ` [PATCH 1/3] dt-bindings: usb: xhci: Add optional power-domains Stefan Wahren
2023-11-26 11:14   ` Conor Dooley
2023-11-26  2:56 ` [PATCH 2/3] ARM: dts: bcm2711: Add generic xHCI Stefan Wahren
2023-11-26  2:56 ` [PATCH 3/3] ARM: dts: bcm2711-rpi-cm4-io: Enable xHCI host Stefan Wahren
2023-11-27  0:34 ` [PATCH 0/3] " Cyril Brulebois
2023-11-27 10:57   ` Stefan Wahren
2023-11-27 11:55     ` Cyril Brulebois [this message]
2023-11-27 12:38       ` Stefan Wahren
2023-11-27 13:02         ` Cyril Brulebois
2023-11-27 15:16           ` Stefan Wahren
2023-11-27 15:59             ` Cyril Brulebois
2023-11-27 16:56           ` Stefan Wahren
2023-11-27 18:21             ` Cyril Brulebois
2023-11-27 18:52           ` Stefan Wahren
2023-11-27  6:02 ` Justin Chen
2023-11-27 11:08   ` Stefan Wahren
2023-11-27 11:22     ` Phil Elwell
2023-11-27 11:38       ` Stefan Wahren
2023-11-27 11:58         ` Phil Elwell
2023-11-27 12:33           ` Stefan Wahren
2023-11-27 16:28             ` Phil Elwell
2023-11-27 17:44               ` Justin Chen
2023-11-27 18:41                 ` Florian Fainelli
2023-11-27 19:22                   ` Stefan Wahren
2023-11-27 21:49                     ` Florian Fainelli
2023-11-28  6:44                       ` Stefan Wahren
2023-11-28 14:46                         ` Phil Elwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231127115538.npv23hhn7jfrk3fc@mraw.org \
    --to=kibi@debian.org \
    --cc=bcm-kernel-feedback-list@broadcom.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=florian.fainelli@broadcom.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=mathias.nyman@intel.com \
    --cc=robh+dt@kernel.org \
    --cc=wahrenst@gmx.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox