[BISECTED] arm: dts: Resync BeagleBone device trees

Hello,
I've found that the following commit breaks USB on BeagleBone Black board (am335x based):
commit 942853dd96df5de1c0a2a61c877c1cf1c24f1e91 Author: Paul Barker paul.barker@sancloud.com Date: Mon Jul 12 21:14:09 2021 +0100
arm: dts: Resync BeagleBone device trees
When commit is applied then I see the following:
starting USB... No working controllers found USB is stopped. Please issue 'usb start' first. starting USB... No working controllers found
Before the commit USB was working as expected:
starting USB... Bus usb@47401800: scanning bus usb@47401800 for devices... 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found
Device 0: Vendor: Rev: PMAP Prod: USB DISK Pro Type: Removable Hard Disk Capacity: 7381.2 MB = 7.2 GB (15116736 x 512) ... is now current device

Hi,
On Fri, 2021-08-06 at 13:54 +0300, Matwey V. Kornilov wrote:
Hello,
I've found that the following commit breaks USB on BeagleBone Black board (am335x based):
commit 942853dd96df5de1c0a2a61c877c1cf1c24f1e91 Author: Paul Barker paul.barker@sancloud.com Date: Mon Jul 12 21:14:09 2021 +0100
arm: dts: Resync BeagleBone device trees
When commit is applied then I see the following:
starting USB... No working controllers found USB is stopped. Please issue 'usb start' first. starting USB... No working controllers found
Before the commit USB was working as expected:
starting USB... Bus usb@47401800: scanning bus usb@47401800 for devices... 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found
Device 0: Vendor: Rev: PMAP Prod: USB DISK Pro Type: Removable Hard Disk Capacity: 7381.2 MB = 7.2 GB (15116736 x 512) ... is now current device
It looks the the arch/arm/dts/am33xx.dtsi file is out of sync with Linux, leading to this regression. In the current U-Boot version, it has
status = "disabled";
lines for e.g. usb0 while in Linux mainline, those are missing. As the commit you found by bisecting drops the
status = "okay";
lines from arch/arm/dts/am335x-bone-common.dtsi, the device now are no longer enabled. Maybe try syncing am33xx.dtsi as well to check if it helps?

On Fri, Aug 6, 2021 at 12:39 PM Harald Seiler hws@denx.de wrote:
Hi,
On Fri, 2021-08-06 at 13:54 +0300, Matwey V. Kornilov wrote:
Hello,
I've found that the following commit breaks USB on BeagleBone Black board (am335x based):
commit 942853dd96df5de1c0a2a61c877c1cf1c24f1e91 Author: Paul Barker paul.barker@sancloud.com Date: Mon Jul 12 21:14:09 2021 +0100
arm: dts: Resync BeagleBone device trees
When commit is applied then I see the following:
starting USB... No working controllers found USB is stopped. Please issue 'usb start' first. starting USB... No working controllers found
Before the commit USB was working as expected:
starting USB... Bus usb@47401800: scanning bus usb@47401800 for devices... 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found
Device 0: Vendor: Rev: PMAP Prod: USB DISK Pro Type: Removable Hard Disk Capacity: 7381.2 MB = 7.2 GB (15116736 x 512) ... is now current device
It looks the the arch/arm/dts/am33xx.dtsi file is out of sync with Linux, leading to this regression. In the current U-Boot version, it has
status = "disabled";
lines for e.g. usb0 while in Linux mainline, those are missing. As the commit you found by bisecting drops the
status = "okay";
lines from arch/arm/dts/am335x-bone-common.dtsi, the device now are no longer enabled. Maybe try syncing am33xx.dtsi as well to check if it helps?
It's usual for peripheral devices to be disabled in the SoC .dtsi file, those that are actively used by devices are supposed to enable them in the device .dts so I would expect to see the appropriate bit enabling it in the device .dts.

