Modify I2S pin as GPIO

Hello,

Because we don’t have enough GPIO for use, we went to use the four pins of I2S0(We don’t need to use this specific function).
I find the pin mapping in this file “Jetson_TX1_Generic_Customer_Pinmux_Customer_Release.xlsm” and the four pins were mapping to GPIO_PB00 ~ GPIO_PB03, now I have two question as below:
1.I could find the TK1 GPIO definition in arch/arm/mach-tegra/gpio-names.h, but where is the TX1?
I try to control the I2S0_SDIN(GPIO3_PB01) as GPIO9 which TK1 defined, but this pin couldn’t output what I expect.
2.Continuous the first question, should I modify the setting for I2S0 which may be set in bootloader or device tree.

Thanks

  1. The gpio-names.h only some define for the readable purpose if you need it you can still modify/include it.
  2. You need to modify the DT for your request. Like below is modify i2s1 to gpio PB01
diff --git a/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi b/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi
index 44dcf7e..707a472 100644
--- a/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi
+++ b/arch/arm64/boot/dts/tegra210-platforms/tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi
@@ -47,7 +47,7 @@
 
                        dap1_din_pb1 {
                                nvidia,pins = "dap1_din_pb1";
-                               nvidia,function = "i2s1";
+                               nvidia,function = "rsvd1";
                                nvidia,pull = <TEGRA_PIN_PULL_NONE>;
                                nvidia,tristate = <TEGRA_PIN_DISABLE>;
                                nvidia,enable-input = <TEGRA_PIN_ENABLE>;

Hi ShaneCCC,

Thanks for your response.
What’s the meaning of revd1? Is there any document to map such define?

Thanks

You can check the pimux table. You can see the SFIO0, SFIO1, SFIO2, SFIO3 and for the GP01 ball name DAP1_DIN config as GPIO you need to config this pin to first empty field.

External Media