linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] at91/dt: ariettag25: style cleanup
@ 2019-07-31 22:00 Uwe Kleine-König
  2019-08-01  8:26 ` Ludovic Desroches
  2019-08-12 14:57 ` Alexandre Belloni
  0 siblings, 2 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2019-07-31 22:00 UTC (permalink / raw)
  To: Nicolas Ferre, Alexandre Belloni, Ludovic Desroches
  Cc: Mark Rutland, devicetree, Rob Herring, linux-arm-kernel

- newline between properties and sub-nodes
- use tags from included dtsi instead of duplicating the hierarchy
- status should be the last property
- drop duplicated alias

There are no differences in the generated .dtb

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
---
Hello,

these are the style rules I was teached when modifying imx dts files.
Do they apply to at91, too?

Best regards
Uwe

 arch/arm/boot/dts/at91-ariettag25.dts | 87 +++++++++++++--------------
 1 file changed, 43 insertions(+), 44 deletions(-)

diff --git a/arch/arm/boot/dts/at91-ariettag25.dts b/arch/arm/boot/dts/at91-ariettag25.dts
index 7a34c4dc05d2..8f9f5a22cbf6 100644
--- a/arch/arm/boot/dts/at91-ariettag25.dts
+++ b/arch/arm/boot/dts/at91-ariettag25.dts
@@ -6,14 +6,11 @@
  */
 /dts-v1/;
 #include "at91sam9g25.dtsi"
+
 / {
 	model = "Acme Systems Arietta G25";
 	compatible = "acme,ariettag25", "atmel,at91sam9x5", "atmel,at91sam9";
 
-	aliases {
-		serial0 = &dbgu;
-	};
-
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
@@ -34,55 +31,16 @@
 
 	ahb {
 		apb {
-			mmc0: mmc@f0008000 {
-				pinctrl-0 = <
-				  &pinctrl_mmc0_slot0_clk_cmd_dat0
-				  &pinctrl_mmc0_slot0_dat1_3>;
-				status = "okay";
-
-				slot@0 {
-					reg = <0>;
-					bus-width = <4>;
-				};
-			};
-
-			tcb0: timer@f8008000 {
-				timer@0 {
-					compatible = "atmel,tcb-timer";
-					reg = <0>;
-				};
-
-				timer@1 {
-					compatible = "atmel,tcb-timer";
-					reg = <1>;
-				};
-			};
-
-			usb2: gadget@f803c000 {
-				status = "okay";
-			};
-
-			dbgu: serial@fffff200 {
-				status = "okay";
-			};
-
 			rtc@fffffeb0 {
 				status = "okay";
 			};
 		};
 
-		usb0: ohci@600000 {
-			status = "okay";
-			num-ports = <3>;
-		};
-
-		usb1: ehci@700000 {
-			status = "okay";
-		};
 	};
 
 	leds {
 		compatible = "gpio-leds";
+
 		arietta_led {
 			label = "arietta_led";
 			gpios = <&pioB 8 GPIO_ACTIVE_HIGH>; /* PB8 */
@@ -90,3 +48,44 @@
 		};
 	};
 };
+
+&dbgu {
+	status = "okay";
+};
+
+&mmc0 {
+	pinctrl-0 = <
+		&pinctrl_mmc0_slot0_clk_cmd_dat0
+		&pinctrl_mmc0_slot0_dat1_3>;
+	status = "okay";
+
+	slot@0 {
+		reg = <0>;
+		bus-width = <4>;
+	};
+};
+
+&tcb0 {
+	timer@0 {
+		compatible = "atmel,tcb-timer";
+		reg = <0>;
+	};
+
+	timer@1 {
+		compatible = "atmel,tcb-timer";
+		reg = <1>;
+	};
+};
+
+&usb0 {
+	num-ports = <3>;
+	status = "okay";
+};
+
+&usb1 {
+	status = "okay";
+};
+
+&usb2 {
+	status = "okay";
+};
-- 
2.20.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: [PATCH] at91/dt: ariettag25: style cleanup
  2019-07-31 22:00 [PATCH] at91/dt: ariettag25: style cleanup Uwe Kleine-König