пт, 6 авг. 2021 г. в 14:45, Peter Robinson pbrobinson@gmail.com:
On Fri, Aug 6, 2021 at 12:39 PM Harald Seiler hws@denx.de wrote:
Hi,
On Fri, 2021-08-06 at 13:54 +0300, Matwey V. Kornilov wrote:
Hello,
I've found that the following commit breaks USB on BeagleBone Black board (am335x based):
commit 942853dd96df5de1c0a2a61c877c1cf1c24f1e91 Author: Paul Barker paul.barker@sancloud.com Date: Mon Jul 12 21:14:09 2021 +0100
arm: dts: Resync BeagleBone device trees
When commit is applied then I see the following:
starting USB... No working controllers found USB is stopped. Please issue 'usb start' first. starting USB... No working controllers found
Before the commit USB was working as expected:
starting USB... Bus usb@47401800: scanning bus usb@47401800 for devices... 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found
Device 0: Vendor: Rev: PMAP Prod: USB DISK Pro Type: Removable Hard Disk Capacity: 7381.2 MB = 7.2 GB (15116736 x 512) ... is now current device
It looks the the arch/arm/dts/am33xx.dtsi file is out of sync with Linux, leading to this regression. In the current U-Boot version, it has
status = "disabled";
lines for e.g. usb0 while in Linux mainline, those are missing. As the commit you found by bisecting drops the
status = "okay";
lines from arch/arm/dts/am335x-bone-common.dtsi, the device now are no longer enabled. Maybe try syncing am33xx.dtsi as well to check if it helps?
It's usual for peripheral devices to be disabled in the SoC .dtsi file, those that are actively used by devices are supposed to enable them in the device .dts so I would expect to see the appropriate bit enabling it in the device .dts.
This may be related: https://github.com/torvalds/linux/commit/12afc0cf81210969756daecd7eb48b307f0...

On Fri, 2021-08-06 at 12:44 +0100, Peter Robinson wrote:
On Fri, Aug 6, 2021 at 12:39 PM Harald Seiler hws@denx.de wrote:
Hi,
On Fri, 2021-08-06 at 13:54 +0300, Matwey V. Kornilov wrote:
Hello,
I've found that the following commit breaks USB on BeagleBone Black board (am335x based):
commit 942853dd96df5de1c0a2a61c877c1cf1c24f1e91 Author: Paul Barker paul.barker@sancloud.com Date: Mon Jul 12 21:14:09 2021 +0100
arm: dts: Resync BeagleBone device trees
When commit is applied then I see the following:
starting USB... No working controllers found USB is stopped. Please issue 'usb start' first. starting USB... No working controllers found
Before the commit USB was working as expected:
starting USB... Bus usb@47401800: scanning bus usb@47401800 for devices... 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found
Device 0: Vendor: Rev: PMAP Prod: USB DISK Pro Type: Removable Hard Disk Capacity: 7381.2 MB = 7.2 GB (15116736 x 512) ... is now current device
It looks the the arch/arm/dts/am33xx.dtsi file is out of sync with Linux, leading to this regression. In the current U-Boot version, it has
status = "disabled";
lines for e.g. usb0 while in Linux mainline, those are missing. As the commit you found by bisecting drops the
status = "okay";
lines from arch/arm/dts/am335x-bone-common.dtsi, the device now are no longer enabled. Maybe try syncing am33xx.dtsi as well to check if it helps?
It's usual for peripheral devices to be disabled in the SoC .dtsi file, those that are actively used by devices are supposed to enable them in the device .dts so I would expect to see the appropriate bit enabling it in the device .dts.
True, but apparently this was changed for am33xx.dtsi, see Linux commit 0782e8572ce4 ("ARM: dts: Probe am335x musb with ti-sysc") [1].
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i...

