Dear All,
I am using an IMX6DL on a custom board and I am trying to use the USB OTG interface. I am currently facing some problems regarding the interface detection.
In particular, I have no information about the OTG interface on the dmesg kernel log and, even if I am sure the OTG Vbus power is on (thanks to led DL6), Linux is not able to detect any usb peripheral.
In the following you can find all the information about the schematic, the devicetree and kernel configuration.
- Schematic:
Signal connection to the processor:
Signal Name Processor pin Pin Muxing
USB_OTG_N B6 (this pin has no alternate functions)
USB_OTG_P A6 (this pin has no alternate functions)
USB_OTG_ID W23 GPIO1_24
USB_OTG_H1_OC J20 GPIO3_30
USB_OTG_PWR_EN V5 GPIO4_15
USB_OTG_OC T6 GPIO4_14
- Device Tree
In the following the otg part in the .dts file.
&usbotg {
status = "okay";
dr_mode = "otg";
srp-disable;
hnp-disable;
adp-disable;
disable-over-current;
};
I have also tried to remove the options srp-disable, hnp-disable, and adp-disable without any success.
In the following the otg part of the .dtsi file.
pinctrl_usbotg: usbotggrp {
fsl,pins = <
MX6QDL_PAD_KEY_COL4__USB_OTG_OC 0x1b0b0
MX6QDL_PAD_ENET_RX_ER__USB_OTG_ID 0x1b0b0
>;
};
pinctrl_usbotg_vbus: usbotg_vbusgrp {
fsl,pins = <
/* power enable, low active */
#define GP_USB_OTG_PWR <&gpio4 15 GPIO_ACTIVE_LOW>
MX6QDL_PAD_KEY_ROW4__GPIO4_IO15 0x17059
>;
};
reg_usbotg_vbus: regulator@4 {
compatible = "regulator-fixed";
reg = <4>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg_vbus>;
regulator-name = "usbotg_vbus";
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
gpio = GP_USB_OTG_PWR;
enable-active-low;
};
&usbotg {
vbus-supply = <®_usbotg_vbus>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg>;
disable-over-current;
status = "okay";
};
- Kernel
Regarding the loaded kernel modules, I followed the IMX6 reference manuale (https://nxpcommunity.force.com/sfc/servlet.shepherd/document/download/06957000004mHAWAA2?operationCo..., section 39.3.3, page 316) and I loaded the following modules:
1. CONFIG_USB - Build Support for Host-side USB
2. CONFIG_USB_EHCI_HCD - EHCI HCD (USB 2.0) support
3. CONFIG_USB_CHIPIDEA - ChipIdea high-speed Dual Role Controller
4. CONFIG_USB_CHIPIDEA_UDC - ChipIdea device controller
5. CONFIG_USB_CHIPIDEA_HOST - ChipIdea host controller
6. CONFIG_USB_GADGET - USB Gadget Support
7. CONFIG_USB_MXS_PHY - Freescale MXS USB PHY support
Note that module 6 has been loaded manually after system boot.
Am I doing something wrong? Can you please give me some support?
Thanks and best regards,
Enrico
Hi igorpadykov,
Thank you for your answer. I checked the documents you sent me and I found a hardware problem on the board.
Kernel configuration and device tree were good.
Regards,
Enrico
Hi Enrico
one can check VDD_VBUS_CAP described in Figure 51-1. Power system overview
i.MX6SDL Reference Manual
http://cache.freescale.com/files/32bit/doc/ref_manual/IMX6SDLRM.pdf
check 24MHz crystal, probably replacing from working board. Use Chapter 6
Avoiding Board Bring-up Problems i.MX6 System DevelopmentUser’s Guide
https://www.nxp.com/docs/en/user-guide/IMX6DQ6SDLHDG.pdf
May be recommended to test usb in uboot or with bare metal SDK:
Github SDK
https://github.com/backenklee/swp-report/tree/master/iMX6_Platform_SDK
Also simple way to test usb with mfg tool - if it detects board, can be found on
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------