Change USB OC and PWR for USBH and USBC on iMX8DX

Hello,

I’m using a Toradex iMX8DX Colibri board plugged on a custom carrier board and I want to change the Power enable and Overcurrent pins used for USB Host and USB Client.

For USBHost, I want to use Sodimm 133 for PWR and 131 for OC
For USBClient, I want to use Sodimm 129 for PWR and 127 for OC

The different tests I have already done are not at all successful and it is not clear to me if the driver really manages PWR and OC.

It seems on the dtb of the colibri eval board, that the PWR signal is managed by reg_usbh_vbus.

Could you clarify if the driver is able to manage the signal and what is the way to customize it using the dtb ?

Kind regards

Hello @ykrons ,
Sorry for the late answer.
Can you please describe the tests that you have done?

Best regards,
Josep

Hello @ykrons
Do you have any updates on this topic?

Best regards,
Josep

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

Hello @ykrons ,
Would it be possible for you to share with us the schematics of your carrier board?
You can send them to support.eu@toradex.com

Best regards,
Josep

Hello @josep.tx,

I have just sent part of the schematic related to USB by e-mail.

Kind regards