Device tree node for USB serial

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

Device tree node for USB serial

8,969 Views
kai_wu
Contributor III

Hi,

We are using ls1012a On our board, the usb2.0 is connected to a USB phy(USB3300), The USB 2.0 controller with ULPI interface provides point-to-point connectivity that complies with the USB specification, Rev. 2.0.

In the datasheet of USB3300, the usb3300 is described as: 

The USB3300 is an industrial temperature Hi-Speed USB Physical Layer Transceiver (PHY). The USB3300 uses a low pin count interface (ULPI) to connect to a ULPI compliant Link layer

pastedImage_4.png

In our design, there is a pluggable LTE module connected to the mini USB connector.

In fsl-ls1012a.dtsi, the usb2.0 node is defined as below:

usb1: usb2@8600000 {
    compatible = "fsl-usb2-dr-v2.5", "fsl-usb2-dr";
    reg = <0x0 0x8600000 0x0 0x1000>;
    interrupts = <0 139 0x4>;
    dr_mode = "host";
    phy_type = "ulpi";
};

In my device tree source file, I enabled usb2.0

&usb1 {
    status = "okay";
};

I also enabled the related USB serial driver in menuconfig already, but there is no file like ttyUSBx created under /dev in my linux kernel. Here is some info about USB in dmesg output. Is my device tree configuration correct? or how could I modify it? Thank you.

root@localhost:~# dmesg|grep -i usb
[ 0.348936] usbcore: registered new interface driver usbfs
[ 0.354550] usbcore: registered new interface driver hub
[ 0.359968] usbcore: registered new device driver usb
[ 0.961123] dwc3 2f00000.usb3: Failed to get clk 'ref': -2
[ 0.968030] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 0.984436] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[ 1.006295] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 1
[ 1.030963] hub 1-0:1.0: USB hub found
[ 1.044596] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 1.052289] xhci-hcd xhci-hcd.0.auto: Host supports USB 3.0 SuperSpeed
[ 1.058977] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.
[ 1.067660] hub 2-0:1.0: USB hub found
[ 1.075905] usbcore: registered new interface driver usb-storage
[ 1.240391] usbcore: registered new interface driver usbhid
[ 1.246078] usbhid: USB HID core driver

Labels (1)
0 Kudos
Reply
8 Replies

1,150 Views
Wobaffet
Senior Contributor I

Hello, were you able to solve the problem? We are having similar issues with our quectel module. Thanks!

Best Regards.

0 Kudos
Reply

8,578 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Kai Wu,

In your log, it shows the FSL EHCI controller was not initialized, only the XHCI controller init done.

Below is the items that needed for EHCI in kernel .config:

 

Basing on default LSDK config, make sure below CONFIGs have been selected:

 pastedImage_1.png

pastedImage_2.png

 pastedImage_3.png

 

       If your problem remains, would you please provide full dtsi & dts source file and kernels .config file to do more investigation.

Thanks,

Yiping

0 Kudos
Reply

8,578 Views
kai_wu
Contributor III

Hi yipingwang

Thanks for your reply, I have enabled most of them in my menuconfig.     

But I cannot find EHCI support for PPC USB controller on OF platform bus.

Also I found Support for Freescale on-chip EHCI USB controller but in your screenshot it is Support for Freescale PPC on-chip EHCI USB controller, see below.

pastedImage_1.png

I tried to search for USB_EHCI_HCD_PPC_OF in menuconfig, it is found in the search result, but I cannot find it in menuconfig. Is there any mistake in my menuconfig?

pastedImage_4.png

Below is the latest dmesg output, also I attached my device tree files.

pastedImage_7.png

0 Kudos
Reply

8,578 Views
yipingwang
NXP TechSupport
NXP TechSupport

 The latest log has shown that FSL EHCI driver has been called as expected. And the dtsi files look good.

  For kernel_config, please configure CONFIG_USB_SERIAL,  you are planning to connect a USB-to-UART adapter to our board (our board work as USB host), right?

   If yes, please set above CONFIG to y and refer to here for details, and maybe extra driver is also needed, which depend on the brand/type of your adapter, such as below list (quoted from drivers/usb/serial/Makefile):

 

8 obj-$(CONFIG_USB_SERIAL)                        += usbserial.o

  9

10 usbserial-y := usb-serial.o generic.o bus.o

11

12 usbserial-$(CONFIG_USB_SERIAL_CONSOLE)  += console.o

13

14 obj-$(CONFIG_USB_SERIAL_AIRCABLE)               += aircable.o

15 obj-$(CONFIG_USB_SERIAL_ARK3116)                += ark3116.o

16 obj-$(CONFIG_USB_SERIAL_BELKIN)                 += belkin_sa.o

17 obj-$(CONFIG_USB_SERIAL_CH341)                  += ch341.o

18 obj-$(CONFIG_USB_SERIAL_CP210X)                 += cp210x.o

19 obj-$(CONFIG_USB_SERIAL_CYBERJACK)              += cyberjack.o

20 obj-$(CONFIG_USB_SERIAL_CYPRESS_M8)             += cypress_m8.o

21 obj-$(CONFIG_USB_SERIAL_DEBUG)                  += usb_debug.o

