How to change the selection of the UART3(Module Pin H9,H10)

Hello all,

Chapter “12.0 WLAN / BT (INTEGRATED) – JETSON TX2 ONLY” of the official document <<JetsonTX2_Series_OEM_Product_Design_Guide.pdf>> said “The UART interface is multiplexed and either route
these to the WLAN/BT device or to the connector pins for use on the carrier board. The default selection for the multiplexers is to the WLAN/BT device.”;
and In Chapter “13.3 UART”, it said "One of the UARTs is used for the WLAN/BT on Jetson TX2 or as
UART3 at the connector depending on the setting of a multiplexor. ";

so i think UART3 can be selected as a UART , not WLAN;
is it possible to select UART3 as a UART(not used for WLAN)?
if it’s possible, how to change UART3 from WLAN to a UART?

Please try to toggle the “wifi_over_pcie” property under the device tree.
It should be under gpio@2200000.

Hi WayneWWW, thanks for your reply.
I am using the rel-28.2.1; i found the “wifi_over_pcie” under gpio@2200000, but it looks like already “disabled”; can you teach me how to toggle the property in detail?

Please enable it.

I enabled “wifi_over_pcie”, but the wlan is still working. is there anything else should i do?
Here is my modified dts:

gpio@2200000 {
		compatible = "nvidia,tegra186-gpio";
		reg-names = "security", "gpio";
		reg = <0x0 0x2200000 0x0 0x10000 0x0 0x2210000 0x0 0x10000>;
		interrupts = <0x0 0x2f 0x4 0x0 0x32 0x4 0x0 0x35 0x4 0x0 0x38 0x4 0x0 0x3b 0x4 0x0 0xb4 0x4>;
		gpio-controller;
		#gpio-cells = <0x2>;
		interrupt-controller;
		#interrupt-cells = <0x2>;
		gpio-ranges = <0xca 0x0 0x0 0x90 0xca 0x90 0x98 0x8 0xca 0x98 0xb8 0x10 0xca 0xa8 0xd8 0x18>;
		status = "okay";
		linux,phandle = <0x12>;
		phandle = <0x12>;

		wifi_over_pcie {
			gpio-hog;
			gpios = <0x8c 0x0>;
			output-low;
			label = "wifi-over-pcie";
			status = "okay";
		};

		pcie0_lane2_mux {
			gpio-hog;
			gpios = <0x8b 0x0>;
			output-low;
			label = "pcie-lane2-mux";
			status = "disabled";
		};

		e3325_sdio_rst {
			gpio-hog;
			gpios = <0xe 0x0>;
			output-high;
			label = "e3325-sdio-rst";
			status = "disabled";
		};

		e3325_lane0_mux {
			gpio-hog;
			gpios = <0xc 0x0>;
			output-low;
			label = "e3325-lane0-mux";
			status = "disabled";
		};

		camera-control-output-low {
			gpio-hog;
			output-low;
			gpios = <0x8d 0x0 0x88 0x0 0x89 0x0 0x5e 0x0>;
			label = "cam0-rst", "cam0-pwdn", "cam1-rst", "cam1-pwdn";
			status = "disabled";
		};

		camera-control-output-high {
			gpio-hog;
			output-high;
			gpios = <0x8d 0x0>;
			label = "cam0-rst";
			status = "disabled";
		};

		camera-control-input {
			status = "disabled";
		};

		wifi-enable {
			gpio-hog;
			gpios = <0x68 0x0>;
			output-high;
			line-name = "wifi-enable";
		};

		wifi-wake-ap {
			gpio-hog;
			input;
			label = "wifi-wake-ap";
			status = "disabled";
		};

		sdmmc-wake-support-input {
			gpio-hog;
			gpios = <0x7d 0x0>;
			input;
			label = "sdmmc-wake-input";
			status = "okay";
		};

		sdmmc-wake-support-output {
			gpio-hog;
			gpios = <0x7e 0x0>;
			output-low;
			label = "sdmmc-wake-output";
			status = "okay";
		};
	};
  1. Could you change the “output-low;” to “output-high” and see if anything change?
  2. Could you see this gpio with below commands?
sudo -s
cd /sys/kernel/debug
cat gpio

Are you able to scope this gpio?

The output of the cmd “cat gpio” when the dts is “output-low”:

GPIOs 320-511, platform/2200000.gpio, tegra-gpio:
 gpio-381 (                    |reset_gpio          ) out lo    
 gpio-412 (                    |vdd-usb0-5v         ) out lo    
 gpio-413 (                    |vdd-usb1-5v         ) out lo    
 gpio-420 (                    |eqos_phy_reset      ) out hi    
 gpio-421 (                    |eqos_phy_intr       ) in  hi    
 gpio-424 (                    |wlan_pwr            ) out lo    
 gpio-426 (                    |cam1-pwdn           ) out lo    
 gpio-441 (                    |hdmi2.0_hpd         ) in  lo    
 gpio-444 (                    |wp                  ) in  hi    
 gpio-445 (                    |cd                  ) in  hi    
 gpio-446 (                    |en-vdd-sd           ) out lo    
 gpio-456 (                    |cam0-pwdn           ) out lo    
 gpio-457 (                    |cam1-rst            ) out lo    
 gpio-460 (                    |wifi-over-pcie      ) out lo    
 gpio-461 (                    |cam0-rst            ) out lo    
 gpio-479 (                    |external-connection:) in  hi    
 gpio-484 (                    |bt_ext_wake         ) out hi

then i changed “output-low” to “output-high”, the output of cmd is:

GPIOs 320-511, platform/2200000.gpio, tegra-gpio:
 gpio-381 (                    |reset_gpio          ) out lo    
 gpio-412 (                    |vdd-usb0-5v         ) out lo    
 gpio-413 (                    |vdd-usb1-5v         ) out lo    
 gpio-420 (                    |eqos_phy_reset      ) out hi    
 gpio-421 (                    |eqos_phy_intr       ) in  hi    
 gpio-424 (                    |wlan_pwr            ) out hi    
 gpio-426 (                    |cam1-pwdn           ) out lo    
 gpio-441 (                    |hdmi2.0_hpd         ) in  hi    
 gpio-444 (                    |wp                  ) in  hi    
 gpio-445 (                    |cd                  ) in  hi    
 gpio-446 (                    |en-vdd-sd           ) out lo    
 gpio-456 (                    |cam0-pwdn           ) out lo    
 gpio-457 (                    |cam1-rst            ) out lo    
 gpio-460 (                    |wifi-over-pcie      ) out hi    
 gpio-461 (                    |cam0-rst            ) out lo    
 gpio-479 (                    |external-connection:) in  lo    
 gpio-484 (                    |bt_ext_wake         ) out hi

and the wlan is still working.

I don’t knwo how to do it.

Hi,

Only Bluetooth is using that UART, so only verify the wlan(wifi) does not prove the gpio setting is not working.

Please check the UART pin on carrier board by loopback test.

Hi WayneWWW,
Thank you very much!
It’t working, my verify method is wrong.

Hi,
I change the dts and cat gpio value like you.But uart3(ttyTH3) TX still not work.

wifi_over_pcie {
			gpio-hog;
			gpios = <0x8c 0x0>;
			output-low;
			label = "wifi-over-pcie";
			status = "okay";

How did you set UART3 to uart?
Thank you very much.