Custom USB client driver needs devicetree config on TX2 NX

I’m trying to implement a custom driver feature that needs access in the devicetree. We have the driver reporting the Parent node /xhci@3530000 but I’m not sure how to call in the devicetree the specific node for usb bus/device.

Below is the device

travis@ubuntu:~$ lsusb -t
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/3p, 5000M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/4p, 5000M
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=tegra-xusb/4p, 480M
    |__ Port 2: Dev 2, If 0, Class=Hub, Driver=hub/5p, 480M
        |__ Port 5: Dev 4, If 0, Class=Vendor Specific Class, Driver=, 480M
    |__ **Port 3: Dev 5, If 0, Class=Vendor Specific Class, Driver=lrdmwl_usb, 480M**
travis@ubuntu:~$ lsusb
Bus 002 Device 002: ID 0424:5744 Standard Microsystems Corp.
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
**Bus 001 Device 005: ID 1286:204e Marvell Semiconductor, Inc.**
Bus 001 Device 004: ID 0424:2740 Standard Microsystems Corp.
Bus 001 Device 002: ID 0424:2744 Standard Microsystems Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

In the devicetree I’m finding:

	xhci@3530000 {
		status = "okay";
		phys = <&{/xusb_padctl@3520000/pads/usb2/lanes/usb2-0}>,
		phy-names = "usb2-0", "usb2-1", "usb2-2", "usb3-1";

How would I add properties to the Bus1-Port3-Device5?


Actually, device driver should not need to be added under xhci node… Those device tree properties are only for tegra xhci driver.

I need to add a special property so the driver knows where a separate gpio is to control the device.

How can I add property to usb bus1-port3?

You should not add property to our driver. You should add it to the device driver’s node. This is not what I can answer.

This depends on your device driver vendor to answer.

And It is unlikely to configure “bus1-port3-device5”. Just take a most common scenario as example, what if another device occupied this device and your device becomes “bus-1-port-3-device7”? You would need to configure device tree again just because the usb enumeration order is different? Such case is not correct.

And I just notice I already answered the same reply to you 2 weeks ago.

USB device is on the m.2 and is always plugged into the same place thus bus and port do not change.

I need to add properties to a node that represents that device plugged into a specific port.

See binding:

These usb bindings don’t work on Nvidia?

I am not using Intel or Realtek but Marvell chipset by NXP.

For us this is pretty standard implementation with a reset gpio tied to wifi module. With PCIe the reset is in the PCI standard, for SDIO we use mmc-pwrseq binding in devicetree, and for USB we have used this binding without issue on atmel processor. But seems for Nvidia it does not work. I’m asking for help on this binding, not recommendation for different wifi chipset.


Let me check the driver and reply whether it would work or not later.

For now, I can only tell we are not using this kind of DT in current device tree.

The added child node would contain a custom property that our driver will consume. We don’t want to add a property to one of your existing nodes.

For example I’ve tried:

			compatible = "usb1286,204e";
			reg = <1>;
			pmu-en-gpios = <TEGRA_MAIN_GPIO(L, 0) GPIO_ACTIVE_HIGH>;

And as stated previously this is the node our driver is reporting, I just don’t know how to add the child node to point to that specific usb port.

Confirmed with our usb driver team. This is not supported.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.