пт, 6 авг. 2021 г. в 14:39, Harald Seiler hws@denx.de:
Hi,
On Fri, 2021-08-06 at 13:54 +0300, Matwey V. Kornilov wrote:
Hello,
I've found that the following commit breaks USB on BeagleBone Black board (am335x based):
commit 942853dd96df5de1c0a2a61c877c1cf1c24f1e91 Author: Paul Barker paul.barker@sancloud.com Date: Mon Jul 12 21:14:09 2021 +0100
arm: dts: Resync BeagleBone device trees
When commit is applied then I see the following:
starting USB... No working controllers found USB is stopped. Please issue 'usb start' first. starting USB... No working controllers found
Before the commit USB was working as expected:
starting USB... Bus usb@47401800: scanning bus usb@47401800 for devices... 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found
Device 0: Vendor: Rev: PMAP Prod: USB DISK Pro Type: Removable Hard Disk Capacity: 7381.2 MB = 7.2 GB (15116736 x 512) ... is now current device
It looks the the arch/arm/dts/am33xx.dtsi file is out of sync with Linux, leading to this regression. In the current U-Boot version, it has
status = "disabled";
lines for e.g. usb0 while in Linux mainline, those are missing. As the commit you found by bisecting drops the
status = "okay";
lines from arch/arm/dts/am335x-bone-common.dtsi, the device now are no longer enabled. Maybe try syncing am33xx.dtsi as well to check if it helps?
Just syncing am33xx.dtsi doesn't work. It leads to the following compiling error:
DTC arch/arm/dts/am335x-baltos.dtb Error: arch/arm/dts/.am335x-baltos.dtb.pre.tmp:436.1-9 Label or path phy_sel not found FATAL ERROR: Syntax error parsing input tree Check /build/arch/arm/dts/.am335x-baltos.dtb.pre.tmp for errors
-- Harald
DENX Software Engineering GmbH, Managing Director: Wolfgang Denk HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-62 Fax: +49-8142-66989-80 Email: hws@denx.de

