Aw: Re: [BUG] USB broken on rk3568 based R2Pro
Frank Wunderlich
frank-w at public-files.de
Fri Jul 8 02:37:25 PDT 2022
regards Frank
> Gesendet: Donnerstag, 07. Juli 2022 um 21:41 Uhr
> Von: "Peter Geis" <pgwipeout at gmail.com>
> On Thu, Jul 7, 2022 at 1:51 PM Frank Wunderlich <frank-w at public-files.de> wrote:
> >
> > Hi,
> >
> > traced it down with manual reverts to this one:
> >
> > commit 6a98df08ccd55e87947d253b19925691763e755c
> > phy: rockchip-inno-usb2: Fix muxed interrupt support
> >
> > luckily i can revert only this and now upper usb-port works again
> >
> > @samuel: have you an idea how to fix your problem without breaking my board? :)
> >
> > @greg/Vinod: maybe we can add a revert of this in mainline till issue is resolved?
> >
> > regards Frank
>
> I don't know what you're running, but with the standard arm64
> defconfig w/ all rockchip stuff built in, I have no issues here on
> 5.19.
> Note, the following changes are necessary to the 5.19 dts here:
> Remove the extcon from usb_host0_xhci, as the production model doesn't
> have automatic switching capabilities. The ID pin was removed in favor
> of the usb debug function which also doesn't work.
> Add dr_mode = "host" to the same node, for the same reason.
i already added the dr_mode=host to my xhci-node [1], but it is not pushed down to usb2-phy
it looks like the dr_mode property is ignored (or not yet set)...so the switch statement which is added by the patch choose the wrong initialization. in 5.18 init was done independ from phy-mode
# dmesg | grep -i debug
[ 1.093370] phy phy-fe8a0000.usb2phy.0: DEBUG: Passed rockchip_usb2phy_irq 981 port_id:1(OTG:0,HOST:1)
[ 1.094739] phy phy-fe8a0000.usb2phy.1: DEBUG: Passed rockchip_usb2phy_irq 981 port_id:0(OTG:0,HOST:1)
# cat /sys/firmware/devicetree/base/usb at fcc00000/dr_mode
host#
# cat /sys/firmware/devicetree/base/usb at fd000000/dr_mode
host#
usb_host0_xhci: usb at fcc00000 {
phys = <&usb2phy0_otg>, <&combphy0 PHY_TYPE_USB3>; <<<< usb2phy0_otg seems to be initialized to otg mode and dr_mode is not applied when rockchip_usb2phy_irq is run
second controller works
usb_host1_xhci: usb at fd000000 {
phy-names = "usb2-phy", "usb3-phy";
in case that defconfig is the cause like peter guessed...i use same defconfig for 5.18 (working) and 5.19-rc (only lower port working)
$ grep -i 'usb\|hci\|otg' ../build/.config
# CONFIG_HISI_HIKEY_USB is not set
# CONFIG_MISC_RTSX_USB is not set
CONFIG_SATA_AHCI=y
CONFIG_SATA_AHCI_PLATFORM=y
# CONFIG_AHCI_CEVA is not set
# CONFIG_AHCI_QORIQ is not set
# CONFIG_SATA_ACARD_AHCI is not set
# CONFIG_MDIO_MVUSB is not set
CONFIG_USB_NET_DRIVERS=y
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_RTL8152 is not set
# CONFIG_USB_LAN78XX is not set
# CONFIG_USB_USBNET is not set
# CONFIG_USB_HSO is not set
# CONFIG_USB_IPHETH is not set
# CONFIG_USB_NET_RNDIS_WLAN is not set
# CONFIG_MOUSE_SYNAPTICS_USB is not set
# CONFIG_XILLYUSB is not set
# CONFIG_I2C_TINY_USB is not set
# USB GPIO expanders
# end of USB GPIO expanders
# USB-based Watchdog Cards
# CONFIG_USBPCWATCHDOG is not set
# CONFIG_REGULATOR_QCOM_USB_VBUS is not set
# CONFIG_USB_PULSE8_CEC is not set
# CONFIG_USB_RAINSHADOW_CEC is not set
CONFIG_SND_USB=y
# CONFIG_SND_USB_AUDIO is not set
# CONFIG_SND_USB_UA101 is not set
# CONFIG_SND_USB_CAIAQ is not set
# CONFIG_SND_USB_6FIRE is not set
# CONFIG_SND_USB_HIFACE is not set
# CONFIG_SND_USB_POD is not set
# CONFIG_SND_USB_PODHD is not set
# CONFIG_SND_USB_TONEPORT is not set
# CONFIG_SND_USB_VARIAX is not set
# USB HID support
CONFIG_USB_HID=y
# CONFIG_USB_HIDDEV is not set
# end of USB HID support
CONFIG_USB_OHCI_LITTLE_ENDIAN=y
CONFIG_USB_SUPPORT=y
CONFIG_USB_COMMON=y
# CONFIG_USB_LED_TRIG is not set
# CONFIG_USB_ULPI_BUS is not set
CONFIG_USB_CONN_GPIO=y
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB=y
CONFIG_USB_PCI=y
# CONFIG_USB_ANNOUNCE_NEW_DEVICES is not set
# Miscellaneous USB options
CONFIG_USB_DEFAULT_PERSIST=y
# CONFIG_USB_FEW_INIT_RETRIES is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
CONFIG_USB_OTG=y
# CONFIG_USB_OTG_PRODUCTLIST is not set
# CONFIG_USB_OTG_DISABLE_EXTERNAL_HUB is not set
# CONFIG_USB_OTG_FSM is not set
# CONFIG_USB_LEDS_TRIGGER_USBPORT is not set
CONFIG_USB_AUTOSUSPEND_DELAY=2
# CONFIG_USB_MON is not set
# USB Host Controller Drivers
# CONFIG_USB_C67X00_HCD is not set
CONFIG_USB_XHCI_HCD=y
# CONFIG_USB_XHCI_DBGCAP is not set
CONFIG_USB_XHCI_PCI=y
# CONFIG_USB_XHCI_PCI_RENESAS is not set
CONFIG_USB_XHCI_PLATFORM=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_EHCI_ROOT_HUB_TT=y
CONFIG_USB_EHCI_TT_NEWSCHED=y
CONFIG_USB_EHCI_PCI=y
# CONFIG_USB_EHCI_FSL is not set
CONFIG_USB_EHCI_HCD_PLATFORM=y
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_FOTG210_HCD is not set
# CONFIG_USB_MAX3421_HCD is not set
CONFIG_USB_OHCI_HCD=y
CONFIG_USB_OHCI_HCD_PCI=y
CONFIG_USB_OHCI_HCD_PLATFORM=y
# CONFIG_USB_UHCI_HCD is not set
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
# CONFIG_USB_HCD_TEST_MODE is not set
# CONFIG_USB_XEN_HCD is not set
# USB Device Class drivers
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set
# CONFIG_USB_WDM is not set
# CONFIG_USB_TMC is not set
# NOTE: USB_STORAGE depends on SCSI but BLK_DEV_SD may
# also be needed; see USB_STORAGE Help for more info
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_REALTEK is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_ISD200 is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_STORAGE_KARMA is not set
# CONFIG_USB_STORAGE_CYPRESS_ATACB is not set
# CONFIG_USB_STORAGE_ENE_UB6250 is not set
# CONFIG_USB_UAS is not set
# USB Imaging devices
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set
# CONFIG_USBIP_CORE is not set
# CONFIG_USB_CDNS_SUPPORT is not set
# CONFIG_USB_MUSB_HDRC is not set
CONFIG_USB_DWC3=y
CONFIG_USB_DWC3_HOST=y
CONFIG_USB_DWC3_PCI=y
CONFIG_USB_DWC3_HAPS=y
CONFIG_USB_DWC3_OF_SIMPLE=y
CONFIG_USB_DWC2=y
CONFIG_USB_DWC2_HOST=y
# Gadget/Dual-role mode requires USB Gadget support to be enabled
# CONFIG_USB_DWC2_PCI is not set
# CONFIG_USB_DWC2_DEBUG is not set
# CONFIG_USB_DWC2_TRACK_MISSED_SOFS is not set
# CONFIG_USB_CHIPIDEA is not set
# CONFIG_USB_ISP1760 is not set
# USB port drivers
# CONFIG_USB_SERIAL is not set
# USB Miscellaneous drivers
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_ADUTUX is not set
# CONFIG_USB_SEVSEG is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_FTDI_ELAN is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_SISUSBVGA is not set
# CONFIG_USB_LD is not set
# CONFIG_USB_TRANCEVIBRATOR is not set
# CONFIG_USB_IOWARRIOR is not set
# CONFIG_USB_TEST is not set
# CONFIG_USB_EHSET_TEST_FIXTURE is not set
# CONFIG_USB_ISIGHTFW is not set
# CONFIG_USB_YUREX is not set
# CONFIG_USB_EZUSB_FX2 is not set
# CONFIG_USB_HUB_USB251XB is not set
# CONFIG_USB_HSIC_USB3503 is not set
# CONFIG_USB_HSIC_USB4604 is not set
# CONFIG_USB_LINK_LAYER_TEST is not set
# CONFIG_USB_CHAOSKEY is not set
# USB Physical Layer drivers
CONFIG_USB_PHY=y
CONFIG_NOP_USB_XCEIV=y
# CONFIG_USB_GPIO_VBUS is not set
# CONFIG_USB_ISP1301 is not set
# CONFIG_USB_ULPI is not set
# end of USB Physical Layer drivers
# CONFIG_USB_GADGET is not set
CONFIG_USB_ROLE_SWITCH=y
CONFIG_MMC_SDHCI=y
# CONFIG_MMC_SDHCI_PCI is not set
CONFIG_MMC_SDHCI_ACPI=y
CONFIG_MMC_SDHCI_PLTFM=y
# CONFIG_MMC_SDHCI_OF_ARASAN is not set
# CONFIG_MMC_SDHCI_OF_ASPEED is not set
# CONFIG_MMC_SDHCI_OF_AT91 is not set
CONFIG_MMC_SDHCI_OF_DWCMSHC=y
# CONFIG_MMC_SDHCI_CADENCE is not set
CONFIG_MMC_SDHCI_F_SDH30=y
# CONFIG_MMC_SDHCI_MILBEAUT is not set
CONFIG_MMC_CQHCI=y
# CONFIG_MMC_SDHCI_XENON is not set
# CONFIG_MMC_SDHCI_OMAP is not set
# CONFIG_MMC_SDHCI_AM654 is not set
# LED driver for blink(1) USB RGB LED is under Special HID drivers (HID_THINGM)
CONFIG_EXTCON_USB_GPIO=y
# CONFIG_EXTCON_USBC_TUSB320 is not set
# CONFIG_BCM_KONA_USB2_PHY is not set
# CONFIG_PHY_PXA_28NM_USB2 is not set
# CONFIG_PHY_CPCAP_USB is not set
CONFIG_PHY_ROCKCHIP_INNO_USB2=y
CONFIG_PHY_ROCKCHIP_USB=y
# CONFIG_PHY_SAMSUNG_USB2 is not set
# CONFIG_USB4 is not set
as you see i have
CONFIG_USB_OTG=y
and
CONFIG_USB_ROLE_SWITCH=y
enabled which should push down the dr_mode property to phy
my full defconfig/source is here [2]
regards Frank
[1] https://github.com/frank-w/BPI-R2-4.14/commit/0530fbbf7785a9709354c3de1e5a3cd01a3a859a
[2] https://github.com/frank-w/BPI-R2-4.14/blob/5.19-rc/arch/arm64/configs/quartz64_defconfig
More information about the linux-phy
mailing list