Add Pinmux Register Address Lookup Tool#130
Conversation
| @@ -0,0 +1,79 @@ | |||
| # Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved. | |||
There was a problem hiding this comment.
can you add #!/usr/bin/env python
There was a problem hiding this comment.
I think we should rename this file to gpio_pinmux_lookup.py
There was a problem hiding this comment.
Can you add documentation on how to use this in the README
There was a problem hiding this comment.
can you remove _ between pin and mux
50ebfa5 to
815dc73
Compare
This reverts commit 52d6867.
…ded Board BOARD mode GPIO pin number + corresponding test file Co-authored-by: Tharun Ganeshram <tharun.ganeshram@gmail.com>
…d formatting Co-authored-by: Tharun Ganeshram <tharun.ganeshram@gmail.com>
Co-authored-by: Tharun Ganeshram <tharun.ganeshram@gmail.com>
…environment variable JETSON_TESTING_MODEL_NAME overrides device models entirely, pinmux as one word, addressing comments Co-authored-by: Tharun Ganeshram <tharun.ganeshram@gmail.com>
815dc73 to
be2fc02
Compare
…IN_NX_PIN_DEFS with correct pinmux registers. Extracts data from tegra234_groups and tegra234_aon_groups in pinctrl file. Co-authored-by: Tharun Ganeshram <tharun.ganeshram@gmail.com>
Co-authored-by: Tharun Ganeshram <tharun.ganeshram@gmail.com>
| x[2], | ||
| pwm_chip_dir=pwm_dirs.get(x[7], None), | ||
| pwm_id=x[8], | ||
| reg_block_base_addr=x[9] if 9 < len(x) else None, |
There was a problem hiding this comment.
can you update this for the new data structure?
lib/python/Jetson/GPIO/gpio_cdev.py
Outdated
|
|
||
| try: | ||
| mem_fd = os.open('/dev/mem', os.O_RDONLY | os.O_SYNC) | ||
| reg_address = ch_info.reg_block_base_addr + ch_info.reg_offset |
There was a problem hiding this comment.
Because the data structure change i think this need to change also
…sting logic for changed data structure Co-authored-by: Tharun Ganeshram <tharun.ganeshram@gmail.com>
dev/update_pinmux_registers.py
Outdated
| @@ -1,5 +1,5 @@ | |||
| #!/usr/bin/env python | |||
| # Copyright (c) 2019-2023, NVIDIA CORPORATION. All rights reserved. | |||
| # Copyright (c) 2019-2025, NVIDIA CORPORATION. All rights reserved. | |||
There was a problem hiding this comment.
I think this is a new file so it would be
2025
lib/python/Jetson/GPIO/gpio_cdev.py
Outdated
| @@ -1,4 +1,4 @@ | |||
| # Copyright (c) 2023, NVIDIA CORPORATION. All rights reserved. | |||
| # Copyright (c) 2025, NVIDIA CORPORATION. All rights reserved. | |||
There was a problem hiding this comment.
this is an old file so it should be
2023-2025
dev/pinctrl-tegra234.c
Outdated
| * Pinctrl data for the NVIDIA Tegra234 pinmux | ||
| * | ||
| * Copyright (c) 2021-2023, NVIDIA CORPORATION. All rights reserved. | ||
| * Copyright (c) 2021-2025, NVIDIA CORPORATION. All rights reserved. |
There was a problem hiding this comment.
Technically you dont need to change this 😅
Co-authored-by: Tharun Ganeshram <tharun.ganeshram@gmail.com>
e988ba7 to
70f1252
Compare
Co-authored-by: Tharun Ganeshram <tharun.ganeshram@gmail.com>
samples/test_all_apis.py
Outdated
| GPIO.setwarnings(True) | ||
| mem_fd = os.open('/dev/mem', os.O_RDWR | os.O_SYNC) | ||
| # These depend on the pin being BCM 4 for Orin nano/nx | ||
| PIN_REGISTER_ADDR = 0x02448000 + 0x28 |
There was a problem hiding this comment.
can you update the PIN_REGISTER_ADDR to 0x02448030
Co-authored-by: Tharun Ganeshram <tharun.ganeshram@gmail.com>
Simple tool to lookup pin mux register address for Jetson GPIO pins. User must specify the BOARD mode GPIO pin number.