Skip to contentSkip to conversation

ARM: imx6: DHCOM i.MX6 PDK: Fix usb-otg VBUS regulator

PATCH New Harald Seiler 2 participants 2 messages Apr 16, 2020 – Apr 19, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: imx6: DHCOM i.MX6 PDK: Fix usb-otg VBUS regulator

During the conversion of this board to DM_REGULATOR, usb-mass-storage was broken and started failing with the following error:

        => ums 0 mmc 2
        UMS: LUN 0, dev 2, hwpart 0, sector 0x0, count 0xe90000
        Error enabling VBUS supply
        g_dnl_register: failed!, error: -38
        g_dnl_register failed

Fix this by adding the relevant GPIO to the regulator node.

Fixes 4ca99fe81aea ("ARM: imx: dh-imx6: Enable DM regulator")

---

Notes:

    This patch currently depends on "ARM: imx6: DHCOM i.MX6 PDK: Convert to
    DM_ETH" although this could be changed.
    
    This is a working fix but I am not 100% sure if it is the correct thing
    to do.  The device-tree contains a second regulator which already
    defines this exact GPIO:
    
    	reg_usb_h1_vbus: regulator-usb-h1-vbus {
    		compatible = "regulator-fixed";
    		regulator-name = "usb_h1_vbus";
    		regulator-min-microvolt = <5000000>;
    		regulator-max-microvolt = <5000000>;
    		gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>;
    		enable-active-high;
    	};
    
    Maybe &reg_usb_otg_vbus is superfluous and the two should be merged into
    a single regulator used for both &usbh1 and &usbotg?
 arch/arm/dts/imx6qdl-dhcom-pdk2-u-boot.dtsi | 2 ++
 arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi      | 9 +++++++++
 2 files changed, 11 insertions(+)
 create mode 100644 arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi
arch/arm/dts/imx6qdl-dhcom-pdk2-u-boot.dtsi +2 -0
index a54e421de3e4..32128d4d2ab4 100644
@@ -3,6 +3,8 @@
  * Copyright (C) 2020 Harald Seiler <[email protected]>
  */
 
+#include "imx6qdl-dhcom-u-boot.dtsi"
+
 / {
 	fec_vio: regulator-fec {
 		compatible = "regulator-fixed";
arch/arm/dts/imx6qdl-dhcom-u-boot.dtsi new file +9 -0
new file mode 100644
index 000000000000..4c3b5e82d61b
@@ -0,0 +1,9 @@
+// SPDX-License-Identifier: (GPL-2.0+)
+/*
+ * Copyright (C) 2020 Harald Seiler <[email protected]>
+ */
+
+&reg_usb_otg_vbus {
+	gpio = <&gpio3 31 GPIO_ACTIVE_HIGH>;
+	enable-active-high;
+};
Signature · 1 line
2.26.1
#1 lore raw

PATCH 1/1 ARM: imx6: DHCOM i.MX6 PDK: Fix usb-otg VBUS regulator

Quoted 10 lines

During the conversion of this board to DM_REGULATOR, usb-mass-storage was broken and started failing with the following error:

        => ums 0 mmc 2
        UMS: LUN 0, dev 2, hwpart 0, sector 0x0, count 0xe90000
        Error enabling VBUS supply
        g_dnl_register: failed!, error: -38
        g_dnl_register failed

Fix this by adding the relevant GPIO to the regulator node.

Fixes 4ca99fe81aea ("ARM: imx: dh-imx6: Enable DM regulator")

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================