RE: [PATCH v3 2/3] ARM: dts: add ngpios for vf610 compatible gpio controllers
From: Bough Chen <haibo.chen@nxp.com>
Date: 2025-06-17 03:02:30
Also in:
imx, linux-devicetree, linux-gpio, lkml
Gentle ping...
quoted hunk ↗ jump to hunk
-----Original Message----- From: Bough Chen <haibo.chen@nxp.com> Sent: 2025年5月20日 11:46 To: Rob Herring <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>; Conor Dooley [off-list ref]; Shawn Guo [off-list ref]; Sascha Hauer [off-list ref]; Pengutronix Kernel Team [off-list ref]; Fabio Estevam [off-list ref]; Stefan Agner [off-list ref]; Linus Walleij [off-list ref]; Bartosz Golaszewski [off-list ref] Cc: devicetree@vger.kernel.org; imx@lists.linux.dev; linux-arm-kernel@lists.infradead.org; linux-kernel@vger.kernel.org; linux-gpio@vger.kernel.org; Bough Chen [off-list ref]; Peng Fan [off-list ref]; wahrenst@gmx.net; conor@kernel.org; Frank Li [off-list ref] Subject: [PATCH v3 2/3] ARM: dts: add ngpios for vf610 compatible gpio controllers After commit da5dd31efd24 ("gpio: vf610: Switch to gpio-mmio"), the vf610 GPIO driver no longer uses the static number 32 for gc->ngpio. This allows users to configure the number of GPIOs per port. And some gpio controllers did have less pads. So add 'ngpios' here, this can save some memory when request bitmap, and also show user more accurate information when use gpio tools. Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Haibo Chen <haibo.chen@nxp.com> --- arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi | 4 ++++ arch/arm/boot/dts/nxp/vf/vfxxx.dtsi | 5 +++++ 2 files changed, 9 insertions(+)diff --git a/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsib/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi index 3c6ef7bfba60986b797bb01b843830d364c96d45..880b9a4f32b0846a773dbf9a d30715c84ac2fda6 100644--- a/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi +++ b/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi@@ -399,6 +399,7 @@ gpio_ptc: gpio@40ae0000 { <&pcc3 IMX7ULP_CLK_PCTLC>; clock-names = "gpio", "port"; gpio-ranges = <&iomuxc1 0 0 20>; + ngpios = <20>; }; gpio_ptd: gpio@40af0000 {@@ -413,6 +414,7 @@ gpio_ptd: gpio@40af0000 { <&pcc3 IMX7ULP_CLK_PCTLD>; clock-names = "gpio", "port"; gpio-ranges = <&iomuxc1 0 32 12>; + ngpios = <12>; }; gpio_pte: gpio@40b00000 {@@ -427,6 +429,7 @@ gpio_pte: gpio@40b00000 { <&pcc3 IMX7ULP_CLK_PCTLE>; clock-names = "gpio", "port"; gpio-ranges = <&iomuxc1 0 64 16>; + ngpios = <16>; }; gpio_ptf: gpio@40b10000 {@@ -441,6 +444,7 @@ gpio_ptf: gpio@40b10000 { <&pcc3 IMX7ULP_CLK_PCTLF>; clock-names = "gpio", "port"; gpio-ranges = <&iomuxc1 0 96 20>; + ngpios = <20>; }; };diff --git a/arch/arm/boot/dts/nxp/vf/vfxxx.dtsib/arch/arm/boot/dts/nxp/vf/vfxxx.dtsi index 597f20be82f1ee044e14bfaf3bd05cff37a8ad39..a275821c35d41e97eb2139a08 1ef5765d07672aa 100644--- a/arch/arm/boot/dts/nxp/vf/vfxxx.dtsi +++ b/arch/arm/boot/dts/nxp/vf/vfxxx.dtsi@@ -318,6 +318,7 @@ gpio0: gpio@40049000 { interrupt-controller; #interrupt-cells = <2>; gpio-ranges = <&iomuxc 0 0 32>; + ngpios = <32>; }; gpio1: gpio@4004a000 {@@ -329,6 +330,7 @@ gpio1: gpio@4004a000 { interrupt-controller; #interrupt-cells = <2>; gpio-ranges = <&iomuxc 0 32 32>; + ngpios = <32>; }; gpio2: gpio@4004b000 {@@ -340,6 +342,7 @@ gpio2: gpio@4004b000 { interrupt-controller; #interrupt-cells = <2>; gpio-ranges = <&iomuxc 0 64 32>; + ngpios = <32>; }; gpio3: gpio@4004c000 {@@ -351,6 +354,7 @@ gpio3: gpio@4004c000 { interrupt-controller; #interrupt-cells = <2>; gpio-ranges = <&iomuxc 0 96 32>; + ngpios = <32>; }; gpio4: gpio@4004d000 {@@ -362,6 +366,7 @@ gpio4: gpio@4004d000 { interrupt-controller; #interrupt-cells = <2>; gpio-ranges = <&iomuxc 0 128 7>; + ngpios = <7>; }; anatop: anatop@40050000 { --2.34.1