[v2,06/15] arm: dts: Add devicetree for OrangePi 2G IoT board

Message ID 20181121033652.12247-7-manivannan.sadhasivam@linaro.org
State Superseded
Headers show
Series
  • Add initial RDA8810PL SoC and Orange Pi boards support
Related show

Commit Message

Manivannan Sadhasivam Nov. 21, 2018, 3:36 a.m.
Add initial devicetree support for OrangePi 2G IoT board from Xunlong.

Signed-off-by: Andreas Färber <afaerber@suse.de>

Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

---
 arch/arm/boot/dts/Makefile                    |  2 +
 .../boot/dts/rda8810pl-orangepi-2g-iot.dts    | 40 +++++++++++++++++++
 2 files changed, 42 insertions(+)
 create mode 100644 arch/arm/boot/dts/rda8810pl-orangepi-2g-iot.dts

-- 
2.17.1

Comments

Arnd Bergmann Nov. 21, 2018, 8:55 a.m. | #1
On Wed, Nov 21, 2018 at 4:38 AM Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> wrote:
> +       aliases {

> +               serial0 = &uart0;

> +               serial1 = &uart1;

> +               serial2 = &uart2;

> +       };

>

+
> +&uart2 {

> +       status = "okay";

> +       clocks = <&uart2_clk>;

> +};


This is clearly mismatched here: you mark only one uart as 'enabled, but
list three of them as aliases. Having 'serial0' point to a disabled uart
may easily break applications that expect the first one to be the
console.

Best make that

       serial0 = &uart2;

and drop the other ones if only one of them is exposed on the
board. If all three are usable, you should enable them all here,
and make sure that the numbering of the aliases matches the
labels on the board or its documentation.

        Arnd
Rob Herring Dec. 3, 2018, 3:53 p.m. | #2
On Tue, Nov 20, 2018 at 9:38 PM Manivannan Sadhasivam
<manivannan.sadhasivam@linaro.org> wrote:
>

> Add initial devicetree support for OrangePi 2G IoT board from Xunlong.

>

> Signed-off-by: Andreas Färber <afaerber@suse.de>

> Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

> ---

>  arch/arm/boot/dts/Makefile                    |  2 +

>  .../boot/dts/rda8810pl-orangepi-2g-iot.dts    | 40 +++++++++++++++++++

>  2 files changed, 42 insertions(+)

>  create mode 100644 arch/arm/boot/dts/rda8810pl-orangepi-2g-iot.dts

>

> diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile

> index b0e966d625b9..a0fdad8f10dd 100644

> --- a/arch/arm/boot/dts/Makefile

> +++ b/arch/arm/boot/dts/Makefile

> @@ -806,6 +806,8 @@ dtb-$(CONFIG_ARCH_QCOM) += \

>         qcom-msm8974-sony-xperia-castor.dtb \

>         qcom-msm8974-sony-xperia-honami.dtb \

>         qcom-mdm9615-wp8548-mangoh-green.dtb

> +dtb-$(CONFIG_ARCH_RDA) += \

> +       rda8810pl-orangepi-2g-iot.dtb

>  dtb-$(CONFIG_ARCH_REALVIEW) += \


Question for Arnd/Olof: can we *please* start putting new SoC families
in sub-dirs?

Rob
Rob Herring Dec. 3, 2018, 5:21 p.m. | #3
On Mon, Dec 3, 2018 at 11:11 AM Olof Johansson <olof@lixom.net> wrote:
>

> On Mon, Dec 3, 2018 at 7:54 AM Rob Herring <robh+dt@kernel.org> wrote:

> >

> > On Tue, Nov 20, 2018 at 9:38 PM Manivannan Sadhasivam

> > <manivannan.sadhasivam@linaro.org> wrote:

> > >

> > > Add initial devicetree support for OrangePi 2G IoT board from Xunlong.

> > >

> > > Signed-off-by: Andreas Färber <afaerber@suse.de>

> > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

> > > ---

> > >  arch/arm/boot/dts/Makefile                    |  2 +

> > >  .../boot/dts/rda8810pl-orangepi-2g-iot.dts    | 40 +++++++++++++++++++

> > >  2 files changed, 42 insertions(+)

> > >  create mode 100644 arch/arm/boot/dts/rda8810pl-orangepi-2g-iot.dts

> > >

> > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile

> > > index b0e966d625b9..a0fdad8f10dd 100644

> > > --- a/arch/arm/boot/dts/Makefile

> > > +++ b/arch/arm/boot/dts/Makefile

> > > @@ -806,6 +806,8 @@ dtb-$(CONFIG_ARCH_QCOM) += \

> > >         qcom-msm8974-sony-xperia-castor.dtb \

> > >         qcom-msm8974-sony-xperia-honami.dtb \

> > >         qcom-mdm9615-wp8548-mangoh-green.dtb

> > > +dtb-$(CONFIG_ARCH_RDA) += \

> > > +       rda8810pl-orangepi-2g-iot.dtb

> > >  dtb-$(CONFIG_ARCH_REALVIEW) += \

> >

> > Question for Arnd/Olof: can we *please* start putting new SoC families

> > in sub-dirs?

>

> I think we're at a point where it's becoming quite awkward to keep it

