Xavier GPIO Output Enable

I am trying to enable GPIO9_CAN1_GPIO0 on Header J30 (Pin 32).
I have currently created the config files from the pinmux spreadsheet.

I was wondering the following:

  1. Where do I put the configuration files? (I am compiling from kernel source)
  2. Do I modify tegra194-p2888-0001-p2822-0000-common.dtsi to enable the gpio output (gpio-hog;output-high, etc.)?
    Thanks!

hello aplb,

please access developer guide, you should refer to Pinmux and GPIO Configuration for the steps to update the board with your customization.
thanks

Hi Jerry,

I have been referring to the developer guide. However, every time I turn on/off Xavier then the register value resets.

Therefore, I want to modify the pinmux configuration using the adaptation guide to make permanent changes to the pin.

So far I have done the following:

  1. Create cfg files from the pinmux spreadsheet
  2. Move the cfg files to Linux_for_Tegra/sources/hardware/nvidia/platform/t19x/galen/bct/{pinmux|padvoltage}
  3. Flash the kernel

However, the register value for can1_en_pbb1 (Reg: 0x0c303048) does not change to output (0x0000c408) and still stays at the original value 0x0000c054

What else do I need to do to ensure that the gpio is permanently an output?

Thanks!

Hi aplb,

You may want to check this as referece: https://devtalk.nvidia.com/default/topic/1058267/jetson-tx2/-tx2-gpio-how-can-we-set-gpio-high-for-gpio7_touch_rst-/?offset=3#5366757

GPIOs for the Xavier are defined in hardware/nvidia/soc/t19x/kernel-include/dt-bindings/gpio/tegra194-gpio.h

Xavier pinmux spreadsheet can be found here: http://developer.nvidia.com/embedded/dlc/jetson-xavier-pinmux

Hi Jafet,

Thanks for this. I was able to get the GPIO (Pin 12 on J30 or dap2_sclk_ph7) working correctly (active low, output-high). However, I noticed that controlling the GPIO causes an issue.

If I unexport and export gpio351, I lose the initial state (Active low is 0 instead of 1) and modifying the value results in no voltage change on the pin.

I checked the dap2_sclk_ph7 register (Reg:0x02434018) and get a value of 0x00000005. However, after exporting and unexporting, I get a value of 0x000000405.

Not sure how to make it such that unexporting and exporting a gpio does not change its active low initial state.

Thanks!