[1/2] ARM: dts: qcom: ipq4019-ap.dk01.1: use existing labels for nodes

Message ID 20230811210142.403160-1-robimarko@gmail.com
State New
Headers
Series [1/2] ARM: dts: qcom: ipq4019-ap.dk01.1: use existing labels for nodes |

Commit Message

Robert Marko Aug. 11, 2023, 9:01 p.m. UTC
  All of the nodes under soc already have existing labels so use those
instead.

Signed-off-by: Robert Marko <robimarko@gmail.com>
---
 .../boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi | 140 +++++++++---------
 1 file changed, 69 insertions(+), 71 deletions(-)
  

Comments

Konrad Dybcio Aug. 11, 2023, 9:27 p.m. UTC | #1
On 11.08.2023 23:01, Robert Marko wrote:
> All of the nodes under soc already have existing labels so use those
> instead.
> 
> Signed-off-by: Robert Marko <robimarko@gmail.com>
> ---
dtx_diff returns an empty diff, nice

Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Couple further suggestions:

- wdog can probably enabled unconditionally
- same for blsp dma since there's only one host so it must be
  used by something
- same for crypto engine as it's a common piece of hw
- you can drop mux{}, pinmux{}, pinconf{} from pin nodes, just add
  the properties directly under the pin nodes
- this devicetree could use some schema warnings cleanup (make dtbs_check
  plus things like no underscores in node names)

