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

2018-12-03 Thread Olof Johansson
On Mon, Dec 3, 2018 at 9:21 AM Rob Herring  wrote:
>
> On Mon, Dec 3, 2018 at 11:11 AM Olof Johansson  wrote:
> >
> > On Mon, Dec 3, 2018 at 7:54 AM Rob Herring  wrote:
> > >
> > > On Tue, Nov 20, 2018 at 9:38 PM Manivannan Sadhasivam
> > >  wrote:
> > > >
> > > > Add initial devicetree support for OrangePi 2G IoT board from Xunlong.
> > > >
> > > > Signed-off-by: Andreas Färber 
> > > > Signed-off-by: Manivannan Sadhasivam 
> > > > ---
> > > >  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


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

2018-12-03 Thread Rob Herring
On Mon, Dec 3, 2018 at 11:11 AM Olof Johansson  wrote:
>
> On Mon, Dec 3, 2018 at 7:54 AM Rob Herring  wrote:
> >
> > On Tue, Nov 20, 2018 at 9:38 PM Manivannan Sadhasivam
> >  wrote:
> > >
> > > Add initial devicetree support for OrangePi 2G IoT board from Xunlong.
> > >
> > > Signed-off-by: Andreas Färber 
> > > Signed-off-by: Manivannan Sadhasivam 
> > > ---
> > >  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


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

2018-12-03 Thread Olof Johansson
On Mon, Dec 3, 2018 at 7:54 AM Rob Herring  wrote:
>
> On Tue, Nov 20, 2018 at 9:38 PM Manivannan Sadhasivam
>  wrote:
> >
> > Add initial devicetree support for OrangePi 2G IoT board from Xunlong.
> >
> > Signed-off-by: Andreas Färber 
> > Signed-off-by: Manivannan Sadhasivam 
> > ---
> >  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.


-Olof


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

2018-12-03 Thread Rob Herring
On Tue, Nov 20, 2018 at 9:38 PM Manivannan Sadhasivam
 wrote:
>
> Add initial devicetree support for OrangePi 2G IoT board from Xunlong.
>
> Signed-off-by: Andreas Färber 
> Signed-off-by: Manivannan Sadhasivam 
> ---
>  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


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

2018-11-21 Thread Arnd Bergmann
On Wed, Nov 21, 2018 at 4:38 AM Manivannan Sadhasivam
 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


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

2018-11-20 Thread Manivannan Sadhasivam
Add initial devicetree support for OrangePi 2G IoT board from Xunlong.

Signed-off-by: Andreas Färber 
Signed-off-by: Manivannan Sadhasivam 
---
 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) += \
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 ..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@8000 {
+   device_type = "memory";
+   reg = <0x8000 0x1000>;
+   };
+
+   uart2_clk: uart2-clk {
+   compatible = "fixed-clock";
+   clock-frequency = <921600>;
+   #clock-cells = <0>;
+   };
+};
+
+&uart2 {
+   status = "okay";
+   clocks = <&uart2_clk>;
+};
-- 
2.17.1