usb-otg1 without id pin on 3.14.28

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

usb-otg1 without id pin on 3.14.28

Jump to solution
4,024 Views
jayakumar2
Contributor V

Hi,

I'm using a 6sl board with 3.14.28. Previously, I was running 3.0.35 and had usb-net via the usb-otg1 port working. I only use the usb-otg1 port for usb-net (aka rndis to get usb-over-ethernet working with a windows host). In 3.0.35, I did initialization as follows:

static void __init mx6_evk_init_usb(void)
{
int ret = 0;

imx_otg_base = MX6_IO_ADDRESS(MX6Q_USB_OTG_BASE_ADDR);

/* disable external charger detect,
* or it will affect signal quality at dp.
*/

ret = gpio_request(MX6_BRD_USBOTG1_PWR, "usbotg-pwr");
if (ret) {
pr_err("failed to get GPIO MX6_BRD_USBOTG1_PWR:%d\n", ret);
return;
}
gpio_direction_output(MX6_BRD_USBOTG1_PWR, 0);

ret = gpio_request(MX6_BRD_USBOTG2_PWR, "usbh1-pwr");
if (ret) {
pr_err("failed to get GPIO MX6_BRD_USBOTG2_PWR:%d\n", ret);
return;
}
gpio_direction_output(MX6_BRD_USBOTG2_PWR, 0);

mx6_set_otghost_vbus_func(imx6_evk_usbotg_vbus);
mx6_set_host1_vbus_func(imx6_evk_usbh1_vbus);

#ifdef CONFIG_USB_EHCI_ARC_HSIC
mx6_usb_h2_init();
#endif

With 3.14.28, I faced one issue which is that on my board, the USB_ID pin is not connected and is left floating. So my understanding is that I need to pull that pin high to get the effect of always being a slave device. So in my device tree config, I did:

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 = <&gpio4 0 0>;
enable-active-high;
};

pinctrl_usbotg1: usbotg1grp {
fsl,pins = <
/* MX6SL_PAD_EPDC_PWRCOM__USB_OTG1_ID 0x17059 */
MX6SL_PAD_FEC_RXD0__USB_OTG1_ID 0x17059
>;
};

In above, I used FEC_RXD0 as a dummy source for OTG1_ID.

&usbotg1 {
vbus-supply = <&reg_usb_otg1_vbus>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg1>;
disable-over-current;
status = "okay";
};

But with above configuration, the result I get is:

root@imx6slevk:~# dmesg|grep -i usb
usb_otg1_vbus: 5000 mV
usb_otg2_vbus: 5000 mV
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
usbphy_nop1.11 supply vcc not found, using dummy regulator
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
usbcore: registered new interface driver usb-storage
ci_hdrc ci_hdrc.1: new USB bus registered, assigned bus number 1
ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
usbcore: registered new interface driver bcm203x
usbcore: registered new interface driver btusb
usbcore: registered new interface driver ath3k
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
usb_otg1_vbus: disabling

and no messages when the usb cable is plugged in.

I suspect the problem is that I'm not getting the vbus regulator to be enabled. ie: the last message above shows usb_otg1_vbus disabling. But I'm not sure why that's happening.

To compare, with 3.0.35, I get:

usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
IMX usb wakeup probe
Initializing USB Mass Storage driver...
usbcore: registered new interface driver usb-storage
USB Mass Storage support registered.
ARC USBOTG Device Controller driver (1 August 2005)
usb0: MAC a2:e4:59:e7:a5:41
usb0: HOST MAC aa:41:a2:46:a7:b4
g_ether gadget: controller 'fsl-usb2-udc' not recognized; trying CDC Ethernet (ECM)
fsl-usb2-udc: bind to driver g_ether
Bluetooth: Generic Bluetooth USB driver ver 0.6
usbcore: registered new interface driver btusb
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver

... plug in usb cable

root@imx6qsabresd:~# otg udc vbus rising wakeup
try_wake_up_udc: udc out low power mode
g_ether gadget: high speed config #1: CDC Ethernet (ECM)

... unplug cable

root@imx6qsabresd:~# fsl_gadget_disconnect_event: udc enter low power mode

I would appreciate any advice or suggestions on what to look at to solve this.

Thanks!

Labels (2)
Tags (2)
1 Solution
2,696 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jaya

in device mode USB_ID pin can be left floating, for Linux

configuration one can check sect.41.2.7 Changing the Controller

Operation Mode attached Linux Guide.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

3 Replies
2,696 Views
jayakumar2
Contributor V

Thanks Igor. That worked.

0 Kudos
2,696 Views
emintolgasivri
Contributor II

Hi

I got message too.I am using imx7d.

-------------------

bd7181x-rtc bd7181x-rtc: setting system clock to 2000-01-01 12:00:10 UTC (946728010)
usb_otg1_vbus: disabling
can2-3v3: disabling
VDD_SD1: disabling
wlreg_on: disabling
ALSA device list:
  No soundcards found.

-------------------------

I am using otg ports.OTG1 goes to usb2513b hub chip.OTG2 goes to gsm module.I am using otg ports as host.I connect DP,DN ang GND pins.VBUS goes to 5V directly.OTG2 is is working and can dedect gsm module.But otg1 couldnt dedect hub chip.And I saw usb_otg1_vbus:disabling  on startup.

How can I fix this?

0 Kudos
2,697 Views
igorpadykov
NXP Employee
NXP Employee

Hi Jaya

in device mode USB_ID pin can be left floating, for Linux

configuration one can check sect.41.2.7 Changing the Controller

Operation Mode attached Linux Guide.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------