Issue in turning UART2 RTS and CTS to GPIO

Hi,

I want to turn UART2 RTS to GPIO OUT and CTS to GPIO IN.
I changed pinmux .cfg, so that UART2 RTS and CTS are GPIO. I also found out that UART2 RTS maps to GPIO (X,6) and CTS maps to GPIO (X, 7).
I connect RTS pin with CTS pin in hardware (loopback).

I could get it to work under Linux. I tested using /sys/class/gpio/export under Linux. When I drive GPIO for RTS to 1/0, I can get 1/0 from GPIO for CTS correspondingly.

But I couldn’t get it to work under cboot.

cboot provide tegra-gpio driver support. So it is easy to read/write GPIO in cboot. I am confident with my code in cboot.

This is what I change in pinmux .cfg:
pinmux.0x0243d080 = 0x00000001; # uart2_rts_px6: rsvd1, tristate-disable, input-disable, lpdr-disable
pinmux.0x0243d088 = 0x00000059; # uart2_cts_px7: rsvd1, pull-up, tristate-enable, input-enable, lpdr-disable

I didn’t chang dtb for Linux or cboot. I don’t think I need.

Is there anything that I am missing? Why it works under Linux, but not work under cboot?

Thanks,
Shuo

hello lunarking1028,

you should not modify the cfg file directly.
please access pinmux spreadsheet to have customization.
you should also refer to the documentation, Jetson AGX Xavier MB1 Platform Configuration for the pinmux and GPIO configurations.
thanks