USB2 host mode can not detect usb device in kernel 4.14

custom_board

#1

Hi,
with driver dwc3-qcom, USB3 port can detect usb mouse and work properly, but usb2 port can’t.

related dtsi and dmesg as below.
branch: qcomlt-4.14
fs version: buster-222

apq8096-db820c.dtsi

            usb@76f8800 {
                    status = "okay";
                    extcon = <&usb2_id>;
                    dwc3@7600000 {
                            extcon = <&usb2_id>;
                            dr_mode = "host";
                            maximum-speed = "high-speed";
                    };
            };

msm8996.dtsi

            usb2: usb@76f8800 {
                    compatible = "qcom,msm8996-dwc3", "qcom,dwc3";
                    reg = <0x76f8800 0x400>;
                    #address-cells = <1>;
                    #size-cells = <1>;
                    ranges;

                    clocks = <&gcc GCC_PERIPH_NOC_USB20_AHB_CLK>,
                            <&gcc GCC_USB20_MASTER_CLK>,
                            <&gcc GCC_USB20_MOCK_UTMI_CLK>,
                            <&gcc GCC_USB20_SLEEP_CLK>,
                            <&gcc GCC_USB_PHY_CFG_AHB2PHY_CLK>;

                    assigned-clocks = <&gcc GCC_USB20_MOCK_UTMI_CLK>,
                                      <&gcc GCC_USB20_MASTER_CLK>;
                    assigned-clock-rates = <19200000>, <60000000>;

                    power-domains = <&gcc USB30_GDSC>;
                    status = "okay";

                    dwc3@7600000 {
                            compatible = "snps,dwc3";
                            reg = <0x7600000 0xcc00>;
                            interrupts = <0 138 0>;
                            phys = <&hsusb_phy2>;
                            phy-names = "usb2-phy";
                    };
            };

dmesg for usb

[ 6.379012] hub 1-0:1.0: USB hub found
[ 6.401565] xhci-hcd xhci-hcd.0.auto: new USB bus registered, assigned bus number 2
[ 6.407007] usb usb2: We don’t know the algorithms for LPM for this host, disabling LPM.
[ 6.414831] usb: probe of usb2 device_links_check_suppliers() ret=0
[ 6.440366] hub 2-0:1.0: USB hub found
[ 6.472476] dwc3-qcom 76f8800.usb: Can’t create debugfs root
[ 6.477771] dwc3-qcom 76f8800.usb: failed to initialize debugfs
[ 6.483746] dwc3-qcom: probe of 76f8800.usb drv->probe() ret=0
[ 24.970986] usb usb1-port1: couldn’t allocate usb_device

lsusb -t

/: Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/0p, 5000M
/: Bus 01.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M

cat /sys/kernel/debug/7600000.dwc3/link_state

SS.Disabled

cat /sys/kernel/debug/7600000.dwc3/mode

host

can someone give advice on this?


#2

Which USB 2 port are you talking about? Dragonboard 820c has 2 USB3 ports for host mode (+1 D+/D- on high speed connector) and one micro USB(2) port for device/peripheral mode.


#3

Actually there is other usb2 connector on my development board with s820.
Apologize if my post is not suitable here.


#4

You are very welcome to ask questions but as a matter of both etiquette and practicality it is sensible to mention that you are using a SoM or custom board rather than the Dragonboard 820C. Custom board questions do tend to attract slightly fewer replies (mostly because they tend to be about problems that don’t reproduce on the Dragonboard so there are fewer users around to help) but I think there still plenty of useful conversations happening around the forum.


#5

Thanks, I will mention custom board in similar situation.

Besides, usb2 function works normally if checkout branch to latest.