On 13/02/2024 09:27, Krishna Kurapati wrote: > Multiport USB controller (host-only) of SA8295 ADP has 4 Type-A ports > exposed for connecting peripherals. The VBUS to these peripherals is > provided by TPS2559QWDRCTQ1 regulators connected to these ports. Each > regulator has an enable pin controlled by PMM8540. Since these regulators > are GPIO controlled regulators, model them as fixed regulators and keep > them Always-On at boot since we are wakeup capable and we don't need to > turn them off on suspend. Also since we don't enter device mode, these > regulators can be kept on. > > Signed-off-by: Krishna Kurapati <quic_kriskura@xxxxxxxxxxx> > --- > arch/arm64/boot/dts/qcom/sa8295p-adp.dts | 83 ++++++++++++++++++++++++ > 1 file changed, 83 insertions(+) > > diff --git a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > index fd253942e5e5..49418843c214 100644 > --- a/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > +++ b/arch/arm64/boot/dts/qcom/sa8295p-adp.dts > @@ -9,6 +9,7 @@ > #include <dt-bindings/gpio/gpio.h> > #include <dt-bindings/regulator/qcom,rpmh-regulator.h> > #include <dt-bindings/spmi/spmi.h> > +#include <dt-bindings/pinctrl/qcom,pmic-gpio.h> > > #include "sa8540p.dtsi" > #include "sa8540p-pmics.dtsi" > @@ -108,6 +109,46 @@ edp3_connector_in: endpoint { > }; > }; > }; > + > + regulator-usb2-vbus { > + compatible = "regulator-fixed"; > + regulator-name = "USB2_VBUS"; > + gpio = <&pmm8540c_gpios 9 GPIO_ACTIVE_HIGH>; > + pinctrl-0 = <&usb2_en>; > + pinctrl-names = "default"; > + enable-active-high; > + regulator-always-on; > + }; > + > + regulator-usb3-vbus { > + compatible = "regulator-fixed"; > + regulator-name = "USB3_VBUS"; > + gpio = <&pmm8540e_gpios 5 GPIO_ACTIVE_HIGH>; > + pinctrl-0 = <&usb3_en>; > + pinctrl-names = "default"; > + enable-active-high; > + regulator-always-on; > + }; > + > + regulator-usb4-vbus { > + compatible = "regulator-fixed"; > + regulator-name = "USB4_VBUS"; > + gpio = <&pmm8540g_gpios 5 GPIO_ACTIVE_HIGH>; > + pinctrl-0 = <&usb4_en>; > + pinctrl-names = "default"; > + enable-active-high; > + regulator-always-on; > + }; > + > + regulator-usb5-vbus { > + compatible = "regulator-fixed"; > + regulator-name = "USB5_VBUS"; > + gpio = <&pmm8540g_gpios 9 GPIO_ACTIVE_HIGH>; > + pinctrl-0 = <&usb5_en>; > + pinctrl-names = "default"; > + enable-active-high; > + regulator-always-on; Why all these regulators are always on? If USB controller does not probe for any reason, why keeping them enabled? These must not be always-on, but instead used by connector as VBUS supply (or by whatever you have there for USB). Best regards, Krzysztof