From: Prathamesh Shete <pshete@nvidia.com>
To: Linus Walleij <linusw@kernel.org>,
Bartosz Golaszewski <brgl@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: Thierry Reding <thierry.reding@kernel.org>,
Jonathan Hunter <jonathanh@nvidia.com>,
Prathamesh Shete <pshete@nvidia.com>,
<linux-gpio@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-tegra@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: [PATCH 2/2] gpio: tegra186: Add support for Tegra238
Date: Thu, 14 May 2026 12:48:35 +0000 [thread overview]
Message-ID: <20260514124835.108532-2-pshete@nvidia.com> (raw)
In-Reply-To: <20260514124835.108532-1-pshete@nvidia.com>
Extend the existing Tegra186 GPIO controller driver with support for the
GPIO controller found on Tegra238.
Signed-off-by: Prathamesh Shete <pshete@nvidia.com>
---
drivers/gpio/gpio-tegra186.c | 68 ++++++++++++++++++++++++++++++++++++
1 file changed, 68 insertions(+)
diff --git a/drivers/gpio/gpio-tegra186.c b/drivers/gpio/gpio-tegra186.c
index aa7c3e44234f..f56617c298c0 100644
--- a/drivers/gpio/gpio-tegra186.c
+++ b/drivers/gpio/gpio-tegra186.c
@@ -19,6 +19,7 @@
#include <dt-bindings/gpio/tegra186-gpio.h>
#include <dt-bindings/gpio/tegra194-gpio.h>
#include <dt-bindings/gpio/tegra234-gpio.h>
+#include <dt-bindings/gpio/nvidia,tegra238-gpio.h>
#include <dt-bindings/gpio/tegra241-gpio.h>
#include <dt-bindings/gpio/tegra256-gpio.h>
#include <dt-bindings/gpio/nvidia,tegra264-gpio.h>
@@ -1239,6 +1240,67 @@ static const struct tegra_gpio_soc tegra234_aon_soc = {
.has_vm_support = false,
};
+#define TEGRA238_MAIN_GPIO_PORT(_name, _bank, _port, _pins) \
+ TEGRA_GPIO_PORT(TEGRA238_MAIN, _name, _bank, _port, _pins)
+
+static const struct tegra_gpio_port tegra238_main_ports[] = {
+ TEGRA238_MAIN_GPIO_PORT(A, 0, 0, 8),
+ TEGRA238_MAIN_GPIO_PORT(B, 0, 1, 5),
+ TEGRA238_MAIN_GPIO_PORT(C, 0, 2, 8),
+ TEGRA238_MAIN_GPIO_PORT(D, 0, 3, 8),
+ TEGRA238_MAIN_GPIO_PORT(E, 0, 4, 4),
+ TEGRA238_MAIN_GPIO_PORT(F, 0, 5, 8),
+ TEGRA238_MAIN_GPIO_PORT(G, 0, 6, 8),
+ TEGRA238_MAIN_GPIO_PORT(H, 0, 7, 6),
+ TEGRA238_MAIN_GPIO_PORT(J, 1, 0, 8),
+ TEGRA238_MAIN_GPIO_PORT(K, 1, 1, 4),
+ TEGRA238_MAIN_GPIO_PORT(L, 1, 2, 8),
+ TEGRA238_MAIN_GPIO_PORT(M, 1, 3, 8),
+ TEGRA238_MAIN_GPIO_PORT(N, 1, 4, 3),
+ TEGRA238_MAIN_GPIO_PORT(P, 1, 5, 8),
+ TEGRA238_MAIN_GPIO_PORT(Q, 1, 6, 3),
+ TEGRA238_MAIN_GPIO_PORT(R, 2, 0, 8),
+ TEGRA238_MAIN_GPIO_PORT(S, 2, 1, 8),
+ TEGRA238_MAIN_GPIO_PORT(T, 2, 2, 8),
+ TEGRA238_MAIN_GPIO_PORT(U, 2, 3, 6),
+ TEGRA238_MAIN_GPIO_PORT(V, 2, 4, 2),
+ TEGRA238_MAIN_GPIO_PORT(W, 3, 0, 8),
+ TEGRA238_MAIN_GPIO_PORT(X, 3, 1, 2)
+};
+
+static const struct tegra_gpio_soc tegra238_main_soc = {
+ .num_ports = ARRAY_SIZE(tegra238_main_ports),
+ .ports = tegra238_main_ports,
+ .name = "tegra238-gpio",
+ .instance = 0,
+ .num_irqs_per_bank = 8,
+ .has_vm_support = true,
+};
+
+#define TEGRA238_AON_GPIO_PORT(_name, _bank, _port, _pins) \
+ TEGRA_GPIO_PORT(TEGRA238_AON, _name, _bank, _port, _pins)
+
+static const struct tegra_gpio_port tegra238_aon_ports[] = {
+ TEGRA238_AON_GPIO_PORT(AA, 0, 0, 8),
+ TEGRA238_AON_GPIO_PORT(BB, 0, 1, 1),
+ TEGRA238_AON_GPIO_PORT(CC, 0, 2, 8),
+ TEGRA238_AON_GPIO_PORT(DD, 0, 3, 8),
+ TEGRA238_AON_GPIO_PORT(EE, 0, 4, 6),
+ TEGRA238_AON_GPIO_PORT(FF, 0, 5, 8),
+ TEGRA238_AON_GPIO_PORT(GG, 0, 6, 8),
+ TEGRA238_AON_GPIO_PORT(HH, 0, 7, 4)
+};
+
+static const struct tegra_gpio_soc tegra238_aon_soc = {
+ .num_ports = ARRAY_SIZE(tegra238_aon_ports),
+ .ports = tegra238_aon_ports,
+ .name = "tegra238-gpio-aon",
+ .instance = 1,
+ .num_irqs_per_bank = 8,
+ .has_gte = true,
+ .has_vm_support = false,
+};
+
#define TEGRA241_MAIN_GPIO_PORT(_name, _bank, _port, _pins) \
TEGRA_GPIO_PORT(TEGRA241_MAIN, _name, _bank, _port, _pins)
@@ -1447,6 +1509,12 @@ static const struct of_device_id tegra186_gpio_of_match[] = {
}, {
.compatible = "nvidia,tegra234-gpio-aon",
.data = &tegra234_aon_soc
+ }, {
+ .compatible = "nvidia,tegra238-gpio",
+ .data = &tegra238_main_soc
+ }, {
+ .compatible = "nvidia,tegra238-gpio-aon",
+ .data = &tegra238_aon_soc
}, {
.compatible = "nvidia,tegra256-gpio",
.data = &tegra256_main_soc
--
2.25.1
prev parent reply other threads:[~2026-05-14 12:49 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-14 12:48 [PATCH 1/2] dt-bindings: gpio: Add Tegra238 support Prathamesh Shete
2026-05-14 12:48 ` Prathamesh Shete [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260514124835.108532-2-pshete@nvidia.com \
--to=pshete@nvidia.com \
--cc=brgl@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jonathanh@nvidia.com \
--cc=krzk+dt@kernel.org \
--cc=linusw@kernel.org \
--cc=linux-gpio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=robh@kernel.org \
--cc=thierry.reding@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox