[PATCH v3 0/3] Add 'ngpios' and 'gpio-reserved-ranges' for vf610-gpio driver

Haibo Chen posted 3 patches 7 months ago
Documentation/devicetree/bindings/gpio/gpio-vf610.yaml | 7 +++++++
arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi                 | 4 ++++
arch/arm/boot/dts/nxp/vf/vfxxx.dtsi                    | 5 +++++
arch/arm64/boot/dts/freescale/imx8ulp.dtsi             | 3 +++
arch/arm64/boot/dts/freescale/imx93.dtsi               | 4 ++++
arch/arm64/boot/dts/freescale/imx94.dtsi               | 7 +++++++
arch/arm64/boot/dts/freescale/imx95.dtsi               | 5 +++++
7 files changed, 35 insertions(+)
[PATCH v3 0/3] Add 'ngpios' and 'gpio-reserved-ranges' for vf610-gpio driver
Posted by Haibo Chen 7 months ago
Not all GPIO ports have 32 pads, so add 'ngpios' property to specify
the number. This can save some memory when alloc bitmap for GPIO,
besides GPIO tools like gpioinfo will show the correct information.

Some GPIO ports even more special, e.g. GPIO7 on imx94, it only support
IO0~IO9 and IO16~IO27, so add 'gpio-reserved-ranges' property.

Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
---
Changes in v3:
- switch PATCH1 and PATCH2, move the binding changes before the DTS changes, to avoid temporary DT build warnings.
- put arm64 and arm dts changes in separated patches.
- add default value for ngpios in binding doc.
- add Frank Li's reviewed by tag
- Link to v2: https://lore.kernel.org/r/20250519-gpio-dts-v2-0-b9e77173e9c5@nxp.com

Changes in v2:
- No changes for PATCH1.
- Add PATCH2 in this verson to avoid dt-binding check.
- Link to v1: https://lore.kernel.org/r/20250516-gpio-dts-v1-1-a9c3505f54c5@nxp.com

---
Haibo Chen (3):
      dt-bindings: gpio: vf610: add ngpios and gpio-reserved-ranges
      ARM: dts: add ngpios for vf610 compatible gpio controllers
      ARM64: dts: add ngpios for vf610 compatible gpio controllers

 Documentation/devicetree/bindings/gpio/gpio-vf610.yaml | 7 +++++++
 arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi                 | 4 ++++
 arch/arm/boot/dts/nxp/vf/vfxxx.dtsi                    | 5 +++++
 arch/arm64/boot/dts/freescale/imx8ulp.dtsi             | 3 +++
 arch/arm64/boot/dts/freescale/imx93.dtsi               | 4 ++++
 arch/arm64/boot/dts/freescale/imx94.dtsi               | 7 +++++++
 arch/arm64/boot/dts/freescale/imx95.dtsi               | 5 +++++
 7 files changed, 35 insertions(+)
---
base-commit: 484803582c77061b470ac64a634f25f89715be3f
change-id: 20250516-gpio-dts-408311b633c4

Best regards,
-- 
Haibo Chen <haibo.chen@nxp.com>
Re: [PATCH v3 0/3] Add 'ngpios' and 'gpio-reserved-ranges' for vf610-gpio driver
Posted by Linus Walleij 7 months ago
On Tue, May 20, 2025 at 5:44 AM Haibo Chen <haibo.chen@nxp.com> wrote:

> Not all GPIO ports have 32 pads, so add 'ngpios' property to specify
> the number. This can save some memory when alloc bitmap for GPIO,
> besides GPIO tools like gpioinfo will show the correct information.
>
> Some GPIO ports even more special, e.g. GPIO7 on imx94, it only support
> IO0~IO9 and IO16~IO27, so add 'gpio-reserved-ranges' property.
>
> Signed-off-by: Haibo Chen <haibo.chen@nxp.com>

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

Yours,
Linus Walleij
Re: (subset) [PATCH v3 0/3] Add 'ngpios' and 'gpio-reserved-ranges' for vf610-gpio driver
Posted by Bartosz Golaszewski 7 months ago
From: Bartosz Golaszewski <bartosz.golaszewski@linaro.org>


On Tue, 20 May 2025 11:46:11 +0800, Haibo Chen wrote:
> Not all GPIO ports have 32 pads, so add 'ngpios' property to specify
> the number. This can save some memory when alloc bitmap for GPIO,
> besides GPIO tools like gpioinfo will show the correct information.
> 
> Some GPIO ports even more special, e.g. GPIO7 on imx94, it only support
> IO0~IO9 and IO16~IO27, so add 'gpio-reserved-ranges' property.
> 
> [...]

Applied, thanks!

[1/3] dt-bindings: gpio: vf610: add ngpios and gpio-reserved-ranges
      https://git.kernel.org/brgl/linux/c/4e9d73034196ac8ab496bb47583197b36ba13327

Best regards,
-- 
Bartosz Golaszewski <bartosz.golaszewski@linaro.org>