This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

J721EXSOMXEVM: USB Modem not recognized in J7

Part Number: J721EXSOMXEVM

Hello,

I have a Modem that is connected to J7 over USB 2.0. To connect the modem we are using the USB1 interface as a host in J7. However, Modem is not recognized in J7. This is the device tree I am using 

&usbss1 {
	pinctrl-names = "default";
	status = "okay";
	ti,usb2-only;
};

&usb1 {
	pinctrl-names = "default";
	status = "okay";
	dr_mode = "host";
	maximum-speed = "high-speed";
};

In /drivers/usb/serial/option.c driver we added usb device for our modem like below (as suggested by modem provider).

{ USB_DEVICE_INTERFACE_CLASS(TELIT_VENDOR_ID, 0x1055, 0xff), /* Telit FN980  */
.driver_info = NCTRL(0) | RSVD(1) },

Just want to let you know that USB line has D+ & D- , there is no VBUS. It is a self-power peripheral. I would assume that "lsusb" or "dmesg" should show some log for success or failure. However, I don't see any log at all. 

How to debug this issue?

Thanks,

Satish

  • Hello Satish,

    Have you verified the USB connection schematics between the J7 USB1 instance and the modem with your hardware schematics expert and made sure it is correct?

    if you are not getting the modem device detected and enumerated by the J7, we suspect few things:

    - the device could be faulty

    - The schematics may not be correct.

    If the above is OK, the next step would be to connect a USB analyzer b/n the USB1 instance and the modem and analyze the USB trace. 

    Do let us know.

    Thanks.

  • Hi Praveen,

    Does Device tree look good to you? Do you think any other software changes are needed in BSP?

    We reviewed this Schematic with TI and we agree that schematics are fine. Is there a way to put any debug log in USB driver to see if it is making any attempt to probe the device?

    I will try to see if I can find a USB analyzer.

    Thanks,

    Satish

  • Hi Satish,

    Does Device tree look good to you? Do you think any other software changes are needed in BSP?

    Yes, the DT entries look good. Ideally, there is no other software change required.

    Try connecting some other USB device (eg: USB flash drive) and see if it gets enumerated.  Do share the kernel logs for us to analyze.

    Thanks.

  • Hi Praveen,

    I connected the USB analyzer and I don't see any activity on the analyzer. Being J7 as host we are assuming that it should start a scan for device search and we do not see any such log on USB analyzer.

    We have USB0 configured as host and the flash drive works fine. The difference between USB0 & USB1 in our board is - We do not have VBUS on USB1 as it is a self-powered chip. 

    This is a blocker for us and we are trying to understand how the USB driver is working without VBUS. Are you available for a short call next week, so we can share the Schematic and see if we can find a better way to debug? I will reach out to my TI representative to see if we can set up a call.

    Thanks,

    Satish

  • Hi Satish,

    Ideally, the VBUS line is not required to be present for a self-powered device to be enumerated & connected. 

    I connected the USB analyzer and I don't see any activity on the analyzer. Being J7 as host we are assuming that it should start a scan for device search and we do not see any such log on USB analyzer.

    Since the USB analyzer is not seeing any activity, we suspect the issue could be on how the D+ and D- lines are connected b/n the J7(Host) and the device. Please do reach out to your TI representative and he can help set up the call. We can get the HW experts also looped into the call as needed.

    Thanks.

  • Can you read the following registers:

    USB0_MMR_MMRVBP_USBSS_CMN:  0x04104004

    USB1_MMR_MMRVBP_USBSS_CMN:  0x0411 4004

    -Zack

  • Here it is 

    root@j7-evm:~# devmem2 0x04104004
    /dev/mem opened.
    Memory mapped at address 0xffffa8a00000.
    Read at address 0x04104004 (0xffffa8a04004): 0x00090201
    root@j7-evm:~#
    root@j7-evm:~# devmem2 0x04114004
    /dev/mem opened.
    Memory mapped at address 0xffffa6610000.
    Read at address 0x04114004 (0xffffa6614004): 0x00090201
    root@j7-evm:~#

  • Satish,
    Here is something to try: Before PWRUP_RST_N bit of USB1_MMR_MMRVBP_USBSS_CMN is set to 1, write bits 18:17 of 0x0411 4004 to be 0b01.  Praveen, can you comment on if or how Satish can do this?

    -Zack

  • Yeah, I need some help with how to do this manually and/or from the source code.

  • Satish,

    To write to the register manually, we can you the devmem2 command as well.

    root@j7-evm:~# devmem2 0x04114004 w 0x000B0201

    Try reading it back to confirm if the write is successful.

    root@j7-evm:~# devmem2 0x04114004 w

    Thanks.

  • Praveen,

    The TRM specifies that this field needs to be written to before PWRUP_RST_N is set to 1.  That's the 0 bit of this register.  It's already 1 at the point where Satish read the registers the first time, so if he does the write at that point it won't take effect.  He needs to do the write command before the Linux driver takes releases reset.

  • Zack, Satish,

    The TRM specifies that this field needs to be written to before PWRUP_RST_N is set to 1.  That's the 0 bit of this register.  It's already 1 at the point where Satish read the registers the first time, so if he does the write at that point it won't take effect.  He needs to do the write command before the Linux driver takes releases reset.

    As per your stated above, this register must be set before the USB driver is started at either U-Boot or Kernel. This is very complicated and I am not sure how this can be done without modifying the code and rebuilding it.

    One suggestion is to try this at the U-Boot prompt, provided the UBoot has not configured the USB instance, before starting the kernel. 

    Thanks.

  • Satish,

    Could you provide the complete kernel boot log?

    Thanks.

  • Also, can you give us the value in register 0x04110480?

    And a schematic showing the D+ and D- lines, and the part # of the device?

    -Zack

  • Hi Zack,

    Please find attached the kernel log.

    0312.kernel_log.txt

    Unfortunately, my system doesn't allow me to read 0x04110480 memory location. after the read command it is just stuck like below 

    From Kernel

    root@j7-evm:~# devmem2 0x04110480
    /dev/mem

    from UBoot

    => md 0x04110480
    04110480:

    And a schematic showing the D+ and D- lines, and the part # of the device?

    >> Yes we have USB chip on J7 where it is working as self powered device, D+ & D- is connected to the Modem.

    Thanks,

    Satish 

  • Satish,

    I gave the wrong address.  Can you try 0x4124480?  Just from the kernel, uboot isn't necessary.

    -Zack

  • Hi Zack,

    Its same behaviour, it is stuck again.

    root@j7-evm:~# devmem2 0x4124480
    /dev/mem opened.
    Memory mapped at address 0xffffa1ac0000.

    Thanks,

    Satish

  • Hi Zack,

    Any update on this?

    Thanks,

    Satish

  • Hi Satish,

    In the register reads we discussed previously, I was trying to read a connection status bit.  For some reason, they can't be read with devmem2.  I found the same results on an EVM using a working interface.  For now, I want to address something that one of our designers brought up, the use of DRVVBUS.  Remind me, on USB0, is DRVVBUS connected, and is it in the device tree file?  If so, could you add DRVVBUS to the device tree for USB1?

    Regards,

    Zack

  • Hi Zack,

    I do have USB0_DRVVBUS connected in Schematic but there is no entry added in the device tree for DRVVBUS for USB0.

    There is no DRVVBUS for USB1. In order to test DRVVBUS, what entry should I add in the device tree of the USB1 node for DRVVBUS?

    Thanks,

    Satish