gpio pinmux setting


I try to change gpio6(pinmux) and make it work in normal gpio.

Default, gpio6 is always high .

Then i change the file “tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi”

and find

touch_int_px1 {
				nvidia,pins = "touch_int_px1";
				nvidia,function = "rsvd0";
				nvidia,pull = <TEGRA_PIN_PULL_UP>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_ENABLE>;

then I change it below

touch_int_px1 {
				nvidia,pins = "touch_int_px1";
				nvidia,function = "rsvd0";
				nvidia,pull = <TEGRA_PIN_PULL_NONE>;
				nvidia,tristate = <TEGRA_PIN_DISABLE>;
				nvidia,enable-input = <TEGRA_PIN_DISABLE>;

Now the gpio is always low. Still i can not set value( o or 1) to it.

Is there any suggestion to solve it?

Thank you!

Be certain that your changes made it in…updating a device tree became more complicated in R28.x. Either explore “/proc/device-tree/” and verify the changes made it in, or create a dts from this and explore the dts:

dtc -I fs -O dts -o extracted.dts /proc/device-tree

Once you know your changes are in place someone can verify if the changes were valid.

Hi, linuxdev.

We temporarily use driver package R24.2.1.

I just run “dtc -I fs -O dts -o extracted.dts /proc/device-tree” on the command line.

And open extracted.dts , find below results:

touch_int_px1 {
    				nvidia,enable-input = <0x0>;
                                nvidia,tristate = <0x0>;
    				nvidia,pull = <0x0>;
                                nvidia,function = "rsvd0";
    				nvidia,pins = "touch_int_px1";

It is keep with the change I do in “tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi”

I also find that gpio7(v,6) is similar with gpio(x,1) on extracted.dts.

I can set gpio7’s value in kernel and it is definite change to the value (0 or 1) I wante, but gpio6 not


I am unsure of the wording used…it sounds like your changes are reflected in the running device tree. This in turn would mean your edits succeeded in making their way into the system…the result of the edits may not be what you want.

I’m set up at the moment only for my TX2, but are you certain your numeric values for “gpio6” are really for the pin you want? Are you certain nothing else is already using that gpio?

Thanks a lot,linuxdev.

Default, the value of gpio6(x,1) or gpio-185 is always high even if I set its value low in kernel.

After I change “tegra210-jetson-cv-pinmux-p2597-2180-a00.dtsi” above(#1).

Its value is always low.

The gpio6 is pinmux, I just want that it works in normal gpio which I can set its value low and high, but failed.

I will check weather there is something else concerned.

Someone else will need to comment on whether you are associating the correct device tree with the physical pins. What are the exact pins you are looking at on the carrier board?

Sorry for some misleading.

The value I get about the gpio6(Tx1 pin is B25) is not by testing the relative pin on the carrier board.

I just use function “gpio_direction_output()” “gpio_set_value()” “gpio_get_value()” … in kernel source code to set and get the value of gpio6(185), and printk it.

Is this the developer carrier board? A custom board? This would probably change the context of any answer.

It is a custom board.

But it seems that I just want the pin of gpio6(B25) of tx1 module to have the function to output high or low level.

I can’t understand the association between them.

The hardware engineer tells me that the pin gpio6(B25) is connected to a voltage conversion chip(1.8 to 3.3v), then connected to a i2c chip. Our target is to control i2c by the gpio high or low level

Someone else will have to answer how to associate a pin of the BGA to a GPIO for device tree. Mostly I’d recommend using the pinmux spreadsheet, or looking at data published for the specific carrier board…but a custom board could be completely different. Even the boot up in cboot or U-Boot could change whether a pin is available or not.

Hi, linuxdev.

Thank you for your patient answer.

I need to learn more to make it.