diff mbox series

[v2] pinctrl: freescale: Add support for imx943 pinctrl

Message ID 20250516100423.1685732-1-ping.bai@nxp.com
State New
Headers show
Series [v2] pinctrl: freescale: Add support for imx943 pinctrl | expand

Commit Message

Jacky Bai May 16, 2025, 10:04 a.m. UTC
The i.MX943 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.MX943 IOMUXC Daisy input register differs from
that of the i.MX95. Update the pinctrl-imx-scmi driver to add support for
i.MX943.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
---
 - v2 changes:
  - refine the commit log.
---
 drivers/pinctrl/freescale/pinctrl-imx-scmi.c | 4 ++++
 drivers/pinctrl/pinctrl-scmi.c               | 1 +
 2 files changed, 5 insertions(+)

Comments

Linus Walleij May 20, 2025, 9:51 p.m. UTC | #1
On Fri, May 16, 2025 at 12:02 PM Jacky Bai <ping.bai@nxp.com> wrote:

> The i.MX943 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.MX943 IOMUXC Daisy input register differs from
> that of the i.MX95. Update the pinctrl-imx-scmi driver to add support for
> i.MX943.
>
> Signed-off-by: Jacky Bai <ping.bai@nxp.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>

Reviewed-by: Linus Walleij <linus.walleij@linaro.org>

I would merge it... but you also need a patch adding fsl,imx94 to
Documentation/devicetree/bindings/arm/fsl.yaml
do you not?

Yours,
Linus Walleij
Jacky Bai May 21, 2025, 3:07 a.m. UTC | #2
Hi Linus,

> Subject: Re: [PATCH v2] pinctrl: freescale: Add support for imx943 pinctrl
> 
> On Fri, May 16, 2025 at 12:02 PM Jacky Bai <ping.bai@nxp.com> wrote:
> 
> > The i.MX943 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.MX943 IOMUXC Daisy input register differs
> > from that of the i.MX95. Update the pinctrl-imx-scmi driver to add
> > support for i.MX943.
> >
> > Signed-off-by: Jacky Bai <ping.bai@nxp.com>
> > Reviewed-by: Peng Fan <peng.fan@nxp.com>
> 
> Reviewed-by: Linus Walleij <linus.walleij@linaro.org>
> 
> I would merge it... but you also need a patch adding fsl,imx94 to
> Documentation/devicetree/bindings/arm/fsl.yaml
> do you not?
> 

Sorry, I forgot to add you in Cc list of in below thread:
https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250421065139.3073232-2-ping.bai@nxp.com/
The "fsl,imx94" compatible changes has been merged in linux-next tree.

BR
Jacky

> Yours,
> Linus Walleij
Linus Walleij May 21, 2025, 8:12 a.m. UTC | #3
On Fri, May 16, 2025 at 12:02 PM Jacky Bai <ping.bai@nxp.com> wrote:

> The i.MX943 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.MX943 IOMUXC Daisy input register differs from
> that of the i.MX95. Update the pinctrl-imx-scmi driver to add support for
> i.MX943.
>
> Signed-off-by: Jacky Bai <ping.bai@nxp.com>
> Reviewed-by: Peng Fan <peng.fan@nxp.com>

Patch applied, expecting the compatible string to come in from
another tree!

Yours,
Linus Walleij
diff mbox series

Patch

diff --git a/drivers/pinctrl/freescale/pinctrl-imx-scmi.c b/drivers/pinctrl/freescale/pinctrl-imx-scmi.c
index 8f15c4c4dc44..4e8ab919b334 100644
--- a/drivers/pinctrl/freescale/pinctrl-imx-scmi.c
+++ b/drivers/pinctrl/freescale/pinctrl-imx-scmi.c
@@ -51,6 +51,7 @@  struct scmi_pinctrl_imx {
 #define IMX_SCMI_PIN_SIZE	24
 
 #define IMX95_DAISY_OFF		0x408
+#define IMX94_DAISY_OFF		0x608
 
 static int pinctrl_scmi_imx_dt_node_to_map(struct pinctrl_dev *pctldev,
 					   struct device_node *np,
@@ -70,6 +71,8 @@  static int pinctrl_scmi_imx_dt_node_to_map(struct pinctrl_dev *pctldev,
 	if (!daisy_off) {
 		if (of_machine_is_compatible("fsl,imx95")) {
 			daisy_off = IMX95_DAISY_OFF;
+		} else if (of_machine_is_compatible("fsl,imx94")) {
+			daisy_off = IMX94_DAISY_OFF;
 		} else {
 			dev_err(pctldev->dev, "platform not support scmi pinctrl\n");
 			return -EINVAL;
@@ -289,6 +292,7 @@  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",
 	NULL
 };
 
diff --git a/drivers/pinctrl/pinctrl-scmi.c b/drivers/pinctrl/pinctrl-scmi.c
index df4bbcd7d1d5..383681041e4c 100644
--- a/drivers/pinctrl/pinctrl-scmi.c
+++ b/drivers/pinctrl/pinctrl-scmi.c
@@ -507,6 +507,7 @@  static int pinctrl_scmi_get_pins(struct scmi_pinctrl *pmx,
 
 static const char * const scmi_pinctrl_blocklist[] = {
 	"fsl,imx95",
+	"fsl,imx94",
 	NULL
 };