Wiki Home » vmx53 » usb

usb

Last modified by Administrator on 2015/01/17 19:51

Examples

How to configure USB

Device tree

Initial SOC configuration is part the following device tree source files

  • arch/arm/boot/dts/imx53.dtsi

Shared module configuration is part the following device tree source files

  • arch/arm/boot/dts/imx53-vmx53.dtsi

Specific module configuration is part of device tree source files

  • arch/arm/boot/dts/imx53-vmx53-557.dts
  • arch/arm/boot/dts/imx53-vmx53-668.dts
  • arch/arm/boot/dts/imx53-vmx53-779.dts
Usually only the single module HW configuration needs to be edited.

Bus: USB H1

Host mode

&usbh1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbh1>;
phy_type = "utmi";
disable-over-current;
vbus-supply = <&reg_usbh1_vbus>;
status = "okay";
};

Bus: USB OTG

Host mode

&usbotg {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg>;
phy_type = "utmi";
dr_mode = "host";
disable-over-current;
vbus-supply = <&reg_usbotg_vbus>;
status = "okay";
};

Peripheral mode

&usbotg {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg>;
phy_type = "utmi";
dr_mode = "peripheral";
disable-over-current;
vbus-supply = <&reg_usbotg_vbus>;
status = "okay";
};

OTG mode

&usbotg {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usbotg>;
phy_type = "utmi";
dr_mode = "otg";
disable-over-current;
vbus-supply = <&reg_usbotg_vbus>;
status = "okay";
};

lsusb

Peripheral Mode

 Jumper H401 opened (OTG peripheral mode) 
[email protected] ~lsusb
Bus 002 Device 002: ID 0424:2514 (vmx baseboard USB HUB)
Bus 002 Device 001: ID 1d6b:0002 (i.MX53 USBH1 port)

After connecting the i.MX53 usb port into PC port the module will act as usb ethernet device.

[email protected] ~dmesg
[18124.937371] g_ether gadget: high-speed config #1: CDC Ethernet (ECM)
[18124.937402] g_ether gadget: init ecm
[18124.937413] g_ether gadget: notify connect true
[18124.938348] g_ether gadget: setup complete --> -108, 0/0
[18124.940347] g_ether gadget: activate ecm
[18124.940376] usb0: qlen 10
[18124.940385] g_ether gadget: ecm_open
[18124.940407] usb0: eth_start
[18124.941353] g_ether gadget: setup complete --> -108, 0/0
[18124.941369] g_ether gadget: packet filter 0e
[18124.941382] g_ether gadget: ecm req21.43 v000e i0000 l0
[18124.942364] g_ether gadget: setup complete --> -108, 0/0
[18124.986107] g_ether gadget: notify connect true
[18125.018109] g_ether gadget: notify speed 425984000

Host Mode

Notes: Jumper H401 shorted (OTG host mode) 
[email protected] ~lsusb
Bus 002 Device 002: ID 0424:2514 (vmx baseboard USB HUB)
Bus 001 Device 001: ID 1d6b:0002 (i.MX53 USBOTG port)
Bus 002 Device 001: ID 1d6b:0002 (i.MX53 USBH1 port)

After connecting the usb peripheral into i.MX53 usb port the device will be enumerated.

