2019-05-10 15:54:58

by Jerome Brunet

[permalink] [raw]
Subject: [PATCH 1/2] arm64: dts: meson: sei510: consistently order nodes

Like order boards, order nodes by address then node names then aliases.

Signed-off-by: Jerome Brunet <[email protected]>
---
.../boot/dts/amlogic/meson-g12a-sei510.dts | 92 +++++++++----------
1 file changed, 46 insertions(+), 46 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
index 34b40587e5ef..61fb30047d7f 100644
--- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
@@ -14,10 +14,6 @@
compatible = "seirobotics,sei510", "amlogic,g12a";
model = "SEI Robotics SEI510";

- aliases {
- serial0 = &uart_AO;
- };
-
adc_keys {
compatible = "adc-keys";
io-channels = <&saradc 0>;
@@ -31,13 +27,8 @@
};
};

- ao_5v: regulator-ao_5v {
- compatible = "regulator-fixed";
- regulator-name = "AO_5V";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- vin-supply = <&dc_in>;
- regulator-always-on;
+ aliases {
+ serial0 = &uart_AO;
};

chosen {
@@ -54,23 +45,6 @@
};
};

- dc_in: regulator-dc_in {
- compatible = "regulator-fixed";
- regulator-name = "DC_IN";
- regulator-min-microvolt = <5000000>;
- regulator-max-microvolt = <5000000>;
- regulator-always-on;
- };
-
- emmc_1v8: regulator-emmc_1v8 {
- compatible = "regulator-fixed";
- regulator-name = "EMMC_1V8";
- regulator-min-microvolt = <1800000>;
- regulator-max-microvolt = <1800000>;
- vin-supply = <&vddao_3v3>;
- regulator-always-on;
- };
-
hdmi-connector {
compatible = "hdmi-connector";
type = "a";
@@ -87,12 +61,30 @@
reg = <0x0 0x0 0x0 0x40000000>;
};

- reserved-memory {
- /* TEE Reserved Memory */
- bl32_reserved: bl32@5000000 {
- reg = <0x0 0x05300000 0x0 0x2000000>;
- no-map;
- };
+ ao_5v: regulator-ao_5v {
+ compatible = "regulator-fixed";
+ regulator-name = "AO_5V";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ vin-supply = <&dc_in>;
+ regulator-always-on;
+ };
+
+ dc_in: regulator-dc_in {
+ compatible = "regulator-fixed";
+ regulator-name = "DC_IN";
+ regulator-min-microvolt = <5000000>;
+ regulator-max-microvolt = <5000000>;
+ regulator-always-on;
+ };
+
+ emmc_1v8: regulator-emmc_1v8 {
+ compatible = "regulator-fixed";
+ regulator-name = "EMMC_1V8";
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ vin-supply = <&vddao_3v3>;
+ regulator-always-on;
};

vddao_3v3: regulator-vddao_3v3 {
@@ -122,6 +114,14 @@
vin-supply = <&vddao_3v3>;
regulator-always-on;
};
+
+ reserved-memory {
+ /* TEE Reserved Memory */
+ bl32_reserved: bl32@5000000 {
+ reg = <0x0 0x05300000 0x0 0x2000000>;
+ no-map;
+ };
+ };
};

&cec_AO {
@@ -144,6 +144,18 @@
};
};

+&hdmi_tx {
+ status = "okay";
+ pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
+ pinctrl-names = "default";
+};
+
+&hdmi_tx_tmds_port {
+ hdmi_tx_tmds_out: endpoint {
+ remote-endpoint = <&hdmi_connector_in>;
+ };
+};
+
&saradc {
status = "okay";
vref-supply = <&vddio_ao1v8>;
@@ -161,18 +173,6 @@
};
};

-&hdmi_tx {
- status = "okay";
- pinctrl-0 = <&hdmitx_hpd_pins>, <&hdmitx_ddc_pins>;
- pinctrl-names = "default";
-};
-
-&hdmi_tx_tmds_port {
- hdmi_tx_tmds_out: endpoint {
- remote-endpoint = <&hdmi_connector_in>;
- };
-};
-
&uart_AO {
status = "okay";
pinctrl-0 = <&uart_ao_a_pins>;
--
2.20.1


2019-05-10 21:44:58

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH 1/2] arm64: dts: meson: sei510: consistently order nodes

Jerome Brunet <[email protected]> writes:

