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.

AM6422: USB controller about phyrst_a_enable register

Part Number: AM6422


Hello,

I'm trying to enable phyrst_a_enable register for USB controller ---which is the work around to address issue with RX sensitivty  for USB2 PHY.

And I found out that in currently CDNS3 driver(linux 6.1    drd.c), it is only set when USB dr mode is OTG.

My question is ,do I need to set this register when USB'S dr mode is peripheral?

  • Hi Yuchen,

    AM64x Errata i2134 only affects SR1.0, which you shouldn't use in your project. So you don't need to worry about the workaround for i2134.

  • Hi Bin, 

    I have more information to provide:

    Currently I am using SR2 AM6422. 

    And our project need to use USB 2.0 as RNDIS/NCM.

    If I configure USB dr mode to OTG and set "phyrst_a_enable" in DTS, everything works fine.

    But If I configure USB dr mode to peripheral or OTG --- without set "phyrst_a_enable " in DTS, the USB gadget will occasionally stuck at initializing then the whole system will stuck. Nothing I can do but to power off then power on the whole device.

    Therefore I think the issue I met has something to do with the "phyrst_a_enable".

    And for some reason, I have to set dr mode to peripheral in the DTS, and by reading the CDNS3 driver, I found out that if the dr mode is peripheral then "phyrst_a_enable" is not set at all. 

    So I really need to know, Do I need to set "phyrst_a_enalbe" when the DR mode is peripheral?

  • Hi Yuchen,

    This USB driver is implemented by the open source community, but I will try to see if I can find the reason why phyrst_a_enable bit is only set for OTG mode but not PERIPHERAL mode.

    Meanwhile, can you please try to add the code which set this phyrst_a_enable bit in the 'case USB_DR_MODE_PERIPHERAL:' branch in function cdns_set_mode() to see if you can make 'dr_mode = peripheral' to work in your project?

  • Hello Bin,

    I have try to add the code which set this phyrst_a_enable bit in the 'case USB_DR_MODE_PERIPHERAL:' branch in function cdns_set_mode() but unfortunatelly it doesn't work.

    Do you have any update about "phyrst_a_enable" register in dr mode?

  • Also, "phyrst_a_enable" is mentioned in Errata i2134. The Errata sheet says that it can only affect SR1, but it seems like it will also affect SR2.

    Do you have plan to provide patch for Errata i2134?

  • Hi Yuchen,

    And for some reason, I have to set dr mode to peripheral in the DTS,

    Can you please explain why you have to set dr_mode to "peripheral"?

  • Hi Bin,

    It is because of we have a request from customer ---- they need to see "usb0" after entering "ifconfig" even if the the usb cable is not connected.

    If I set dr mode to OTG, usb0 can only be seen when USB cable is connected. 

    Or do you have any idea how I can set dr mode to OTG meanwhile "usb0" can be seen even if the usb cable is not connected?

  • Hi Yuchen,

    Let me check this on my SK board, and get back to you.

  • Hi Yuchen,

    they need to see "usb0" after entering "ifconfig" even if the the usb cable is not connected.

    What does the customer need to do with ifconfig on usb0 interface?

    Note that udev rules can be used for any configuration whenever usb0 interface is created.

  • Hi Bin,

    The customer need to config IP address for this "usb0" interface and use dhcpd server to config IPv4 Address/Subnet Mask for the RNDIS ethernet gadget appears in Windows.

  • Hi Yuchen,

    To configure a network interface, the network interface doesn't have to exist. I am not a Ethernet expert, but in the old school way, network interfaces are configured in /etc/network/interfaces. Then whenever a network interface is created, Linux will automatically configure it based on the settings in /etc/network/interfaces. I think nowadays most Linux systems moved to systemd, but it should have a similar way to configure network interfaces.