Change USB OC and PWR for USBH and USBC on iMX8DX

Hello,

Sorry for the delay.

I have lost a bit of information since my initial request but here is what I have roughly tested:

I have :

  • created a regulator definition that is using SODIMM 129
reg_usbc_vbus: regulator-usbc-vbus {
		compatible = "regulator-fixed";
		pinctrl-names = "default";
		pinctrl-0 = <&pinctrl_usbc1_reg>;
		regulator-name = "usbc_vbus";
		regulator-min-microvolt = <5000000>;
		regulator-max-microvolt = <5000000>;
		gpio = <&lsio_gpio4 3 GPIO_ACTIVE_LOW>;
};
  • adapted the USBC to use this regulator
&usbotg1 {
	vbus-supply = <&reg_usbc_vbus>;
	ci-disable-lpm;
	over-current-active-low;
	power-active-high;
};
  • also changed the regulator of USBH to use SODIMM 133
&reg_usbh_vbus {
		pinctrl-0 = <&pinctrl_usbh1_reg>;
		gpio = <&lsio_gpio4 4 GPIO_ACTIVE_LOW>;
};
  • and adapted the USBH to use this regulator
&usbotg3 {
	pinctrl-names = "default";
	pinctrl-0 = <&pinctrl_usbotg3>;
	ci-disable-lpm;
	over-current-active-low;
	power-active-high;
};

Corresponding SODIMM (PWR and OC) have been added to pinctrl_usbotg1 and pinctrl_usbotg3.

I’m expecting that the regulators were enabled when the USB driver is loaded, but it doesn’t seems to be the case. So I have finally kept regulator definitions but added “regulator-always-on;” to ensure the regulator is properly activated.

For over-current, I have not tested after seeing that post : Overcurrent flag not sparking - #6 by stefan_e.tx
Has the situation changed on that point?

Kind regards