linux-gpio.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] pinctrl: imx: Support i.MX952 and update for i.MX94
@ 2025-12-17  2:40 Peng Fan (OSS)
  2025-12-17  2:40 ` [PATCH 1/2] pinctrl: imx: Support NXP scmi extended mux config Peng Fan (OSS)
  2025-12-17  2:40 ` [PATCH 2/2] pinctrl: imx: Add support for NXP i.MX952 Peng Fan (OSS)
  0 siblings, 2 replies; 3+ messages in thread
From: Peng Fan (OSS) @ 2025-12-17  2:40 UTC (permalink / raw)
  To: Dong Aisheng, Fabio Estevam, Shawn Guo, Jacky Bai,
	Pengutronix Kernel Team, NXP S32 Linux Team, Linus Walleij,
	Sascha Hauer, Sudeep Holla, Cristian Marussi
  Cc: linux-gpio, imx, linux-arm-kernel, linux-kernel, arm-scmi,
	Peng Fan, Ranjani Vaidyanathan

Patch 1:
For the changes to i.MX94, some pins' mux options are not controlled by
IOMUXC, they are controlled in WAKUPMIX BLK CTRL. SM extends the pinctrl
protocol, by adding a new cfg option.

Patch 2:
Similar as i.MX95 and i.MX94, i.MX952 IOMUXC is also managed by System
Manager(SM) and exposed to Linux through SCMI pinctrl protocol.

i.MX952's select input register offset is different, so need to update
driver to include it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Peng Fan (1):
      pinctrl: imx: Add support for NXP i.MX952

Ranjani Vaidyanathan (1):
      pinctrl: imx: Support NXP scmi extended mux config

 drivers/pinctrl/freescale/pinctrl-imx-scmi.c | 20 ++++++++++++++++----
 drivers/pinctrl/pinctrl-scmi.c               |  3 ++-
 2 files changed, 18 insertions(+), 5 deletions(-)
---
base-commit: 563c8dd425b59e44470e28519107b1efc99f4c7b
change-id: 20251217-imx952-pin-2731d9cb6a15

Best regards,
-- 
Peng Fan <peng.fan@nxp.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] pinctrl: imx: Support NXP scmi extended mux config
  2025-12-17  2:40 [PATCH 0/2] pinctrl: imx: Support i.MX952 and update for i.MX94 Peng Fan (OSS)
@ 2025-12-17  2:40 ` Peng Fan (OSS)
  2025-12-17  2:40 ` [PATCH 2/2] pinctrl: imx: Add support for NXP i.MX952 Peng Fan (OSS)
  1 sibling, 0 replies; 3+ messages in thread
From: Peng Fan (OSS) @ 2025-12-17  2:40 UTC (permalink / raw)
  To: Dong Aisheng, Fabio Estevam, Shawn Guo, Jacky Bai,
	Pengutronix Kernel Team, NXP S32 Linux Team, Linus Walleij,
	Sascha Hauer, Sudeep Holla, Cristian Marussi
  Cc: linux-gpio, imx, linux-arm-kernel, linux-kernel, arm-scmi,
	Peng Fan, Ranjani Vaidyanathan

From: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>

i.MX94 has special muxing options for certain pins. Their mux settings
are not in IOMUXC module. i.MX System Manager Firmware includes new vendor
defined pinctrl type to SCMI pinctrl driver to handle these pins. The MUX
value field in the IOMUX table is extended to 16 bits where the lower 8
bits represent the current IOMUX value and the upper 8 bits represent the
new extended mux added in i.MX94.

Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/pinctrl/freescale/pinctrl-imx-scmi.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx-scmi.c b/drivers/pinctrl/freescale/pinctrl-imx-scmi.c
index 4e8ab919b334a11e3e716c4580e18bb0e65a6c02..04728ad807d38367a19e6e774d4ccc985549ecfe 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx-scmi.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx-scmi.c
@@ -38,11 +38,12 @@ struct scmi_pinctrl_imx {
 };
 
 /* SCMI pin control types, aligned with SCMI firmware */
-#define IMX_SCMI_NUM_CFG	4
+#define IMX_SCMI_NUM_CFG	5
 #define IMX_SCMI_PIN_MUX	192
 #define IMX_SCMI_PIN_CONFIG	193
 #define IMX_SCMI_PIN_DAISY_ID	194
 #define IMX_SCMI_PIN_DAISY_CFG	195
+#define IMX_SCMI_PIN_EXT	196
 
 #define IMX_SCMI_NO_PAD_CTL		BIT(31)
 #define IMX_SCMI_PAD_SION		BIT(30)