> in a flat directory, yes.

>

> Best way to handle this is usually right before the closing of a merge

> window, so let's do it then. It'll be a conflict-ridden mess if we try

> to stage something in -next, so I'd rather just do it directly in our

> tree as a one-shot thing.


While I'd like to see the whole thing converted, I was only asking
about this one platform. That should be doable now, right?

Rob
Olof Johansson Dec. 3, 2018, 5:53 p.m. | #4
On Mon, Dec 3, 2018 at 9:21 AM Rob Herring <robh+dt@kernel.org> wrote:
>

> On Mon, Dec 3, 2018 at 11:11 AM Olof Johansson <olof@lixom.net> wrote:

> >

> > On Mon, Dec 3, 2018 at 7:54 AM Rob Herring <robh+dt@kernel.org> wrote:

> > >

> > > On Tue, Nov 20, 2018 at 9:38 PM Manivannan Sadhasivam

> > > <manivannan.sadhasivam@linaro.org> wrote:

> > > >

> > > > Add initial devicetree support for OrangePi 2G IoT board from Xunlong.

> > > >

> > > > Signed-off-by: Andreas Färber <afaerber@suse.de>

> > > > Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>

> > > > ---

> > > >  arch/arm/boot/dts/Makefile                    |  2 +

> > > >  .../boot/dts/rda8810pl-orangepi-2g-iot.dts    | 40 +++++++++++++++++++

> > > >  2 files changed, 42 insertions(+)

> > > >  create mode 100644 arch/arm/boot/dts/rda8810pl-orangepi-2g-iot.dts

> > > >

> > > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile

> > > > index b0e966d625b9..a0fdad8f10dd 100644

> > > > --- a/arch/arm/boot/dts/Makefile

> > > > +++ b/arch/arm/boot/dts/Makefile

> > > > @@ -806,6 +806,8 @@ dtb-$(CONFIG_ARCH_QCOM) += \

> > > >         qcom-msm8974-sony-xperia-castor.dtb \

> > > >         qcom-msm8974-sony-xperia-honami.dtb \

> > > >         qcom-mdm9615-wp8548-mangoh-green.dtb

> > > > +dtb-$(CONFIG_ARCH_RDA) += \

> > > > +       rda8810pl-orangepi-2g-iot.dtb

> > > >  dtb-$(CONFIG_ARCH_REALVIEW) += \

> > >

> > > Question for Arnd/Olof: can we *please* start putting new SoC families

> > > in sub-dirs?

> >

> > I think we're at a point where it's becoming quite awkward to keep it

> > in a flat directory, yes.

> >

> > Best way to handle this is usually right before the closing of a merge

> > window, so let's do it then. It'll be a conflict-ridden mess if we try

> > to stage something in -next, so I'd rather just do it directly in our

> > tree as a one-shot thing.

>

> While I'd like to see the whole thing converted, I was only asking

> about this one platform. That should be doable now, right?


I'd rather apply this to current scheme and then move everything once,
instead of having maintainers go "Oh, I guess I need to move mine" and
we end up with an onslaught of conflicting pull requests to move
things apart.


-Olof

Patch

diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
index b0e966d625b9..a0fdad8f10dd 100644
--- a/arch/arm/boot/dts/Makefile
+++ b/arch/arm/boot/dts/Makefile
@@ -806,6 +806,8 @@  dtb-$(CONFIG_ARCH_QCOM) += \
 	qcom-msm8974-sony-xperia-castor.dtb \
 	qcom-msm8974-sony-xperia-honami.dtb \
 	qcom-mdm9615-wp8548-mangoh-green.dtb
+dtb-$(CONFIG_ARCH_RDA) += \
+	rda8810pl-orangepi-2g-iot.dtb
 dtb-$(CONFIG_ARCH_REALVIEW) += \
 	arm-realview-pb1176.dtb \
 	arm-realview-pb11mp.dtb \
diff --git a/arch/arm/boot/dts/rda8810pl-orangepi-2g-iot.dts b/arch/arm/boot/dts/rda8810pl-orangepi-2g-iot.dts
new file mode 100644
index 000000000000..5e5bd0542e0c
--- /dev/null
+++ b/arch/arm/boot/dts/rda8810pl-orangepi-2g-iot.dts
@@ -0,0 +1,40 @@ 
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Copyright (c) 2017 Andreas Färber
+ * Copyright (c) 2018 Manivannan Sadhasivam
+ */
+
+/dts-v1/;
+
+#include "rda8810pl.dtsi"
+
+/ {
+	compatible = "xunlong,orangepi-2g-iot", "rda,8810pl";
+	model = "Orange Pi 2G-IoT";
+
+	aliases {
+		serial0 = &uart0;
+		serial1 = &uart1;
+		serial2 = &uart2;
+	};
+
+	chosen {
+		stdout-path = "serial2:921600n8";
+	};
+
+	memory@80000000 {
+		device_type = "memory";
+		reg = <0x80000000 0x10000000>;
+	};
+
+	uart2_clk: uart2-clk {
+		compatible = "fixed-clock";
+		clock-frequency = <921600>;
+		#clock-cells = <0>;
+	};
+};
+
+&uart2 {
+	status = "okay";
+	clocks = <&uart2_clk>;
+};