Hi, I would like to use USB stick with my board using i.mx6ull.
However the usb stick is not detected. I checked "dmesg", "df", and "lsblk", but usb stick is not recognized.
I think my device tree is wrong, so would you tell me how to modify it?
related part of my device tree is as follows.
(I use usbotg2 as usb port)
&usbotg1 {
dr_mode = "host";
/*disable-over-current;*/
fsl,over-current-polarity-active-low;
pinctrl-0 = <&pinctrl_usb_otg1>;
status = "okay";
};&usbotg2 {
dr_mode = "host";
/*disable-over-current;*/
fsl,over-current-polarity-active-low;
fsl,power-line-polarity-active-high;
pinctrl-0 = <&pinctrl_usb_otg2>;
status = "okay";
};pinctrl_usb_otg1: usbotg1grp {
fsl,pins = <
MX6UL_PAD_GPIO1_IO01__USB_OTG1_OC 0x17059
MX6UL_PAD_GPIO1_IO04__USB_OTG1_PWR 0x17059
>;
};pinctrl_usb_otg2: usbotg2grp {
fsl,pins = <
MX6UL_PAD_ENET2_TX_CLK__ANATOP_OTG2_ID 0x17059
MX6UL_PAD_ENET2_TX_DATA1__USB_OTG2_PWR 0x17059
MX6UL_PAD_ENET2_TX_EN__USB_OTG2_OC 0x17059
>;
};
and imx6ull.dtsi
usbphy1: usbphy@020c9000 {
compatible = "fsl,imx6ul-usbphy", "fsl,imx23-usbphy";
reg = <0x020c9000 0x1000>;
interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6UL_CLK_USBPHY1>;
phy-3p0-supply = <®_3p0>;
fsl,anatop = <&anatop>;
};usbphy2: usbphy@020ca000 {
compatible = "fsl,imx6ul-usbphy", "fsl,imx23-usbphy";
reg = <0x020ca000 0x1000>;
interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6UL_CLK_USBPHY2>;
phy-3p0-supply = <®_3p0>;
fsl,anatop = <&anatop>;
};aips2: aips-bus@02100000 {
compatible = "fsl,aips-bus", "simple-bus";
#address-cells = <1>;
#size-cells = <1>;
reg = <0x02100000 0x100000>;
ranges;usbotg1: usb@02184000 {
compatible = "fsl,imx6ul-usb", "fsl,imx27-usb";
reg = <0x02184000 0x200>;
interrupts = <GIC_SPI 43 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6UL_CLK_USBOH3>;
fsl,usbphy = <&usbphy1>;
fsl,usbmisc = <&usbmisc 0>;
fsl,anatop = <&anatop>;
ahb-burst-config = <0x0>;
tx-burst-size-dword = <0x10>;
rx-burst-size-dword = <0x10>;
status = "disabled";
};usbotg2: usb@02184200 {
compatible = "fsl,imx6ul-usb", "fsl,imx27-usb";
reg = <0x02184200 0x200>;
interrupts = <GIC_SPI 42 IRQ_TYPE_LEVEL_HIGH>;
clocks = <&clks IMX6UL_CLK_USBOH3>;
fsl,usbphy = <&usbphy2>;
fsl,usbmisc = <&usbmisc 1>;
ahb-burst-config = <0x0>;
tx-burst-size-dword = <0x10>;
rx-burst-size-dword = <0x10>;
status = "okay";
};usbmisc: usbmisc@02184800 {
#index-cells = <1>;
compatible = "fsl,imx6ul-usbmisc", "fsl,imx6q-usbmisc";
reg = <0x02184800 0x200>;
};
Hi Hirotoshi
one can try using external usb hub and with Demo Image
dts description can be found in sect.39.2.6 Changing the Controller Operation Mode
attached Linux Guide and
linux/arch/arm/boot/dts/imx6ull-14x14-evk.dts
imx6ull-14x14-evk.dts\dts\boot\arm\arch - linux-imx - i.MX Linux kernel
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hi igor, thank you for your answer.
Actually the resistance of my board was wrong.
After fixing it, changing MX6UL_PAD_ENET2_TX_DATA1__USB_OTG2_PWR 0x17059
into MX6UL_PAD_ENET2_TX_DATA1_GPIO2_IO12 0x17059 and adding
USB_CNTO {
label = "gpio44";
gpios = <&gpio2 12 0>;
linux,default-trigger = "gpio";
default-state = "off";
};
, USB stick is come to be recognized.
However I would like to use USB_OTG2_PWR to utilize usb controller function against over currency problem and so on. Are there any way how to utilize the function?