Skip to content

[linux-nvidia-6.17] Backport GPIO line name prefix handling#340

Open
nvmochs wants to merge 2 commits intoNVIDIA:24.04_linux-nvidia-6.17-nextfrom
nvmochs:gpio_line_name_prefix_617
Open

[linux-nvidia-6.17] Backport GPIO line name prefix handling#340
nvmochs wants to merge 2 commits intoNVIDIA:24.04_linux-nvidia-6.17-nextfrom
nvmochs:gpio_line_name_prefix_617

Conversation

@nvmochs
Copy link
Copy Markdown
Collaborator

@nvmochs nvmochs commented Mar 11, 2026

These two upstream patches (currently in linux-next, ETA v7.1) add support for GPIO devices on multi-socket systems and are required for VR. Without these patches, there are duplicate gpio names and the kernel logs warnings during boot:

$ sudo gpioinfo
gpiochip0 - 30 lines:
	line   0: "COMPUTE-PA.00" kernel input active-high [used]
...
	line  29: "COMPUTE-PE.07" kernel input active-high [used]
gpiochip1 - 94 lines:
	line   0: "SYSTEM-PA.00" kernel input active-high [used]
...
	line  93: "SYSTEM-PV.01" unused input active-high 
gpiochip2 - 30 lines:
	line   0: "COMPUTE-PA.00" kernel input active-high [used]
...
	line  29: "COMPUTE-PE.07" kernel input active-high [used]
gpiochip3 - 94 lines:
	line   0: "SYSTEM-PA.00" kernel input active-high [used]
...
	line  93: "SYSTEM-PV.01" unused input active-high 

$ sudo journalctl -k -b 0 | grep -i collision 
Mar 11 18:05:37 localhost.localdomain kernel: gpio gpiochip2: Detected name collision for GPIO name 'COMPUTE-PA.00'
Mar 11 18:05:37 localhost.localdomain kernel: gpio gpiochip2: Detected name collision for GPIO name 'COMPUTE-PA.01'
Mar 11 18:05:37 localhost.localdomain kernel: gpio gpiochip2: Detected name collision for GPIO name 'COMPUTE-PA.02'
Mar 11 18:05:37 localhost.localdomain kernel: gpio gpiochip2: Detected name collision for GPIO name 'COMPUTE-PB.00’

With the patches in place on a system that defines ACPI PXM nodes for the GPIO devices, gpio names include the corresponding NUMA node:

$ sudo gpioinfo
gpiochip0 - 30 lines:
	line   0: "0-COMPUTE-PA.00" kernel input active-high [used]
...
	line  29: "0-COMPUTE-PE.07" kernel input active-high [used]
gpiochip1 - 94 lines:
	line   0: "0-SYSTEM-PA.00" kernel input active-high [used]
...
	line  93: "0-SYSTEM-PV.01" unused input active-high 
gpiochip2 - 30 lines:
	line   0: "1-COMPUTE-PA.00" kernel input active-high [used]
...
	line  29: "1-COMPUTE-PE.07" kernel input active-high [used]
gpiochip3 - 94 lines:
	line   0: "1-SYSTEM-PA.00" kernel input active-high [used]
...
	line  93: "1-SYSTEM-PV.01" unused input active-high 

This removes the collisions warnings during boot:

$ sudo journalctl -k -b 0 | grep -i collision 
$

LKML: https://lore.kernel.org/all/20260217081431.1208351-1-pshete@nvidia.com/

linux-next:

2423e336d948 gpio: tegra186: Simplify GPIO line name prefix handling
2c299030c681 gpio: tegra186: Support multi-socket devices

To test, I verified the presence of the PXM nodes:

$ egrep -A 2 'NVDA0808|NVDA0708' *.dsl
dsdt.dsl:            Name (_HID, "NVDA0708")  // _HID: Hardware ID
dsdt.dsl-            Name (_UID, 0x00)  // _UID: Unique ID
dsdt.dsl-            Name (_PXM, 0x00)  // _PXM: Device Proximity
--
dsdt.dsl:            Name (_HID, "NVDA0808")  // _HID: Hardware ID
dsdt.dsl-            Name (_UID, 0x00)  // _UID: Unique ID
dsdt.dsl-            Name (_PXM, 0x00)  // _PXM: Device Proximity
--
ssdt18.dsl:            Name (_HID, "NVDA0708")  // _HID: Hardware ID
ssdt18.dsl-            Name (_UID, 0x10)  // _UID: Unique ID
ssdt18.dsl-            Name (_PXM, 0x01)  // _PXM: Device Proximity
--
ssdt18.dsl:            Name (_HID, "NVDA0808")  // _HID: Hardware ID
ssdt18.dsl-            Name (_UID, 0x10)  // _UID: Unique ID
ssdt18.dsl-            Name (_PXM, 0x01)  // _PXM: Device Proximity

And the removal of the duplicate gpio names and collision warnings (included above).

Note that this requires UEFI support added in nvb5277588.


LP: https://bugs.launchpad.net/ubuntu/+source/linux-nvidia-6.17/+bug/2143954

Prathamesh Shete added 2 commits March 11, 2026 14:22
Introduce TEGRA_GPIO_PREFIX() to define the Tegra SoC GPIO name
prefix in one place. Use it for the Tegra410 COMPUTE and SYSTEM
controllers so the prefix is "COMPUTE-" and "SYSTEM-" respectively.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/20260217081431.1208351-1-pshete@nvidia.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
(cherry picked from commit 2423e336d94868f0d2fcd81a87b90c5ea59736e0 linux-next)
Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
On Tegra platforms, multiple SoC instances may be present with each
defining the same GPIO name. For such devices, this results in
duplicate GPIO names.

When the device has a valid NUMA node, prepend the NUMA node ID
to the GPIO name prefix. The node ID identifies each socket,
ensuring GPIO line names remain distinct across multiple sockets.

Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
Acked-by: Thierry Reding <treding@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Link: https://patch.msgid.link/20260217081431.1208351-2-pshete@nvidia.com
Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com>
(cherry picked from commit 2c299030c6813eaa9ef95773c64d65c50fa706ac linux-next)
Signed-off-by: Matthew R. Ochs <mochs@nvidia.com>
Copy link
Copy Markdown
Collaborator

@clsotog clsotog left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acked-by: Carol L Soto <csoto@nvidia.com>

@jamieNguyenNVIDIA
Copy link
Copy Markdown
Collaborator

Acked-by: Jamie Nguyen <jamien@nvidia.com>

@nvmochs
Copy link
Copy Markdown
Collaborator Author

nvmochs commented Mar 12, 2026

PR submitted to Canonical.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants