Linux-Amlogic Archive on lore.kernel.org
 help / Atom feed
* [PATCHv2 0/1] PATCHv2 Odroid c1+ usb fixes
@ 2019-02-09 17:54 Anand Moon
  2019-02-09 17:54 ` [PATCHv2 1/1] ARM: dts: meson8b: odroidc1: fix USB power supplies for phy Anand Moon
  0 siblings, 1 reply; 2+ messages in thread
From: Anand Moon @ 2019-02-09 17:54 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel, linux-amlogic
  Cc: Martin Blumenstingl, Kevin Hilman, Rob Herring

From my side this changes fix the usb power issue on usb1 ports
This is follow up on my previous patches.

Changes from prevoius patch drop the initialization of usb0 otg port.

RFC 
[0] https://patchwork.kernel.org/patch/10777359/
[1] https://patchwork.kernel.org/patch/10777369/

Patch v0
[0] https://lore.kernel.org/patchwork/patch/1031616/
[1] https://lore.kernel.org/patchwork/patch/1031617/

As per Martin's suggestion and input I have tried to fix below issue.

Fixed the phy power issue on the usb port.

# cat /sys/kernel/debug/regulator/regulator_summary
 regulator                      use open bypass  opmode voltage current     min     max
---------------------------------------------------------------------------------------
 regulator-dummy                  4    3      0 unknown     0mV     0mA     0mV     0mV
    c90c0000.usb                  1                                 0mA     0mV     0mV
    c90c0000.usb                  1                                 0mA     0mV     0mV
    VCCK                          1    1      0 unknown   860mV     0mA   860mV  1140mV
       cpu0                       0                                 0mA   860mV   860mV
 P5V0                             3    4      0 unknown  5000mV     0mA  5000mV  5000mV
    VCC1V8                        1    1      0 unknown  1800mV     0mA  1800mV  1800mV
       c1108680.adc               1                                 0mA     0mV     0mV
    VCC3V3                        1    2      0 unknown  3300mV     0mA  3300mV  3300mV
       VDD_RTC                    0    0      0 unknown   900mV     0mA   900mV   900mV
       TFLASH_VDD                 1    1      0 unknown  3300mV     0mA  3300mV  3300mV
          c1108c20.mmc:slot@1     1                                 0mA  3300mV  3400mV
    DDR_VDDC                      0    0      0 unknown  1500mV     0mA  1500mV  1500mV
    USB_VBUS                      2    1      0 unknown  5000mV     0mA  5000mV  5000mV
       phy-c1108820.phy.0         2                                 0mA     0mV     0mV
 TF_IO                            0    1      0 unknown  3300mV     0mA  1800mV  3300mV

# lsusb -t
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=dwc2/1p, 480M
    |__ Port 1: Dev 2, If 0, Class=Hub, Driver=hub/4p, 480M
        |__ Port 1: Dev 3, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 2: Dev 4, If 0, Class=Mass Storage, Driver=usb-storage, 480M
        |__ Port 3: Dev 5, If 0, Class=Video, Driver=uvcvideo, 480M
        |__ Port 3: Dev 5, If 1, Class=Video, Driver=uvcvideo, 480M
        |__ Port 3: Dev 5, If 2, Class=Audio, Driver=snd-usb-audio, 480M
        |__ Port 3: Dev 5, If 3, Class=Audio, Driver=snd-usb-audio, 480M
        |__ Port 4: Dev 6, If 0, Class=Mass Storage, Driver=usb-storage, 480M

 
Now hotpluing of usb device is working on odroid c1+ boards.
TODO: need to initialize the otg usb port to accept usb device.

Any input are welcome 

Best Regards
-Anand

Anand Moon (1):
  ARM: dts: meson8b: odroidc1: fix USB power supplies for phy

 arch/arm/boot/dts/meson8b-odroidc1.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

* [PATCHv2 1/1] ARM: dts: meson8b: odroidc1: fix USB power supplies for phy
  2019-02-09 17:54 [PATCHv2 0/1] PATCHv2 Odroid c1+ usb fixes Anand Moon
@ 2019-02-09 17:54 ` Anand Moon
  0 siblings, 0 replies; 2+ messages in thread
From: Anand Moon @ 2019-02-09 17:54 UTC (permalink / raw)
  To: devicetree, linux-arm-kernel, linux-amlogic
  Cc: Martin Blumenstingl, Kevin Hilman, Rob Herring, Neil Armstrong,
	Jerome Brunet