@ 2019-08-01  8:26 ` Ludovic Desroches
  2019-08-12 15:47   ` Nicolas.Ferre
  2019-08-12 14:57 ` Alexandre Belloni
  1 sibling, 1 reply; 5+ messages in thread
From: Ludovic Desroches @ 2019-08-01  8:26 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mark Rutland, devicetree, Alexandre Belloni, Rob Herring,
	linux-arm-kernel

On Thu, Aug 01, 2019 at 12:00:45AM +0200, Uwe Kleine-König wrote:
> External E-Mail
> 
> 
> - newline between properties and sub-nodes
> - use tags from included dtsi instead of duplicating the hierarchy
> - status should be the last property
> - drop duplicated alias
> 
> There are no differences in the generated .dtb
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>

> ---
> Hello,
> 
> these are the style rules I was teached when modifying imx dts files.
> Do they apply to at91, too?

Hello Uwe,

It's okay for me, we had no guidelines at the beginning, that explain
some inconsistency among our dt files. We tend to follow these rules
excepted the use of labels.

I would like to be sure that Nicolas and Alexandre are on the same
wavelength than me.

Regards

Ludovic

> 
> Best regards
> Uwe
> 
>  arch/arm/boot/dts/at91-ariettag25.dts | 87 +++++++++++++--------------
>  1 file changed, 43 insertions(+), 44 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/at91-ariettag25.dts b/arch/arm/boot/dts/at91-ariettag25.dts
> index 7a34c4dc05d2..8f9f5a22cbf6 100644
> --- a/arch/arm/boot/dts/at91-ariettag25.dts
> +++ b/arch/arm/boot/dts/at91-ariettag25.dts
> @@ -6,14 +6,11 @@
>   */
>  /dts-v1/;
>  #include "at91sam9g25.dtsi"
> +
>  / {
>  	model = "Acme Systems Arietta G25";
>  	compatible = "acme,ariettag25", "atmel,at91sam9x5", "atmel,at91sam9";
>  
> -	aliases {
> -		serial0 = &dbgu;
> -	};
> -
>  	chosen {
>  		stdout-path = "serial0:115200n8";
>  	};
> @@ -34,55 +31,16 @@
>  
>  	ahb {
>  		apb {
> -			mmc0: mmc@f0008000 {
> -				pinctrl-0 = <
> -				  &pinctrl_mmc0_slot0_clk_cmd_dat0
> -				  &pinctrl_mmc0_slot0_dat1_3>;
> -				status = "okay";
> -
> -				slot@0 {
> -					reg = <0>;
> -					bus-width = <4>;
> -				};
> -			};
> -
> -			tcb0: timer@f8008000 {
> -				timer@0 {
> -					compatible = "atmel,tcb-timer";
> -					reg = <0>;
> -				};
> -
> -				timer@1 {
> -					compatible = "atmel,tcb-timer";
> -					reg = <1>;
> -				};
> -			};
> -
> -			usb2: gadget@f803c000 {
> -				status = "okay";
> -			};
> -
> -			dbgu: serial@fffff200 {
> -				status = "okay";
> -			};
> -
>  			rtc@fffffeb0 {
>  				status = "okay";
>  			};
>  		};
>  
> -		usb0: ohci@600000 {
> -			status = "okay";
> -			num-ports = <3>;
> -		};
> -
> -		usb1: ehci@700000 {
> -			status = "okay";
> -		};
>  	};
>  
>  	leds {
>  		compatible = "gpio-leds";
> +
>  		arietta_led {
>  			label = "arietta_led";
>  			gpios = <&pioB 8 GPIO_ACTIVE_HIGH>; /* PB8 */
> @@ -90,3 +48,44 @@
>  		};
>  	};
>  };
> +
> +&dbgu {
> +	status = "okay";
> +};
> +
> +&mmc0 {
> +	pinctrl-0 = <
> +		&pinctrl_mmc0_slot0_clk_cmd_dat0
> +		&pinctrl_mmc0_slot0_dat1_3>;
> +	status = "okay";
> +
> +	slot@0 {
> +		reg = <0>;
> +		bus-width = <4>;
> +	};
> +};
> +
> +&tcb0 {
> +	timer@0 {
> +		compatible = "atmel,tcb-timer";
> +		reg = <0>;
> +	};
> +
> +	timer@1 {
> +		compatible = "atmel,tcb-timer";
> +		reg = <1>;
> +	};
> +};
> +
> +&usb0 {
> +	num-ports = <3>;
> +	status = "okay";
> +};
> +
> +&usb1 {
> +	status = "okay";
> +};
> +
> +&usb2 {
> +	status = "okay";
> +};
> -- 
> 2.20.1
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] at91/dt: ariettag25: style cleanup
  2019-07-31 22:00 [PATCH] at91/dt: ariettag25: style cleanup Uwe Kleine-König
  2019-08-01  8:26 ` Ludovic Desroches
