allwinner usb phy driver
Hi:
All of the usb phys run sun4i_usb_phy_write to set some private tp register, but based on allwinner R40's bsp code, sun4i_usb_phy_write only work for ehci0/ohci0.
And I had changed PHY_TX_AMPLITUDE_TUNE's value to 0x17 from 0x14, when the usb enter TEST_J mode, only the ehci0's amplitude is changed.
sun4i_usb_phy_write is as same as USBC_Phy_TpWrite in allwinner bsp code, it is used for change otg's tp values. the backtrace is:
sunxi_udc_bsp_init -> open_usb_clock -> UsbPhyInit(0) -> USBC_Phy_TpWrite.
The other ehci/ohci device should use usb_phyx_tp_write instead. The backtrace is:
open_ehci_clock -> open_clock -> usb_phyx_tp_write
Hi qianfan,
Could you please check if this patch works for you?
https://lore.kernel.org/all/[email protected]/