Skip to contentSkip to conversation

arm64: dts: amlogic: odroid-n2: set usb-pwr-en regulator always on

PATCH In review Anand Moon 2 participants 3 messages Feb 16, 2020 – Feb 17, 2020

Subsystems (2)
lore
Share & tools
lore

Anand Moon

author
#0 lore raw

PATCH 1/1 arm64: dts: amlogic: odroid-n2: set usb-pwr-en regulator always on

usb-pwr-en regulator is getting disable after booting, setting regulator-alway-on help enable the regulator after booting.

[   31.766097] USB_PWR_EN: disabling
Fixes c35f6dc5c377 (arm64: dts: meson: Add minimal support for Odroid-N2)
Cc Martin Blumenstingl <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Neil Armstrong <[email protected]>

---
Patch generated on top of my earier patch.
[0] https://patchwork.kernel.org/patch/11384531/
[1] https://patchwork.kernel.org/patch/11384533/

Before
[root@alarm ~]# cat /sys/kernel/debug/regulator/regulator_summary | grep USB
USB_PWR_EN 0 1 0 unknown 5000mV 0mA 5000mV 5000mV
After
[root@alarm ~]# cat /sys/kernel/debug/regulator/regulator_summary | grep USB
USB_PWR_EN 1 1 0 unknown 5000mV 0mA 5000mV 5000mV

---
 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts +1 -0
index 23eddff85fe5..938a9e15adfc 100644
@@ -177,6 +177,7 @@ usb_pwr_en: regulator-usb_pwr_en {
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		vin-supply = <&vcc_5v>;
+		regulator-always-on;
 
 		/* Connected to the microUSB port power enable */
 		gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
Signature · 1 line
2.25.0
reviewer
#1 lore raw
Quoted 2 lines · Anand Moon

usb-pwr-en regulator is getting disable after booting, setting regulator-alway-on help enable the regulator after booting.

This explains what your patch does, not why it needs to be done. Why does this regulator need be on at all time ? What device needs it and cannot claim it properly ?

Quoted 35 lines
[   31.766097] USB_PWR_EN: disabling
Fixes c35f6dc5c377 (arm64: dts: meson: Add minimal support for Odroid-N2)
Cc Martin Blumenstingl <[email protected]>
Cc Jerome Brunet <[email protected]>
Cc Neil Armstrong <[email protected]>

---
Patch generated on top of my earier patch.
[0] https://patchwork.kernel.org/patch/11384531/
[1] https://patchwork.kernel.org/patch/11384533/

Before
[root@alarm ~]# cat /sys/kernel/debug/regulator/regulator_summary | grep USB
USB_PWR_EN 0 1 0 unknown 5000mV 0mA 5000mV 5000mV
After
[root@alarm ~]# cat /sys/kernel/debug/regulator/regulator_summary | grep USB
USB_PWR_EN 1 1 0 unknown 5000mV 0mA 5000mV 5000mV

---
 arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/amlogic/meson-g12b-odroid-n2.dts +1 -0
index 23eddff85fe5..938a9e15adfc 100644
@@ -177,6 +177,7 @@ usb_pwr_en: regulator-usb_pwr_en {
 		regulator-min-microvolt = <5000000>;
 		regulator-max-microvolt = <5000000>;
 		vin-supply = <&vcc_5v>;
+		regulator-always-on;
 
 		/* Connected to the microUSB port power enable */
 		gpio = <&gpio GPIOH_6 GPIO_ACTIVE_HIGH>;
author
#2 lore raw

Hi Jerome,

Quoted 11 lines · Jerome Brunet
Quoted 2 lines · Anand Moon

usb-pwr-en regulator is getting disable after booting, setting regulator-alway-on help enable the regulator after booting.

This explains what your patch does, not why it needs to be done. Why does this regulator need be on at all time ? What device needs it and cannot claim it properly ?

I missed this node is for micro usb, plz discard this patch. I am relay sorry for this, sorry for the noise.

-Anand