@ 2019-08-12 14:57 ` Alexandre Belloni
  1 sibling, 0 replies; 5+ messages in thread
From: Alexandre Belloni @ 2019-08-12 14:57 UTC (permalink / raw)
  To: Uwe Kleine-König
  Cc: Mark Rutland, devicetree, Ludovic Desroches, Rob Herring,
	linux-arm-kernel

Hi,

The subject prefix should be "ARM: dts: at91:"

On 01/08/2019 00:00:45+0200, Uwe Kleine-König wrote:
> - newline between properties and sub-nodes
> - use tags from included dtsi instead of duplicating the hierarchy
> - status should be the last property
> - drop duplicated alias
> 
> There are no differences in the generated .dtb
> 
> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> ---
> Hello,
> 
> these are the style rules I was teached when modifying imx dts files.
> Do they apply to at91, too?
> 
> Best regards
> Uwe
> 
>  arch/arm/boot/dts/at91-ariettag25.dts | 87 +++++++++++++--------------
>  1 file changed, 43 insertions(+), 44 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/at91-ariettag25.dts b/arch/arm/boot/dts/at91-ariettag25.dts
> index 7a34c4dc05d2..8f9f5a22cbf6 100644
> --- a/arch/arm/boot/dts/at91-ariettag25.dts
> +++ b/arch/arm/boot/dts/at91-ariettag25.dts
> @@ -6,14 +6,11 @@
>   */
>  /dts-v1/;
>  #include "at91sam9g25.dtsi"
> +
>  / {
>  	model = "Acme Systems Arietta G25";
>  	compatible = "acme,ariettag25", "atmel,at91sam9x5", "atmel,at91sam9";
>  
> -	aliases {
> -		serial0 = &dbgu;
> -	};
> -
>  	chosen {
>  		stdout-path = "serial0:115200n8";
>  	};
> @@ -34,55 +31,16 @@
>  
>  	ahb {
>  		apb {
> -			mmc0: mmc@f0008000 {
> -				pinctrl-0 = <
> -				  &pinctrl_mmc0_slot0_clk_cmd_dat0
> -				  &pinctrl_mmc0_slot0_dat1_3>;
> -				status = "okay";
> -
> -				slot@0 {
> -					reg = <0>;
> -					bus-width = <4>;
> -				};
> -			};
> -
> -			tcb0: timer@f8008000 {
> -				timer@0 {
> -					compatible = "atmel,tcb-timer";
> -					reg = <0>;
> -				};
> -
> -				timer@1 {
> -					compatible = "atmel,tcb-timer";
> -					reg = <1>;
> -				};
> -			};
> -
> -			usb2: gadget@f803c000 {
> -				status = "okay";
> -			};
> -
> -			dbgu: serial@fffff200 {
> -				status = "okay";
> -			};
> -
>  			rtc@fffffeb0 {

You can had a label to the rtc in a preliminary patch so you can remove
the hierarchy.

>  				status = "okay";
>  			};
>  		};
>  
> -		usb0: ohci@600000 {
> -			status = "okay";
> -			num-ports = <3>;
> -		};
> -
> -		usb1: ehci@700000 {
> -			status = "okay";
> -		};
>  	};
>  
>  	leds {
>  		compatible = "gpio-leds";
> +
>  		arietta_led {
>  			label = "arietta_led";
>  			gpios = <&pioB 8 GPIO_ACTIVE_HIGH>; /* PB8 */
> @@ -90,3 +48,44 @@
>  		};
>  	};
>  };
> +
> +&dbgu {
> +	status = "okay";
> +};
> +
> +&mmc0 {
> +	pinctrl-0 = <
> +		&pinctrl_mmc0_slot0_clk_cmd_dat0
> +		&pinctrl_mmc0_slot0_dat1_3>;
> +	status = "okay";
> +
> +	slot@0 {
> +		reg = <0>;
> +		bus-width = <4>;
> +	};
> +};
> +
> +&tcb0 {
> +	timer@0 {
> +		compatible = "atmel,tcb-timer";
> +		reg = <0>;
> +	};
> +
> +	timer@1 {
> +		compatible = "atmel,tcb-timer";
> +		reg = <1>;
> +	};
> +};
> +
> +&usb0 {
> +	num-ports = <3>;
> +	status = "okay";
> +};
> +
> +&usb1 {
> +	status = "okay";
> +};
> +
> +&usb2 {
> +	status = "okay";
> +};
> -- 
> 2.20.1
> 

-- 
Alexandre Belloni, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] at91/dt: ariettag25: style cleanup
  2019-08-01  8:26 ` Ludovic Desroches
