How to change UART0_CTS to GPIO3_PX.03

X means 23.
I calculate it with 320+23*8+3=507

/sys/class/gpio# echo 507 > export 
bash: echo: write error: Device or resource busy
cat /sys/kernel/debug/gpio
gpiochip2: GPIOs 248-255, parent: platform/max77620-gpio, max77620-gpio, can sleep:
 gpio-253 (                    |spmic_gpio_input    ) in  lo    
 gpio-254 (                    |spmic_gpio_input    ) in  hi    

gpiochip1: GPIOs 256-319, parent: platform/c2f0000.gpio, tegra-gpio-aon:
 gpio-302 (                    |eqos_phy_reset      ) out hi    
 gpio-312 (                    |power-key           ) in  hi    

gpiochip0: GPIOs 320-511, parent: platform/2200000.gpio, tegra-gpio:
 gpio-408 (                    |sysfs               ) out hi    
 gpio-409 (                    |sysfs               ) out hi    
 gpio-410 (                    |sysfs               ) out hi    
 gpio-412 (                    |external-connection:) in  lo    
 gpio-441 (                    |hdmi2.0_hpd         ) in  hi  

I can’t see someone use the gpio507.

What UART0_CTS are you talking about here? Could you give the pin #?

tx2nx 105

Port X is not 23. Please check header file.

1 Like

I see.
That means 8×19+320+3=475

gpiochip0: GPIOs 320-511, parent: platform/2200000.gpio, tegra-gpio:
 gpio-408 (                    |sysfs               ) out hi    
 gpio-409 (                    |sysfs               ) out hi    
 gpio-410 (                    |sysfs               ) out hi    
 gpio-412 (                    |external-connection:) in  lo    
 gpio-441 (                    |hdmi2.0_hpd         ) in  hi    
 gpio-475 (                    |sysfs               ) in  lo  

Here is a button and I pull up it with a resistance.

/sys/class/gpio/gpio475# cat direction 
in

But it’s value always is 0.
It test it with a Voltmeter and work well.

Could you change that pin to output pin first and toggle it and see if your Voltmeter can see it?

I works well when I follow your steps.
That means I should set it to be output and then set it to input?

And pin# 209 UART1_CTS* GPIO3_PW.05

tegra186-gpio.h

I can’t find port W

W is AON GPIO.

Can I calculate it with the formula 320+port*8+pin?
Or 320 is not right?

The answer is already inside your own reply… Check your first comment in this post…

gpiochip1: GPIOs 256-319, parent: platform/c2f0000.gpio, tegra-gpio-aon:
 gpio-302 (                    |eqos_phy_reset      ) out hi    
 gpio-312 (                    |power-key           ) in  hi    

gpiochip0: GPIOs 320-511, parent: platform/2200000.gpio, tegra-gpio:
 gpio-408 (                    |sysfs               ) out hi    
 gpio-409 (                    |sysfs               ) out hi    
 gpio-410 (                    |sysfs               ) out hi    
 gpio-412 (                    |external-connection:) in  lo    
 gpio-441 (                    |hdmi2.0_hpd         ) in  hi  
1 Like

haha, thanks!

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.