lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID:
 <DU0PR04MB9496A011670D1579BCFADBBA909FA@DU0PR04MB9496.eurprd04.prod.outlook.com>
Date: Tue, 20 May 2025 01:55:23 +0000
From: Bough Chen <haibo.chen@....com>
To: Peng Fan <peng.fan@....com>, Rob Herring <robh@...nel.org>, Krzysztof
 Kozlowski <krzk+dt@...nel.org>, Conor Dooley <conor+dt@...nel.org>, Shawn Guo
	<shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>, Pengutronix
 Kernel Team <kernel@...gutronix.de>, Fabio Estevam <festevam@...il.com>,
	Stefan Agner <stefan@...er.ch>, Linus Walleij <linus.walleij@...aro.org>,
	Bartosz Golaszewski <brgl@...ev.pl>
CC: "devicetree@...r.kernel.org" <devicetree@...r.kernel.org>,
	"imx@...ts.linux.dev" <imx@...ts.linux.dev>,
	"linux-arm-kernel@...ts.infradead.org"
	<linux-arm-kernel@...ts.infradead.org>, "linux-kernel@...r.kernel.org"
	<linux-kernel@...r.kernel.org>, "linux-gpio@...r.kernel.org"
	<linux-gpio@...r.kernel.org>
Subject: RE: [PATCH v2 1/2] ARM: dts: add ngpios for vf610 compatible gpio
 controllers

> -----Original Message-----
> From: Peng Fan <peng.fan@....com>
> Sent: 2025年5月19日 21:06
> To: Bough Chen <haibo.chen@....com>; Rob Herring <robh@...nel.org>;
> Krzysztof Kozlowski <krzk+dt@...nel.org>; Conor Dooley
> <conor+dt@...nel.org>; Shawn Guo <shawnguo@...nel.org>; Sascha Hauer
> <s.hauer@...gutronix.de>; Pengutronix Kernel Team
> <kernel@...gutronix.de>; Fabio Estevam <festevam@...il.com>; Stefan
> Agner <stefan@...er.ch>; Linus Walleij <linus.walleij@...aro.org>; Bartosz
> Golaszewski <brgl@...ev.pl>
> Cc: devicetree@...r.kernel.org; imx@...ts.linux.dev;
> linux-arm-kernel@...ts.infradead.org; linux-kernel@...r.kernel.org;
> linux-gpio@...r.kernel.org; Bough Chen <haibo.chen@....com>
> Subject: RE: [PATCH v2 1/2] ARM: dts: add ngpios for vf610 compatible gpio
> controllers
> 
> > Subject: [PATCH v2 1/2] ARM: dts: add ngpios for vf610 compatible gpio
> > controllers
> >
> > After commit da5dd31efd24 ("gpio: vf610: Switch to gpio-mmio"),
> > vf610 gpio driver no more use the static number 32 for gc->ngpio, user
> > has a chance to config it through device tree for each 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.
> >
> > Besides, some gpio controllers have hole in the gpio ranges, so use
> > 'gpio-reserved-ranges' to cover that, then the gpioinfo tool show the
> > correct result.
> >
> > Signed-off-by: Haibo Chen <haibo.chen@....com>
> > ---
> >  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 +++++
> 
> arm64 and arm should be in separated patch.

Okay, thanks!