@ 2019-08-12 15:47   ` Nicolas.Ferre
  2019-08-12 21:32     ` Uwe Kleine-König
  0 siblings, 1 reply; 5+ messages in thread
From: Nicolas.Ferre @ 2019-08-12 15:47 UTC (permalink / raw)
  To: uwe, alexandre.belloni, mark.rutland, devicetree, robh+dt,
	linux-arm-kernel

On 01/08/2019 at 10:26, Ludovic Desroches wrote:
> On Thu, Aug 01, 2019 at 12:00:45AM +0200, Uwe Kleine-König wrote:
>>
>> - newline between properties and sub-nodes
>> - use tags from included dtsi instead of duplicating the hierarchy
>> - status should be the last property
>> - drop duplicated alias
>>
>> There are no differences in the generated .dtb
>>
>> Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
> Acked-by: Ludovic Desroches <ludovic.desroches@microchip.com>
> 
>> ---
>> Hello,
>>
>> these are the style rules I was teached when modifying imx dts files.
>> Do they apply to at91, too?
> 
> Hello Uwe,
> 
> It's okay for me, we had no guidelines at the beginning, that explain
> some inconsistency among our dt files. We tend to follow these rules
> excepted the use of labels.
> 
> I would like to be sure that Nicolas and Alexandre are on the same
> wavelength than me.

After I had been reluctant to use them (another syntax to learn in 
addition to learning DT, remember, back in the days...), I'm now okay to 
use labels as they are so convenient and widely used.

Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

Thanks Uwe! Best regards,
   Nicolas


