diff mbox series

[08/13] arm64: dts: ti: k3-j721e: Enable GPIO nodes at the board level

Message ID 20230802205309.257392-9-afd@ti.com (mailing list archive)
State New, archived
Headers show
Series Another round of K3 DTSI disables | expand

Commit Message

Andrew Davis Aug. 2, 2023, 8:53 p.m. UTC
GPIO nodes defined in the top-level J721e SoC dtsi files are incomplete
and may not be functional unless they are extended with pinmux and
device information.

Disable the GPIO nodes in the dtsi files and only enable the ones that
are actually pinned out on a given board.

Signed-off-by: Andrew Davis <afd@ti.com>
---
 .../boot/dts/ti/k3-j721e-beagleboneai64.dts   | 42 ++++---------------
 .../dts/ti/k3-j721e-common-proc-board.dts     | 35 ++++------------
 arch/arm64/boot/dts/ti/k3-j721e-main.dtsi     |  8 ++++
 .../boot/dts/ti/k3-j721e-mcu-wakeup.dtsi      |  2 +
 arch/arm64/boot/dts/ti/k3-j721e-sk.dts        | 31 +++-----------
 5 files changed, 31 insertions(+), 87 deletions(-)

Comments

Dhruva Gole Aug. 7, 2023, 5:34 a.m. UTC | #1
On 03/08/23 02:23, Andrew Davis wrote:
> GPIO nodes defined in the top-level J721e SoC dtsi files are incomplete
> and may not be functional unless they are extended with pinmux and
> device information.
> 
> Disable the GPIO nodes in the dtsi files and only enable the ones that
> are actually pinned out on a given board.
> 
> Signed-off-by: Andrew Davis <afd@ti.com>
> ---
>   .../boot/dts/ti/k3-j721e-beagleboneai64.dts   | 42 ++++---------------
>   .../dts/ti/k3-j721e-common-proc-board.dts     | 35 ++++------------
>   arch/arm64/boot/dts/ti/k3-j721e-main.dtsi     |  8 ++++
>   .../boot/dts/ti/k3-j721e-mcu-wakeup.dtsi      |  2 +
>   arch/arm64/boot/dts/ti/k3-j721e-sk.dts        | 31 +++-----------
>   5 files changed, 31 insertions(+), 87 deletions(-)
> 

Reviewed-by: Dhruva Gole <d-gole@ti.com>

> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts b/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts
> index 0b89977351c98..99536765939d9 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts
> +++ b/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts
> @@ -647,52 +647,24 @@ eeprom@50 {
>   	};
>   };
>   
> -&main_gpio2 {
> -	/* Unused */
> -	status = "disabled";
> -};
> -
> -&main_gpio3 {
> -	/* Unused */
> -	status = "disabled";
> -};
> -
> -&main_gpio4 {
> -	/* Unused */
> -	status = "disabled";
> -};
> -
> -&main_gpio5 {
> -	/* Unused */
> -	status = "disabled";
> -};
> -
> -&main_gpio6 {
> -	/* Unused */
> -	status = "disabled";
> -};
> -
> -&main_gpio7 {
> -	/* Unused */
> -	status = "disabled";
> -};
> -
>   &wkup_gpio0 {
> +	status = "okay";
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&mcu_adc0_pins_default>, <&mcu_adc1_pins_default>,
>   		    <&mikro_bus_pins_default>;
>   };
>   
> -&wkup_gpio1 {
> -	/* Unused */
> -	status = "disabled";
> -};
> -
>   &main_gpio0 {
> +	status = "okay";
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&csi1_gpio_pins_default>, <&csi0_gpio_pins_default>;
>   };
>   
> +&main_gpio1 {
> +	status = "okay";
> +	/* default pins */
> +};
> +
>   &usb_serdes_mux {
>   	idle-states = <1>, <1>; /* USB0 to SERDES3, USB1 to SERDES2 */
>   };
> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
> index e9b84d2c64b26..2fd940893eb5f 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
> +++ b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
> @@ -469,37 +469,20 @@ &main_uart4 {
>   	pinctrl-0 = <&main_uart4_pins_default>;
>   };
>   
> -&main_gpio2 {
> -	status = "disabled";
> -};
> -
> -&main_gpio3 {
> -	status = "disabled";
> -};
> -
> -&main_gpio4 {
> -	status = "disabled";
> -};
> -
> -&main_gpio5 {
> -	status = "disabled";
> -};
> -
> -&main_gpio6 {
> -	status = "disabled";
> -};
> -
> -&main_gpio7 {
> -	status = "disabled";
> -};
> -
>   &wkup_gpio0 {
> +	status = "okay";
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&wkup_gpio_pins_default>;
>   };
>   
> -&wkup_gpio1 {
> -	status = "disabled";
> +&main_gpio0 {
> +	status = "okay";
> +	/* default pins */
> +};
> +
> +&main_gpio1 {
> +	status = "okay";
> +	/* default pins */
>   };
>   
>   &main_sdhci0 {
> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
> index 0ca31186b9b74..7f663d9280b57 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
> @@ -1339,6 +1339,7 @@ main_gpio0: gpio@600000 {
>   		power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>;
>   		clocks = <&k3_clks 105 0>;
>   		clock-names = "gpio";
> +		status = "disabled";
>   	};
>   
>   	main_gpio1: gpio@601000 {
> @@ -1355,6 +1356,7 @@ main_gpio1: gpio@601000 {
>   		power-domains = <&k3_pds 106 TI_SCI_PD_EXCLUSIVE>;
>   		clocks = <&k3_clks 106 0>;
>   		clock-names = "gpio";
> +		status = "disabled";
>   	};
>   
>   	main_gpio2: gpio@610000 {
> @@ -1372,6 +1374,7 @@ main_gpio2: gpio@610000 {
>   		power-domains = <&k3_pds 107 TI_SCI_PD_EXCLUSIVE>;
>   		clocks = <&k3_clks 107 0>;
>   		clock-names = "gpio";
> +		status = "disabled";
>   	};
>   
>   	main_gpio3: gpio@611000 {
> @@ -1388,6 +1391,7 @@ main_gpio3: gpio@611000 {
>   		power-domains = <&k3_pds 108 TI_SCI_PD_EXCLUSIVE>;
>   		clocks = <&k3_clks 108 0>;
>   		clock-names = "gpio";
> +		status = "disabled";
>   	};
>   
>   	main_gpio4: gpio@620000 {
> @@ -1405,6 +1409,7 @@ main_gpio4: gpio@620000 {
>   		power-domains = <&k3_pds 109 TI_SCI_PD_EXCLUSIVE>;
>   		clocks = <&k3_clks 109 0>;
>   		clock-names = "gpio";
> +		status = "disabled";
>   	};
>   
>   	main_gpio5: gpio@621000 {
> @@ -1421,6 +1426,7 @@ main_gpio5: gpio@621000 {
>   		power-domains = <&k3_pds 110 TI_SCI_PD_EXCLUSIVE>;
>   		clocks = <&k3_clks 110 0>;
>   		clock-names = "gpio";
> +		status = "disabled";
>   	};
>   
>   	main_gpio6: gpio@630000 {
> @@ -1438,6 +1444,7 @@ main_gpio6: gpio@630000 {
>   		power-domains = <&k3_pds 111 TI_SCI_PD_EXCLUSIVE>;
>   		clocks = <&k3_clks 111 0>;
>   		clock-names = "gpio";
> +		status = "disabled";
>   	};
>   
>   	main_gpio7: gpio@631000 {
> @@ -1454,6 +1461,7 @@ main_gpio7: gpio@631000 {
>   		power-domains = <&k3_pds 112 TI_SCI_PD_EXCLUSIVE>;
>   		clocks = <&k3_clks 112 0>;
>   		clock-names = "gpio";
> +		status = "disabled";
>   	};
>   
>   	main_sdhci0: mmc@4f80000 {
> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
> index 0c01bdd9656f1..4d107eee9b341 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
> +++ b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
> @@ -281,6 +281,7 @@ wkup_gpio0: gpio@42110000 {
>   		power-domains = <&k3_pds 113 TI_SCI_PD_EXCLUSIVE>;
>   		clocks = <&k3_clks 113 0>;
>   		clock-names = "gpio";
> +		status = "disabled";
>   	};
>   
>   	wkup_gpio1: gpio@42100000 {
> @@ -297,6 +298,7 @@ wkup_gpio1: gpio@42100000 {
>   		power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
>   		clocks = <&k3_clks 114 0>;
>   		clock-names = "gpio";
> +		status = "disabled";
>   	};
>   
>   	mcu_i2c0: i2c@40b00000 {
> diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
> index 4cd5346f2dd59..dfb6af60482e7 100644
> --- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
> +++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
> @@ -731,41 +731,20 @@ &main_i2c5 {
>   };
>   
>   &main_gpio0 {
> +	status = "okay";
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&rpi_header_gpio0_pins_default>;
>   };
>   
>   &main_gpio1 {
> +	status = "okay";
>   	pinctrl-names = "default";
>   	pinctrl-0 = <&rpi_header_gpio1_pins_default>;
>   };
>   
> -&main_gpio2 {
> -	status = "disabled";
> -};
> -
> -&main_gpio3 {
> -	status = "disabled";
> -};
> -
> -&main_gpio4 {
> -	status = "disabled";
> -};
> -
> -&main_gpio5 {
> -	status = "disabled";
> -};
> -
> -&main_gpio6 {
> -	status = "disabled";
> -};
> -
> -&main_gpio7 {
> -	status = "disabled";
> -};
> -
> -&wkup_gpio1 {
> -	status = "disabled";
> +&wkup_gpio0 {
> +	status = "okay";
> +	/* default pins */
>   };
>   
>   &usb_serdes_mux {
diff mbox series

Patch

diff --git a/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts b/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts
index 0b89977351c98..99536765939d9 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721e-beagleboneai64.dts
@@ -647,52 +647,24 @@  eeprom@50 {
 	};
 };
 
-&main_gpio2 {
-	/* Unused */
-	status = "disabled";
-};
-
-&main_gpio3 {
-	/* Unused */
-	status = "disabled";
-};
-
-&main_gpio4 {
-	/* Unused */
-	status = "disabled";
-};
-
-&main_gpio5 {
-	/* Unused */
-	status = "disabled";
-};
-
-&main_gpio6 {
-	/* Unused */
-	status = "disabled";
-};
-
-&main_gpio7 {
-	/* Unused */
-	status = "disabled";
-};
-
 &wkup_gpio0 {
+	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&mcu_adc0_pins_default>, <&mcu_adc1_pins_default>,
 		    <&mikro_bus_pins_default>;
 };
 
-&wkup_gpio1 {
-	/* Unused */
-	status = "disabled";
-};
-
 &main_gpio0 {
+	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&csi1_gpio_pins_default>, <&csi0_gpio_pins_default>;
 };
 
+&main_gpio1 {
+	status = "okay";
+	/* default pins */
+};
+
 &usb_serdes_mux {
 	idle-states = <1>, <1>; /* USB0 to SERDES3, USB1 to SERDES2 */
 };
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
index e9b84d2c64b26..2fd940893eb5f 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721e-common-proc-board.dts
@@ -469,37 +469,20 @@  &main_uart4 {
 	pinctrl-0 = <&main_uart4_pins_default>;
 };
 
-&main_gpio2 {
-	status = "disabled";
-};
-
-&main_gpio3 {
-	status = "disabled";
-};
-
-&main_gpio4 {
-	status = "disabled";
-};
-
-&main_gpio5 {
-	status = "disabled";
-};
-
-&main_gpio6 {
-	status = "disabled";
-};
-
-&main_gpio7 {
-	status = "disabled";
-};
-
 &wkup_gpio0 {
+	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&wkup_gpio_pins_default>;
 };
 
-&wkup_gpio1 {
-	status = "disabled";
+&main_gpio0 {
+	status = "okay";
+	/* default pins */
+};
+
+&main_gpio1 {
+	status = "okay";
+	/* default pins */
 };
 
 &main_sdhci0 {
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
index 0ca31186b9b74..7f663d9280b57 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721e-main.dtsi
@@ -1339,6 +1339,7 @@  main_gpio0: gpio@600000 {
 		power-domains = <&k3_pds 105 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 105 0>;
 		clock-names = "gpio";
+		status = "disabled";
 	};
 
 	main_gpio1: gpio@601000 {
@@ -1355,6 +1356,7 @@  main_gpio1: gpio@601000 {
 		power-domains = <&k3_pds 106 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 106 0>;
 		clock-names = "gpio";
+		status = "disabled";
 	};
 
 	main_gpio2: gpio@610000 {
@@ -1372,6 +1374,7 @@  main_gpio2: gpio@610000 {
 		power-domains = <&k3_pds 107 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 107 0>;
 		clock-names = "gpio";
+		status = "disabled";
 	};
 
 	main_gpio3: gpio@611000 {
@@ -1388,6 +1391,7 @@  main_gpio3: gpio@611000 {
 		power-domains = <&k3_pds 108 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 108 0>;
 		clock-names = "gpio";
+		status = "disabled";
 	};
 
 	main_gpio4: gpio@620000 {
@@ -1405,6 +1409,7 @@  main_gpio4: gpio@620000 {
 		power-domains = <&k3_pds 109 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 109 0>;
 		clock-names = "gpio";
+		status = "disabled";
 	};
 
 	main_gpio5: gpio@621000 {
@@ -1421,6 +1426,7 @@  main_gpio5: gpio@621000 {
 		power-domains = <&k3_pds 110 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 110 0>;
 		clock-names = "gpio";
+		status = "disabled";
 	};
 
 	main_gpio6: gpio@630000 {
@@ -1438,6 +1444,7 @@  main_gpio6: gpio@630000 {
 		power-domains = <&k3_pds 111 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 111 0>;
 		clock-names = "gpio";
+		status = "disabled";
 	};
 
 	main_gpio7: gpio@631000 {
@@ -1454,6 +1461,7 @@  main_gpio7: gpio@631000 {
 		power-domains = <&k3_pds 112 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 112 0>;
 		clock-names = "gpio";
+		status = "disabled";
 	};
 
 	main_sdhci0: mmc@4f80000 {
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
index 0c01bdd9656f1..4d107eee9b341 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
+++ b/arch/arm64/boot/dts/ti/k3-j721e-mcu-wakeup.dtsi
@@ -281,6 +281,7 @@  wkup_gpio0: gpio@42110000 {
 		power-domains = <&k3_pds 113 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 113 0>;
 		clock-names = "gpio";
+		status = "disabled";
 	};
 
 	wkup_gpio1: gpio@42100000 {
@@ -297,6 +298,7 @@  wkup_gpio1: gpio@42100000 {
 		power-domains = <&k3_pds 114 TI_SCI_PD_EXCLUSIVE>;
 		clocks = <&k3_clks 114 0>;
 		clock-names = "gpio";
+		status = "disabled";
 	};
 
 	mcu_i2c0: i2c@40b00000 {
diff --git a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
index 4cd5346f2dd59..dfb6af60482e7 100644
--- a/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
+++ b/arch/arm64/boot/dts/ti/k3-j721e-sk.dts
@@ -731,41 +731,20 @@  &main_i2c5 {
 };
 
 &main_gpio0 {
+	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&rpi_header_gpio0_pins_default>;
 };
 
 &main_gpio1 {
+	status = "okay";
 	pinctrl-names = "default";
 	pinctrl-0 = <&rpi_header_gpio1_pins_default>;
 };
 
-&main_gpio2 {
-	status = "disabled";
-};
-
-&main_gpio3 {
-	status = "disabled";
-};
-
-&main_gpio4 {
-	status = "disabled";
-};
-
-&main_gpio5 {
-	status = "disabled";
-};
-
-&main_gpio6 {
-	status = "disabled";
-};
-
-&main_gpio7 {
-	status = "disabled";
-};
-
-&wkup_gpio1 {
-	status = "disabled";
+&wkup_gpio0 {
+	status = "okay";
+	/* default pins */
 };
 
 &usb_serdes_mux {