No USB with mainline Kernel 4.16


#1

Hey there,
I’m having issues with the usb host interface with the mainline kernel 4.16.
I haven’t changed any devicetree files so far and used the sunxi_defconfig to configure the kernel.
After booting with the Kernel + .dtb file I got this error:

sun4i-usb-phy 1c19400.phy: Couldn't request ID GPIO

No USB device gets recognized. I think the V3s stays in device mode and don’t act as host.

sun8i-v3s
sun8i-v3s-lichee…


#2

Hi,
There is no “ehci0” and “ohci0” in device tree , needed for host behavior .
Probably in both files : sun8i-v3s.dtsi <- definition ;
sun8i-v3s-…dts <- enabling them.
Check Old device tree you have been using.


#3

No luck this time :confused:
sun8i-v3s:

           usb_otg: usb@1c19000 {
		compatible = "allwinner,sun8i-h3-musb";
		reg = <0x01c19000 0x0400>;
		clocks = <&ccu CLK_BUS_OTG>;
		resets = <&ccu RST_BUS_OTG>;
		interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_HIGH>;
		interrupt-names = "mc";
		phys = <&usbphy 0>;
		phy-names = "usb";
		extcon = <&usbphy 0>;
		status = "disabled";
	};

	usbphy: phy@1c19400 {
		compatible = "allwinner,sun8i-v3s-usb-phy";
		reg = <0x01c19400 0x2c>,
		      <0x01c1a800 0x4>;
		reg-names = "phy_ctrl",
			    "pmu0";
		clocks = <&ccu CLK_USB_PHY0>;
		clock-names = "usb0_phy";
		resets = <&ccu RST_USB_PHY0>;
		reset-names = "usb0_reset";
		status = "disabled";
		#phy-cells = <1>;
	};

	ehci0: usb@01c1a000 {
		compatible = "allwinner,sun8i-v3s-ehci", "generic-ehci";
		reg = <0x01c1a000 0x100>;
		interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>;
		resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
		phys = <&usbphy 0>;
   		phy-names = "usb";
		status = "okay";
	};

	ohci0: usb@01c1a400 {
		compatible = "allwinner,sun8i-v3s-ohci", "generic-ohci";
		reg = <0x01c1a400 0x100>;
		interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
		clocks = <&ccu CLK_BUS_EHCI0>, <&ccu CLK_BUS_OHCI0>, <&ccu CLK_USB_OHCI0>;
		resets = <&ccu RST_BUS_EHCI0>, <&ccu RST_BUS_OHCI0>;
		phys = <&usbphy 0>;
   		phy-names = "usb";
		status = "okay";
	};

sun8i-v3s-licheepizero:

     &usb_otg {
                     dr_mode = "host";
                     status = "okay";
               };

     &usbphy {
	        usb0_id_det-gpio = <&pio 5 6 GPIO_ACTIVE_HIGH>;
                status = "okay";
               };

I still get these error messages:
[ 0.050035] sun4i-usb-phy 1c19400.phy: Couldn’t request ID GPIO
[ 1.114188] usb usb2: Product: Generic Platform OHCI controller
[ 1.120142] usb usb2: Manufacturer: Linux 4.16.0-rc7-dirty ohci_hcd
[ 1.126433] usb usb2: SerialNumber: 1c1a400.usb
[ 1.140890] usb_phy_generic usb_phy_generic.0.auto: usb_phy_generic.0.auto supply vcc not found, using dummy regulator
[ 1.152367] musb-hdrc musb-hdrc.1.auto: MUSB HDRC host driver
[ 1.158248] musb-hdrc musb-hdrc.1.auto: new USB bus registered, assigned bus number 3
[ 1.166484] usb usb3: New USB device found, idVendor=1d6b, idProduct=0002
[ 1.173292] usb usb3: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 1.180593] usb usb3: Product: MUSB HDRC host driver
[ 1.185564] usb usb3: Manufacturer: Linux 4.16.0-rc7-dirty musb-hcd
[ 1.191868] usb usb3: SerialNumber: musb-hdrc.1.auto
[ 1.795811] usb 2-1: new low-speed USB device number 2 using ohci-platform
[ 2.015774] usb 2-1: device descriptor read/64, error -62
[ 2.345790] usb 2-1: device descriptor read/64, error -62
[ 2.675804] usb 2-1: new low-speed USB device number 3 using ohci-platform
[ 2.895790] usb 2-1: device descriptor read/64, error -62
[ 3.225849] usb 2-1: device descriptor read/64, error -62
[ 3.345949] usb usb2-port1: attempt power cycle
[ 3.896579] usb 2-1: new low-speed USB device number 4 using ohci-platform
[ 4.355954] usb 2-1: device not accepting address 4, error -62
[ 4.576011] usb 2-1: new low-speed USB device number 5 using ohci-platform
[ 5.035968] usb 2-1: device not accepting address 5, error -62
[ 5.075290] usb usb2-port1: unable to enumerate USB device

No USB device is connected to the V3s to this point. And if i plug one in (mice, flash drive)
nothing happens no new messages from dmesg and lsusb only show me this:

Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

No device plugged in!


#4

I think I had a solder bridge between some pins…
I tried a new IC and it works with out any issues.