* [PATCH v2 01/11] dt-bindings: gpio: vf610: fix clock requirements per SoC
2026-11-02 23:44 [PATCH v2 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
@ 2026-11-02 23:44 ` Peng Fan (OSS)
2026-11-03 11:46 ` Krzysztof Kozlowski
2026-11-02 23:44 ` [PATCH v2 02/11] gpio: vf610: simplify with irq_set_irq_wake() Peng Fan (OSS)
` (9 subsequent siblings)
10 siblings, 1 reply; 18+ messages in thread
From: Peng Fan (OSS) @ 2026-11-02 23:44 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Bartosz Golaszewski, linux-gpio, devicetree, linux-kernel, imx,
linux-arm-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
The i.MX7ULP GPIO controller needs both the GPIO and PORT clocks,
while the i.MX8ULP and its derivatives (i.MX93/94/95/952) only have
a single "gpio" clock. The VF610 controller has no gateable clocks,
so keep clocks optional there.
Describe the clock items with minItems/maxItems, require exactly two
clocks for i.MX7ULP, and require exactly one "gpio" clock for the
i.MX8ULP family.
Fixes: c61d8b5791ab ("dt-bindings: gpio: gpio-vf610: Add imx8ulp compatible string")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
.../devicetree/bindings/gpio/gpio-vf610.yaml | 32 ++++++++++++++++++++++
1 file changed, 32 insertions(+)
diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
index a31f64b6d40b..822fa11d18d9 100644
--- a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
+++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
@@ -57,11 +57,13 @@ properties:
maxItems: 32
clocks:
+ minItems: 1
items:
- description: SoC GPIO clock
- description: SoC PORT clock
clock-names:
+ minItems: 1
items:
- const: gpio
- const: port
@@ -116,6 +118,36 @@ allOf:
reg:
items:
- description: GPIO register base address
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx7ulp-gpio
+ then:
+ properties:
+ clocks:
+ minItems: 2
+ maxItems: 2
+ clock-names:
+ minItems: 2
+ maxItems: 2
+ required:
+ - clocks
+ - clock-names
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx8ulp-gpio
+ then:
+ properties:
+ clocks:
+ maxItems: 1
+ clock-names:
+ maxItems: 1
+ required:
+ - clocks
+ - clock-names
additionalProperties: false
--
2.51.0
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH v2 01/11] dt-bindings: gpio: vf610: fix clock requirements per SoC
2026-11-02 23:44 ` [PATCH v2 01/11] dt-bindings: gpio: vf610: fix clock requirements per SoC Peng Fan (OSS)
@ 2026-11-03 11:46 ` Krzysztof Kozlowski
2026-11-03 13:15 ` Peng Fan
0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-03 11:46 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Bartosz Golaszewski, linux-gpio, devicetree,
linux-kernel, imx, linux-arm-kernel, Peng Fan
On Tue, Nov 03, 2026 at 07:44:05AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> The i.MX7ULP GPIO controller needs both the GPIO and PORT clocks,
> while the i.MX8ULP and its derivatives (i.MX93/94/95/952) only have
> a single "gpio" clock. The VF610 controller has no gateable clocks,
> so keep clocks optional there.
Same second comment.
>
> Describe the clock items with minItems/maxItems, require exactly two
> clocks for i.MX7ULP, and require exactly one "gpio" clock for the
> i.MX8ULP family.
Drop sentence, redundant.
>
> Fixes: c61d8b5791ab ("dt-bindings: gpio: gpio-vf610: Add imx8ulp compatible string")
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---
> .../devicetree/bindings/gpio/gpio-vf610.yaml | 32 ++++++++++++++++++++++
> 1 file changed, 32 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
> index a31f64b6d40b..822fa11d18d9 100644
> --- a/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
> +++ b/Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
> @@ -57,11 +57,13 @@ properties:
> maxItems: 32
>
> clocks:
> + minItems: 1
> items:
> - description: SoC GPIO clock
> - description: SoC PORT clock
>
> clock-names:
> + minItems: 1
> items:
> - const: gpio
> - const: port
> @@ -116,6 +118,36 @@ allOf:
> reg:
> items:
> - description: GPIO register base address
> + - if:
> + properties:
> + compatible:
> + contains:
> + const: fsl,imx7ulp-gpio
> + then:
> + properties:
> + clocks:
> + minItems: 2
> + maxItems: 2
So you ignore not only my feedback... Good to know, the more the
merrier.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH v2 01/11] dt-bindings: gpio: vf610: fix clock requirements per SoC
2026-11-03 11:46 ` Krzysztof Kozlowski
@ 2026-11-03 13:15 ` Peng Fan
2026-11-03 13:14 ` Krzysztof Kozlowski
0 siblings, 1 reply; 18+ messages in thread
From: Peng Fan @ 2026-11-03 13:15 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Bartosz Golaszewski, linux-gpio, devicetree,
linux-kernel, imx, linux-arm-kernel, Peng Fan
On Tue, Nov 03, 2026 at 12:46:12PM +0100, Krzysztof Kozlowski wrote:
>On Tue, Nov 03, 2026 at 07:44:05AM +0800, Peng Fan (OSS) wrote:
>> From: Peng Fan <peng.fan@nxp.com>
>>
>> The i.MX7ULP GPIO controller needs both the GPIO and PORT clocks,
>> while the i.MX8ULP and its derivatives (i.MX93/94/95/952) only have
>> a single "gpio" clock. The VF610 controller has no gateable clocks,
>> so keep clocks optional there.
>
>Same second comment.
Please suggest what I should use to replace vf610 in the subject.
I not find a better idea expect picking "vf610" from the filename.
>
>>
>> Describe the clock items with minItems/maxItems, require exactly two
>> clocks for i.MX7ULP, and require exactly one "gpio" clock for the
>> + then:
>> + properties:
>> + clocks:
>> + minItems: 2
>> + maxItems: 2
>
>So you ignore not only my feedback... Good to know, the more the
>merrier.
Oops. Frank raised this.
Thanks
Peng
>
>Best regards,
>Krzysztof
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 01/11] dt-bindings: gpio: vf610: fix clock requirements per SoC
2026-11-03 13:15 ` Peng Fan
@ 2026-11-03 13:14 ` Krzysztof Kozlowski
2026-11-03 14:00 ` Peng Fan
0 siblings, 1 reply; 18+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-03 13:14 UTC (permalink / raw)
To: Peng Fan
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Bartosz Golaszewski, linux-gpio, devicetree,
linux-kernel, imx, linux-arm-kernel, Peng Fan
On 03/11/2026 14:15, Peng Fan wrote:
> On Tue, Nov 03, 2026 at 12:46:12PM +0100, Krzysztof Kozlowski wrote:
>> On Tue, Nov 03, 2026 at 07:44:05AM +0800, Peng Fan (OSS) wrote:
>>> From: Peng Fan <peng.fan@nxp.com>
>>>
>>> The i.MX7ULP GPIO controller needs both the GPIO and PORT clocks,
>>> while the i.MX8ULP and its derivatives (i.MX93/94/95/952) only have
>>> a single "gpio" clock. The VF610 controller has no gateable clocks,
>>> so keep clocks optional there.
>>
>> Same second comment.
>
> Please suggest what I should use to replace vf610 in the subject.
> I not find a better idea expect picking "vf610" from the filename.
Subject has nothing to do here. Read again my comment. You say vf610 has
no clocks, but I do not see corresponding update.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 18+ messages in thread
* Re: [PATCH v2 01/11] dt-bindings: gpio: vf610: fix clock requirements per SoC
2026-11-03 13:14 ` Krzysztof Kozlowski
@ 2026-11-03 14:00 ` Peng Fan
2026-11-03 14:19 ` Krzysztof Kozlowski
0 siblings, 1 reply; 18+ messages in thread
From: Peng Fan @ 2026-11-03 14:00 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Bartosz Golaszewski, linux-gpio, devicetree,
linux-kernel, imx, linux-arm-kernel, Peng Fan
On Tue, Nov 03, 2026 at 02:14:07PM +0100, Krzysztof Kozlowski wrote:
>On 03/11/2026 14:15, Peng Fan wrote:
>> On Tue, Nov 03, 2026 at 12:46:12PM +0100, Krzysztof Kozlowski wrote:
>>> On Tue, Nov 03, 2026 at 07:44:05AM +0800, Peng Fan (OSS) wrote:
>>>> From: Peng Fan <peng.fan@nxp.com>
>>>>
>>>> The i.MX7ULP GPIO controller needs both the GPIO and PORT clocks,
>>>> while the i.MX8ULP and its derivatives (i.MX93/94/95/952) only have
>>>> a single "gpio" clock. The VF610 controller has no gateable clocks,
>>>> so keep clocks optional there.
>>>
>>> Same second comment.
>>
>> Please suggest what I should use to replace vf610 in the subject.
>> I not find a better idea expect picking "vf610" from the filename.
>
>Subject has nothing to do here. Read again my comment. You say vf610 has
>no clocks, but I do not see corresponding update.
Thanks for quick reply. I see.
In v3, I will include below in the dt-binding patch. please let me know if
it is wrong.
- if:
properties:
compatible:
const: fsl,vf610-gpio
then:
properties:
clocks: false
clock-names: false
Thanks
Peng
>
>Best regards,
>Krzysztof
>
>
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH v2 01/11] dt-bindings: gpio: vf610: fix clock requirements per SoC
2026-11-03 14:00 ` Peng Fan
@ 2026-11-03 14:19 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-03 14:19 UTC (permalink / raw)
To: Peng Fan
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Bartosz Golaszewski, linux-gpio, devicetree,
linux-kernel, imx, linux-arm-kernel, Peng Fan
On 03/11/2026 15:00, Peng Fan wrote:
>> Subject has nothing to do here. Read again my comment. You say vf610 has
>> no clocks, but I do not see corresponding update.
>
> Thanks for quick reply. I see.
>
> In v3, I will include below in the dt-binding patch. please let me know if
> it is wrong.
>
> - if:
> properties:
> compatible:
> const: fsl,vf610-gpio
> then:
> properties:
> clocks: false
> clock-names: false
Looks ok.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v2 02/11] gpio: vf610: simplify with irq_set_irq_wake()
2026-11-02 23:44 [PATCH v2 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 01/11] dt-bindings: gpio: vf610: fix clock requirements per SoC Peng Fan (OSS)
@ 2026-11-02 23:44 ` Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 03/11] gpio: vf610: use devm_clk_get_optional_enabled() for clock handling Peng Fan (OSS)
` (8 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2026-11-02 23:44 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Bartosz Golaszewski, linux-gpio, devicetree, linux-kernel, imx,
linux-arm-kernel, Peng Fan, Daniel Baluta
From: Peng Fan <peng.fan@nxp.com>
Replace the manual enable/disable irq wake logic with a single call to
irq_set_irq_wake() to simplify code.
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/gpio/gpio-vf610.c | 5 +----
1 file changed, 1 insertion(+), 4 deletions(-)
diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index adfa2c2d5873..c1c562071c0d 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -189,10 +189,7 @@ static int vf610_gpio_irq_set_wake(struct irq_data *d, u32 enable)
struct vf610_gpio_port *port =
gpiochip_get_data(irq_data_get_irq_chip_data(d));
- if (enable)
- enable_irq_wake(port->irq);
- else
- disable_irq_wake(port->irq);
+ irq_set_irq_wake(port->irq, enable);
return 0;
}
--
2.51.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v2 03/11] gpio: vf610: use devm_clk_get_optional_enabled() for clock handling
2026-11-02 23:44 [PATCH v2 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 01/11] dt-bindings: gpio: vf610: fix clock requirements per SoC Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 02/11] gpio: vf610: simplify with irq_set_irq_wake() Peng Fan (OSS)
@ 2026-11-02 23:44 ` Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 04/11] gpio: vf610: drop unneeded header Peng Fan (OSS)
` (7 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2026-11-02 23:44 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Bartosz Golaszewski, linux-gpio, devicetree, linux-kernel, imx,
linux-arm-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Replace the manual clock acquisition, enable and cleanup sequences with
devm_clk_get_optional_enabled() for both the port and gpio clocks. The
helper treats a missing clock as NULL and automatically disables and
unprepares the clocks on driver unbind, so the vf610_gpio_disable_clk()
helper is no longer needed.
Unlike the previous code, propagate all errors from the helper,
including clk_prepare_enable() failures. The old code only tolerated
lookup errors and failed probe when enabling the clock failed; continuing
with a disabled clock could fault when accessing the PORT/GPIO registers.
The optional helper already covers the "clock not described" case, so
there is no need to silently ignore other errors.
The clock pointers are only needed during probe now that devm manages
their lifetime, so drop them from struct vf610_gpio_port and use a local
variable instead.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/gpio/gpio-vf610.c | 46 +++++++++-------------------------------------
1 file changed, 9 insertions(+), 37 deletions(-)
diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index c1c562071c0d..9ebb4469fd15 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -34,8 +34,6 @@ struct vf610_gpio_port {
void __iomem *gpio_base;
const struct fsl_gpio_soc_data *sdata;
u8 irqc[VF610_GPIO_PER_PORT];
- struct clk *clk_port;
- struct clk *clk_gpio;
int irq;
};
@@ -206,11 +204,6 @@ static const struct irq_chip vf610_irqchip = {
GPIOCHIP_IRQ_RESOURCE_HELPERS,
};
-static void vf610_gpio_disable_clk(void *data)
-{
- clk_disable_unprepare(data);
-}
-
static int vf610_gpio_probe(struct platform_device *pdev)
{
struct gpio_generic_chip_config config;
@@ -218,6 +211,7 @@ static int vf610_gpio_probe(struct platform_device *pdev)
struct vf610_gpio_port *port;
struct gpio_chip *gc;
struct gpio_irq_chip *girq;
+ struct clk *clk;
unsigned long flags;
int i;
int ret;
@@ -261,37 +255,15 @@ static int vf610_gpio_probe(struct platform_device *pdev)
if (port->irq < 0)
return port->irq;
- port->clk_port = devm_clk_get(dev, "port");
- ret = PTR_ERR_OR_ZERO(port->clk_port);
- if (!ret) {
- ret = clk_prepare_enable(port->clk_port);
- if (ret)
- return ret;
- ret = devm_add_action_or_reset(dev, vf610_gpio_disable_clk,
- port->clk_port);
- if (ret)
- return ret;
- } else if (ret == -EPROBE_DEFER) {
- /*
- * Percolate deferrals, for anything else,
- * just live without the clocking.
- */
- return ret;
- }
+ clk = devm_clk_get_optional_enabled(dev, "port");
+ if (IS_ERR(clk))
+ return dev_err_probe(dev, PTR_ERR(clk),
+ "failed to get/enable port clock\n");
- port->clk_gpio = devm_clk_get(dev, "gpio");
- ret = PTR_ERR_OR_ZERO(port->clk_gpio);
- if (!ret) {
- ret = clk_prepare_enable(port->clk_gpio);
- if (ret)
- return ret;
- ret = devm_add_action_or_reset(dev, vf610_gpio_disable_clk,
- port->clk_gpio);
- if (ret)
- return ret;
- } else if (ret == -EPROBE_DEFER) {
- return ret;
- }
+ clk = devm_clk_get_optional_enabled(dev, "gpio");
+ if (IS_ERR(clk))
+ return dev_err_probe(dev, PTR_ERR(clk),
+ "failed to get/enable gpio clock\n");
gc = &port->chip.gc;
flags = GPIO_GENERIC_PINCTRL_BACKEND;
--
2.51.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v2 04/11] gpio: vf610: drop unneeded header
2026-11-02 23:44 [PATCH v2 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
` (2 preceding siblings ...)
2026-11-02 23:44 ` [PATCH v2 03/11] gpio: vf610: use devm_clk_get_optional_enabled() for clock handling Peng Fan (OSS)
@ 2026-11-02 23:44 ` Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 05/11] gpio: vf610: drop unnecessary wrappers Peng Fan (OSS)
` (6 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2026-11-02 23:44 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Bartosz Golaszewski, linux-gpio, devicetree, linux-kernel, imx,
linux-arm-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Remove the unused pinctrl consumer header since the driver doesn't use
any pinctrl consumer functions.
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/gpio/gpio-vf610.c | 1 -
1 file changed, 1 deletion(-)
diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index 9ebb4469fd15..d14cd5515293 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -16,7 +16,6 @@
#include <linux/io.h>
#include <linux/ioport.h>
#include <linux/irq.h>
-#include <linux/pinctrl/consumer.h>
#include <linux/platform_device.h>
#include <linux/property.h>
--
2.51.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v2 05/11] gpio: vf610: drop unnecessary wrappers
2026-11-02 23:44 [PATCH v2 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
` (3 preceding siblings ...)
2026-11-02 23:44 ` [PATCH v2 04/11] gpio: vf610: drop unneeded header Peng Fan (OSS)
@ 2026-11-02 23:44 ` Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 06/11] MAINTAINERS: Update i.MX GPIO entry Peng Fan (OSS)
` (5 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2026-11-02 23:44 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Bartosz Golaszewski, linux-gpio, devicetree, linux-kernel, imx,
linux-arm-kernel, Peng Fan, Daniel Baluta
From: Peng Fan <peng.fan@nxp.com>
Remove trivial wrapper functions vf610_gpio_writel() and
vf610_gpio_readl() that just called the relaxed versions directly.
Replace their usage with direct calls to writel_relaxed() and
readl_relaxed().
Reviewed-by: Daniel Baluta <daniel.baluta@nxp.com>
Reviewed-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
drivers/gpio/gpio-vf610.c | 26 ++++++++------------------
1 file changed, 8 insertions(+), 18 deletions(-)
diff --git a/drivers/gpio/gpio-vf610.c b/drivers/gpio/gpio-vf610.c
index d14cd5515293..0ef220eacd3b 100644
--- a/drivers/gpio/gpio-vf610.c
+++ b/drivers/gpio/gpio-vf610.c
@@ -82,16 +82,6 @@ static const struct of_device_id vf610_gpio_dt_ids[] = {
};
MODULE_DEVICE_TABLE(of, vf610_gpio_dt_ids);
-static inline void vf610_gpio_writel(u32 val, void __iomem *reg)
-{
- writel_relaxed(val, reg);
-}
-
-static inline u32 vf610_gpio_readl(void __iomem *reg)
-{
- return readl_relaxed(reg);
-}
-
static void vf610_gpio_irq_handler(struct irq_desc *desc)
{
struct vf610_gpio_port *port =
@@ -102,10 +92,10 @@ static void vf610_gpio_irq_handler(struct irq_desc *desc)
chained_irq_enter(chip, desc);
- irq_isfr = vf610_gpio_readl(port->base + PORT_ISFR);
+ irq_isfr = readl_relaxed(port->base + PORT_ISFR);
for_each_set_bit(pin, &irq_isfr, VF610_GPIO_PER_PORT) {
- vf610_gpio_writel(BIT(pin), port->base + PORT_ISFR);
+ writel_relaxed(BIT(pin), port->base + PORT_ISFR);
generic_handle_domain_irq(port->chip.gc.irq.domain, pin);
}
@@ -119,7 +109,7 @@ static void vf610_gpio_irq_ack(struct irq_data *d)
gpiochip_get_data(irq_data_get_irq_chip_data(d));
int gpio = d->hwirq;
- vf610_gpio_writel(BIT(gpio), port->base + PORT_ISFR);
+ writel_relaxed(BIT(gpio), port->base + PORT_ISFR);
}
static int vf610_gpio_irq_set_type(struct irq_data *d, u32 type)
@@ -165,7 +155,7 @@ static void vf610_gpio_irq_mask(struct irq_data *d)
irq_hw_number_t gpio_num = irqd_to_hwirq(d);
void __iomem *pcr_base = port->base + PORT_PCR(gpio_num);
- vf610_gpio_writel(0, pcr_base);
+ writel_relaxed(0, pcr_base);
gpiochip_disable_irq(gc, gpio_num);
}
@@ -177,8 +167,8 @@ static void vf610_gpio_irq_unmask(struct irq_data *d)
void __iomem *pcr_base = port->base + PORT_PCR(gpio_num);
gpiochip_enable_irq(gc, gpio_num);
- vf610_gpio_writel(port->irqc[gpio_num] << PORT_PCR_IRQC_OFFSET,
- pcr_base);
+ writel_relaxed(port->irqc[gpio_num] << PORT_PCR_IRQC_OFFSET,
+ pcr_base);
}
static int vf610_gpio_irq_set_wake(struct irq_data *d, u32 enable)
@@ -292,10 +282,10 @@ static int vf610_gpio_probe(struct platform_device *pdev)
/* Mask all GPIO interrupts */
for (i = 0; i < gc->ngpio; i++)
- vf610_gpio_writel(0, port->base + PORT_PCR(i));
+ writel_relaxed(0, port->base + PORT_PCR(i));
/* Clear the interrupt status register for all GPIO's */
- vf610_gpio_writel(~0, port->base + PORT_ISFR);
+ writel_relaxed(~0, port->base + PORT_ISFR);
girq = &gc->irq;
gpio_irq_chip_set_chip(girq, &vf610_irqchip);
--
2.51.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v2 06/11] MAINTAINERS: Update i.MX GPIO entry
2026-11-02 23:44 [PATCH v2 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
` (4 preceding siblings ...)
2026-11-02 23:44 ` [PATCH v2 05/11] gpio: vf610: drop unnecessary wrappers Peng Fan (OSS)
@ 2026-11-02 23:44 ` Peng Fan (OSS)
2026-11-03 11:47 ` Krzysztof Kozlowski
2026-11-02 23:44 ` [PATCH v2 07/11] arm64: dts: imx8ulp: fix gpio clocks Peng Fan (OSS)
` (4 subsequent siblings)
10 siblings, 1 reply; 18+ messages in thread
From: Peng Fan (OSS) @ 2026-11-02 23:44 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Bartosz Golaszewski, linux-gpio, devicetree, linux-kernel, imx,
linux-arm-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Update i.MX GPIO entry to include VF610 GPIO driver and dt-binding.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
MAINTAINERS | 2 ++
1 file changed, 2 insertions(+)
diff --git a/MAINTAINERS b/MAINTAINERS
index 7177e77fe5e9..bf5ef00dbc2e 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -10706,7 +10706,9 @@ L: linux-gpio@vger.kernel.org
L: imx@lists.linux.dev
S: Maintained
F: Documentation/devicetree/bindings/gpio/fsl-imx-gpio.yaml
+F: Documentation/devicetree/bindings/gpio/gpio-vf610.yaml
F: drivers/gpio/gpio-mxc.c
+F: drivers/gpio/gpio-vf610.c
FREESCALE IMX I2C DRIVER
M: Oleksij Rempel <o.rempel@pengutronix.de>
--
2.51.0
^ permalink raw reply [flat|nested] 18+ messages in thread* Re: [PATCH v2 06/11] MAINTAINERS: Update i.MX GPIO entry
2026-11-02 23:44 ` [PATCH v2 06/11] MAINTAINERS: Update i.MX GPIO entry Peng Fan (OSS)
@ 2026-11-03 11:47 ` Krzysztof Kozlowski
0 siblings, 0 replies; 18+ messages in thread
From: Krzysztof Kozlowski @ 2026-11-03 11:47 UTC (permalink / raw)
To: Peng Fan (OSS)
Cc: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam, Bartosz Golaszewski, linux-gpio, devicetree,
linux-kernel, imx, linux-arm-kernel, Peng Fan
On Tue, Nov 03, 2026 at 07:44:10AM +0800, Peng Fan (OSS) wrote:
> From: Peng Fan <peng.fan@nxp.com>
>
> Update i.MX GPIO entry to include VF610 GPIO driver and dt-binding.
Here and in subject - pointless "Update". Everything is update. If
people were using such syntax, then entire `git log --oneline` would be
useful.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 18+ messages in thread
* [PATCH v2 07/11] arm64: dts: imx8ulp: fix gpio clocks
2026-11-02 23:44 [PATCH v2 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
` (5 preceding siblings ...)
2026-11-02 23:44 ` [PATCH v2 06/11] MAINTAINERS: Update i.MX GPIO entry Peng Fan (OSS)
@ 2026-11-02 23:44 ` Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 08/11] arm64: dts: imx93: " Peng Fan (OSS)
` (3 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2026-11-02 23:44 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Bartosz Golaszewski, linux-gpio, devicetree, linux-kernel, imx,
linux-arm-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
IMX8ULP_CLK_PCTL[E,F] clocks are actually clocks for PAD digital fiter,
not for GPIO. And per Reference mannual[1], 26.3.5 Clocking:
The GPIO module receives a single clock, which is used for register
access and synchronize external pin inputs.
So only drop the 'port' clock.
[1] https://www.nxp.com/docs/en/reference-manual/IMX8ULPRM.pdf
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
arch/arm64/boot/dts/freescale/imx8ulp.dtsi | 15 ++++++---------
1 file changed, 6 insertions(+), 9 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
index ac8293f81c6b..b8006bb6c942 100644
--- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
@@ -739,9 +739,8 @@ gpioe: gpio@2d000000 {
<GIC_SPI 130 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&pcc4 IMX8ULP_CLK_RGPIOE>,
- <&pcc4 IMX8ULP_CLK_PCTLE>;
- clock-names = "gpio", "port";
+ clocks = <&pcc4 IMX8ULP_CLK_RGPIOE>;
+ clock-names = "gpio";
gpio-ranges = <&iomuxc1 0 32 24>;
ngpios = <24>;
};
@@ -755,9 +754,8 @@ gpiof: gpio@2d010000 {
<GIC_SPI 132 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&pcc4 IMX8ULP_CLK_RGPIOF>,
- <&pcc4 IMX8ULP_CLK_PCTLF>;
- clock-names = "gpio", "port";
+ clocks = <&pcc4 IMX8ULP_CLK_RGPIOF>;
+ clock-names = "gpio";
gpio-ranges = <&iomuxc1 0 64 32>;
ngpios = <32>;
};
@@ -994,9 +992,8 @@ gpiod: gpio@2e200000 {
<GIC_SPI 128 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&pcc5 IMX8ULP_CLK_RGPIOD>,
- <&pcc5 IMX8ULP_CLK_RGPIOD>;
- clock-names = "gpio", "port";
+ clocks = <&pcc5 IMX8ULP_CLK_RGPIOD>;
+ clock-names = "gpio";
gpio-ranges = <&iomuxc1 0 0 24>;
ngpios = <24>;
};
--
2.51.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v2 08/11] arm64: dts: imx93: fix gpio clocks
2026-11-02 23:44 [PATCH v2 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
` (6 preceding siblings ...)
2026-11-02 23:44 ` [PATCH v2 07/11] arm64: dts: imx8ulp: fix gpio clocks Peng Fan (OSS)
@ 2026-11-02 23:44 ` Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 09/11] arm64: dts: imx95: " Peng Fan (OSS)
` (2 subsequent siblings)
10 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2026-11-02 23:44 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Bartosz Golaszewski, linux-gpio, devicetree, linux-kernel, imx,
linux-arm-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Per reference mannual [1], 28.3.5 Clocking:
GPIO receives a single clock, which is used for register access and
synchronization with external pin inputs. So drop the 'port' clock.
[1] https://www.nxp.com/docs/en/reference-manual/IMX93RM.pdf
Fixes: e41ba6957139 ("arm64: dts: imx93: add gpio clk")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
arch/arm64/boot/dts/freescale/imx91_93_common.dtsi | 20 ++++++++------------
1 file changed, 8 insertions(+), 12 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi b/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
index a68ffd04ee08..cf73dab17637 100644
--- a/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx91_93_common.dtsi
@@ -1034,9 +1034,8 @@ gpio2: gpio@43810000 {
<GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&clk IMX93_CLK_GPIO2_GATE>,
- <&clk IMX93_CLK_GPIO2_GATE>;
- clock-names = "gpio", "port";
+ clocks = <&clk IMX93_CLK_GPIO2_GATE>;
+ clock-names = "gpio";
gpio-ranges = <&iomuxc 0 4 30>;
ngpios = <30>;
};
@@ -1050,9 +1049,8 @@ gpio3: gpio@43820000 {
<GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&clk IMX93_CLK_GPIO3_GATE>,
- <&clk IMX93_CLK_GPIO3_GATE>;
- clock-names = "gpio", "port";
+ clocks = <&clk IMX93_CLK_GPIO3_GATE>;
+ clock-names = "gpio";
gpio-ranges = <&iomuxc 0 84 8>, <&iomuxc 8 66 18>,
<&iomuxc 26 34 2>, <&iomuxc 28 0 4>;
ngpios = <32>;
@@ -1067,9 +1065,8 @@ gpio4: gpio@43830000 {
<GIC_SPI 190 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&clk IMX93_CLK_GPIO4_GATE>,
- <&clk IMX93_CLK_GPIO4_GATE>;
- clock-names = "gpio", "port";
+ clocks = <&clk IMX93_CLK_GPIO4_GATE>;
+ clock-names = "gpio";
gpio-ranges = <&iomuxc 0 38 28>, <&iomuxc 28 36 2>;
ngpios = <30>;
};
@@ -1083,9 +1080,8 @@ gpio1: gpio@47400000 {
<GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&clk IMX93_CLK_GPIO1_GATE>,
- <&clk IMX93_CLK_GPIO1_GATE>;
- clock-names = "gpio", "port";
+ clocks = <&clk IMX93_CLK_GPIO1_GATE>;
+ clock-names = "gpio";
gpio-ranges = <&iomuxc 0 92 16>;
ngpios = <16>;
};
--
2.51.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v2 09/11] arm64: dts: imx95: fix gpio clocks
2026-11-02 23:44 [PATCH v2 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
` (7 preceding siblings ...)
2026-11-02 23:44 ` [PATCH v2 08/11] arm64: dts: imx93: " Peng Fan (OSS)
@ 2026-11-02 23:44 ` Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 10/11] arm64: dts: imx952: " Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 11/11] arm64: dts: imx94: add clocks for gpio controller Peng Fan (OSS)
10 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2026-11-02 23:44 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Bartosz Golaszewski, linux-gpio, devicetree, linux-kernel, imx,
linux-arm-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Per reference mannual [1], 69.3.5 Clocking:
GPIO receives a single clock, which is used for register access and
synchronization with external pin inputs. So drop the 'port' clock.
[1] https://www.nxp.com/docs/en/reference-manual/IMX95RM.pdf
Fixes: 5e3cbb8e4256 ("arm64: dts: freescale: add i.MX95 basic dtsi")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
arch/arm64/boot/dts/freescale/imx95.dtsi | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi b/arch/arm64/boot/dts/freescale/imx95.dtsi
index d20c2498b9aa..0398de491553 100644
--- a/arch/arm64/boot/dts/freescale/imx95.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx95.dtsi
@@ -1300,9 +1300,8 @@ gpio2: gpio@43810000 {
<GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&scmi_clk IMX95_CLK_BUSWAKEUP>,
- <&scmi_clk IMX95_CLK_BUSWAKEUP>;
- clock-names = "gpio", "port";
+ clocks = <&scmi_clk IMX95_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
gpio-ranges = <&scmi_iomuxc 0 4 32>;
ngpios = <32>;
};
@@ -1316,9 +1315,8 @@ gpio3: gpio@43820000 {
<GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&scmi_clk IMX95_CLK_BUSWAKEUP>,
- <&scmi_clk IMX95_CLK_BUSWAKEUP>;
- clock-names = "gpio", "port";
+ clocks = <&scmi_clk IMX95_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
gpio-ranges = <&scmi_iomuxc 0 104 8>, <&scmi_iomuxc 8 74 18>,
<&scmi_iomuxc 26 42 2>, <&scmi_iomuxc 28 0 4>;
ngpios = <32>;
@@ -1333,9 +1331,8 @@ gpio4: gpio@43840000 {
<GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&scmi_clk IMX95_CLK_BUSWAKEUP>,
- <&scmi_clk IMX95_CLK_BUSWAKEUP>;
- clock-names = "gpio", "port";
+ clocks = <&scmi_clk IMX95_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
gpio-ranges = <&scmi_iomuxc 0 46 28>, <&scmi_iomuxc 28 44 2>;
ngpios = <30>;
};
@@ -1349,9 +1346,8 @@ gpio5: gpio@43850000 {
<GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&scmi_clk IMX95_CLK_BUSWAKEUP>,
- <&scmi_clk IMX95_CLK_BUSWAKEUP>;
- clock-names = "gpio", "port";
+ clocks = <&scmi_clk IMX95_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
gpio-ranges = <&scmi_iomuxc 0 92 12>, <&scmi_iomuxc 12 36 6>;
ngpios = <18>;
};
@@ -1689,9 +1685,8 @@ gpio1: gpio@47400000 {
<GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&scmi_clk IMX95_CLK_M33>,
- <&scmi_clk IMX95_CLK_M33>;
- clock-names = "gpio", "port";
+ clocks = <&scmi_clk IMX95_CLK_M33>;
+ clock-names = "gpio";
gpio-ranges = <&scmi_iomuxc 0 112 16>;
ngpios = <16>;
status = "disabled";
--
2.51.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v2 10/11] arm64: dts: imx952: fix gpio clocks
2026-11-02 23:44 [PATCH v2 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
` (8 preceding siblings ...)
2026-11-02 23:44 ` [PATCH v2 09/11] arm64: dts: imx95: " Peng Fan (OSS)
@ 2026-11-02 23:44 ` Peng Fan (OSS)
2026-11-02 23:44 ` [PATCH v2 11/11] arm64: dts: imx94: add clocks for gpio controller Peng Fan (OSS)
10 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2026-11-02 23:44 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Bartosz Golaszewski, linux-gpio, devicetree, linux-kernel, imx,
linux-arm-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Per reference mannual:
GPIO receives a single clock, which is used for register access and
synchronization with external pin inputs. So drop the 'port' clock.
Fixes: b516a4dd6a1f ("arm64: dts: freescale: Add initial device tree for i.MX952")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
arch/arm64/boot/dts/freescale/imx952.dtsi | 25 ++++++++++---------------
1 file changed, 10 insertions(+), 15 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx952.dtsi b/arch/arm64/boot/dts/freescale/imx952.dtsi
index 1154b66dadb2..22f02f48298f 100644
--- a/arch/arm64/boot/dts/freescale/imx952.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx952.dtsi
@@ -1024,9 +1024,8 @@ gpio2: gpio@43810000 {
<GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&scmi_clk IMX952_CLK_BUSWAKEUP>,
- <&scmi_clk IMX952_CLK_BUSWAKEUP>;
- clock-names = "gpio", "port";
+ clocks = <&scmi_clk IMX952_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
gpio-ranges = <&scmi_iomuxc 0 4 32>;
ngpios = <32>;
};
@@ -1040,9 +1039,8 @@ gpio3: gpio@43820000 {
<GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&scmi_clk IMX952_CLK_BUSWAKEUP>,
- <&scmi_clk IMX952_CLK_BUSWAKEUP>;
- clock-names = "gpio", "port";
+ clocks = <&scmi_clk IMX952_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
gpio-ranges = <&scmi_iomuxc 0 115 8>, <&scmi_iomuxc 8 85 18>,
<&scmi_iomuxc 26 53 2>, <&scmi_iomuxc 28 0 4>;
ngpios = <32>;
@@ -1057,9 +1055,8 @@ gpio4: gpio@43840000 {
<GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&scmi_clk IMX952_CLK_BUSWAKEUP>,
- <&scmi_clk IMX952_CLK_BUSWAKEUP>;
- clock-names = "gpio", "port";
+ clocks = <&scmi_clk IMX952_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
gpio-ranges = <&scmi_iomuxc 0 57 28>, <&scmi_iomuxc 28 55 2>;
ngpios = <30>;
};
@@ -1073,9 +1070,8 @@ gpio5: gpio@43850000 {
<GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&scmi_clk IMX952_CLK_BUSWAKEUP>,
- <&scmi_clk IMX952_CLK_BUSWAKEUP>;
- clock-names = "gpio", "port";
+ clocks = <&scmi_clk IMX952_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
gpio-ranges = <&scmi_iomuxc 0 103 12>, <&scmi_iomuxc 12 36 6>;
ngpios = <18>;
};
@@ -1411,9 +1407,8 @@ gpio1: gpio@47400000 {
<GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
interrupt-controller;
#interrupt-cells = <2>;
- clocks = <&scmi_clk IMX952_CLK_M33>,
- <&scmi_clk IMX952_CLK_M33>;
- clock-names = "gpio", "port";
+ clocks = <&scmi_clk IMX952_CLK_M33>;
+ clock-names = "gpio";
gpio-ranges = <&scmi_iomuxc 0 123 16>;
ngpios = <16>;
status = "disabled";
--
2.51.0
^ permalink raw reply [flat|nested] 18+ messages in thread* [PATCH v2 11/11] arm64: dts: imx94: add clocks for gpio controller
2026-11-02 23:44 [PATCH v2 00/11] gpio: vf610: fix clocks and misc cleanup Peng Fan (OSS)
` (9 preceding siblings ...)
2026-11-02 23:44 ` [PATCH v2 10/11] arm64: dts: imx952: " Peng Fan (OSS)
@ 2026-11-02 23:44 ` Peng Fan (OSS)
10 siblings, 0 replies; 18+ messages in thread
From: Peng Fan (OSS) @ 2026-11-02 23:44 UTC (permalink / raw)
To: Linus Walleij, Bartosz Golaszewski, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Stefan Agner, Dong Aisheng,
Jacky Bai, Frank Li, Sascha Hauer, Pengutronix Kernel Team,
Fabio Estevam
Cc: Bartosz Golaszewski, linux-gpio, devicetree, linux-kernel, imx,
linux-arm-kernel, Peng Fan
From: Peng Fan <peng.fan@nxp.com>
Per reference mannual:
GPIO receives a single clock, which is used for register access and
synchronization with external pin inputs. So add the gpio clock entry.
Fixes: b0d011d4841b ("arm64: dts: freescale: Add basic dtsi for imx943")
Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
arch/arm64/boot/dts/freescale/imx94.dtsi | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx94.dtsi b/arch/arm64/boot/dts/freescale/imx94.dtsi
index 020aa1da3315..90925d48daad 100644
--- a/arch/arm64/boot/dts/freescale/imx94.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx94.dtsi
@@ -861,6 +861,8 @@ gpio2: gpio@43810000 {
interrupt-controller;
interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&scmi_clk IMX94_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
#gpio-cells = <2>;
gpio-controller;
gpio-ranges = <&scmi_iomuxc 0 4 32>;
@@ -874,6 +876,8 @@ gpio3: gpio@43820000 {
interrupt-controller;
interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&scmi_clk IMX94_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
#gpio-cells = <2>;
gpio-controller;
gpio-ranges = <&scmi_iomuxc 0 36 26>;
@@ -887,6 +891,8 @@ gpio4: gpio@43840000 {
interrupt-controller;
interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&scmi_clk IMX94_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
#gpio-cells = <2>;
gpio-controller;
gpio-ranges = <&scmi_iomuxc 0 62 4>, <&scmi_iomuxc 4 0 4>,
@@ -901,6 +907,8 @@ gpio5: gpio@43850000 {
interrupt-controller;
interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&scmi_clk IMX94_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
#gpio-cells = <2>;
gpio-controller;
gpio-ranges = <&scmi_iomuxc 0 108 32>;
@@ -914,6 +922,8 @@ gpio6: gpio@43860000 {
interrupt-controller;
interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&scmi_clk IMX94_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
#gpio-cells = <2>;
gpio-controller;
gpio-ranges = <&scmi_iomuxc 0 66 32>;
@@ -927,6 +937,8 @@ gpio7: gpio@43870000 {
interrupt-controller;
interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&scmi_clk IMX94_CLK_BUSWAKEUP>;
+ clock-names = "gpio";
#gpio-cells = <2>;
gpio-controller;
gpio-ranges = <&scmi_iomuxc 0 98 10>, <&scmi_iomuxc 16 152 12>;
--
2.51.0
^ permalink raw reply [flat|nested] 18+ messages in thread