USB nodes were mistakenly disabled in
commit 942853dd96df ("arm: dts: Resync BeagleBone device trees")
This commit is to fix the following issue:
starting USB... No working controllers found USB is stopped. Please issue 'usb start' first. starting USB... No working controllers found
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... Fixes: 942853dd96df ("arm: dts: Resync BeagleBone device trees") Signed-off-by: Matwey V. Kornilov matwey.kornilov@gmail.com --- arch/arm/dts/am33xx.dtsi | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/arch/arm/dts/am33xx.dtsi b/arch/arm/dts/am33xx.dtsi index ce07cec846..b5093020ee 100644 --- a/arch/arm/dts/am33xx.dtsi +++ b/arch/arm/dts/am33xx.dtsi @@ -380,28 +380,24 @@ #address-cells = <1>; #size-cells = <1>; ti,hwmods = "usb_otg_hs"; - status = "disabled";
usb_ctrl_mod: control@44e10620 { compatible = "ti,am335x-usb-ctrl-module"; reg = <0x44e10620 0x10 0x44e10648 0x4>; reg-names = "phy_ctrl", "wakeup"; - status = "disabled"; };
usb0_phy: usb-phy@47401300 { compatible = "ti,am335x-usb-phy"; reg = <0x47401300 0x100>; reg-names = "phy"; - status = "disabled"; ti,ctrl_mod = <&usb_ctrl_mod>; #phy-cells = <0>; };
usb0: usb@47401000 { compatible = "ti,musb-am33xx"; - status = "disabled"; reg = <0x47401400 0x400 0x47401000 0x200>; reg-names = "mc", "control"; @@ -443,14 +439,12 @@ compatible = "ti,am335x-usb-phy"; reg = <0x47401b00 0x100>; reg-names = "phy"; - status = "disabled"; ti,ctrl_mod = <&usb_ctrl_mod>; #phy-cells = <0>; };
usb1: usb@47401800 { compatible = "ti,musb-am33xx"; - status = "disabled"; reg = <0x47401c00 0x400 0x47401800 0x200>; reg-names = "mc", "control";

On Sat, 7 Aug 2021 14:17:38 +0300 "Matwey V. Kornilov" matwey.kornilov@gmail.com wrote:
USB nodes were mistakenly disabled in
commit 942853dd96df ("arm: dts: Resync BeagleBone device trees")
This commit is to fix the following issue:
starting USB... No working controllers found USB is stopped. Please issue 'usb start' first. starting USB... No working controllers found
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... Fixes: 942853dd96df ("arm: dts: Resync BeagleBone device trees") Signed-off-by: Matwey V. Kornilov matwey.kornilov@gmail.com
arch/arm/dts/am33xx.dtsi | 6 ------ 1 file changed, 6 deletions(-)
diff --git a/arch/arm/dts/am33xx.dtsi b/arch/arm/dts/am33xx.dtsi index ce07cec846..b5093020ee 100644 --- a/arch/arm/dts/am33xx.dtsi +++ b/arch/arm/dts/am33xx.dtsi @@ -380,28 +380,24 @@ #address-cells = <1>; #size-cells = <1>; ti,hwmods = "usb_otg_hs";
status = "disabled"; usb_ctrl_mod: control@44e10620 { compatible = "ti,am335x-usb-ctrl-module"; reg = <0x44e10620 0x10 0x44e10648 0x4>; reg-names = "phy_ctrl", "wakeup";
status = "disabled"; }; usb0_phy: usb-phy@47401300 { compatible = "ti,am335x-usb-phy"; reg = <0x47401300 0x100>; reg-names = "phy";
status = "disabled"; ti,ctrl_mod = <&usb_ctrl_mod>; #phy-cells = <0>; }; usb0: usb@47401000 { compatible = "ti,musb-am33xx";
status = "disabled"; reg = <0x47401400 0x400 0x47401000 0x200>; reg-names = "mc", "control";
@@ -443,14 +439,12 @@ compatible = "ti,am335x-usb-phy"; reg = <0x47401b00 0x100>; reg-names = "phy";
status = "disabled"; ti,ctrl_mod = <&usb_ctrl_mod>; #phy-cells = <0>; }; usb1: usb@47401800 { compatible = "ti,musb-am33xx";
status = "disabled"; reg = <0x47401c00 0x400 0x47401800 0x200>; reg-names = "mc", "control";
This looks like the right approach to me.
As you noted in your other email, just resyncing am33xx.dtsi isn't as trivial as it seems as all dts/dtsi files which include this would also need resyncing. I focused on just resyncing the files for the BeagleBone and its derivatives as that was more manageable. I did a quick check of am33xx.dtsi for potential incompatibilities but obviously missed this one, thanks for sending this patch to fix it.
Reviewed-by: Paul Barker paul.barker@sancloud.com

Hi,
On Sat, 2021-08-07 at 14:17 +0300, Matwey V. Kornilov wrote:
USB nodes were mistakenly disabled in
commit 942853dd96df ("arm: dts: Resync BeagleBone device trees")
To be precise, the problem is that only half of the device tree files were synced. am33xx.dtsi (and seemingly some more) were skipped, leading to the symptoms you found. I think it is likely that the upstream changes in am33xx.dtsi which we are missing right now will lead to more regressions of similar nature.
So I'd say we should dig deeper into the problems you encountered while attempting to just sync the entirety of am33xx.dtsi. The end goal is that all device-tree files not ending in `-uboot` match what is in Linux, so it is inevitable that someone needs to look into this anyway.

On Tue, Aug 10, 2021 at 12:04:23PM +0200, Harald Seiler wrote:
Hi,
On Sat, 2021-08-07 at 14:17 +0300, Matwey V. Kornilov wrote:
USB nodes were mistakenly disabled in
commit 942853dd96df ("arm: dts: Resync BeagleBone device trees")
To be precise, the problem is that only half of the device tree files were synced. am33xx.dtsi (and seemingly some more) were skipped, leading to the symptoms you found. I think it is likely that the upstream changes in am33xx.dtsi which we are missing right now will lead to more regressions of similar nature.
So I'd say we should dig deeper into the problems you encountered while attempting to just sync the entirety of am33xx.dtsi. The end goal is that all device-tree files not ending in `-uboot` match what is in Linux, so it is inevitable that someone needs to look into this anyway.
Yes, there is a general need to re-sync all of the TI dts files with upstream. It's unclear to me right now if a full resync on the am33xx line will produce the same set of total failure that resyncing the rest of the omap5/j6/am57xx and later families have.

On Sat, Aug 07, 2021 at 02:17:38PM +0300, Matwey V. Kornilov wrote:
USB nodes were mistakenly disabled in
commit 942853dd96df ("arm: dts: Resync BeagleBone device trees")
This commit is to fix the following issue:
starting USB... No working controllers found USB is stopped. Please issue 'usb start' first. starting USB... No working controllers found
Reference: https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?i... Fixes: 942853dd96df ("arm: dts: Resync BeagleBone device trees") Signed-off-by: Matwey V. Kornilov matwey.kornilov@gmail.com Reviewed-by: Paul Barker paul.barker@sancloud.com
Applied to u-boot/master, thanks!
participants (5)
-
Harald Seiler
-
Matwey V. Kornilov
-
Paul Barker
-
Peter Robinson
-
Tom Rini