@@ -118,7 +119,14 @@ static int pinctrl_scmi_imx_dt_node_to_map(struct pinctrl_dev *pctldev,
 
 		pin_id = mux_reg / 4;
 
-		cfg[j++] = pinconf_to_config_packed(IMX_SCMI_PIN_MUX, mux_val);
+		cfg[j++] = pinconf_to_config_packed(IMX_SCMI_PIN_MUX, (mux_val & 0xFF));
+
+		if (mux_val & 0xFF00) {
+			int ext_val = (mux_val & 0xFF00) >> 8;
+
+			cfg[j++] = pinconf_to_config_packed(IMX_SCMI_PIN_EXT, ext_val);
+		} else
+			ncfg--;
 
 		if (!conf_reg || (conf_val & IMX_SCMI_NO_PAD_CTL))
 			ncfg--;

-- 
2.37.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] pinctrl: imx: Add support for NXP i.MX952
  2025-12-17  2:40 [PATCH 0/2] pinctrl: imx: Support i.MX952 and update for i.MX94 Peng Fan (OSS)
  2025-12-17  2:40 ` [PATCH 1/2] pinctrl: imx: Support NXP scmi extended mux config Peng Fan (OSS)
@ 2025-12-17  2:40 ` Peng Fan (OSS)
  1 sibling, 0 replies; 3+ messages in thread
From: Peng Fan (OSS) @ 2025-12-17  2:40 UTC (permalink / raw)
  To: Dong Aisheng, Fabio Estevam, Shawn Guo, Jacky Bai,
	Pengutronix Kernel Team, NXP S32 Linux Team, Linus Walleij,
	Sascha Hauer, Sudeep Holla, Cristian Marussi
  Cc: linux-gpio, imx, linux-arm-kernel, linux-kernel, arm-scmi,
	Peng Fan

From: Peng Fan <peng.fan@nxp.com>

The i.MX952 System Manager (SM) firmware supports the System Control
Management Interface (SCMI) pinctrl protocol, similar to the i.MX95 SM.
The base offset for the i.MX952 IOMUXC Daisy input register differs from
that of the i.MX95. Update the pinctrl-imx-scmi driver to add support for
i.MX952.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
 drivers/pinctrl/freescale/pinctrl-imx-scmi.c | 8 ++++++--
 drivers/pinctrl/pinctrl-scmi.c               | 3 ++-
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/pinctrl/freescale/pinctrl-imx-scmi.c b/drivers/pinctrl/freescale/pinctrl-imx-scmi.c
index 04728ad807d38367a19e6e774d4ccc985549ecfe..dab2fabdf4561c21f747773f2908f15b61eebb50 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx-scmi.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx-scmi.c
@@ -51,8 +51,9 @@ struct scmi_pinctrl_imx {
 
 #define IMX_SCMI_PIN_SIZE	24
 
-#define IMX95_DAISY_OFF		0x408
 #define IMX94_DAISY_OFF		0x608
+#define IMX95_DAISY_OFF		0x408
+#define IMX952_DAISY_OFF	0x460
 
 static int pinctrl_scmi_imx_dt_node_to_map(struct pinctrl_dev *pctldev,
 					   struct device_node *np,
@@ -74,6 +75,8 @@ static int pinctrl_scmi_imx_dt_node_to_map(struct pinctrl_dev *pctldev,
 			daisy_off = IMX95_DAISY_OFF;
 		} else if (of_machine_is_compatible("fsl,imx94")) {
 			daisy_off = IMX94_DAISY_OFF;
+		} else if (of_machine_is_compatible("fsl,imx952")) {
+			daisy_off = IMX952_DAISY_OFF;
 		} else {
 			dev_err(pctldev->dev, "platform not support scmi pinctrl\n");
 			return -EINVAL;
@@ -299,8 +302,9 @@ scmi_pinctrl_imx_get_pins(struct scmi_pinctrl_imx *pmx, struct pinctrl_desc *des
 }
 
 static const char * const scmi_pinctrl_imx_allowlist[] = {
-	"fsl,imx95",
 	"fsl,imx94",
+	"fsl,imx95",
+	"fsl,imx952",
 	NULL
 };
 
diff --git a/drivers/pinctrl/pinctrl-scmi.c b/drivers/pinctrl/pinctrl-scmi.c
index af3ac031e3626818495a168a96c7930907d9524a..d5fb8649cd9aaddee679ebfd86d8f3d1127b8e01 100644
--- a/drivers/pinctrl/pinctrl-scmi.c
+++ b/drivers/pinctrl/pinctrl-scmi.c
@@ -504,8 +504,9 @@ static int pinctrl_scmi_get_pins(struct scmi_pinctrl *pmx,
 }
 
 static const char * const scmi_pinctrl_blocklist[] = {
-	"fsl,imx95",
 	"fsl,imx94",
+	"fsl,imx95",
+	"fsl,imx952",
 	NULL
 };
 

-- 
2.37.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2025-12-17  2:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-12-17  2:40 [PATCH 0/2] pinctrl: imx: Support i.MX952 and update for i.MX94 Peng Fan (OSS)
2025-12-17  2:40 ` [PATCH 1/2] pinctrl: imx: Support NXP scmi extended mux config Peng Fan (OSS)
2025-12-17  2:40 ` [PATCH 2/2] pinctrl: imx: Add support for NXP i.MX952 Peng Fan (OSS)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).