All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH 1/3] arm: dts: sun7i: Update Ainol AW1 dts
@ 2018-03-25 12:35 Paul Kocialkowski
  2018-03-25 12:36 ` [U-Boot] [PATCH 3/3] sunxi: Add extra I2C bus support to Ainol AW1 defconfig Paul Kocialkowski
  2018-03-26 11:09 ` [U-Boot] [PATCH 1/3] arm: dts: sun7i: Update Ainol AW1 dts Maxime Ripard
  0 siblings, 2 replies; 7+ messages in thread
From: Paul Kocialkowski @ 2018-03-25 12:35 UTC (permalink / raw)
  To: u-boot

Spam detection software, running on the system "lists.denx.de",
has identified this incoming email as possible spam.  The original
message has been attached to this so you can view it or label
similar future email.  If you have any questions, see
@@CONTACT_ADDRESS@@ for details.

Content preview:  This introduces a newer dts for the Ainol AW1, that will be
   the base for introducing upstream Linux support for the device. This update
   in U-Boot allows fixing USB OTG detection, that was missing from the previous
   dts. [...] 

Content analysis details:   (5.2 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                            [77.128.107.220 listed in zen.spamhaus.org]
 1.3 RCVD_IN_RP_RNBL        RBL: Relay in RNBL,
                            https://senderscore.org/blacklistlookup/
                           [77.128.107.220 listed in bl.score.senderscore.com]
 0.0 RCVD_IN_SORBS_DUL      RBL: SORBS: sent directly from dynamic IP address
                            [77.128.107.220 listed in dnsbl.sorbs.net]
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                            dynamic-looking rDNS


-------------- next part --------------
An embedded message was scrubbed...
From: Paul Kocialkowski <contact@paulk.fr>
Subject: [PATCH 1/3] arm: dts: sun7i: Update Ainol AW1 dts
Date: Sun, 25 Mar 2018 14:35:59 +0200
Size: 7538
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180325/f3056183/attachment.mht>

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

* [U-Boot] [PATCH 3/3] sunxi: Add extra I2C bus support to Ainol AW1 defconfig
@ 2018-03-25 12:36 ` Paul Kocialkowski
  2018-03-26 11:10   ` Maxime Ripard
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Kocialkowski @ 2018-03-25 12:36 UTC (permalink / raw)
  To: u-boot

Spam detection software, running on the system "lists.denx.de",
has identified this incoming email as possible spam.  The original
message has been attached to this so you can view it or label
similar future email.  If you have any questions, see
@@CONTACT_ADDRESS@@ for details.

Content preview:  I2C bus 1 is used for the accelerometer and i2c bus 2 for
  the touchscreen of the device. While these are not supported in U-Boot, its
   command line can be used to access these peripherals. Signed-off-by: Paul
   Kocialkowski <contact@paulk.fr> --- configs/Ainol_AW1_defconfig | 2 ++ 1
  file changed, 2 insertions(+) [...] 

Content analysis details:   (5.2 points, 5.0 required)

 pts rule name              description
---- ---------------------- --------------------------------------------------
 1.3 RCVD_IN_RP_RNBL        RBL: Relay in RNBL,
                            https://senderscore.org/blacklistlookup/
                           [77.128.107.220 listed in bl.score.senderscore.com]
 0.0 RCVD_IN_SORBS_DUL      RBL: SORBS: sent directly from dynamic IP address
                            [77.128.107.220 listed in dnsbl.sorbs.net]
 3.6 RCVD_IN_PBL            RBL: Received via a relay in Spamhaus PBL
                            [77.128.107.220 listed in zen.spamhaus.org]
 0.4 RDNS_DYNAMIC           Delivered to internal network by host with
                            dynamic-looking rDNS


-------------- next part --------------
An embedded message was scrubbed...
From: Paul Kocialkowski <contact@paulk.fr>
Subject: [PATCH 3/3] sunxi: Add extra I2C bus support to Ainol AW1 defconfig
Date: Sun, 25 Mar 2018 14:36:01 +0200
Size: 2046
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180325/d349749f/attachment.mht>

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

* [U-Boot] [PATCH 1/3] arm: dts: sun7i: Update Ainol AW1 dts
  2018-03-25 12:35 [U-Boot] [PATCH 1/3] arm: dts: sun7i: Update Ainol AW1 dts Paul Kocialkowski
  2018-03-25 12:36 ` [U-Boot] [PATCH 3/3] sunxi: Add extra I2C bus support to Ainol AW1 defconfig Paul Kocialkowski
@ 2018-03-26 11:09 ` Maxime Ripard
  2018-03-26 12:39   ` Paul Kocialkowski
  1 sibling, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2018-03-26 11:09 UTC (permalink / raw)
  To: u-boot

Hi,

On Sun, Mar 25, 2018 at 02:35:59PM +0200, Paul Kocialkowski wrote:
> This introduces a newer dts for the Ainol AW1, that will be the base for
> introducing upstream Linux support for the device.
> 
> This update in U-Boot allows fixing USB OTG detection, that was missing
> from the previous dts.
> 
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>

We usually will use the Linux DTS once it's been merged, so please
send it there first.

> ---
>  arch/arm/dts/sun7i-a20-ainol-aw1.dts | 215 ++++++++++++++++++++++++++++++++++-
>  1 file changed, 211 insertions(+), 4 deletions(-)
> 
> diff --git a/arch/arm/dts/sun7i-a20-ainol-aw1.dts b/arch/arm/dts/sun7i-a20-ainol-aw1.dts
> index 8b730cdfae..f62d67d6d6 100644
> --- a/arch/arm/dts/sun7i-a20-ainol-aw1.dts
> +++ b/arch/arm/dts/sun7i-a20-ainol-aw1.dts
> @@ -1,17 +1,57 @@
>  /*
> - * Copyright 2015 Hans de Goede <hdegoede@redhat.com>
> + * Copyright 2018 Paul Kocialkowski <contact@paulk.fr>
>   *
> - * Minimal dts file for the Ainol AW1 for u-boot only
> + * This file is dual-licensed: you can use it either under the terms
> + * of the GPL or the X11 license, at your option. Note that this dual
> + * licensing only applies to this file, and not this project as a
> + * whole.
>   *
> - * SPDX-License-Identifier:     GPL-2.0+ or X11
> + *  a) This file is free software; you can redistribute it and/or
> + *     modify it under the terms of the GNU General Public License as
> + *     published by the Free Software Foundation; either version 2 of the
> + *     License, or (at your option) any later version.
> + *
> + *     This file is distributed in the hope that it will be useful,
> + *     but WITHOUT ANY WARRANTY; without even the implied warranty of
> + *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
> + *     GNU General Public License for more details.
> + *
> + * Or, alternatively,
> + *
> + *  b) Permission is hereby granted, free of charge, to any person
> + *     obtaining a copy of this software and associated documentation
> + *     files (the "Software"), to deal in the Software without
> + *     restriction, including without limitation the rights to use,
> + *     copy, modify, merge, publish, distribute, sublicense, and/or
> + *     sell copies of the Software, and to permit persons to whom the
> + *     Software is furnished to do so, subject to the following
> + *     conditions:
> + *
> + *     The above copyright notice and this permission notice shall be
> + *     included in all copies or substantial portions of the Software.
> + *
> + *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
> + *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
> + *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
> + *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
> + *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
> + *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
> + *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
> + *     OTHER DEALINGS IN THE SOFTWARE.
>   */
>  
>  /dts-v1/;
>  #include "sun7i-a20.dtsi"
> +#include "sunxi-common-regulators.dtsi"

Since you have regulator support, you shouldn't need these anymore.

> +#include <dt-bindings/gpio/gpio.h>
> +#include <dt-bindings/input/input.h>
> +#include <dt-bindings/interrupt-controller/irq.h>
> +#include <dt-bindings/pwm/pwm.h>
>  
>  / {
>  	model = "Ainol AW1";
> -	compatible = "ainol,aw1", "allwinner,sun7i-a20";
> +	compatible = "ainol,ainol-aw1", "allwinner,sun7i-a20";
>  
>  	aliases {
>  		serial0 = &uart0;
> @@ -20,6 +60,116 @@
>  	chosen {
>  		stdout-path = "serial0:115200n8";
>  	};
> +
> +	backlight: backlight {
> +		compatible = "pwm-backlight";
> +		pinctrl-names = "default";
> +		pinctrl-0 = <&backlight_enable_pin>;
> +		pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>;
> +		brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>;
> +		default-brightness-level = <8>;
> +		enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */
> +	};
> +};
> +
> +&cpu0 {
> +	cpu-supply = <&reg_dcdc2>;
> +};
> +
> +&otg_sram {
> +	status = "okay";
> +};
> +
> +&mmc0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&mmc0_pins_a>;
> +	vmmc-supply = <&reg_vcc3v3>;
> +	bus-width = <4>;
> +	cd-gpios = <&pio 7 1 GPIO_ACTIVE_HIGH>; /* PH1 */
> +	cd-inverted;
> +	status = "okay";
> +};
> +
> +&usb_otg {
> +	dr_mode = "otg";
> +	status = "okay";
> +};
> +
> +&usbphy {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&usb0_id_detect_pin>;
> +	usb0_id_det-gpio = <&pio 7 4 GPIO_ACTIVE_HIGH>; /* PH4 */
> +	usb0_vbus_power-supply = <&usb_power_supply>;
> +	usb0_vbus-supply = <&reg_usb0_vbus>;
> +	usb1_vbus-supply = <&reg_usb1_vbus>;
> +	usb2_vbus-supply = <&reg_usb2_vbus>;
> +	status = "okay";
> +};
> +
> +&ehci0 {
> +	status = "okay";
> +};
> +
> +&ohci0 {
> +	status = "okay";
> +};
> +
> +&ehci1 {
> +	status = "okay";
> +};
> +
> +&ohci1 {
> +	status = "okay";
> +};

Your nodes should be ordered by alphabetical order (at least as much
as possible, this isn't really doable for all the AXP stuff).

> +&pio {
> +	backlight_enable_pin: backlight_enable_pin at 0 {
> +		pins = "PH7";
> +		function = "gpio_out";
> +	};
> +
> +	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
> +		pins = "PH4";
> +		function = "gpio_in";
> +		bias-pull-up;
> +	};
> +
> +	usb0_vbus_pin: usb0_vbus_pin at 0 {
> +		pins = "PB9";
> +		function = "gpio_out";
> +	};
> +};

We're trying to remove these nodes from our DTs, it's redundant since
the GPIOs will request the pin in pinctrl when being taken.

> +
> +&pwm {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&pwm0_pins_a>;
> +	status = "okay";
> +};
> +
> +&lradc {
> +	vref-supply = <&reg_vcc3v0>;
> +	status = "okay";
> +
> +	button at 571 {
> +		label = "Volume Up";
> +		linux,code = <KEY_VOLUMEUP>;
> +		channel = <0>;
> +		voltage = <571428>;
> +	};
> +
> +	button at 761 {
> +		label = "Volume Down";
> +		linux,code = <KEY_VOLUMEDOWN>;
> +		channel = <0>;
> +		voltage = <761904>;
> +	};
> +
> +	button at 952 {
> +		label = "Home";
> +		linux,code = <KEY_HOME>;
> +		channel = <0>;
> +		voltage = <952380>;
> +	};
>  };
>  
>  &uart0 {
> @@ -27,3 +177,60 @@
>  	pinctrl-0 = <&uart0_pins_a>;
>  	status = "okay";
>  };
> +
> +&i2c0 {
> +	pinctrl-names = "default";
> +	pinctrl-0 = <&i2c0_pins_a>;
> +	status = "okay";
> +
> +	axp209: pmic at 34 {
> +		reg = <0x34>;
> +		interrupt-parent = <&nmi_intc>;
> +		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> +	};
> +};
> +
> +#include "axp209.dtsi"
> +
> +&reg_dcdc2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1450000>;
> +	regulator-name = "vdd-cpu";
> +};
> +
> +&reg_dcdc3 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <1000000>;
> +	regulator-max-microvolt = <1400000>;
> +	regulator-name = "vdd-int-dll";
> +};
> +
> +&reg_ldo1 {
> +	regulator-name = "vdd-rtc";
> +};
> +
> +&reg_ldo2 {
> +	regulator-always-on;
> +	regulator-min-microvolt = <3000000>;
> +	regulator-max-microvolt = <3000000>;
> +	regulator-name = "avcc";
> +};
> +
> +&reg_usb0_vbus {
> +	pinctrl-0 = <&usb0_vbus_pin>;
> +	gpio = <&pio 1 9 GPIO_ACTIVE_HIGH>; /*PB9 */
> +	status = "okay";
> +};
> +
> +&reg_usb1_vbus {
> +	status = "okay";
> +};
> +
> +&reg_usb2_vbus {
> +	status = "okay";
> +};
> +
> +&usb_power_supply {
> +	status = "okay";
> +};
> -- 
> 2.16.2
> 

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180326/58981aef/attachment.sig>

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

* [U-Boot] [PATCH 3/3] sunxi: Add extra I2C bus support to Ainol AW1 defconfig
  2018-03-25 12:36 ` [U-Boot] [PATCH 3/3] sunxi: Add extra I2C bus support to Ainol AW1 defconfig Paul Kocialkowski
@ 2018-03-26 11:10   ` Maxime Ripard
  2018-03-26 12:34     ` Paul Kocialkowski
  0 siblings, 1 reply; 7+ messages in thread
From: Maxime Ripard @ 2018-03-26 11:10 UTC (permalink / raw)
  To: u-boot

On Sun, Mar 25, 2018 at 02:36:01PM +0200, Paul Kocialkowski wrote:
> I2C bus 1 is used for the accelerometer and i2c bus 2 for the
> touchscreen of the device. While these are not supported in U-Boot, its
> command line can be used to access these peripherals.
> 
> Signed-off-by: Paul Kocialkowski <contact@paulk.fr>

I'm not sure what the use case would be for U-Boot though. I guess you
can always enable it through menuconfig if you really want it, but
there's no real need for it in the default configuration.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180326/b6b6d2e3/attachment.sig>

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

* [U-Boot] [PATCH 3/3] sunxi: Add extra I2C bus support to Ainol AW1 defconfig
  2018-03-26 11:10   ` Maxime Ripard
@ 2018-03-26 12:34     ` Paul Kocialkowski
  0 siblings, 0 replies; 7+ messages in thread
From: Paul Kocialkowski @ 2018-03-26 12:34 UTC (permalink / raw)
  To: u-boot

Hi,

On Mon, 2018-03-26 at 13:10 +0200, Maxime Ripard wrote:
> On Sun, Mar 25, 2018 at 02:36:01PM +0200, Paul Kocialkowski wrote:
> > I2C bus 1 is used for the accelerometer and i2c bus 2 for the
> > touchscreen of the device. While these are not supported in U-Boot,
> > its
> > command line can be used to access these peripherals.
> > 
> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> 
> I'm not sure what the use case would be for U-Boot though. I guess you
> can always enable it through menuconfig if you really want it, but
> there's no real need for it in the default configuration.

Fair enough, I'll drop this patch.

Cheers,

-- 
Paul Kocialkowski, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180326/f04493e3/attachment.sig>

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

* [U-Boot] [PATCH 1/3] arm: dts: sun7i: Update Ainol AW1 dts
  2018-03-26 11:09 ` [U-Boot] [PATCH 1/3] arm: dts: sun7i: Update Ainol AW1 dts Maxime Ripard
@ 2018-03-26 12:39   ` Paul Kocialkowski
  2018-03-26 13:13     ` Maxime Ripard
  0 siblings, 1 reply; 7+ messages in thread
From: Paul Kocialkowski @ 2018-03-26 12:39 UTC (permalink / raw)
  To: u-boot

Hi,

On Mon, 2018-03-26 at 13:09 +0200, Maxime Ripard wrote:
> Hi,
> 
> On Sun, Mar 25, 2018 at 02:35:59PM +0200, Paul Kocialkowski wrote:
> > This introduces a newer dts for the Ainol AW1, that will be the base
> > for
> > introducing upstream Linux support for the device.
> > 
> > This update in U-Boot allows fixing USB OTG detection, that was
> > missing
> > from the previous dts.
> > 
> > Signed-off-by: Paul Kocialkowski <contact@paulk.fr>
> 
> We usually will use the Linux DTS once it's been merged, so please
> send it there first.

Sure thing!

[...]

> Your nodes should be ordered by alphabetical order (at least as much
> as possible, this isn't really doable for all the AXP stuff).

I tried to preserve the order from the sun7i-a20.dtsi file, which felt
like the most straightforward thing to do.

Is there any particlar reason why things should be sorted
alphabetically? It feels like it has the potential to explode related
blocs in different areas of the file, thus reducing readability (like
you've mentioned for the AXP).

> > +&pio {
> > +	backlight_enable_pin: backlight_enable_pin at 0 {
> > +		pins = "PH7";
> > +		function = "gpio_out";
> > +	};
> > +
> > +	usb0_id_detect_pin: usb0_id_detect_pin at 0 {
> > +		pins = "PH4";
> > +		function = "gpio_in";
> > +		bias-pull-up;
> > +	};
> > +
> > +	usb0_vbus_pin: usb0_vbus_pin at 0 {
> > +		pins = "PB9";
> > +		function = "gpio_out";
> > +	};
> > +};
> 
> We're trying to remove these nodes from our DTs, it's redundant since
> the GPIOs will request the pin in pinctrl when being taken.
> 
> > +
> > +&pwm {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&pwm0_pins_a>;
> > +	status = "okay";
> > +};
> > +
> > +&lradc {
> > +	vref-supply = <&reg_vcc3v0>;
> > +	status = "okay";
> > +
> > +	button at 571 {
> > +		label = "Volume Up";
> > +		linux,code = <KEY_VOLUMEUP>;
> > +		channel = <0>;
> > +		voltage = <571428>;
> > +	};
> > +
> > +	button at 761 {
> > +		label = "Volume Down";
> > +		linux,code = <KEY_VOLUMEDOWN>;
> > +		channel = <0>;
> > +		voltage = <761904>;
> > +	};
> > +
> > +	button at 952 {
> > +		label = "Home";
> > +		linux,code = <KEY_HOME>;
> > +		channel = <0>;
> > +		voltage = <952380>;
> > +	};
> >  };
> >  
> >  &uart0 {
> > @@ -27,3 +177,60 @@
> >  	pinctrl-0 = <&uart0_pins_a>;
> >  	status = "okay";
> >  };
> > +
> > +&i2c0 {
> > +	pinctrl-names = "default";
> > +	pinctrl-0 = <&i2c0_pins_a>;
> > +	status = "okay";
> > +
> > +	axp209: pmic at 34 {
> > +		reg = <0x34>;
> > +		interrupt-parent = <&nmi_intc>;
> > +		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
> > +	};
> > +};
> > +
> > +#include "axp209.dtsi"
> > +
> > +&reg_dcdc2 {
> > +	regulator-always-on;
> > +	regulator-min-microvolt = <1000000>;
> > +	regulator-max-microvolt = <1450000>;
> > +	regulator-name = "vdd-cpu";
> > +};
> > +
> > +&reg_dcdc3 {
> > +	regulator-always-on;
> > +	regulator-min-microvolt = <1000000>;
> > +	regulator-max-microvolt = <1400000>;
> > +	regulator-name = "vdd-int-dll";
> > +};
> > +
> > +&reg_ldo1 {
> > +	regulator-name = "vdd-rtc";
> > +};
> > +
> > +&reg_ldo2 {
> > +	regulator-always-on;
> > +	regulator-min-microvolt = <3000000>;
> > +	regulator-max-microvolt = <3000000>;
> > +	regulator-name = "avcc";
> > +};
> > +
> > +&reg_usb0_vbus {
> > +	pinctrl-0 = <&usb0_vbus_pin>;
> > +	gpio = <&pio 1 9 GPIO_ACTIVE_HIGH>; /*PB9 */
> > +	status = "okay";
> > +};
> > +
> > +&reg_usb1_vbus {
> > +	status = "okay";
> > +};
> > +
> > +&reg_usb2_vbus {
> > +	status = "okay";
> > +};
> > +
> > +&usb_power_supply {
> > +	status = "okay";
> > +};
> > -- 
> > 2.16.2
> > 
> 
> 
-- 
Paul Kocialkowski, Bootlin (formerly Free Electrons)
Embedded Linux and kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 488 bytes
Desc: This is a digitally signed message part
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180326/eca54cf7/attachment.sig>

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

* [U-Boot] [PATCH 1/3] arm: dts: sun7i: Update Ainol AW1 dts
  2018-03-26 12:39   ` Paul Kocialkowski
@ 2018-03-26 13:13     ` Maxime Ripard
  0 siblings, 0 replies; 7+ messages in thread
From: Maxime Ripard @ 2018-03-26 13:13 UTC (permalink / raw)
  To: u-boot

On Mon, Mar 26, 2018 at 02:39:23PM +0200, Paul Kocialkowski wrote:
> > Your nodes should be ordered by alphabetical order (at least as much
> > as possible, this isn't really doable for all the AXP stuff).
> 
> I tried to preserve the order from the sun7i-a20.dtsi file, which felt
> like the most straightforward thing to do.
>
> Is there any particlar reason why things should be sorted
> alphabetically? It feels like it has the potential to explode related
> blocs in different areas of the file, thus reducing readability (like
> you've mentioned for the AXP).

It's what we're doing everywhere else would be a great reason :)

The second, and the reason we actually did this in the first place, is
that it's self sufficient, you don't need to rely on any other DTSI
file to know which order you're suppose to have.

That becomes especially tricky when you're merging various DTSI
together (which order should comes first?), or when you don't always
access a node to the same depth (ie tcon vs tcon_out).

While alphabetical order is easy to understand, follow and to check
during the reviews.

Maxime


-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
https://bootlin.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: not available
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20180326/edb88ef1/attachment.sig>

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

end of thread, other threads:[~2018-03-26 13:13 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-25 12:35 [U-Boot] [PATCH 1/3] arm: dts: sun7i: Update Ainol AW1 dts Paul Kocialkowski
2018-03-25 12:36 ` [U-Boot] [PATCH 3/3] sunxi: Add extra I2C bus support to Ainol AW1 defconfig Paul Kocialkowski
2018-03-26 11:10   ` Maxime Ripard
2018-03-26 12:34     ` Paul Kocialkowski
2018-03-26 11:09 ` [U-Boot] [PATCH 1/3] arm: dts: sun7i: Update Ainol AW1 dts Maxime Ripard
2018-03-26 12:39   ` Paul Kocialkowski
2018-03-26 13:13     ` Maxime Ripard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.