[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20260120115923.3463866-4-khristineandreea.barbulescu@oss.nxp.com>
Date: Tue, 20 Jan 2026 13:59:15 +0200
From: Khristine Andreea Barbulescu <khristineandreea.barbulescu@....nxp.com>
To: Linus Walleij <linus.walleij@...aro.org>,
Bartosz Golaszewski <brgl@...ev.pl>,
Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>,
Chester Lin <chester62515@...il.com>,
Matthias Brugger <mbrugger@...e.com>,
Ghennadi Procopciuc <ghennadi.procopciuc@....com>,
Larisa Grigore <larisa.grigore@....com>,
Lee Jones <lee@...nel.org>,
Shawn Guo <shawnguo@...nel.org>,
Sascha Hauer <s.hauer@...gutronix.de>,
Fabio Estevam <festevam@...il.com>,
Dong Aisheng <aisheng.dong@....com>,
Jacky Bai <ping.bai@....com>,
Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
"Rafael J. Wysocki" <rafael@...nel.org>
Cc: Alberto Ruiz <aruizrui@...hat.com>,
Christophe Lizzi <clizzi@...hat.com>,
devicetree@...r.kernel.org,
Enric Balletbo <eballetb@...hat.com>,
Eric Chanudet <echanude@...hat.com>,
imx@...ts.linux.dev,
linux-arm-kernel@...ts.infradead.org,
linux-gpio@...r.kernel.org,
linux-kernel@...r.kernel.org,
NXP S32 Linux Team <s32@....com>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
"Vincent Guittot devicetree @ vger . kernel . org" <vincent.guittot@...aro.org>
Subject: [PATCH v8 03/10] arm64: dts: s32g: change pinctrl node into the new mfd node
From: Andrei Stefanescu <andrei.stefanescu@....nxp.com>
This commit will switch to the new mfd node for representing the SIUL2
hardware. The old pinctrl binding for SIUL2 will be deprecated in a
later commit since it doesn't correctly represent the hardware.
SIUL2 is now represented as an mfd device. Move the pinctrl related
properties inside the new "nxp-siul2" node. The latter one is now used
to represent the mfd device.
This change came as a result of upstream review in the following series:
https://lore.kernel.org/linux-gpio/a924bbb6-96ec-40be-9d82-a76b2ab73afd@oss.nxp.com/
https://lore.kernel.org/all/20240926143122.1385658-3-andrei.stefanescu@oss.nxp.com/
The SIUL2 module has multiple capabilities. It has support for reading
SoC information, pinctrl and GPIO. All of this functionality is part of
the same register space. The initial pinctrl driver treated the pinctrl
functionality as separate from the GPIO one. However, they do rely on
common registers and a long, detailed and specific register range list
would be required for pinctrl&GPIO (carving out the necessary memory
for each function). Moreover, in some cases this wouldn't be enough. For
example reading a GPIO's direction would require a read of the MSCR
register corresponding to that pin. This would not be possible in the
GPIO driver because all of the MSCR registers are referenced by the
pinctrl driver.
Signed-off-by: Andrei Stefanescu <andrei.stefanescu@....nxp.com>
Signed-off-by: Khristine Andreea Barbulescu <khristineandreea.barbulescu@....nxp.com>
---
arch/arm64/boot/dts/freescale/s32g2.dtsi | 35 ++++++++++++++----------
arch/arm64/boot/dts/freescale/s32g3.dtsi | 35 ++++++++++++++----------
2 files changed, 42 insertions(+), 28 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/s32g2.dtsi b/arch/arm64/boot/dts/freescale/s32g2.dtsi
index 51d00dac12de..fe36851ded15 100644
--- a/arch/arm64/boot/dts/freescale/s32g2.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g2.dtsi
@@ -122,20 +122,27 @@ rtc0: rtc@...60000 {
clock-names = "ipg", "source0";
};
- pinctrl: pinctrl@...9c240 {
- compatible = "nxp,s32g2-siul2-pinctrl";
- /* MSCR0-MSCR101 registers on siul2_0 */
- reg = <0x4009c240 0x198>,
- /* MSCR112-MSCR122 registers on siul2_1 */
- <0x44010400 0x2c>,
- /* MSCR144-MSCR190 registers on siul2_1 */
- <0x44010480 0xbc>,
- /* IMCR0-IMCR83 registers on siul2_0 */
- <0x4009ca40 0x150>,
- /* IMCR119-IMCR397 registers on siul2_1 */
- <0x44010c1c 0x45c>,
- /* IMCR430-IMCR495 registers on siul2_1 */
- <0x440110f8 0x108>;
+ pinctrl: pinctrl@...9c000 {
+ compatible = "nxp,s32g2-siul2";
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pinctrl 0 0 102>, <&pinctrl 112 112 79>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ siul2_0: siul2_0@...9c000 {
+ compatible = "syscon";
+ reg = <0x4009c000 0x179c>;
+ };
+
+ siul2_1: siul2_1@...10000 {
+ compatible = "syscon";
+ reg = <0x44010000 0x17b0>;
+ };
jtag_pins: jtag-pins {
jtag-grp0 {
diff --git a/arch/arm64/boot/dts/freescale/s32g3.dtsi b/arch/arm64/boot/dts/freescale/s32g3.dtsi
index eff7673e7f34..5d5d21b74019 100644
--- a/arch/arm64/boot/dts/freescale/s32g3.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g3.dtsi
@@ -180,20 +180,27 @@ rtc0: rtc@...60000 {
clock-names = "ipg", "source0";
};
- pinctrl: pinctrl@...9c240 {
- compatible = "nxp,s32g2-siul2-pinctrl";
- /* MSCR0-MSCR101 registers on siul2_0 */
- reg = <0x4009c240 0x198>,
- /* MSCR112-MSCR122 registers on siul2_1 */
- <0x44010400 0x2c>,
- /* MSCR144-MSCR190 registers on siul2_1 */
- <0x44010480 0xbc>,
- /* IMCR0-IMCR83 registers on siul2_0 */
- <0x4009ca40 0x150>,
- /* IMCR119-IMCR397 registers on siul2_1 */
- <0x44010c1c 0x45c>,
- /* IMCR430-IMCR495 registers on siul2_1 */
- <0x440110f8 0x108>;
+ pinctrl: pinctrl@...9c000 {
+ compatible = "nxp,s32g3-siul2", "nxp,s32g2-siul2";
+ gpio-controller;
+ #gpio-cells = <2>;
+ gpio-ranges = <&pinctrl 0 0 102>, <&pinctrl 112 112 79>;
+ interrupt-controller;
+ #interrupt-cells = <2>;
+ interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_HIGH>;
+ #address-cells = <1>;
+ #size-cells = <1>;
+ ranges;
+
+ siul2_0: siul2_0@...9c000 {
+ compatible = "syscon";
+ reg = <0x4009c000 0x179c>;
+ };
+
+ siul2_1: siul2_1@...10000 {
+ compatible = "syscon";
+ reg = <0x44010000 0x17b0>;
+ };
jtag_pins: jtag-pins {
jtag-grp0 {
--
2.50.1
Powered by blists - more mailing lists