22 obj-$(CONFIG_USB_SERIAL_DIGI_ACCELEPORT)        += digi_acceleport.o

23 obj-$(CONFIG_USB_SERIAL_EDGEPORT)               += io_edgeport.o

24 obj-$(CONFIG_USB_SERIAL_EDGEPORT_TI)            += io_ti.o

25 obj-$(CONFIG_USB_SERIAL_EMPEG)                  += empeg.o

26 obj-$(CONFIG_USB_SERIAL_F81232)                 += f81232.o

27 obj-$(CONFIG_USB_SERIAL_F8153X)                 += f81534.o

28 obj-$(CONFIG_USB_SERIAL_FTDI_SIO)               += ftdi_sio.o

29 obj-$(CONFIG_USB_SERIAL_GARMIN)                 += garmin_gps.o

30 obj-$(CONFIG_USB_SERIAL_IPAQ)                   += ipaq.o

31 obj-$(CONFIG_USB_SERIAL_IPW)                    += ipw.o

32 obj-$(CONFIG_USB_SERIAL_IR)                     += ir-usb.o

33 obj-$(CONFIG_USB_SERIAL_IUU)                    += iuu_phoenix.o

34 obj-$(CONFIG_USB_SERIAL_KEYSPAN)                += keyspan.o

35 obj-$(CONFIG_USB_SERIAL_KEYSPAN_PDA)            += keyspan_pda.o

36 obj-$(CONFIG_USB_SERIAL_KLSI)                   += kl5kusb105.o

37 obj-$(CONFIG_USB_SERIAL_KOBIL_SCT)              += kobil_sct.o

38 obj-$(CONFIG_USB_SERIAL_MCT_U232)               += mct_u232.o

39 obj-$(CONFIG_USB_SERIAL_METRO)                  += metro-usb.o

40 obj-$(CONFIG_USB_SERIAL_MOS7720)                += mos7720.o

41 obj-$(CONFIG_USB_SERIAL_MOS7840)                += mos7840.o

42 obj-$(CONFIG_USB_SERIAL_MXUPORT)                += mxuport.o

43 obj-$(CONFIG_USB_SERIAL_NAVMAN)                 += navman.o

44 obj-$(CONFIG_USB_SERIAL_OMNINET)                += omninet.o

45 obj-$(CONFIG_USB_SERIAL_OPTICON)                += opticon.o

0 Kudos
Reply

8,578 Views
kai_wu
Contributor III

Hi yipingwang‌,

We are connecting an LTE module(EC25 mini pci-e from quectel) to our board. LTE module is connected to the USB3300 via a mini PCI-E connector. But now the ULPI info is not found in dmesg at all.

LS1012a(ulpi interface)  <----> USB3300(usb phy) <-------> LTE module

The diagram below shows the hardware design of EC25 mini pci-e.

pastedImage_1.png

I am following the instructions from quectel, but ulpi info is still not found in dmesg, also ttyUSBx is not found.

pastedImage_2.png

pastedImage_3.png

0 Kudos
Reply

8,578 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please configure the following in u-boot.

=> setenv hwconfig "usb1:dr_mode=host,phy_type=ulpi"

Please check the following in u-boot

=> usb start
=> usb info

If possible, please provide your Kernel configuration file and the whole Linux booting up log.

0 Kudos
Reply

8,577 Views
kai_wu
Contributor III

Hi yipingwang‌,

This is the uboot output. USB2.0 seems not found in boot. I attached the Linux kernel boot log and the dmesg output.

pastedImage_1.png

0 Kudos
Reply

8,577 Views
yipingwang
NXP TechSupport
NXP TechSupport

The log shows FSL EHCI controller has been initialized without error:

[    1.103317] ehci-fsl: Freescale EHCI Host controller driver

[    1.109081] fsl-ehci fsl-ehci.0: Freescale On-Chip EHCI Host Controller

[    1.115751] fsl-ehci fsl-ehci.0: new USB bus registered, assigned bus number 3

[    1.188797] ata1: SATA link down (SStatus 0 SControl 300)

[    1.454106] fsl-ehci fsl-ehci.0: irq 22, io mem 0x08600000

[    1.472078] fsl-ehci fsl-ehci.0: USB 2.0 started, EHCI 1.00

[    1.478346] hub 3-0:1.0: USB hub found

[    1.482173] hub 3-0:1.0: 1 port detected

 

  But cant see any USB device enumeration information like below (no matter its a serial adapter or a mass storage):

[ 6026.926131] usb 1-1: new full-speed USB device number 4 using ehci-hcd

 

Could they do a sanity check to make sure all related signals (VBUS, GND, D+, D-) is normal to exclude HW issue?

 

Please make sure below code has integrated in U-Boot source file: arch/arm/dts/fsl-ls1012a.dtsi

147                 usb0: usb2@8600000 {

148                         compatible = "fsl-usb2-dr-v2.5", "fsl-usb2-dr";

149                         reg = <0x0 0x8600000 0x0 0x1000>;

150                         interrupts = <0 139 0x4>;

151                         dr_mode = "host";

152                         fsl,usb-erratum-a005697;

153                 };                         

 

0 Kudos
Reply