I’m trying to integrate a m.2 USB/UART wifi module on to a tx2 nx with carrier board.
The devicetree I’m using is tegra186-p3636-0001-p3509-0000-a01.dts.
In this device tree there are already gpio’s tied to pins 54 and 56 (w-disable2 and w-disable1) of the m.2 wifi slot.
gpio@2200000 {
w-disable1 {
gpio-hog;
output-high;
gpios = <TEGRA_MAIN_GPIO(L, 0) GPIO_ACTIVE_LOW>;
label = "w-disable1";
status = "okay";
};
w-disable2 {
gpio-hog;
output-high;
gpios = <TEGRA_MAIN_GPIO(L, 2) GPIO_ACTIVE_LOW>;
label = "w-disable2";
status = "okay";
};
};
These lines are always high, the issue with this is the m.2 wifi modules needs these lines to go low on a soft reboot or possibly hardware issue, usb reload, etc. These signals going low allows the module to do a full reset allowing firmware to be downloaded. If this line never goes low (150-250ms) then the firmware is already loaded on a soft reboot and the driver can not communicate with the module.
Normally on an SDIO interface we use mmc-pwrseq to allow the SDIO slot to trigger these lines to toggle when needed (soft reboot, hardware failure, etc).
On other platforms we’ve used a compatible node with our usb id and a pmu-en-gpios. I personally have not used it, but other colleagues have. Which would look something like:
&usb2 {
...
wifi@2{
compatible = "usb1286,204e";
...
pmu-en-gpios = <&pioE 5 GPIO_ACTIVE_HIGH>;
};
};
Which port usb2-X is tied to the m.2 usb? Where can I put this compatibility in the device-tree?
At the minimum would be good to just toggle the w-disableX on a reboot, is this possible?
Desired would be able to tie usb device to the compatibility of the module, this would allow our driver to reset the module when there is loss of communication.
I am able to toggle w-disableX in user space, which is good to know that I can toggle them. Just need to know how I can control these in the device-tree.
Travis