Hello,
I’m having difficulty setting the default voltage level of the I2S configured as a GPIO pin to 0V rather than 3.3V. We plan to use the GPIO to power on/off a system that needs to be off when the software is not running or if they software crashes. After changing the I2S pins to GPIO, I noticed that the default voltage of the pin is 3.3V when the program is not driving it to 0V. Currently the system is using a 3.3V input to turn on and we would like to avoid adding additional hardware (inverter).
I have
- Changed the overlay to enable I2S to be GPIO.
- changed the Pinmux BCT (tegra234-mb1-bct-pinmux-p3767-dp-a03.dtsi) to have the following settings for the pins of interest:
- Set
pull=NONE,tristate=DISABLE,enable-input=DISABLEon all 5 pins, configuring pads as actively driven outputs (matches existinggpio-output-lowpin patterns likeuart4_cts_ph6)
- Changed the GPIO BCT (tegra234-mb1-bct-gpio-p3767-dp-a03.dtsi) with the following settings:
- Moved
H,7/I,0/I,1/I,2/AC,6fromgpio-inputtogpio-output-low
After making these changes, the jetson does boot up with a default logic of low (0V) on the output, but running any software that uses the GPIO pin will cause it to go back to 3.3V after the software exits, even if the last output command was to set it low. Is there any way to make the GPIO output default to logic low (0V) permanently?
Here is the Overlay changes I made:
fragment@0 {
target = <&pinmux>;
__overlay__ {
pinctrl-names = "default";
pinctrl-0 = <&jetson_io_pinmux>;
jetson_io_pinmux: exp-header-pinmux {
// I2S0_DOUT_3V3 --> I2S0_DOUT
hdr40-pin40 {
nvidia,pins = "soc_gpio42_pi0";
nvidia,tristate = <0x0>;
nvidia,enable-input = <0x1>;
nvidia,pull = <0x0>;
};
// I2S0_DIN_3V3 --> I2S0_DIN
hdr40-pin38 {
nvidia,pins = "soc_gpio43_pi1";
nvidia,tristate = <0x0>;
nvidia,enable-input = <0x1>;
nvidia,pull = <0x0>;
};
// I2S0_LRCLK_3V3 --> I2S0_FS
hdr40-pin35 {
nvidia,pins = "soc_gpio44_pi2";
nvidia,tristate = <0x0>;
nvidia,enable-input = <0x1>;
nvidia,pull = <0x0>;
};
// I2S0_SCLK_3V3 --> I2S0_SCLK
hdr40-pin12 {
nvidia,pins = "soc_gpio41_ph7";
nvidia,tristate = <0x0>;
nvidia,enable-input = <0x1>;
nvidia,pull = <0x0>;
};
// AUD_MCLK_3V3 --> GPIO09
hdr40-pin7 {
nvidia,pins = "soc_gpio59_pac6";
nvidia,tristate = <0x0>;
nvidia,enable-input = <0x1>;
nvidia,pull = <0x0>;
};
};
};
};
and the changes to pinmux BCT:
soc_gpio41_ph7 {
nvidia,pins = "soc_gpio41_ph7";
nvidia,function = "rsvd2";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
soc_gpio42_pi0 {
nvidia,pins = "soc_gpio42_pi0";
nvidia,function = "rsvd2";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
soc_gpio43_pi1 {
nvidia,pins = "soc_gpio43_pi1";
nvidia,function = "rsvd2";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
soc_gpio44_pi2 {
nvidia,pins = "soc_gpio44_pi2";
nvidia,function = "rsvd2";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
soc_gpio59_pac6 {
nvidia,pins = "soc_gpio59_pac6";
nvidia,function = "rsvd2";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_DISABLE>;
nvidia,enable-input = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
and the changes to GPIO BCT
gpio-output-low = <
TEGRA234_MAIN_GPIO(H, 6)
TEGRA234_MAIN_GPIO(H, 7)
TEGRA234_MAIN_GPIO(I, 0)
TEGRA234_MAIN_GPIO(I, 1)
TEGRA234_MAIN_GPIO(I, 2)
TEGRA234_MAIN_GPIO(I, 5)
TEGRA234_MAIN_GPIO(AC, 0)
TEGRA234_MAIN_GPIO(AC, 6)
TEGRA234_MAIN_GPIO(K, 4)
TEGRA234_MAIN_GPIO(K, 5)
>;
Any help would be appreciated.
Thanks!
-Zach