>>   arch/arm/boot/dts/at91-ariettag25.dts | 87 +++++++++++++--------------
>>   1 file changed, 43 insertions(+), 44 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/at91-ariettag25.dts b/arch/arm/boot/dts/at91-ariettag25.dts
>> index 7a34c4dc05d2..8f9f5a22cbf6 100644
>> --- a/arch/arm/boot/dts/at91-ariettag25.dts
>> +++ b/arch/arm/boot/dts/at91-ariettag25.dts
>> @@ -6,14 +6,11 @@
>>    */
>>   /dts-v1/;
>>   #include "at91sam9g25.dtsi"
>> +
>>   / {
>>   	model = "Acme Systems Arietta G25";
>>   	compatible = "acme,ariettag25", "atmel,at91sam9x5", "atmel,at91sam9";
>>   
>> -	aliases {
>> -		serial0 = &dbgu;
>> -	};
>> -
>>   	chosen {
>>   		stdout-path = "serial0:115200n8";
>>   	};
>> @@ -34,55 +31,16 @@
>>   
>>   	ahb {
>>   		apb {
>> -			mmc0: mmc@f0008000 {
>> -				pinctrl-0 = <
>> -				  &pinctrl_mmc0_slot0_clk_cmd_dat0
>> -				  &pinctrl_mmc0_slot0_dat1_3>;
>> -				status = "okay";
>> -
>> -				slot@0 {
>> -					reg = <0>;
>> -					bus-width = <4>;
>> -				};
>> -			};
>> -
>> -			tcb0: timer@f8008000 {
>> -				timer@0 {
>> -					compatible = "atmel,tcb-timer";
>> -					reg = <0>;
>> -				};
>> -
>> -				timer@1 {
>> -					compatible = "atmel,tcb-timer";
>> -					reg = <1>;
>> -				};
>> -			};
>> -
>> -			usb2: gadget@f803c000 {
>> -				status = "okay";
>> -			};
>> -
>> -			dbgu: serial@fffff200 {
>> -				status = "okay";
>> -			};
>> -
>>   			rtc@fffffeb0 {
>>   				status = "okay";
>>   			};
>>   		};
>>   
>> -		usb0: ohci@600000 {
>> -			status = "okay";
>> -			num-ports = <3>;
>> -		};
>> -
>> -		usb1: ehci@700000 {
>> -			status = "okay";
>> -		};
>>   	};
>>   
>>   	leds {
>>   		compatible = "gpio-leds";
>> +
>>   		arietta_led {
>>   			label = "arietta_led";
>>   			gpios = <&pioB 8 GPIO_ACTIVE_HIGH>; /* PB8 */
>> @@ -90,3 +48,44 @@
>>   		};
>>   	};
>>   };
>> +
>> +&dbgu {
>> +	status = "okay";
>> +};
>> +
>> +&mmc0 {
>> +	pinctrl-0 = <
>> +		&pinctrl_mmc0_slot0_clk_cmd_dat0
>> +		&pinctrl_mmc0_slot0_dat1_3>;
>> +	status = "okay";
>> +
>> +	slot@0 {
>> +		reg = <0>;
>> +		bus-width = <4>;
>> +	};
>> +};
>> +
>> +&tcb0 {
>> +	timer@0 {
>> +		compatible = "atmel,tcb-timer";
>> +		reg = <0>;
>> +	};
>> +
>> +	timer@1 {
>> +		compatible = "atmel,tcb-timer";
>> +		reg = <1>;
>> +	};
>> +};
>> +
>> +&usb0 {
>> +	num-ports = <3>;
>> +	status = "okay";
>> +};
>> +
>> +&usb1 {
>> +	status = "okay";
>> +};
>> +
>> +&usb2 {
>> +	status = "okay";
>> +};
>> -- 
>> 2.20.1
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
> 


-- 
Nicolas Ferre

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH] at91/dt: ariettag25: style cleanup
  2019-08-12 15:47   ` Nicolas.Ferre
@ 2019-08-12 21:32     ` Uwe Kleine-König
  0 siblings, 0 replies; 5+ messages in thread
From: Uwe Kleine-König @ 2019-08-12 21:32 UTC (permalink / raw)
  To: Nicolas.Ferre, alexandre.belloni
  Cc: mark.rutland, devicetree, robh+dt, linux-arm-kernel


[-- Attachment #1.1.1: Type: text/plain, Size: 671 bytes --]

Hello,

On 8/12/19 5:47 PM, Nicolas.Ferre@microchip.com wrote:

>> I would like to be sure that Nicolas and Alexandre are on the same
>> wavelength than me.
> 
> After I had been reluctant to use them (another syntax to learn in 
> addition to learning DT, remember, back in the days...), I'm now okay to 
> use labels as they are so convenient and widely used.
> 
> Acked-by: Nicolas Ferre <nicolas.ferre@microchip.com>

I expanded the series a bit now with Alexandre's proposal to add a label
to the internal rtc and also fixed a few more dts files. The arietta dts
is slightly modified, so I didn't add the collected Acks there.

Best regards
Uwe


[-- Attachment #1.2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 176 bytes --]

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2019-08-12 21:32 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-07-31 22:00 [PATCH] at91/dt: ariettag25: style cleanup Uwe Kleine-König
2019-08-01  8:26 ` Ludovic Desroches
2019-08-12 15:47   ` Nicolas.Ferre
2019-08-12 21:32     ` Uwe Kleine-König
2019-08-12 14:57 ` Alexandre Belloni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).