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.

DM8148: MUBS usb2phy rxcalibration failed

Hi, All,

DM8148 is using in our board. Currently, we are using the MUSB driver in PSP_04_04_00_01 which includes in the EZSDK 5.05.02.00. We set both usb controllers as host and they work properly. We want to patch all the changes on MUSB driver in PSP_04_04_00_02 to our system. However, after I port the MUSB driver from latest release in arago project (http://arago-project.org/git/projects/?p=linux-omap3.git;a=shortlog ) into the PSP_04_04_00_01, I got the following error. When kernel boot-up, the usb port is not working.

usb2phy_config 1131: usb2phy rxcalibration failed

Followed is more debug messages from console:

[Tue Feb 23 09:24:06.405 2016] musb-hdrc: version 6.0, host, debug=0
[Tue Feb 23 09:24:06.408 2016] musb-hdrc musb-hdrc.0: dma type: dma-cppi41
[Tue Feb 23 09:24:06.413 2016] MUSB controller-0 revision 4ea20800
[Tue Feb 23 09:24:06.417 2016] usb2phy_config 1131: usb2phy rxcalibration failed
[Tue Feb 23 09:24:06.421 2016] musb-hdrc musb-hdrc.0: MUSB HDRC host driver
[Tue Feb 23 09:24:06.424 2016] musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
[Tue Feb 23 09:24:06.433 2016] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[Tue Feb 23 09:24:06.437 2016] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[Tue Feb 23 09:24:06.443 2016] usb usb1: Product: MUSB HDRC host driver
[Tue Feb 23 09:24:06.448 2016] usb usb1: Manufacturer: Linux 2.6.37 musb-hcd
[Tue Feb 23 09:24:06.453 2016] usb usb1: SerialNumber: musb-hdrc.0
[Tue Feb 23 09:24:06.455 2016] hub 1-0:1.0: USB hub found
[Tue Feb 23 09:24:06.458 2016] hub 1-0:1.0: 1 port detected
[Tue Feb 23 09:24:06.460 2016] musb-hdrc musb-hdrc.0: USB Host mode controller at d701e000 using DMA, IRQ 18
[Tue Feb 23 09:24:06.467 2016] musb-hdrc musb-hdrc.1: dma type: dma-cppi41
[Tue Feb 23 09:24:06.471 2016] MUSB controller-1 revision 4ea20800
[Tue Feb 23 09:24:06.475 2016] usb2phy_config 1131: usb2phy rxcalibration failed
[Tue Feb 23 09:24:06.480 2016] musb-hdrc musb-hdrc.1: MUSB HDRC host driver
[Tue Feb 23 09:24:06.484 2016] musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
[Tue Feb 23 09:24:06.489 2016] usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
[Tue Feb 23 09:24:06.495 2016] usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[Tue Feb 23 09:24:06.501 2016] usb usb2: Product: MUSB HDRC host driver
[Tue Feb 23 09:24:06.505 2016] usb usb2: Manufacturer: Linux 2.6.37 musb-hcd
[Tue Feb 23 09:24:06.509 2016] usb usb2: SerialNumber: musb-hdrc.1
[Tue Feb 23 09:24:06.515 2016] hub 2-0:1.0: USB hub found
[Tue Feb 23 09:24:06.517 2016] hub 2-0:1.0: 1 port detected
[Tue Feb 23 09:24:06.520 2016] musb-hdrc musb-hdrc.1: USB Host mode controller at d7028800 using DMA, IRQ 19

Could anyone have this issue before or any suggestion what is the root cause and how to resolve this failure?


Thanks,

Shunnian

  • Hi Shunnian,

    Can you try to download and use the latest ti81xx linux kernel, instead of patching old kernel, will be there any difference?

    arago-project.org/.../

    When you open the above link, click on the most upper right "snapshot" button, thus you will download the latest ti81xx linux kernel source in tar.gz format (linux-omap3-97101e6c43c0e956dbc2863bd3e50ab70f987a91.tar.gz). Then extract on your host machine, you will have linux-omap3 folder. You should build your new linux kernel from that folder and test it on the DM814x board.

    This ti81xx-master is based on PSP04.04.00.02 plus several patches above. If the ti81xx-master fail, you can also check with PSP04.04.00.02, you can get it from the below link:
    processors.wiki.ti.com/.../TI81XX_Linux_PSP_Releases

    Regards,
    Pavel

  • Hi, Pavel,

    Thanks for your quick response. What I have done is as followed:
    1) Download the latest kernel source ( ti81xx-master ) as you mentioned and extract it.
    2) Copy the whole musb driver folder (driver\usb\musb ) into our source tree.
    3) Copy the following two files into our source tree and overwrite the old files to resolve the compile error.
    arch\arm\plat-omap\include\plat\usb.h
    arch\arm\mach-omap2\usb-musb.c

    Since we already made a lot of changes from EZSDK base code for our custom HW board, we cannot directly build the ti81xx-master and run on our board.

    Do you have any other suggestion?

    In addition, I tried to search the following register in dm8148 datasheet and TRM but I cannot find it:
    #define USB2PHY_RXCALIB_REG_OFFS 0x304

    Any idea on which doc it is defined?

    Thanks,
    Shunnian
  • Shunnian,

    When I try the latest ti81xx linux kernel on the DM814x TI EVM, I have successful USB Init:

    musb-hdrc: version 6.0, host, debug=0

    musb-hdrc musb-hdrc.0: dma type: dma-cppi41

    MUSB controller-0 revision 4ea20800

    usb2phy: computed values rxcalib(15)DACs(30 15 15)

    usb2phy: override computed values rxcalib(15)DACs(30 15 15)

    usb2phy_config: musb(0) rxcalib done, rxcalib read value 6f6f5f7e

    musb-hdrc musb-hdrc.0: MUSB HDRC host driver

    musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1

    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002

    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1

    usb usb1: Product: MUSB HDRC host driver

    usb usb1: Manufacturer: Linux 2.6.37 musb-hcd

    usb usb1: SerialNumber: musb-hdrc.0

    hub 1-0:1.0: USB hub found

    hub 1-0:1.0: 1 port detected

    musb-hdrc musb-hdrc.0: USB Host mode controller at d701e000 using DMA, IRQ 18

    musb-hdrc musb-hdrc.1: dma type: dma-cppi41

    MUSB controller-1 revision 4ea20800

    usb2phy: computed values rxcalib(15)DACs(28 13 14)

    usb2phy: override computed values rxcalib(15)DACs(28 13 14)

    usb2phy_config: musb(1) rxcalib done, rxcalib read value 6f6e5b76

    musb-hdrc musb-hdrc.1: MUSB HDRC host driver

    musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2

    usb usb2: New USB device found, idVendor=1d6b, idProduct=0002

    usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1

    usb usb2: Product: MUSB HDRC host driver

    usb usb2: Manufacturer: Linux 2.6.37 musb-hcd

    usb usb2: SerialNumber: musb-hdrc.1

    hub 2-0:1.0: USB hub found

    hub 2-0:1.0: 1 port detected

    musb-hdrc musb-hdrc.1: USB Host mode controller at d7026800 using DMA, IRQ 19

    Do you have USB device attached to the DM814x board USB ports during linux kernel boot/load? What is your DM814x device silicon revision?

    Regards,
    Pavel


  • Hi, Pavel,

    Glad to know that the latest code worked in EVM. Thanks for your test.

    Yes, we have one camera connected to usb0 and one microchip 2-ports hub connected to usb1 to add one more usb port to the system.

    The part number is TMS320DM8148SCYEA0. So, the silicon revision should be revision 3.0 (video security).

    Regards,
    Shunnian
  • Shunnian,

    Can you try to boot/load the latest kernel without plug/attach any external USB devices to the DM814x board USB ports, is there any difference?

    One other suggestion is to revert back the USB related patches one by one and to check which one exactly is causing this error.

    BR
    Pavel
  • Shunnian Zhai said:
    In addition, I tried to search the following register in dm8148 datasheet and TRM but I cannot find it:
    #define USB2PHY_RXCALIB_REG_OFFS 0x304

    Any idea on which doc it is defined?

    This register full address for USB0 is 0x47401304 and for USB1 is 0x47401B04. The USB2PHY registers are not documented as these registers are not to be used by the users. These registers are primarly used to trim and test the USB PHY, the values should not be modified by the users.

    See also the below pointers:

    Regards,
    Pavel

  • Hi, Pavel,

    Thank you for the info on registers.

    I also did the test by removing the camera and disabling the hub connected to usb0 and usb1. There is no difference and still failed.

    As for the suggestion to revert the patch one by one, it will take some time to work it out.

    For quick test/debug, I do the following:

    1) print the default rxcalib regval before error printing as followed:

    default rxcalib regval 00000000

    Why the value is all 0? Anything wrong here?

    2) comment out the "return" if the USB2PHY_RXCALIB_DONE unsuccessful so the code can continue to run, let is print more values for debug purpose as followed:

    musb-hdrc: version 6.0, host, debug=5
    musb-hdrc musb-hdrc.0: dma type: dma-cppi41
    MUSB controller-0 revision 4ea20800
    default rxcalib regval 00000000
    usb2phy_config 1136: usb2phy rxcalibration failed
    usb2phy_config 1144: musb(0) sign 0 current RXcalib 0
    initial value of DAC3 (0) DAC2(0) DAC1(0)
    usb2phy: computed values rxcalib(15)DACs(0 2 2)
    usb2phy: override computed values rxcalib(15)DACs(0 2 2)
    musb(0) sign(1) rxcalib(15) dac3(2) dac2(2) written val 6f204510
    usb2phy_config: musb(0) rxcalib done, rxcalib read value 6f204100
    musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: MUSB HDRC host driver
    usb usb1: Manufacturer: Linux 2.6.37 musb-hcd
    usb usb1: SerialNumber: musb-hdrc.0
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    musb-hdrc musb-hdrc.0: USB Host mode controller at d701e000 using DMA, IRQ 18

    Could you help advise if anything is wrong from these info?

    Thanks,

    Shunnian

  • Shunnian Zhai said:

    1) print the default rxcalib regval before error printing as followed:

    default rxcalib regval 00000000

    Why the value is all 0? Anything wrong here?

    It seems to be wrong. On my side I have "default rxcalib regval 004f1a6e".

    Shunnian Zhai said:
    Could you help advise if anything is wrong from these info?

    This seems to me to be HW malfunction. You might damaged the USB ports of your custom board. The USB PHY is integrated within the DM814x device, the init/config procedure should be handles correctly by the MUSB driver with no need for user interaction. I do not think you will be able to fix your board changing the USB driver (drivers/usb/musb/ti81xx.c). There are no custom board specific configuration required in the usb driver except for enabling the usb support in custom board specifc file (i.e. arch/arm/mach-omap2/board-ti8148evm.c).

    Can you double check that when using EZSDK5.05.00.02/PSP04.04.00.01 MUSB driver, the USB PHY will be init/config properly?

    Regards,
    Pavel

  • Hi, Pavel,

    I resolved the issue after copying one more latest file as followed to our system and rebuilding the kernel:

    arch/arm/plat-omep/include/plat/cpu.h

    Now console messages look like followed. However, I notice there is difference on the DACs values bwtween usb0 and usb1. Is it correct?

    musb-hdrc: version 6.0, host, debug=0
    musb-hdrc musb-hdrc.0: dma type: dma-cppi41
    MUSB controller-0 revision 4ea20800
    usb2phy: computed values rxcalib(15)DACs(29 13 15)
    usb2phy: override computed values rxcalib(15)DACs(29 13 15)
    usb2phy_config: musb(0) rxcalib done, rxcalib read value 6f6edb7e
    musb-hdrc musb-hdrc.0: MUSB HDRC host driver
    musb-hdrc musb-hdrc.0: new USB bus registered, assigned bus number 1
    usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb1: Product: MUSB HDRC host driver
    usb usb1: Manufacturer: Linux 2.6.37 musb-hcd
    usb usb1: SerialNumber: musb-hdrc.0
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected
    musb-hdrc musb-hdrc.0: USB Host mode controller at d701e000 using DMA, IRQ 18
    musb-hdrc musb-hdrc.1: dma type: dma-cppi41
    MUSB controller-1 revision 4ea20800
    usb2phy: computed values rxcalib(15)DACs(31 13 16)
    usb2phy: override computed values rxcalib(15)DACs(31 13 16)
    usb2phy_config: musb(1) rxcalib done, rxcalib read value 6f6fdb86
    musb-hdrc musb-hdrc.1: MUSB HDRC host driver
    musb-hdrc musb-hdrc.1: new USB bus registered, assigned bus number 2
    usb usb2: New USB device found, idVendor=1d6b, idProduct=0002
    usb usb2: New USB device strings: Mfr=3, Product=2, SerialNumber=1
    usb usb2: Product: MUSB HDRC host driver
    usb usb2: Manufacturer: Linux 2.6.37 musb-hcd
    usb usb2: SerialNumber: musb-hdrc.1
    hub 2-0:1.0: USB hub found
    hub 2-0:1.0: 1 port detected
    musb-hdrc musb-hdrc.1: USB Host mode controller at d7028800 using DMA, IRQ 19

    Thank you very much for your patience and good support on this issue.

    Regards,

    Shunnian

  • Shunnian,

    I have the same on the DM814x TI EVM (difference on the DACs values between usb0 and usb1), so I think this is fine.

    MUSB controller-0 revision 4ea20800
    usb2phy: computed values rxcalib(15)DACs(30 15 15)
    usb2phy: override computed values rxcalib(15)DACs(30 15 15)
    usb2phy_config: musb(0) rxcalib done, rxcalib read value 6f6f5f7e


    MUSB controller-1 revision 4ea20800
    usb2phy: computed values rxcalib(15)DACs(28 13 14)
    usb2phy: override computed values rxcalib(15)DACs(28 13 14)
    usb2phy_config: musb(1) rxcalib done, rxcalib read value 6f6e5b76

    Regards,
    Pavel
  • Hi, Pavel,

    Thanks for your confirmation.

    Regards,
    Shunnian