[FS#497] ipq806x: non-working USB 3.0 port on R7500 / Netgear X4 nighthawk

LEDE Bugs lede-bugs at lists.infradead.org
Sun Feb 26 15:08:47 PST 2017


The following task has a new comment added:

FS#497 - ipq806x: non-working USB 3.0 port on R7500 / Netgear X4 nighthawk
User who did this - Thomas Reifferscheid (reiffert)

----------
Add to arch/arm/boot/dts/qcom-ipq8064.dtsi:

                usbtypesel: pinmux at 1a4000b0 {
                        compatible = "pinctrl-single";
                        pinctrl-single,register-width = ;
                        pinctrl-single,function-mask = ; /* only allow to set the rightmost 3 bits */
                        reg = ;
                };


Add to arch/arm/boot/dts/qcom-ipq8064-r7500.dts:


                pinmux at 1a4000b0 {
                        pinctrl-names = "default";
                        pinctrl-0 = ;

                        board_pins: pinmux_board_pins {
                                pinctrl-single,pins = <
                                        0x00 0x03 /* IPQ_TCSR_USB_CONTROLLER_TYPE_SEL */
                                >;
                        };
                };


After booting you would notice:

root at LEDE:/# dmesg | grep single
[    0.234698] pinctrl-single 1a4000b0.pinmux: allocating 1 pins
[    0.234722] pinctrl-single 1a4000b0.pinmux: try to register 1 pins ...
[    0.234735] pinctrl core: registered pin 0 (1a4000b0.0) on pinctrl-single
[    0.234807] pinctrl-single 1a4000b0.pinmux: found group selector 0 for pinmux_board_pins
[    0.234827] pinctrl-single 1a4000b0.pinmux: request pin 0 (1a4000b0.0) for 1a4000b0.pinmux
[    0.234841] pinctrl-single 1a4000b0.pinmux: enabling pinmux_board_pins function0
[    0.234856] pinctrl-single 1a4000b0.pinmux: failed to lookup the sleep state
[    0.234946] pinctrl-single 1a4000b0.pinmux: 1 pins at pa cea6e0b0 size 4


root at LEDE:/# cat /sys/kernel/debug/pinctrl/1a4000b0.pinmux/pins
registered pins: 1
pin 0 (1a4000b0.0) 00000003 pinctrl-single
root at LEDE:/# [   36.259557] usb 2-1: new SuperSpeed USB device number 2 using xhci-hcd


And that's a working primary USB port.

Just so you know, the following can be found in the .dtsi file, however there is no code in phy-qcom-dwc3.c nor dwc3-of-simple.c which would handle it. I wonder why it was added to the .dtsi file while there is no code handling it. You are safe to remove all occurrences of it.

syscon-tcsr = ;


FYI, IPQ_TCSR_USB_CONTROLLER_TYPE_SEL was taken from the Netgear GPL. 0xb0 and 0x03 is coming from there too.

The above is an attempt to "writel(0x03, 0x1a400000 + 0xb0);" using the devicetree bindings without changing the kernel source code. If anyone knows a smarter way of how to do that .. feel free to add a comment.

Let me know if anyone else is able to reproduce this and I will work on a patch.
----------

More information can be found at the following URL:
https://bugs.lede-project.org/index.php?do=details&task_id=497#comment1987



More information about the lede-bugs mailing list