2021-07-16 10:41:04

by Anand Moon

[permalink] [raw]
Subject: [PATCHv2 0/4] Meson-8b and Meson-gxbb Fix some missing code

On Odroid C1+ and Odroid C2 USB feature is broken

It's being observed the after initiation of USB phy
the USB port goes in to suspend state, If we pass usbcore.autosuspend=-1
via command line USB hotplug seen to be working.

Another issue I observed is increase of USB interrupts event
even if there is not much activity on USB ports.

$ cat /proc/interrupts | grep usb
35: 26462800 0 0 0 GIC-0 63 Level
c90c0000.usb, dwc2_hsotg:usb1

Changes added power node to usb phy and small code cleanup
in usb phy.

Previous version RFC.
[0] https://patchwork.kernel.org/project/linux-amlogic/cover/[email protected]/
Dopped the reoder of code changes as of now.

V1 > changes Fixed the GPIO input signal on Odroid C1+/C2
New patch added to fix Odroid C2.

Thanks
-Anand

Anand Moon (4):
ARM: dts: meson8b: odroidc1: Add usb phy power node
arm64: dts: amlogic: odroidc2: Fix the chip enable signal for usb
power
phy: amlogic: meson8b-usb2: Power off the PHY by putting it into reset
mode
phy: amlogic: meson8b-usb2: don't log an error on -EPROBE_DEFER

arch/arm/boot/dts/meson8b-odroidc1.dts | 19 +++++++++++++++++++
.../boot/dts/amlogic/meson-gxbb-odroidc2.dts | 7 +++----
drivers/phy/amlogic/phy-meson8b-usb2.c | 8 ++++++--
3 files changed, 28 insertions(+), 6 deletions(-)

--
2.32.0


2021-07-16 10:42:10

by Anand Moon

[permalink] [raw]
Subject: [PATCHv2 2/4] arm64: dts: amlogic: odroidc2: Fix the chip enable signal for usb power

Fix the chip enable signal changing from Active High to Active Low
to enable input power to USB power. Also updated signal name as per
the shematics.

Fixes: 5a0803bd5ae2 ("ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes")

Cc: Martin Blumenstingl <[email protected]>
Signed-off-by: Anand Moon <[email protected]>
---
New patch in this series
---
arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 201596247fd9..3f4f16a5dedd 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -38,12 +38,11 @@ usb_otg_pwr: regulator-usb-pwrs {
regulator-max-microvolt = <5000000>;

/*
- * signal name from schematics: PWREN
+ * signal name from schematics: PWREN - GPIOAO.BIT5
*/
- gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
- enable-active-high;
+ gpios = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_LOW>;
/*
- * signal name from schematics: USB_POWER
+ * signal name from schematics: USB_POWER - P5V0
*/
vin-supply = <&p5v0>;
};
--
2.32.0

2021-07-17 20:01:24

by Martin Blumenstingl

[permalink] [raw]
Subject: Re: [PATCHv2 2/4] arm64: dts: amlogic: odroidc2: Fix the chip enable signal for usb power

Hi Anand,

On Fri, Jul 16, 2021 at 12:38 PM Anand Moon <[email protected]> wrote:
>
> Fix the chip enable signal changing from Active High to Active Low
> to enable input power to USB power. Also updated signal name as per
> the shematics.
typo: shematics -> schematics

>
> Fixes: 5a0803bd5ae2 ("ARM64: dts: meson-gxbb-odroidc2: Enable USB Nodes")
>
> Cc: Martin Blumenstingl <[email protected]>
I don't have an Odroid-C2 so I will not be able to review this as well
as the Odroid-C1 patch.
My suggestion is that we discuss the Odroid-C1 patch first as that's
some hardware that we both have.
Once I understand how the Odroid-C1 patch works I can at least give my
Acked-by on the Odroid-C2 change.


Best regards,
Martin