[email protected] ~dmesg
[17987.272001] ci_hdrc ci_hdrc.0: EHCI Host Controller
[17987.272044] ci_hdrc ci_hdrc.0: new USB bus registered, assigned bus number 1
[17987.272089] ci_hdrc ci_hdrc.0: reset hcs_params 0x10011 dbg=0 ind cc=0 pcc=0 ordered ports=1
[17987.272105] ci_hdrc ci_hdrc.0: reset hcc_params 0006 thresh 0 uframes 256/512/1024 park
[17987.272199] ci_hdrc ci_hdrc.0: park 0
[17987.272223] ci_hdrc ci_hdrc.0: reset command 0080002 (park)=0 ithresh=8 period=1024 Reset HALT
[17987.272249] ci_hdrc ci_hdrc.0: init command 0010005 (park)=0 ithresh=1 period=512 RUN
[17987.291471] ci_hdrc ci_hdrc.0: USB 2.0 started, EHCI 1.00
[17987.291694] usb usb1: default language 0x0409
[17987.291769] usb usb1: udev 1, busnum 1, minor = 0
[17987.291785] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[17987.291797] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[17987.291808] usb usb1: Product: EHCI Host Controller
[17987.291818] usb usb1: Manufacturer: Linux 3.12.13-dev ehci_hcd
[17987.291828] usb usb1: SerialNumber: ci_hdrc.0
[17987.292845] usb usb1: usb_probe_device
[17987.292871] usb usb1: configuration #1 chosen from 1 choice
[17987.292955] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[17987.302909] hub 1-0:1.0: usb_probe_interface
[17987.302937] hub 1-0:1.0: usb_probe_interface - got id
[17987.302961] hub 1-0:1.0: USB hub found
[17987.303043] hub 1-0:1.0: 1 port detected
[17987.303056] hub 1-0:1.0: standalone hub
[17987.303068] hub 1-0:1.0: individual port power switching
[17987.303078] hub 1-0:1.0: individual port over-current protection
[17987.303088] hub 1-0:1.0: Single TT
[17987.303099] hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
[17987.303110] hub 1-0:1.0: power on to power good time: 20ms
[17987.303162] hub 1-0:1.0: local power source is good
[17987.303277] hub 1-0:1.0: enabling power on all ports
[17987.401492] ci_hdrc ci_hdrc.0: GetStatus port:1 status 001803 0  ACK POWER sig=j CSC CONNECT
[17987.401563] hub 1-0:1.0: port 1: status 0101 change 0001
[17987.501489] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
[17987.501572] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
[17987.561468] ci_hdrc ci_hdrc.0: GetStatus port:1 status c00100a 6  ACK POWER sig=se0 PEC CSC
[17987.561590] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[17987.561615] ci_hdrc ci_hdrc.0: GetStatus port:1 status c00100a 6  ACK POWER sig=se0 PEC CSC
[17987.561674] hub 1-0:1.0: port 1, status 0100, change 0003, 12 Mb/s
[17987.721456] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x100
[17987.721505] hub 1-0:1.0: hub_suspend
[17987.721553] usb usb1: bus auto-suspend, wakeup 1
[17987.721565] ci_hdrc ci_hdrc.0: suspend root hub
[17988.351026] usb usb1: usb wakeup-resume
[17988.351049] usb usb1: usb auto-resume
[17988.351062] ci_hdrc ci_hdrc.0: resume root hub
[17988.351084] hub 1-0:1.0: hub_resume
[17988.351118] ci_hdrc ci_hdrc.0: GetStatus port:1 status 001803 0  ACK POWER sig=j CSC CONNECT
[17988.351157] hub 1-0:1.0: port 1: status 0101 change 0001
[17988.451485] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
[17988.451549] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
[17988.511473] ci_hdrc ci_hdrc.0: GetStatus port:1 status c00100a 6  ACK POWER sig=se0 PEC CSC
[17988.511585] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
[17988.511610] ci_hdrc ci_hdrc.0: GetStatus port:1 status c00100a 6  ACK POWER sig=se0 PEC CSC
[17988.511668] hub 1-0:1.0: port 1, status 0100, change 0003, 12 Mb/s
[17988.671457] hub 1-0:1.0: debounce: port 1: total 100ms stable 100ms status 0x100
[17988.671497] hub 1-0:1.0: hub_suspend
[17988.671537] usb usb1: bus auto-suspend, wakeup 1
[17988.671549] ci_hdrc ci_hdrc.0: suspend root hub
[17989.384026] usb usb1: usb wakeup-resume
[17989.384046] usb usb1: usb auto-resume
[17989.384060] ci_hdrc ci_hdrc.0: resume root hub
[17989.384079] hub 1-0:1.0: hub_resume
[17989.384110] ci_hdrc ci_hdrc.0: GetStatus port:1 status 001803 0  ACK POWER sig=j CSC CONNECT
[17989.384152] hub 1-0:1.0: port 1: status 0101 change 0001
[17989.491466] hub 1-0:1.0: state 7 ports 1 chg 0002 evt 0000
[17989.491520] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
[17989.551443] ci_hdrc ci_hdrc.0: port 1 reset complete, port enabled
[17989.551469] ci_hdrc ci_hdrc.0: GetStatus port:1 status 001805 0  ACK POWER sig=j PE CONNECT
[17989.611479] usb 1-1: new full-speed USB device number 4 using ci_hdrc
[17989.671445] ci_hdrc ci_hdrc.0: port 1 reset complete, port enabled
[17989.671469] ci_hdrc ci_hdrc.0: GetStatus port:1 status 001805 0  ACK POWER sig=j PE CONNECT
[17989.766271] usb 1-1: default language 0x0409
[17989.769271] usb 1-1: device v10c4 pea60 is not supported
[17989.769285] usb 1-1: udev 4, busnum 1, minor = 3
[17989.769297] usb 1-1: New USB device found, idVendor=10c4, idProduct=ea60
[17989.769309] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=3
[17989.769319] usb 1-1: Product: CP2102 USB to UART Bridge Controller
[17989.769330] usb 1-1: Manufacturer: Silicon Labs
[17989.769339] usb 1-1: SerialNumber: 0001
[17989.770239] usb 1-1: usb_probe_device
[17989.770297] usb 1-1: configuration #1 chosen from 1 choice
[17989.771322] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[17989.782199] hub 1-0:1.0: state 7 ports 1 chg 0000 evt 0002
Tags:
Created by Administrator on 2015/01/17 18:34

This wiki is licensed under a Creative Commons 2.0 license
XWiki Enterprise 6.1 - Documentation