From the shematics GPIOAO.BIT5 gpio input for the PWREN signal of the
USB_HOST controller (usb1), add missing phy-supply link for USB1 phy
controller this changes fixed the power issue on usb ports.
Changes help fix usb reset warning.

[   59.693078] usb 1-1.3: reset high-speed USB device number 6 using dwc2
[   62.703039] usb 1-1.3: reset high-speed USB device number 6 using dwc2
[   65.693073] usb 1-1.3: reset high-speed USB device number 6 using dwc2
[   68.703030] usb 1-1.3: reset high-speed USB device number 6 using dwc2
[   72.080440] usb 1-1.3: USB disconnect, device number 6

Fixes: 2eb79a4d15ff ("ARM: dts: meson: enabling the USB Host controller on Odroid-C1/C1+ board")
Cc: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: Jerome Brunet <jbrunet@baylibre.com>
Cc: Neil Armstrong <narmstrong@baylibre.com>
Cc: Kevin Hilman <khilman@baylibre.com>
Signed-off-by: Anand Moon <linux.amoon@gmail.com>
---
 regulator                      use open bypass  opmode voltage current     min     max
---------------------------------------------------------------------------------------
 regulator-dummy                  4    3      0 unknown     0mV     0mA     0mV     0mV
    c90c0000.usb                  1                                 0mA     0mV     0mV
    c90c0000.usb                  1                                 0mA     0mV     0mV
    VCCK                          1    1      0 unknown   860mV     0mA   860mV  1140mV
       cpu0                       0                                 0mA   860mV   860mV
 P5V0                             3    4      0 unknown  5000mV     0mA  5000mV  5000mV
    VCC1V8                        1    1      0 unknown  1800mV     0mA  1800mV  1800mV
       c1108680.adc               1                                 0mA     0mV     0mV
    VCC3V3                        1    2      0 unknown  3300mV     0mA  3300mV  3300mV
       VDD_RTC                    0    0      0 unknown   900mV     0mA   900mV   900mV
       TFLASH_VDD                 1    1      0 unknown  3300mV     0mA  3300mV  3300mV
          c1108c20.mmc:slot@1     1                                 0mA  3300mV  3400mV
    DDR_VDDC                      0    0      0 unknown  1500mV     0mA  1500mV  1500mV
    USB_VBUS                      2    1      0 unknown  5000mV     0mA  5000mV  5000mV
       phy-c1108820.phy.0         2                                 0mA     0mV     0mV
---
 arch/arm/boot/dts/meson8b-odroidc1.dts | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/arch/arm/boot/dts/meson8b-odroidc1.dts b/arch/arm/boot/dts/meson8b-odroidc1.dts
index 0f0a46ddf3ff..00f2bb1a68f4 100644
--- a/arch/arm/boot/dts/meson8b-odroidc1.dts
+++ b/arch/arm/boot/dts/meson8b-odroidc1.dts
@@ -83,6 +83,20 @@
 		regulator-max-microvolt = <5000000>;
 	};
 
+	usb_vbus: regulator-usb-vbus {
+		compatible = "regulator-fixed";
+
+		regulator-name = "USB_VBUS";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		/*
+		 * signal name from schematics: PWREN
+		 */
+		gpio = <&gpio_ao GPIOAO_5 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		vin-supply = <&p5v0>;
+	};
+
 	tflash_vdd: regulator-tflash_vdd {
 		/*
 		 * signal name from schematics: TFLASH_VDD_EN
@@ -295,6 +309,7 @@
 
 &usb1_phy {
 	status = "okay";
+	phy-supply = <&usb_vbus>;
 };
 
 &usb1 {
-- 
2.20.1


_______________________________________________
linux-amlogic mailing list
linux-amlogic@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-amlogic

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-02-09 17:54 [PATCHv2 0/1] PATCHv2 Odroid c1+ usb fixes Anand Moon
2019-02-09 17:54 ` [PATCHv2 1/1] ARM: dts: meson8b: odroidc1: fix USB power supplies for phy Anand Moon

Linux-Amlogic Archive on lore.kernel.org

Archives are clonable:
	git clone --mirror https://lore.kernel.org/linux-amlogic/0 linux-amlogic/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 linux-amlogic linux-amlogic/ https://lore.kernel.org/linux-amlogic \
		linux-amlogic@lists.infradead.org linux-amlogic@archiver.kernel.org
	public-inbox-index linux-amlogic


Newsgroup available over NNTP:
	nntp://nntp.lore.kernel.org/org.infradead.lists.linux-amlogic


AGPL code for this site: git clone https://public-inbox.org/ public-inbox