Regards
Haibo Chen
> 
> Regards,
> Peng.
> 
> >  6 files changed, 28 insertions(+)
> >
> > diff --git a/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi
> > b/arch/arm/boot/dts/nxp/imx/imx7ulp.dtsi
> > index
> > 3c6ef7bfba60986b797bb01b843830d364c96d45..880b9a4f32b0846a
> > 773dbf9ad30715c84ac2fda6 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@...e0000 {
> >  				 <&pcc3 IMX7ULP_CLK_PCTLC>;
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&iomuxc1 0 0 20>;
> > +			ngpios = <20>;
> >  		};
> >
> >  		gpio_ptd: gpio@...f0000 {
> > @@ -413,6 +414,7 @@ gpio_ptd: gpio@...f0000 {
> >  				 <&pcc3 IMX7ULP_CLK_PCTLD>;
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&iomuxc1 0 32 12>;
> > +			ngpios = <12>;
> >  		};
> >
> >  		gpio_pte: gpio@...00000 {
> > @@ -427,6 +429,7 @@ gpio_pte: gpio@...00000 {
> >  				 <&pcc3 IMX7ULP_CLK_PCTLE>;
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&iomuxc1 0 64 16>;
> > +			ngpios = <16>;
> >  		};
> >
> >  		gpio_ptf: gpio@...10000 {
> > @@ -441,6 +444,7 @@ gpio_ptf: gpio@...10000 {
> >  				 <&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.dtsi
> > b/arch/arm/boot/dts/nxp/vf/vfxxx.dtsi
> > index
> > 597f20be82f1ee044e14bfaf3bd05cff37a8ad39..a275821c35d41e97eb
> > 2139a081ef5765d07672aa 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@...49000 {
> >  				interrupt-controller;
> >  				#interrupt-cells = <2>;
> >  				gpio-ranges = <&iomuxc 0 0 32>;
> > +				ngpios = <32>;
> >  			};
> >
> >  			gpio1: gpio@...4a000 {
> > @@ -329,6 +330,7 @@ gpio1: gpio@...4a000 {
> >  				interrupt-controller;
> >  				#interrupt-cells = <2>;
> >  				gpio-ranges = <&iomuxc 0 32 32>;
> > +				ngpios = <32>;
> >  			};
> >
> >  			gpio2: gpio@...4b000 {
> > @@ -340,6 +342,7 @@ gpio2: gpio@...4b000 {
> >  				interrupt-controller;
> >  				#interrupt-cells = <2>;
> >  				gpio-ranges = <&iomuxc 0 64 32>;
> > +				ngpios = <32>;
> >  			};
> >
> >  			gpio3: gpio@...4c000 {
> > @@ -351,6 +354,7 @@ gpio3: gpio@...4c000 {
> >  				interrupt-controller;
> >  				#interrupt-cells = <2>;
> >  				gpio-ranges = <&iomuxc 0 96 32>;
> > +				ngpios = <32>;
> >  			};
> >
> >  			gpio4: gpio@...4d000 {
> > @@ -362,6 +366,7 @@ gpio4: gpio@...4d000 {
> >  				interrupt-controller;
> >  				#interrupt-cells = <2>;
> >  				gpio-ranges = <&iomuxc 0 128 7>;
> > +				ngpios = <7>;
> >  			};
> >
> >  			anatop: anatop@...50000 {
> > diff --git a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > index
> > 2562a35286c208869d11d7fb970ac84638f45088..13b01f3aa2a4950c
> > 37e72e04f6bfb5995dc19178 100644
> > --- a/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx8ulp.dtsi
> > @@ -686,6 +686,7 @@ gpioe: gpio@...00000 {
> >  					 <&pcc4
> > IMX8ULP_CLK_PCTLE>;
> >  				clock-names = "gpio", "port";
> >  				gpio-ranges = <&iomuxc1 0 32 24>;
> > +				ngpios = <24>;
> >  		};
> >
> >  		gpiof: gpio@...10000 {
> > @@ -701,6 +702,7 @@ gpiof: gpio@...10000 {
> >  					 <&pcc4
> > IMX8ULP_CLK_PCTLF>;
> >  				clock-names = "gpio", "port";
> >  				gpio-ranges = <&iomuxc1 0 64 32>;
> > +				ngpios = <32>;
> >  		};
> >
> >  		per_bridge5: bus@...00000 {
> > @@ -855,6 +857,7 @@ gpiod: gpio@...00000 {
> >  				 <&pcc5 IMX8ULP_CLK_RGPIOD>;
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&iomuxc1 0 0 24>;
> > +			ngpios = <24>;
> >  		};
> >  	};
> >  };
> > diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > b/arch/arm64/boot/dts/freescale/imx93.dtsi
> > index
> > 64cd0776b43d38219fee312baadd4665674a141e..52be83a168d9ee64
> > 52a63039c89169d49b63eb60 100644
> > --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> > @@ -1197,6 +1197,7 @@ gpio2: gpio@...10000 {
> >  				 <&clk IMX93_CLK_GPIO2_GATE>;
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&iomuxc 0 4 30>;
> > +			ngpios = <30>;
> >  		};
> >
> >  		gpio3: gpio@...20000 {
> > @@ -1213,6 +1214,7 @@ gpio3: gpio@...20000 {
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&iomuxc 0 84 8>, <&iomuxc 8
> > 66 18>,
> >  				      <&iomuxc 26 34 2>, <&iomuxc 28
> > 0 4>;
> > +			ngpios = <32>;
> >  		};
> >
> >  		gpio4: gpio@...30000 {
> > @@ -1228,6 +1230,7 @@ gpio4: gpio@...30000 {
> >  				 <&clk IMX93_CLK_GPIO4_GATE>;
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&iomuxc 0 38 28>, <&iomuxc
> > 28 36 2>;
> > +			ngpios = <30>;
> >  		};
> >
> >  		gpio1: gpio@...00000 {
> > @@ -1243,6 +1246,7 @@ gpio1: gpio@...00000 {
> >  				 <&clk IMX93_CLK_GPIO1_GATE>;
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&iomuxc 0 92 16>;
> > +			ngpios = <16>;
> >  		};
> >
> >  		ocotp: efuse@...10000 {
> > diff --git a/arch/arm64/boot/dts/freescale/imx94.dtsi
> > b/arch/arm64/boot/dts/freescale/imx94.dtsi
> > index
> > 3661ea48d7d2994df7b02084e9681beb303aa133..b8ffc428e95be193
> > 8bf5e73316b4163acaa04701 100644
> > --- a/arch/arm64/boot/dts/freescale/imx94.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx94.dtsi
> > @@ -785,6 +785,7 @@ gpio2: gpio@...10000 {
> >  			#gpio-cells = <2>;
> >  			gpio-controller;
> >  			gpio-ranges = <&scmi_iomuxc 0 4 32>;
> > +			ngpios = <32>;
> >  		};
> >
> >  		gpio3: gpio@...20000 {
> > @@ -797,6 +798,7 @@ gpio3: gpio@...20000 {
> >  			#gpio-cells = <2>;
> >  			gpio-controller;
> >  			gpio-ranges = <&scmi_iomuxc 0 36 26>;
> > +			ngpios = <26>;
> >  		};
> >
> >  		gpio4: gpio@...40000 {
> > @@ -810,6 +812,7 @@ gpio4: gpio@...40000 {
> >  			gpio-controller;
> >  			gpio-ranges = <&scmi_iomuxc 0 62 4>, <&scmi_iomuxc 4 0 4>,
> >  				      <&scmi_iomuxc 8 140 12>,
> > <&scmi_iomuxc 20 164 12>;
> > +			ngpios = <32>;
> >  		};
> >
> >  		gpio5: gpio@...50000 {
> > @@ -822,6 +825,7 @@ gpio5: gpio@...50000 {
> >  			#gpio-cells = <2>;
> >  			gpio-controller;
> >  			gpio-ranges = <&scmi_iomuxc 0 108 32>;
> > +			ngpios = <32>;
> >  		};
> >
> >  		gpio6: gpio@...60000 {
> > @@ -834,6 +838,7 @@ gpio6: gpio@...60000 {
> >  			#gpio-cells = <2>;
> >  			gpio-controller;
> >  			gpio-ranges = <&scmi_iomuxc 0 66 32>;
> > +			ngpios = <32>;
> >  		};
> >
> >  		gpio7: gpio@...70000 {
> > @@ -846,6 +851,8 @@ gpio7: gpio@...70000 {
> >  			#gpio-cells = <2>;
> >  			gpio-controller;
> >  			gpio-ranges = <&scmi_iomuxc 0 98 10>, <&scmi_iomuxc 16 152
> 12>;
> > +			gpio-reserved-ranges = <10 6>;
> > +			ngpios = <28>;
> >  		};
> >
> >  		aips1: bus@...00000 {
> > diff --git a/arch/arm64/boot/dts/freescale/imx95.dtsi
> > b/arch/arm64/boot/dts/freescale/imx95.dtsi
> > index
> > 632631a2911224cadc16a943cdb467e091e43384..a2f4fcffcde59849b
> > afcedced3ff317ca6c7cf78 100644
> > --- a/arch/arm64/boot/dts/freescale/imx95.dtsi
> > +++ b/arch/arm64/boot/dts/freescale/imx95.dtsi
> > @@ -1152,6 +1152,7 @@ gpio2: gpio@...10000 {
> >  				 <&scmi_clk
> > IMX95_CLK_BUSWAKEUP>;
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&scmi_iomuxc 0 4 32>;
> > +			ngpios = <32>;
> >  		};
> >
> >  		gpio3: gpio@...20000 {
> > @@ -1168,6 +1169,7 @@ gpio3: gpio@...20000 {
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&scmi_iomuxc 0 104 8>, <&scmi_iomuxc 8 74
> 18>,
> >  				      <&scmi_iomuxc 26 42 2>,
> > <&scmi_iomuxc 28 0 4>;
> > +			ngpios = <32>;
> >  		};
> >
> >  		gpio4: gpio@...40000 {
> > @@ -1183,6 +1185,7 @@ gpio4: gpio@...40000 {
> >  				 <&scmi_clk
> > IMX95_CLK_BUSWAKEUP>;
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&scmi_iomuxc 0 46 28>, <&scmi_iomuxc 28 44
> 2>;
> > +			ngpios = <30>;
> >  		};
> >
> >  		gpio5: gpio@...50000 {
> > @@ -1198,6 +1201,7 @@ gpio5: gpio@...50000 {
> >  				 <&scmi_clk
> > IMX95_CLK_BUSWAKEUP>;
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&scmi_iomuxc 0 92 12>, <&scmi_iomuxc 12 36
> 6>;
> > +			ngpios = <18>;
> >  		};
> >
> >  		aips1: bus@...00000 {
> > @@ -1508,6 +1512,7 @@ gpio1: gpio@...00000 {
> >  				 <&scmi_clk IMX95_CLK_M33>;
> >  			clock-names = "gpio", "port";
> >  			gpio-ranges = <&scmi_iomuxc 0 112 16>;
> > +			ngpios = <16>;
> >  			status = "disabled";
> >  		};
> >
> >
> > --
> > 2.34.1
> >

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