ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
Subsystems (2)
PATCH 1/1 ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
This patch fixes the Meson6, Meson8 and Meson8b USB controllers dts nodes which interrupts are level type instead of edge type.
This avoids errors like "usb 1-1-port1: cannot reset (err = -110)" and similars on Odroid-C1+ board.
--- arch/arm/boot/dts/meson.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/meson.dtsi +2 -2
@@ -217,7 +217,7 @@ #address-cells = <1>; #size-cells = <0>; reg = <0xc9040000 0x40000>; - interrupts = <GIC_SPI 30 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; phys = <&usb0_phy>; phy-names = "usb2-phy"; dr_mode = "host";
@@ -229,7 +229,7 @@ #address-cells = <1>; #size-cells = <0>; reg = <0xc90c0000 0x40000>; - interrupts = <GIC_SPI 31 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; phys = <&usb1_phy>; phy-names = "usb2-phy"; dr_mode = "host";
Signature · 1 line
2.14.1
Martin Blumenstingl
reviewerPATCH 1/1 ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
Quoted 8 lines · Emiliano Ingrassia
This patch fixes the Meson6, Meson8 and Meson8b USB controllers dts nodes which interrupts are level type instead of edge type.
This avoids errors like "usb 1-1-port1: cannot reset (err = -110)" and similars on Odroid-C1+ board.Fixes e29b1cf87473 ("ARM: dts: meson: add USB support on Meson8 and Meson8b")Signed-off-by Emiliano Ingrassia <[email protected]>
USB on my Meson8 (Meson8m2 to be exact) board still works fine (just like before - maybe that was a fluke though...), confirmed by reading a USB thumb drive to /dev/null:
as well as (me being the one who originally didn't do this right):
Quoted 29 lines
--- arch/arm/boot/dts/meson.dtsi | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)arch/arm/boot/dts/meson.dtsi +2
-3@@ -217,7 +217,7 @@ #address-cells = <1>; #size-cells = <0>; reg = <0xc9040000 0x40000>; - interrupts = <GIC_SPI 30 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>; phys = <&usb0_phy>; phy-names = "usb2-phy"; dr_mode = "host";@@ -229,7 +229,7 @@ #address-cells = <1>; #size-cells = <0>; reg = <0xc90c0000 0x40000>; - interrupts = <GIC_SPI 31 IRQ_TYPE_EDGE_RISING>; + interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>; phys = <&usb1_phy>; phy-names = "usb2-phy"; dr_mode = "host"; --2.14.1
PATCH 1/1 ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
Quoted 8 lines · Martin Blumenstingl
Quoted 3 lines
Fixes e29b1cf87473 ("ARM: dts: meson: add USB support on Meson8 and Meson8b")Signed-off-by Emiliano Ingrassia <[email protected]>USB on my Meson8 (Meson8m2 to be exact) board still works fine (just like before - maybe that was a fluke though...), confirmed by reading a USB thumb drive to
/dev/null:
Quoted 5 lines
Tested-by Martin Blumenstingl <[email protected]>as well as (me being the one who originally didn't do this right):
Signed-off-by Martin Blumenstingl <[email protected]>
As the freezes seems to be caused by something else and stress-ng works fine for me now on an Odroid C1+ (at least with the reserved memory regions):
Cheers
PATCH 1/1 ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
In reply to Emiliano IngrassiaQuoted 8 lines · Emiliano Ingrassia
This patch fixes the Meson6, Meson8 and Meson8b USB controllers dts nodes which interrupts are level type instead of edge type.
This avoids errors like "usb 1-1-port1: cannot reset (err = -110)" and similars on Odroid-C1+ board.Fixes e29b1cf87473 ("ARM: dts: meson: add USB support on Meson8 and Meson8b")Signed-off-by Emiliano Ingrassia <[email protected]>
Hi Emiliano,
Yes! I can confirm that these two patches made me able to boot a Debian unstable from a USB stick on an Odroid C1+ for the first time. I tested both a v4.13.2 kernel and a v4.14-rc1 with the SMP patches included.
I'm having one oddity with the stress-ng tool though: Several filesystem related tests make the Odroid hang for me. This works for me:
$ cd /tmp/; time stress-ng -v --class filesystem --sequential 1 --exclude copy-file -t 30s (with /tmp being a tmpfs)
Those tests make the system hang for me almost immediately, though:
$ cd ~/; time stress-ng -v -t 30s --chdir 1 $ cd ~/; time stress-ng -v -t 30s --dir 1 $ cd ~/; time stress-ng -v -t 30s --dirdeep 1 $ cd ~/; time stress-ng -v -t 30s --fallocate 1 $ cd ~/; time stress-ng -v -t 30s --mknod 1 $ cd ~/; time stress-ng -v -t 30s --sync-file 1 $ cd ~/; time stress-ng -v -t 30s --xattr 1
Unfortunately, there is no error message on my serial console then, it just hangs silently with the heartbeat LED stopping to blink.
I also tried:
* Using a USB connected hdd instead of the USB flash drive, with an actively powered USB hub in between.
* Using a clean v4.13.2 with the patched v4.14-rc1 DTB file instead of v4.14-rc1 kernel (with the SMP patches included).
Both without success. I also experienced a two freezes while apt-get installing a few patches.
Anyone having an idea how I could make those crashes more verbose or what else I could try? Or could it be that it freezes so silently due to some sort of internal power issues? (I got a little paranoid with power stuff since the confirmed, hardware related power issues on the Odroid U3)
Regards, Linus
PATCH 1/1 ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
Quoted 4 lines
Or could it be that it freezes
so silently due to some sort of internal power issues? (I got a little paranoid with power stuff since the confirmed, hardware related power issues on the Odroid U3)
Although the USB powering seems to work way better with the Odroid C1+ than with my Odroid U3:
When connecting the HDD via USB directly without the HUB, I can hear the disk trying to spin up, then audibly failing (while spin-up with the actively powered HUB works just fine). Even though the kernel tries to respin it again and again, the system itself stays stable.
On the Odroid U3, connecting this HDD via USB would make the Odroid U3 crash or the internal USB hub or ethernet device (internally wired to the same USB chip, if I understood correctly?) vanish for me.
(So probably not a power issue on the Odroid C1+?)
Regards, Linus
PATCH 1/1 ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
In reply to Linus LüssingQuoted 10 lines · Linus L?ssing
Quoted 8 lines · Emiliano Ingrassia
This patch fixes the Meson6, Meson8 and Meson8b USB controllers dts nodes which interrupts are level type instead of edge type.
This avoids errors like "usb 1-1-port1: cannot reset (err = -110)" and similars on Odroid-C1+ board.Fixes e29b1cf87473 ("ARM: dts: meson: add USB support on Meson8 and Meson8b")Signed-off-by Emiliano Ingrassia <[email protected]>
Hi Linus,
Quoted 7 lines
Hi Emiliano,
Yes! I can confirm that these two patches made me able to boot a Debian unstable from a USB stick on an Odroid C1+ for the first time. I tested both a v4.13.2 kernel and a v4.14-rc1 with the SMP patches included.
Good to hear! Thanks for testing.
Quoted 10 lines
I'm having one oddity with the stress-ng tool though: Several filesystem related tests make the Odroid hang for me. This works for me:
$ cd /tmp/; time stress-ng -v --class filesystem --sequential 1 --exclude copy-file -t 30s (with /tmp being a tmpfs)Those tests make the system hang for me almost immediately, though:
Quoted 8 lines
$ cd ~/; time stress-ng -v -t 30s --chdir 1 $ cd ~/; time stress-ng -v -t 30s --dir 1 $ cd ~/; time stress-ng -v -t 30s --dirdeep 1 $ cd ~/; time stress-ng -v -t 30s --fallocate 1 $ cd ~/; time stress-ng -v -t 30s --mknod 1 $ cd ~/; time stress-ng -v -t 30s --sync-file 1 $ cd ~/; time stress-ng -v -t 30s --xattr 1
I'm sorry, as soon as I can I'll try those tests on my board.
Quoted 6 lines
Unfortunately, there is no error message on my serial console then, it just hangs silently with the heartbeat LED stopping to blink.
I also tried:
Quoted 8 lines
* Using a USB connected hdd instead of the USB flash drive, with an actively powered USB hub in between.
* Using a clean v4.13.2 with the patched v4.14-rc1 DTB file instead of v4.14-rc1 kernel (with the SMP patches included).Both without success. I also experienced a two freezes while apt-get installing a few patches.
Could you list all the kernels you have tried (included versions and patches) ?
Quoted 7 lines
Anyone having an idea how I could make those crashes more verbose or what else I could try? Or could it be that it freezes so silently due to some sort of internal power issues? (I got a little paranoid with power stuff since the confirmed, hardware related power issues on the Odroid U3)
Regards, Linus
Regards,
Emiliano
PATCH 1/1 ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
Quoted 1 line · Emiliano Ingrassia
Could you list all the kernels you have tried (included versions and patches) ?
I tried your two patches with:
A) a clean multi_v7_defconfig and no extra patches on:
* 4.13.2
* 4.13.3
B) a multi_v7_defconfig excluding CONFIG_DRM_TEGRA (causes build errors):
* 4.14.0-rc1, no extra patches
* 4.14.0-rc2, no extra patches
* 4.14.0-rc1, with SMP patches [0]
All these kernels hung for me for the mentioned stress-ng tests almost immediately.
I was also lucky to at least get a glimpse at a kernel crash output during a chdir test once. Unfortunately still cut very early:
~~~
[ 97.499390] Unhandled fault: external abort on non-linefetch (0x1008) at 0
~~~
Regards, Linus
[0]:
81d519f ARM: dts: meson8b: add support for booting the secondary CPU cores 85ded56 ARM: dts: meson8: add support for booting the secondary CPU cores c70daa9 ARM: meson: Add SMP bringup code for Meson8 and Meson8b a39342c ARM: smp_scu: allow the platform code to read the SCU CPU status 0b1863d ARM: smp_scu: add a helper for powering on a specific CPU 27efddb dt-bindings: Amlogic: Add Meson8 and Meson8b SMP related documentation
PATCH 1/1 ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
Hi,
I just noticed this patch from Martin:
8a7f0c5 ARM: dts: meson8: add reserved memory zones
And I simply copied those two reserved memory regions from meson8.dtsi to meson8b.dtsi.
It worked :-) \o/.
It fixed the following issues for me all together:
* stress-ng filesystem stressors as mentioned in previous mail all worked now
* stress-ng memory tests now worked without either not hanging the kernel or at least:
* fixed the OOM killer and reboot-on-panic. Before, on OOM the system would just freeze silently, even with reboot-on-panic configured (vm.panic_on_oom=1, kernel.panic=10 in systctl.conf)
* fixed reboots. Before, a "$ reboot" would result in shutdown just fine, but would hang when trying to load the kernel again, right after u-boot (last line: "Starting kernel ...")
Regards, Linus
PATCH 1/1 ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
Hi Linus,
Quoted 13 lines · Linus L?ssing
Hi,
I just noticed this patch from Martin:
8a7f0c5 ARM: dts: meson8: add reserved memory zones
And I simply copied those two reserved memory regions from
meson8.dtsitomeson8b.dtsi.It worked :-) \o/.
It fixed the following issues for me all together:
Quoted 11 lines
* stress-ng filesystem stressors as mentioned in previous mail all worked now
* stress-ng memory tests now worked without either not hanging the kernel or at least:
* fixed the OOM killer and reboot-on-panic. Before, on OOM the system would just freeze silently, even with reboot-on-panic configured (vm.panic_on_oom=1, kernel.panic=10 in systctl.conf)
* fixed reboots. Before, a "$ reboot" would result in shutdown just fine, but would hang when trying to load the kernel again, right after u-boot (last line: "Starting kernel ...")
Great work!
Would you mind to submit the same patch for Meson8b or ask Martin to do it ?
Quoted 1 line
Regards, Linus
Thank you,
Emiliano
PATCH 1/1 ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
In reply to Emiliano IngrassiaQuoted 8 lines · Emiliano Ingrassia
This patch fixes the Meson6, Meson8 and Meson8b USB controllers dts nodes which interrupts are level type instead of edge type.
This avoids errors like "usb 1-1-port1: cannot reset (err = -110)" and similars on Odroid-C1+ board.Fixes e29b1cf87473 ("ARM: dts: meson: add USB support on Meson8 and Meson8b")Signed-off-by Emiliano Ingrassia <[email protected]>
Applied to v4.15/dt,
Thanks,
Kevin