-
Notifications
You must be signed in to change notification settings - Fork 53
[6.17] backport gpio patches for Tegra 256, tegra 186, tegra410 Edit #270
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 24.04_linux-nvidia-6.17-next
Are you sure you want to change the base?
Conversation
clsotog
left a comment
There was a problem hiding this 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>
|
@nirmoy Two comments
Basically you would want to revert these 2 first: And then pick the content from upstream starting with "dt-bindings: gpio: Add Tegra256 support". |
|
Thanks @jamieNguyenNVIDIA, @nvmochs . Updated with bacported tag for original (f75db6f), removed i2c patch and also reverted "gpio: tegra186: Add support for Tegra410" to restore the original patch. @nvmochs I2C patch was next the GPIO, I blindly picked it up |
|
Clubing reverts together, made later cherry pick cleanly. Thanks Matt for that input |
This reverts commit 5443ed9. Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Extend the existing Tegra186 GPIO controller device tree bindings with support for the GPIO controller found on Tegra256. The number of pins is slightly different, but the programming model remains the same Add a new header, include/dt-bindings/gpio/tegra256-gpio.h, that defines port IDs as well as the TEGRA256_MAIN_GPIO() helper, both of which are used in conjunction to create a unique specifier for each pin. The OS can reconstruct the port ID and pin from these values to determine the register region for the corresponding GPIO. However, the OS does not use the macro definitions in this file. The symbolic names help associate these GPIO specifiers with the names used in the technical documentation available for the chip. Signed-off-by: Prathamesh Shete <pshete@nvidia.com> Acked-by: Conor Dooley <conor.dooley@microchip.com> Link: https://lore.kernel.org/r/20250823055420.24664-1-pshete@nvidia.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> (cherry picked from commit eef6dcb) Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Extend the existing Tegra186 GPIO controller driver with support for the GPIO controller found on Tegra256. While the programming model remains the same, the number of pins has slightly changed. Signed-off-by: Prathamesh Shete <pshete@nvidia.com> Link: https://lore.kernel.org/r/20250823055420.24664-2-pshete@nvidia.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> (cherry picked from commit db12ee0) Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Introduce a generic macro TEGRA_GPIO_PORT to define SoC specific ports macros. This simplifies the code and avoids unnecessary duplication. Suggested-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Kartik Rajput <kkartik@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> (cherry picked from commit f75db6f) Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
Extend the existing Tegra186 GPIO controller driver with support for the GPIO controller found on Tegra410. Tegra410 supports two GPIO controllers referred to as 'COMPUTE' and 'SYSTEM'. Co-developed-by: Nathan Hartman <nhartman@nvidia.com> Signed-off-by: Nathan Hartman <nhartman@nvidia.com> Signed-off-by: Prathamesh Shete <pshete@nvidia.com> Signed-off-by: Kartik Rajput <kkartik@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> (cherry picked from commit 9631a10) Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
On Tegra410, Compute and System GPIOs have same port names. This results in the same GPIO names for both Compute and System GPIOs during initialization in `tegra186_gpio_probe()`, which results in following warnings: kernel: gpio gpiochip1: Detected name collision for GPIO name 'PA.00' kernel: gpio gpiochip1: Detected name collision for GPIO name 'PA.01' kernel: gpio gpiochip1: Detected name collision for GPIO name 'PA.02' kernel: gpio gpiochip1: Detected name collision for GPIO name 'PB.00' kernel: gpio gpiochip1: Detected name collision for GPIO name 'PB.01' ... Add GPIO name prefix in the SoC data and use it to initialize the GPIO name. Port names remain unchanged for previous SoCs. On Tegra410, Compute GPIOs are named COMPUTE-P<PORT>.GPIO, and System GPIOs are named SYSTEM-P<PORT>.GPIO. Fixes: 9631a10 ("gpio: tegra186: Add support for Tegra410") Signed-off-by: Kartik Rajput <kkartik@nvidia.com> Acked-by: Thierry Reding <treding@nvidia.com> Reviewed-by: Jon Hunter <jonathanh@nvidia.com> Link: https://lore.kernel.org/r/20251113163112.885900-1-kkartik@nvidia.com Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@linaro.org> (cherry picked from commit 67f9b82) Signed-off-by: Nirmoy Das <nirmoyd@nvidia.com>
nvmochs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Nirmoy for fixing this up so we can pick clean.
✅ Commit fcfde1e matches upstream exactly
✅ Commit 569a04e matches upstream exactly
✅ Commit 0d506ea matches upstream exactly
✅ Commit 53d8f14 matches upstream exactly
✅ Commit ab483eb matches upstream exactly
Acked-by: Matthew R. Ochs <mochs@nvidia.com>
|
|
|
|
Cherry-pick GPIO related patches for few Tegra CPUs:
dt-bindings: gpio: Add Tegra256 support https://git.kernel.org/torvalds/c/eef6dcbc52fa
gpio: tegra186: Add support for Tegra256 https://git.kernel.org/torvalds/c/db12ee08726e
Revert partial "gpio: tegra186: Use generic macro for port definitions "
gpio: tegra186: Use generic macro for port definitions https://git.kernel.org/torvalds/c/f75db6f7f907
gpio: tegra186: Fix GPIO name collisions for Tegra410 https://git.kernel.org/torvalds/c/67f9b828d4e5
i2c: tegra: Add Tegra256 support https://git.kernel.org/torvalds/c/6e3cb25e62f2
https://bugs.launchpad.net/ubuntu/+source/linux-nvidia/+bug/2137739