AnsweredAssumed Answered

linux kernel get stuck, only if connect the usb device it will work well

Question asked by Cheng si on Jul 14, 2017
Latest reply on Jul 16, 2017 by Cheng si

Hi,I am very new to imx7d, we designed a custom board referring to the imx7sabre board, the USB part, both the otg the host , is the same as sabre.
So in our dts file, the configuration of usb otg and usb host is the same as the sabre, and the kernel we use is freescale/linux 4.1-2.0.x-imx. After we burn the u-boot and the kernel into the emmc, we can start the u-boot and the kernel, but then we get very strange result:
1. After the u-boot successfully load the kernel, the kernel can run for a while then it will get stuck with no errors showing.
2. If we connect either a otg device(like a pc) to otg port or a usb storage to host port, the system will work well.

It seems kernel get into a deep sleep mode if there is no usb interuput request, I was thinking it may have some relationship with the low power mode?

Please give me some advice,thinks.

Here is part of our schematic and dts.

 

dts:

&usbotg1 {
vbus-supply = <&reg_usb_otg1_vbus>;
srp-disable;
hnp-disable;
adp-disable;
disable-over-current;
status = "okay";

};

&usbotg2 {
vbus-supply = <&reg_usb_otg2_vbus>;
disable-over-current;
dr_mode = "host";
status = "okay";
};

 

reg_usb_otg1_vbus: regulator@0 {
compatible = "regulator-fixed";
reg = <0>;
regulator-name = "usb_otg1_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 5 0>;
enable-active-high;
};

reg_usb_otg2_vbus: regulator@1 {
compatible = "regulator-fixed";
reg = <1>;
regulator-name = "usb_otg2_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = <&gpio1 7 0>;
enable-active-high;
};

Attachments

Outcomes