mbox series

[0/2] support i.MX93 truly available GPIO pins

Message ID 20240111131904.1491496-1-hector.palacios@digi.com
Headers show
Series support i.MX93 truly available GPIO pins | expand

Message

Hector Palacios Jan. 11, 2024, 1:19 p.m. UTC
All four GPIO ports of i.MX93 SoC show 32 pins available, but
not every port has 32 pins.
Add support on the GPIO driver to 'ngpios' property and set
the truly available pins on the SoC device tree.

Hector Palacios (2):
      gpio: vf610: add support to DT 'ngpios' property
      arm64: dts: imx93: specify available 'ngpios' per GPIO port

 arch/arm64/boot/dts/freescale/imx93.dtsi | 4 ++++
 drivers/gpio/gpio-vf610.c                | 7 ++++++-
 2 files changed, 10 insertions(+), 1 deletion(-)

Comments

Bartosz Golaszewski Jan. 11, 2024, 1:53 p.m. UTC | #1
On Thu, Jan 11, 2024 at 2:23 PM Hector Palacios
<hector.palacios@digi.com> wrote:
>
> All four GPIO ports of i.MX93 SoC show 32 pins available, but
> not every port has 32 pins.
> Add support on the GPIO driver to 'ngpios' property and set
> the truly available pins on the SoC device tree.
>
> Hector Palacios (2):
>       gpio: vf610: add support to DT 'ngpios' property
>       arm64: dts: imx93: specify available 'ngpios' per GPIO port
>
>  arch/arm64/boot/dts/freescale/imx93.dtsi | 4 ++++
>  drivers/gpio/gpio-vf610.c                | 7 ++++++-
>  2 files changed, 10 insertions(+), 1 deletion(-)
>
>

This is not my email address that comes up when using
get_maintainer.pl, please use it when sending patches.

Bartosz
Alexander Stein Jan. 11, 2024, 2:26 p.m. UTC | #2
Am Donnerstag, 11. Januar 2024, 14:19:04 CET schrieb Hector Palacios:
> According to NXP HRM for i.MX93, the following GPIO pins are available:
> - GPIO1: 16 pins (0..15)
> - GPIO2: 30 pins (0..29)
> - GPIO3: 32 pins (0..31)
> - GPIO4: 30 pins (0..29)
> 
> Signed-off-by: Hector Palacios <hector.palacios@digi.com>
> ---
>  arch/arm64/boot/dts/freescale/imx93.dtsi | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/freescale/imx93.dtsi
> b/arch/arm64/boot/dts/freescale/imx93.dtsi index 34c0540276d1..7eb2cab7c749
> 100644
> --- a/arch/arm64/boot/dts/freescale/imx93.dtsi
> +++ b/arch/arm64/boot/dts/freescale/imx93.dtsi
> @@ -970,6 +970,7 @@ gpio2: gpio@43810000 {
>  				 <&clk IMX93_CLK_GPIO2_GATE>;
>  			clock-names = "gpio", "port";
>  			gpio-ranges = <&iomuxc 0 4 30>;
> +			ngpios = <30>;
>  		};
> 
>  		gpio3: gpio@43820000 {
> @@ -986,6 +987,7 @@ gpio3: gpio@43820000 {
>  			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@43830000 {
> @@ -1001,6 +1003,7 @@ gpio4: gpio@43830000 {
>  				 <&clk IMX93_CLK_GPIO4_GATE>;
>  			clock-names = "gpio", "port";
>  			gpio-ranges = <&iomuxc 0 38 28>, <&iomuxc 28 36 
2>;
> +			ngpios = <30>;
>  		};
> 
>  		gpio1: gpio@47400000 {
> @@ -1016,6 +1019,7 @@ gpio1: gpio@47400000 {
>  				 <&clk IMX93_CLK_GPIO1_GATE>;
>  			clock-names = "gpio", "port";
>  			gpio-ranges = <&iomuxc 0 92 16>;
> +			ngpios = <16>;
>  		};
> 
>  		ocotp: efuse@47510000 {

This leads to warnings upon dtbs_check, e.g.
arch/arm64/boot/dts/freescale/imx93-tqma9352-mba93xxla.dtb: gpio@43810000: 
'ngpios' does not match any of the regexes: '^.+-hog(-[0-9]+)?$', 'pinctrl-
[0-9]+'
  from schema $id: http://devicetree.org/schemas/gpio/gpio-vf610.yaml#

Please address this as well.

Best regards,
Alexander