Disable VBUS power for USB_VBUS_EN0 and USB_VBUS_EN1

Continuing the discussion from How to change the USB behavior of USB_VBUS_EN0 and USB_VBUS_EN1?:

I’ve configured a regulator for the USB_VBUS_EN0 port and a regulator for the USB_VBUS_EN1 port. These power regulators are defined as:

reg_5v_usb: regulator@11 {
	compatible = "regulator-fixed";
	reg = <11>;
	regulator-name = "5V USB";
	regulator-min-microvolt = <5000000>;
	regulator-max-microvolt = <5000000>;
	gpio = <&tegra_main_gpio TEGRA194_MAIN_GPIO(Z, 2) GPIO_ACTIVE_HIGH>;
	regulator-boot-on;
	enable-active-high;

	regulator-state-mem {
		regulator-off-in-suspend;
	};
};

but the part for regulator-off-in-suspend doesn’t do anything. The power stays on for the USB during suspend (the 5V of the USB). When manually toggling the TEGRA194_MAIN_GPIO(Z, 2) pin, the 5V power goes off correctly
The vbus supply for the usb’s are set by setting the following:

xusb_padctl: xusb_padctl@3520000 {
	status = "okay";

	ports {
		usb2-0 {
			vbus-supply = <&reg_5v_rp>;
		};
		usb2-1 {
			vbus-supply = <&reg_5v_fp>;
		};
		usb2-2 {
			vbus-supply = <&reg_5v_fp>;
		};
	};

Am I doing something wrong for disabling the VBUS power during suspend?

Hi,

I double checked with usb driver team. USB vbus wont’ be disabled during suspend state.

Please disable regulator by yourself manually before suspending.

1 Like

And how to configure the nvidia,oc-pin in the device tree?
I checked the documentation and added the pin oc-pin as follows:

ports {
	usb2-0 {
		vbus-supply = <&reg_5v_rp>;
		 nvidia,oc-pin = <TEGRA194_MAIN_GPIO(Q, 0)>;
	};

This causes a crash during the boot sequence of the Jetson. I saw others setting it to “1” as well, but how do you link the overcurrent pin to the usb port in that case? Or how to correctly configure the “nvidia,oc-pin”?

please file a new topic for oc pin question.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.