> Like order boards, order nodes by address then node names then aliases.
>
> Signed-off-by: Jerome Brunet <[email protected]>
> ---
> .../boot/dts/amlogic/meson-g12a-sei510.dts | 92 +++++++++----------
> 1 file changed, 46 insertions(+), 46 deletions(-)
>
> diff --git a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
> index 34b40587e5ef..61fb30047d7f 100644
> --- a/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
> +++ b/arch/arm64/boot/dts/amlogic/meson-g12a-sei510.dts
> @@ -14,10 +14,6 @@
> compatible = "seirobotics,sei510", "amlogic,g12a";
> model = "SEI Robotics SEI510";
>
> - aliases {
> - serial0 = &uart_AO;
> - };
> -
> adc_keys {
> compatible = "adc-keys";
> io-channels = <&saradc 0>;
> @@ -31,13 +27,8 @@
> };
> };
>
> - ao_5v: regulator-ao_5v {
> - compatible = "regulator-fixed";
> - regulator-name = "AO_5V";
> - regulator-min-microvolt = <5000000>;
> - regulator-max-microvolt = <5000000>;
> - vin-supply = <&dc_in>;
> - regulator-always-on;
> + aliases {
> + serial0 = &uart_AO;
> };

minor nit: I kind of like "aliases" and "chosen" at the top since they
are kind of special nodes, but honestly, I can't think of a really good
reason other than personal preference, so keeping things sorted as
you've done here is probably better.

Kevin

2019-05-11 15:54:02

by Jerome Brunet

[permalink] [raw]
Subject: Re: [PATCH 1/2] arm64: dts: meson: sei510: consistently order nodes

On Fri, 2019-05-10 at 14:43 -0700, Kevin Hilman wrote:
> minor nit: I kind of like "aliases" and "chosen" at the top since they
> are kind of special nodes, but honestly, I can't think of a really good
> reason other than personal preference, so keeping things sorted as
> you've done here is probably better.
>

You thought the same, then thought maybe memory was important too. But going
down that path, you end up sorting by feeling. It is going to be difficult
to all agree on which nodes are special.

In the end, we just want/need something that is easy to respect and verify.

> Kevin


2019-05-13 09:41:40

by Neil Armstrong

[permalink] [raw]
Subject: Re: [PATCH 1/2] arm64: dts: meson: sei510: consistently order nodes

On 11/05/2019 17:52, Jerome Brunet wrote:
> On Fri, 2019-05-10 at 14:43 -0700, Kevin Hilman wrote:
>> minor nit: I kind of like "aliases" and "chosen" at the top since they
>> are kind of special nodes, but honestly, I can't think of a really good
>> reason other than personal preference, so keeping things sorted as
>> you've done here is probably better.
>>
>
> You thought the same, then thought maybe memory was important too. But going
> down that path, you end up sorting by feeling. It is going to be difficult
> to all agree on which nodes are special.
>
> In the end, we just want/need something that is easy to respect and verify.

I think it would be better to have the same layout for aliases and memory over
all the amlogic DTS, it's common over all socs to have these nodes on top.

Neil

>
>> Kevin
>
>
>
> _______________________________________________
> linux-amlogic mailing list
> [email protected]
> http://lists.infradead.org/mailman/listinfo/linux-amlogic
>

2019-05-13 23:42:04

by Kevin Hilman

[permalink] [raw]
Subject: Re: [PATCH 1/2] arm64: dts: meson: sei510: consistently order nodes

Neil Armstrong <[email protected]> writes:

> On 11/05/2019 17:52, Jerome Brunet wrote:
>> On Fri, 2019-05-10 at 14:43 -0700, Kevin Hilman wrote:
>>> minor nit: I kind of like "aliases" and "chosen" at the top since they
>>> are kind of special nodes, but honestly, I can't think of a really good
>>> reason other than personal preference, so keeping things sorted as
>>> you've done here is probably better.
>>>
>>
>> You thought the same, then thought maybe memory was important too. But going
>> down that path, you end up sorting by feeling. It is going to be difficult
>> to all agree on which nodes are special.
>>
>> In the end, we just want/need something that is easy to respect and verify.
>
> I think it would be better to have the same layout for aliases and memory over
> all the amlogic DTS, it's common over all socs to have these nodes on top.

aliases, chosen, memory and reserved-memory are ones that are typically
on the top for convience sake, but looking around we have not been
terribly consistent there either.

At this point, to continue the tradition, I'm not going to be too picky
about enforcing "standards" that are loosely defined (or undefined) and
will generally accept cleanups that are moving us towards consistency
and ease of rebasing.

Kevin