Konrad
>  .../boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi | 140 +++++++++---------
>  1 file changed, 69 insertions(+), 71 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi b/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi
> index 0505270cf508..0714616c9e45 100644
> --- a/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi
> +++ b/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi
> @@ -27,87 +27,85 @@ aliases {
>  	chosen {
>  		stdout-path = "serial0:115200n8";
>  	};
> +};
>  
> -	soc {
> -		rng@22000 {
> -			status = "okay";
> -		};
> +&prng {
> +	status = "okay";
> +};
>  
> -		pinctrl@1000000 {
> -			serial_pins: serial_pinmux {
> -				mux {
> -					pins = "gpio60", "gpio61";
> -					function = "blsp_uart0";
> -					bias-disable;
> -				};
> -			};
> -
> -			spi_0_pins: spi_0_pinmux {
> -				pinmux {
> -					function = "blsp_spi0";
> -					pins = "gpio55", "gpio56", "gpio57";
> -				};
> -				pinmux_cs {
> -					function = "gpio";
> -					pins = "gpio54";
> -				};
> -				pinconf {
> -					pins = "gpio55", "gpio56", "gpio57";
> -					drive-strength = <12>;
> -					bias-disable;
> -				};
> -				pinconf_cs {
> -					pins = "gpio54";
> -					drive-strength = <2>;
> -					bias-disable;
> -					output-high;
> -				};
> -			};
> +&tlmm {
> +	serial_pins: serial_pinmux {
> +		mux {
> +			pins = "gpio60", "gpio61";
> +			function = "blsp_uart0";
> +			bias-disable;
>  		};
> +	};
>  
> -		blsp_dma: dma-controller@7884000 {
> -			status = "okay";
> +	spi_0_pins: spi_0_pinmux {
> +		pinmux {
> +			function = "blsp_spi0";
> +			pins = "gpio55", "gpio56", "gpio57";
>  		};
> -
> -		spi@78b5000 {
> -			pinctrl-0 = <&spi_0_pins>;
> -			pinctrl-names = "default";
> -			status = "okay";
> -			cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
> -
> -			mx25l25635e@0 {
> -				#address-cells = <1>;
> -				#size-cells = <1>;
> -				reg = <0>;
> -				compatible = "mx25l25635e";
> -				spi-max-frequency = <24000000>;
> -			};
> +		pinmux_cs {
> +			function = "gpio";
> +			pins = "gpio54";
>  		};
> -
> -		serial@78af000 {
> -			pinctrl-0 = <&serial_pins>;
> -			pinctrl-names = "default";
> -			status = "okay";
> +		pinconf {
> +			pins = "gpio55", "gpio56", "gpio57";
> +			drive-strength = <12>;
> +			bias-disable;
>  		};
> -
> -		cryptobam: dma-controller@8e04000 {
> -			status = "okay";
> +		pinconf_cs {
> +			pins = "gpio54";
> +			drive-strength = <2>;
> +			bias-disable;
> +			output-high;
>  		};
> +	};
> +};
>  
> -		crypto@8e3a000 {
> -			status = "okay";
> -		};
> +&blsp_dma {
> +	status = "okay";
> +};
>  
> -		watchdog@b017000 {
> -			status = "okay";
> -		};
> +&blsp1_spi1 {
> +	pinctrl-0 = <&spi_0_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +	cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
> +
> +	mx25l25635e@0 {
> +		#address-cells = <1>;
> +		#size-cells = <1>;
> +		reg = <0>;
> +		compatible = "mx25l25635e";
> +		spi-max-frequency = <24000000>;
> +	};
> +};
>  
> -		wifi@a000000 {
> -			status = "okay";
> -		};
> +&blsp1_uart1 {
> +	pinctrl-0 = <&serial_pins>;
> +	pinctrl-names = "default";
> +	status = "okay";
> +};
>  
> -		wifi@a800000 {
> -			status = "okay";
> -		};
> -	};
> +&cryptobam {
> +	status = "okay";
> +};
> +
> +&crypto {
> +	status = "okay";
> +};
> +
> +&watchdog {
> +	status = "okay";
> +};
> +
> +&wifi0 {
> +	status = "okay";
> +};
> +
> +&wifi1 {
> +	status = "okay";
>  };
  
Robert Marko Aug. 11, 2023, 9:38 p.m. UTC | #2
On Fri, 11 Aug 2023 at 23:27, Konrad Dybcio <konrad.dybcio@linaro.org> wrote:
>
> On 11.08.2023 23:01, Robert Marko wrote:
> > All of the nodes under soc already have existing labels so use those
> > instead.
> >
> > Signed-off-by: Robert Marko <robimarko@gmail.com>
> > ---
> dtx_diff returns an empty diff, nice
>
> Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>
>
> Couple further suggestions:
>
> - wdog can probably enabled unconditionally
> - same for blsp dma since there's only one host so it must be
>   used by something
> - same for crypto engine as it's a common piece of hw
> - you can drop mux{}, pinmux{}, pinconf{} from pin nodes, just add
>   the properties directly under the pin nodes
> - this devicetree could use some schema warnings cleanup (make dtbs_check
>   plus things like no underscores in node names)

Hi,
Yeah, I am planning a follow-up to clean up the pinctrl and most of
the stuff you mentioned
for the SoC DTSI itself.
I wanted to keep the diff clean here and just use the labels.

Regards,
Robert
>
> Konrad
> >  .../boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi | 140 +++++++++---------
> >  1 file changed, 69 insertions(+), 71 deletions(-)
> >
> > diff --git a/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi b/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi
> > index 0505270cf508..0714616c9e45 100644
> > --- a/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi
> > +++ b/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi
> > @@ -27,87 +27,85 @@ aliases {
> >       chosen {
> >               stdout-path = "serial0:115200n8";
> >       };
> > +};
> >
> > -     soc {
> > -             rng@22000 {
> > -                     status = "okay";
> > -             };
> > +&prng {
> > +     status = "okay";
> > +};
> >
> > -             pinctrl@1000000 {
> > -                     serial_pins: serial_pinmux {
> > -                             mux {
> > -                                     pins = "gpio60", "gpio61";
> > -                                     function = "blsp_uart0";
> > -                                     bias-disable;
> > -                             };
> > -                     };
> > -
> > -                     spi_0_pins: spi_0_pinmux {
> > -                             pinmux {
> > -                                     function = "blsp_spi0";
> > -                                     pins = "gpio55", "gpio56", "gpio57";
> > -                             };
> > -                             pinmux_cs {
> > -                                     function = "gpio";
> > -                                     pins = "gpio54";
> > -                             };
> > -                             pinconf {
> > -                                     pins = "gpio55", "gpio56", "gpio57";
> > -                                     drive-strength = <12>;
> > -                                     bias-disable;
> > -                             };
> > -                             pinconf_cs {
> > -                                     pins = "gpio54";
> > -                                     drive-strength = <2>;
> > -                                     bias-disable;
> > -                                     output-high;
> > -                             };
> > -                     };
> > +&tlmm {
> > +     serial_pins: serial_pinmux {
> > +             mux {
> > +                     pins = "gpio60", "gpio61";
> > +                     function = "blsp_uart0";
> > +                     bias-disable;
> >               };
> > +     };
> >
> > -             blsp_dma: dma-controller@7884000 {
> > -                     status = "okay";
> > +     spi_0_pins: spi_0_pinmux {
> > +             pinmux {
> > +                     function = "blsp_spi0";
> > +                     pins = "gpio55", "gpio56", "gpio57";
> >               };
> > -
> > -             spi@78b5000 {
> > -                     pinctrl-0 = <&spi_0_pins>;
> > -                     pinctrl-names = "default";
> > -                     status = "okay";
> > -                     cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
> > -
> > -                     mx25l25635e@0 {
> > -                             #address-cells = <1>;
> > -                             #size-cells = <1>;
> > -                             reg = <0>;
> > -                             compatible = "mx25l25635e";
> > -                             spi-max-frequency = <24000000>;
> > -                     };
> > +             pinmux_cs {
> > +                     function = "gpio";
> > +                     pins = "gpio54";
> >               };
> > -
> > -             serial@78af000 {
> > -                     pinctrl-0 = <&serial_pins>;
> > -                     pinctrl-names = "default";
> > -                     status = "okay";
> > +             pinconf {
> > +                     pins = "gpio55", "gpio56", "gpio57";
> > +                     drive-strength = <12>;
> > +                     bias-disable;
> >               };
> > -
> > -             cryptobam: dma-controller@8e04000 {
> > -                     status = "okay";
> > +             pinconf_cs {
> > +                     pins = "gpio54";
> > +                     drive-strength = <2>;
> > +                     bias-disable;
> > +                     output-high;
> >               };
> > +     };
> > +};
> >
> > -             crypto@8e3a000 {
> > -                     status = "okay";
> > -             };
> > +&blsp_dma {
> > +     status = "okay";
> > +};
> >
> > -             watchdog@b017000 {
> > -                     status = "okay";
> > -             };
> > +&blsp1_spi1 {
> > +     pinctrl-0 = <&spi_0_pins>;
> > +     pinctrl-names = "default";
> > +     status = "okay";
> > +     cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
> > +
> > +     mx25l25635e@0 {
> > +             #address-cells = <1>;
> > +             #size-cells = <1>;
> > +             reg = <0>;
> > +             compatible = "mx25l25635e";
> > +             spi-max-frequency = <24000000>;
> > +     };
> > +};
> >
> > -             wifi@a000000 {
> > -                     status = "okay";
> > -             };
> > +&blsp1_uart1 {
> > +     pinctrl-0 = <&serial_pins>;
> > +     pinctrl-names = "default";
> > +     status = "okay";
> > +};
> >
> > -             wifi@a800000 {
> > -                     status = "okay";
> > -             };
> > -     };
> > +&cryptobam {
> > +     status = "okay";
> > +};
> > +
> > +&crypto {
> > +     status = "okay";
> > +};
> > +
> > +&watchdog {
> > +     status = "okay";
> > +};
> > +
> > +&wifi0 {
> > +     status = "okay";
> > +};
> > +
> > +&wifi1 {
> > +     status = "okay";
> >  };
  
Bjorn Andersson Jan. 28, 2024, 5:45 p.m. UTC | #3
On Fri, 11 Aug 2023 23:01:02 +0200, Robert Marko wrote:
> All of the nodes under soc already have existing labels so use those
> instead.
> 
> 

Applied, thanks!

[1/2] ARM: dts: qcom: ipq4019-ap.dk01.1: use existing labels for nodes
      commit: 54850df251cb88ba9a32b6371c8cd5908efa3ec6
[2/2] ARM: dts: qcom: ipq4019-ap.dk01.1: align flash node with bindings
      commit: 111bc3710caa7e55bc0040ffa57cec83e09dac07

Best regards,
  

Patch

diff --git a/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi b/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi
index 0505270cf508..0714616c9e45 100644
--- a/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi
+++ b/arch/arm/boot/dts/qcom/qcom-ipq4019-ap.dk01.1.dtsi
@@ -27,87 +27,85 @@  aliases {
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+};
 
-	soc {
-		rng@22000 {
-			status = "okay";
-		};
+&prng {
+	status = "okay";
+};
 
-		pinctrl@1000000 {
-			serial_pins: serial_pinmux {
-				mux {
-					pins = "gpio60", "gpio61";
-					function = "blsp_uart0";
-					bias-disable;
-				};
-			};
-
-			spi_0_pins: spi_0_pinmux {
-				pinmux {
-					function = "blsp_spi0";
-					pins = "gpio55", "gpio56", "gpio57";
-				};
-				pinmux_cs {
-					function = "gpio";
-					pins = "gpio54";
-				};
-				pinconf {
-					pins = "gpio55", "gpio56", "gpio57";
-					drive-strength = <12>;
-					bias-disable;
-				};
-				pinconf_cs {
-					pins = "gpio54";
-					drive-strength = <2>;
-					bias-disable;
-					output-high;
-				};
-			};
+&tlmm {
+	serial_pins: serial_pinmux {
+		mux {
+			pins = "gpio60", "gpio61";
+			function = "blsp_uart0";
+			bias-disable;
 		};
+	};
 
-		blsp_dma: dma-controller@7884000 {
-			status = "okay";
+	spi_0_pins: spi_0_pinmux {
+		pinmux {
+			function = "blsp_spi0";
+			pins = "gpio55", "gpio56", "gpio57";
 		};
-
-		spi@78b5000 {
-			pinctrl-0 = <&spi_0_pins>;
-			pinctrl-names = "default";
-			status = "okay";
-			cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
-
-			mx25l25635e@0 {
-				#address-cells = <1>;
-				#size-cells = <1>;
-				reg = <0>;
-				compatible = "mx25l25635e";
-				spi-max-frequency = <24000000>;
-			};
+		pinmux_cs {
+			function = "gpio";
+			pins = "gpio54";
 		};
-
-		serial@78af000 {
-			pinctrl-0 = <&serial_pins>;
-			pinctrl-names = "default";
-			status = "okay";
+		pinconf {
+			pins = "gpio55", "gpio56", "gpio57";
+			drive-strength = <12>;
+			bias-disable;
 		};
-
-		cryptobam: dma-controller@8e04000 {
-			status = "okay";
+		pinconf_cs {
+			pins = "gpio54";
+			drive-strength = <2>;
+			bias-disable;
+			output-high;
 		};
+	};
+};
 
-		crypto@8e3a000 {
-			status = "okay";
-		};
+&blsp_dma {
+	status = "okay";
+};
 
-		watchdog@b017000 {
-			status = "okay";
-		};
+&blsp1_spi1 {
+	pinctrl-0 = <&spi_0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+	cs-gpios = <&tlmm 54 GPIO_ACTIVE_HIGH>;
+
+	mx25l25635e@0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0>;
+		compatible = "mx25l25635e";
+		spi-max-frequency = <24000000>;
+	};
+};
 
-		wifi@a000000 {
-			status = "okay";
-		};
+&blsp1_uart1 {
+	pinctrl-0 = <&serial_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
 
-		wifi@a800000 {
-			status = "okay";
-		};
-	};
+&cryptobam {
+	status = "okay";
+};
+
+&crypto {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&wifi0 {
+	status = "okay";
+};
+
+&wifi1 {
+	status = "okay";
 };