All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
@ 2017-09-22 11:57 Emiliano Ingrassia
  2017-09-23 13:15 ` Martin Blumenstingl
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Emiliano Ingrassia @ 2017-09-22 11:57 UTC (permalink / raw)
  To: linus-amlogic

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 <ingrassia@epigenesys.com>
---
 arch/arm/boot/dts/meson.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi
index cd6ad072e72c..bf270806a688 100644
--- a/arch/arm/boot/dts/meson.dtsi
+++ b/arch/arm/boot/dts/meson.dtsi
@@ -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

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

* [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
  2017-09-22 11:57 [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b Emiliano Ingrassia
@ 2017-09-23 13:15 ` Martin Blumenstingl
  2017-09-28 16:35   ` Linus Lüssing
  2017-09-24  4:28 ` Linus Lüssing
  2017-10-06 22:24 ` Kevin Hilman
  2 siblings, 1 reply; 10+ messages in thread
From: Martin Blumenstingl @ 2017-09-23 13:15 UTC (permalink / raw)
  To: linus-amlogic

On Fri, Sep 22, 2017 at 1:57 PM, Emiliano Ingrassia
<ingrassia@epigenesys.com> wrote:
> 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 <ingrassia@epigenesys.com>

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:

Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

as well as (me being the one who originally didn't do this right):

Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

> ---
>  arch/arm/boot/dts/meson.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/arch/arm/boot/dts/meson.dtsi b/arch/arm/boot/dts/meson.dtsi
> index cd6ad072e72c..bf270806a688 100644
> --- a/arch/arm/boot/dts/meson.dtsi
> +++ b/arch/arm/boot/dts/meson.dtsi
> @@ -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
>

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

* [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
  2017-09-22 11:57 [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b Emiliano Ingrassia
  2017-09-23 13:15 ` Martin Blumenstingl
@ 2017-09-24  4:28 ` Linus Lüssing
  2017-09-24  4:42   ` Linus Lüssing
  2017-09-25 22:48   ` Emiliano Ingrassia
  2017-10-06 22:24 ` Kevin Hilman
  2 siblings, 2 replies; 10+ messages in thread
From: Linus Lüssing @ 2017-09-24  4:28 UTC (permalink / raw)
  To: linus-amlogic

On Fri, Sep 22, 2017 at 01:57:08PM +0200, Emiliano Ingrassia wrote:
> 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 <ingrassia@epigenesys.com>

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

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

* [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
  2017-09-24  4:28 ` Linus Lüssing
@ 2017-09-24  4:42   ` Linus Lüssing
  2017-09-25 22:48   ` Emiliano Ingrassia
  1 sibling, 0 replies; 10+ messages in thread
From: Linus Lüssing @ 2017-09-24  4:42 UTC (permalink / raw)
  To: linus-amlogic

> 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

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

* [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
  2017-09-24  4:28 ` Linus Lüssing
  2017-09-24  4:42   ` Linus Lüssing
@ 2017-09-25 22:48   ` Emiliano Ingrassia
  2017-09-28 14:51     ` Linus Lüssing
  1 sibling, 1 reply; 10+ messages in thread
From: Emiliano Ingrassia @ 2017-09-25 22:48 UTC (permalink / raw)
  To: linus-amlogic

On Sun, Sep 24, 2017 at 06:28:03AM +0200, Linus L?ssing wrote:
> On Fri, Sep 22, 2017 at 01:57:08PM +0200, Emiliano Ingrassia wrote:
> > 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 <ingrassia@epigenesys.com>
> 

Hi Linus,

> 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.

> 
> 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
> 

I'm sorry, as soon as I can I'll try those tests on my board.

> 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.
>

Could you list all the kernels you have tried (included versions and 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

Regards,

Emiliano

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

* [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
  2017-09-25 22:48   ` Emiliano Ingrassia
@ 2017-09-28 14:51     ` Linus Lüssing
  2017-09-28 15:56       ` Linus Lüssing
  0 siblings, 1 reply; 10+ messages in thread
From: Linus Lüssing @ 2017-09-28 14:51 UTC (permalink / raw)
  To: linus-amlogic

On Tue, Sep 26, 2017 at 12:48:02AM +0200, Emiliano Ingrassia wrote:
> 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

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

* [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
  2017-09-28 14:51     ` Linus Lüssing
@ 2017-09-28 15:56       ` Linus Lüssing
  2017-09-28 18:37         ` Emiliano Ingrassia
  0 siblings, 1 reply; 10+ messages in thread
From: Linus Lüssing @ 2017-09-28 15:56 UTC (permalink / raw)
  To: linus-amlogic

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

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

* [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
  2017-09-23 13:15 ` Martin Blumenstingl
@ 2017-09-28 16:35   ` Linus Lüssing
  0 siblings, 0 replies; 10+ messages in thread
From: Linus Lüssing @ 2017-09-28 16:35 UTC (permalink / raw)
  To: linus-amlogic

On Sat, Sep 23, 2017 at 03:15:23PM +0200, Martin Blumenstingl wrote:
> > Fixes: e29b1cf87473 ("ARM: dts: meson: add USB support on Meson8 and Meson8b")
> >
> > Signed-off-by: Emiliano Ingrassia <ingrassia@epigenesys.com>
> 
> 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:
> 
> Tested-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> 
> as well as (me being the one who originally didn't do this right):
> 
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>

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):

Tested-by: Linus L?ssing <linus.luessing@c0d3.blue>

Cheers

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

* [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
  2017-09-28 15:56       ` Linus Lüssing
@ 2017-09-28 18:37         ` Emiliano Ingrassia
  0 siblings, 0 replies; 10+ messages in thread
From: Emiliano Ingrassia @ 2017-09-28 18:37 UTC (permalink / raw)
  To: linus-amlogic

Hi Linus,

On Thu, Sep 28, 2017 at 05:56:26PM +0200, Linus L?ssing wrote:
> 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 ...")
> 

Great work!

Would you mind to submit the same patch for Meson8b or ask Martin to do it ?

> Regards, Linus

Thank you,

Emiliano

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

* [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b
  2017-09-22 11:57 [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b Emiliano Ingrassia
  2017-09-23 13:15 ` Martin Blumenstingl
  2017-09-24  4:28 ` Linus Lüssing
@ 2017-10-06 22:24 ` Kevin Hilman
  2 siblings, 0 replies; 10+ messages in thread
From: Kevin Hilman @ 2017-10-06 22:24 UTC (permalink / raw)
  To: linus-amlogic

Emiliano Ingrassia <ingrassia@epigenesys.com> writes:

> 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 <ingrassia@epigenesys.com>

Applied to v4.15/dt,

Thanks,

Kevin

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

end of thread, other threads:[~2017-10-06 22:24 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-09-22 11:57 [PATCH] ARM: dts: meson: fixing USB support on Meson6, Meson8 and Meson8b Emiliano Ingrassia
2017-09-23 13:15 ` Martin Blumenstingl
2017-09-28 16:35   ` Linus Lüssing
2017-09-24  4:28 ` Linus Lüssing
2017-09-24  4:42   ` Linus Lüssing
2017-09-25 22:48   ` Emiliano Ingrassia
2017-09-28 14:51     ` Linus Lüssing
2017-09-28 15:56       ` Linus Lüssing
2017-09-28 18:37         ` Emiliano Ingrassia
2017-10-06 22:24 ` Kevin Hilman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.