I am trying to get two pins to operate as GPIO on the TX2 NX. I’ve configured them in the NX system pinmux spreadsheet, and am using the following configurations for those pins, which was generated from the spreadsheet:
dap2_fs_pc4 {
nvidia,pins = "dap2_fs_pc4";
nvidia,function = "rsvd1";
nvidia,pull = <TEGRA_PIN_PULL_NONE>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
gen7_i2c_scl_pl0 {
nvidia,pins = "gen7_i2c_scl_pl0";
nvidia,function = "rsvd2";
nvidia,pull = <TEGRA_PIN_PULL_DOWN>;
nvidia,tristate = <TEGRA_PIN_ENABLE>;
nvidia,enable-input = <TEGRA_PIN_ENABLE>;
nvidia,io-high-voltage = <TEGRA_PIN_DISABLE>;
nvidia,lpdr = <TEGRA_PIN_DISABLE>;
};
I believe these should map to GPIO numbers 340 and 408, respectively. When I do
$ echo 408 >/sys/class/gpio/export
it (as expected) creates the proper gpio408 directory and the symlink to it in /sys/class/gpio.
However,
$ echo 340 >/sys/class/gpio/export
Gives an error:
echo: write error: Device or resource busy
Can anybody offer guidance, how to determine what is keeping that particular pin “busy” so that it can’t be exposed as a GPIO?
Thanks for any suggestions.