From: Nishanth Menon <nm@ti.com>
To: Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Rob Herring <robh@kernel.org>
Cc: <linux-kernel@vger.kernel.org>, <devicetree@vger.kernel.org>,
<linux-arm-kernel@lists.infradead.org>,
Tero Kristo <kristo@kernel.org>,
Vignesh Raghavendra <vigneshr@ti.com>, Nishanth Menon <nm@ti.com>,
Vaishnav Achath <vaishnav.a@ti.com>,
Jared McArthur <j-mcarthur@ti.com>, Bryan Brattlof <bb@ti.com>,
Dhruva Gole <d-gole@ti.com>
Subject: [PATCH 3/3] arm64: dts: ti: k3-j722s: Add gpio-ranges properties
Date: Tue, 18 Jun 2024 12:31:23 -0500 [thread overview]
Message-ID: <20240618173123.2592074-4-nm@ti.com> (raw)
In-Reply-To: <20240618173123.2592074-1-nm@ti.com>
From: Jared McArthur <j-mcarthur@ti.com>
The AM67A/J722S/TDA4AEN platform is a derivative of AM62P platform
and we have no single 1:1 relation regarding index of GPIO and pin
controller. The GPIOs and pin controller registers have mapping and
holes in the map. These have been extracted from the J722S data
sheet. The MCU mapping is carried forward as is with J722S, however the
main GPIO block has differences that needs to be accounted for.
Mux mode input is selected as it is bi-directional. In case a specific
pull type or a specific pin level drive setting is desired, the board
device tree files will have to explicitly mux those pins for the GPIO
with the desired setting.
Ref: J722S Data sheet https://www.ti.com/lit/gpn/tda4aen-q1
Signed-off-by: Jared McArthur <j-mcarthur@ti.com>
Signed-off-by: Nishanth Menon <nm@ti.com>
---
Note: this generates a 'too large' warning for
pinctrl-single,gpio-ranges -
https://lore.kernel.org/r/20240618165102.2380159-1-nm@ti.com/ for more
details
arch/arm64/boot/dts/ti/k3-j722s.dtsi | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/arch/arm64/boot/dts/ti/k3-j722s.dtsi b/arch/arm64/boot/dts/ti/k3-j722s.dtsi
index 9132b0232b0b..84441a8ed4f0 100644
--- a/arch/arm64/boot/dts/ti/k3-j722s.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j722s.dtsi
@@ -83,11 +83,28 @@ &inta_main_dmss {
ti,interrupt-ranges = <7 71 21>;
};
+&main_pmx0 {
+ pinctrl-single,gpio-range =
+ <&main_pmx0_range 0 32 (PIN_INPUT | PIN_GPIO_MUX_MODE)>,
+ <&main_pmx0_range 33 55 (PIN_INPUT | PIN_GPIO_MUX_MODE)>,
+ <&main_pmx0_range 101 25 (PIN_INPUT | PIN_GPIO_MUX_MODE)>,
+ <&main_pmx0_range 137 5 (PIN_INPUT | PIN_GPIO_MUX_MODE)>,
+ <&main_pmx0_range 143 3 (PIN_INPUT | PIN_GPIO_MUX_MODE)>,
+ <&main_pmx0_range 149 2 (PIN_INPUT | PIN_GPIO_MUX_MODE)>;
+};
+
&main_gpio0 {
+ gpio-ranges = <&main_pmx0 0 0 32>,
+ <&main_pmx0 32 33 38>,
+ <&main_pmx0 70 72 17>;
ti,ngpio = <87>;
};
&main_gpio1 {
+ gpio-ranges = <&main_pmx0 7 101 25>,
+ <&main_pmx0 42 137 5>,
+ <&main_pmx0 47 143 3>,
+ <&main_pmx0 50 149 2>;
ti,ngpio = <73>;
};
--
2.43.0
prev parent reply other threads:[~2024-06-18 17:32 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-18 17:31 [PATCH 0/3] arm64: dts: ti: k3-am62p/j722s: Add gpio-ranges properties Nishanth Menon
2024-06-18 17:31 ` [PATCH 1/3] arm64: dts: ti: k3-pinctrl: Define a generic GPIO MUX Mode Nishanth Menon
2024-06-19 4:52 ` Dhruva Gole
2024-06-19 13:02 ` Nishanth Menon
2024-06-18 17:31 ` [PATCH 2/3] arm64: dts: ti: k3-am62p: Add gpio-ranges properties Nishanth Menon
2024-06-19 8:00 ` Dhruva Gole
2024-06-18 17:31 ` Nishanth Menon [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=20240618173123.2592074-4-nm@ti.com \
--to=nm@ti.com \
--cc=bb@ti.com \
--cc=conor+dt@kernel.org \
--cc=d-gole@ti.com \
--cc=devicetree@vger.kernel.org \
--cc=j-mcarthur@ti.com \
--cc=kristo@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh@kernel.org \
--cc=vaishnav.a@ti.com \
--cc=vigneshr@ti.com \
/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