Python pinmux-dts2cfg.py Error Processing GPIO File

Orin-test-gpio-default.dtsi (3.8 KB)
Orin-test-pinmux.dtsi (64.6 KB)

Python throws an error when using the pinmux script with .dtsi files generated from the pinmux Excel file. This error is thrown even when generating with the unmodified Excel file.

The gpio-default and pinmux .dtsi files attached to this issue were generated by an unmodified version of the pinmux spreadsheet (Jetson_AGX_Orin_Series_Pinmux_Config_Template_1.5.xlsm). I am seeing an issue with a key error from the pinmux Python script (.dtsi files are located in the t19x directory):


> cd ~/Linux_for_Tegra/kernel/pinmux/t19x
> python pinmux-dts2cfg.py --pinmux addr_info.txt gpio_addr_info.txt por_val.txt Orin-test-pinmux.dtsi Orin-test-gpio-default.dtsi 1.0

##
## Pinmux version 1.0
## Input pinmux file name: Orin-test-pinmux.dtsi
## Input gpio file name: Orin-test-gpio-default.dtsi
## Generation date: 2023-04-24 15:35
## PLEASE DO NOT EDIT THIS FILE
## This is autogenerated file using the script pinmux-dts2cfg.py
##
pinmux.major = 1;
pinmux.minor = 0;
#### Pinmux for gpio-input pins ####
Traceback (most recent call last):
  File "pinmux-dts2cfg.py", line 518, in <module>
    main(sys.argv[0], sys.argv[1:])
  File "pinmux-dts2cfg.py", line 514, in main
    gpio_list = process_gpio_file(v.gpio_dts_file, pinmux_gpio_dict, gpio_port_addr_dict, pinmux_non_aon_addr, pinmux_aon_addr, v.mask)
  File "pinmux-dts2cfg.py", line 193, in process_gpio_file
    port_addr = int(gpio_addr_dict[port][0], 0) # Got port address
KeyError: 'TEGRA234_MAIN_GPIO(B'

The “pinmux-dts2cfg.py” Python script is from the “Jetson_Linux_R35.3.1_aarch64.tbz2” driver package (BSP). Changing the version passed to the Python script to 1.5 did not fix the KeyError output. Let me know if there is a workaround for this issue. Thanks.

Hi,

You hit error because this usecse is not needed. Orin AGX pinmux file is not cfg file. It is only dtsi file.

Only T186/T194 need to convert pinmux dts for cfg file. Orin does not need to do the conversion.

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