diff mbox series

[2/5] arm64: dts: rockchip: Add DT for NanoPi M4

Message ID 324b75bbeef2552ddde62f4e1834ac908a45bebd.1546981251.git.robin.murphy@arm.com (mailing list archive)
State New, archived
Headers show
Series NanoPC-T4 (and a bit of NanoPi M4) support | expand

Commit Message

Robin Murphy Jan. 8, 2019, 9:57 p.m. UTC
There are a number of subtle differences between the nanopi4 variants,
and where they disagree, the common DTSI currently follows the details
of NanoPi M4. In order to improve matters even more, let's add a
separate DTS for the M4 to which we can start splitting things out
appropriately. The third variant, NanoPi NEO4, is a lot closer to the M4
than either is to the larger T4, so arguably could get away with just
sharing the M4 DT for now (plus I have neither of the smaller boards to
actually test with).

Signed-off-by: Robin Murphy <robin.murphy@arm.com>
---
 .../devicetree/bindings/arm/rockchip.yaml      |  5 +++++
 arch/arm64/boot/dts/rockchip/Makefile          |  1 +
 .../boot/dts/rockchip/rk3399-nanopi-m4.dts     | 18 ++++++++++++++++++
 3 files changed, 24 insertions(+)
 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts

Comments

Heiko Stübner Jan. 8, 2019, 10:15 p.m. UTC | #1
Hi Robin,

Am Dienstag, 8. Januar 2019, 22:57:24 CET schrieb Robin Murphy:
> There are a number of subtle differences between the nanopi4 variants,
> and where they disagree, the common DTSI currently follows the details
> of NanoPi M4. In order to improve matters even more, let's add a
> separate DTS for the M4 to which we can start splitting things out
> appropriately. The third variant, NanoPi NEO4, is a lot closer to the M4
> than either is to the larger T4, so arguably could get away with just
> sharing the M4 DT for now (plus I have neither of the smaller boards to
> actually test with).
> 
> Signed-off-by: Robin Murphy <robin.murphy@arm.com>

I'm not sure if Rob actually checks the devicetree list or relies on
patches Cc'ed directly to him for binding review, so you might want
to add the 2 dt maintainers explicitly.

> ---
>  .../devicetree/bindings/arm/rockchip.yaml      |  5 +++++
>  arch/arm64/boot/dts/rockchip/Makefile          |  1 +
>  .../boot/dts/rockchip/rk3399-nanopi-m4.dts     | 18 ++++++++++++++++++
>  3 files changed, 24 insertions(+)
>  create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts
> 
> diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
> index bcc60c492a12..b4756e0cb7d0 100644
> --- a/Documentation/devicetree/bindings/arm/rockchip.yaml
> +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
> @@ -92,6 +92,11 @@ properties:
>            - const: friendlyarm,nanopc-t4
>            - const: rockchip,rk3399
>  
> +      - description: FriendlyElec NanoPi M4
> +        items:
> +          - const: friendlyarm,nanopi-m4
> +          - const: rockchip,rk3399
> +

When we hashed out the Rockchip yaml thingy, there also
came up the possibility of grouping the similar boards together
into an enum, see the rk3399-firefly or the rk3288-evb-* for example.

So the binding for both could possibly become:

      - description: FriendlyElec NanoPi
        items:
	  - enum:
          	- friendlyarm,nanopi-m4
          	- friendlyarm,nanopi-t4
          - const: rockchip,rk3399

We didn't come up with a hard rule for all cases, but the
Nano PI feels like it qualifies ;-)


Heiko



>        - description: GeekBuying GeekBox
>          items:
>            - const: geekbuying,geekbox
> diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
> index 1c7406111dfd..91a669378605 100644
> --- a/arch/arm64/boot/dts/rockchip/Makefile
> +++ b/arch/arm64/boot/dts/rockchip/Makefile
> @@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
>  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-inx.dtb
>  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-kd.dtb
>  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopc-t4.dtb
> +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4.dtb
>  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
>  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb
>  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock960.dtb
> diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts
> new file mode 100644
> index 000000000000..8d3f0ba29c72
> --- /dev/null
> +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts
> @@ -0,0 +1,18 @@
> +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
> +/*
> + * FriendlyElec NanoPi M4 board device tree source
> + *
> + * Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
> + * (http://www.friendlyarm.com)
> + *
> + * Copyright (c) 2018 Collabora Ltd.
> + * Copyright (c) 2019 Arm Ltd.
> + */
> +
> +/dts-v1/;
> +#include "rk3399-nanopi4.dtsi"
> +
> +/ {
> +	model = "FriendlyElec NanoPi M4";
> +	compatible = "friendlyarm,nanopi-m4", "rockchip,rk3399";
> +};
>
Robin Murphy Jan. 8, 2019, 10:35 p.m. UTC | #2
Hi Heiko,

On 2019-01-08 10:15 pm, Heiko Stuebner wrote:
> Hi Robin,
> 
> Am Dienstag, 8. Januar 2019, 22:57:24 CET schrieb Robin Murphy:
>> There are a number of subtle differences between the nanopi4 variants,
>> and where they disagree, the common DTSI currently follows the details
>> of NanoPi M4. In order to improve matters even more, let's add a
>> separate DTS for the M4 to which we can start splitting things out
>> appropriately. The third variant, NanoPi NEO4, is a lot closer to the M4
>> than either is to the larger T4, so arguably could get away with just
>> sharing the M4 DT for now (plus I have neither of the smaller boards to
>> actually test with).
>>
>> Signed-off-by: Robin Murphy <robin.murphy@arm.com>
> 
> I'm not sure if Rob actually checks the devicetree list or relies on
> patches Cc'ed directly to him for binding review, so you might want
> to add the 2 dt maintainers explicitly.

Er, that's embarassing... I somehow failed to register that my mindless 
copy-paste job ends up adding a new binding that *isn't* the one Rob 
already reviewed :(

>> ---
>>   .../devicetree/bindings/arm/rockchip.yaml      |  5 +++++
>>   arch/arm64/boot/dts/rockchip/Makefile          |  1 +
>>   .../boot/dts/rockchip/rk3399-nanopi-m4.dts     | 18 ++++++++++++++++++
>>   3 files changed, 24 insertions(+)
>>   create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts
>>
>> diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
>> index bcc60c492a12..b4756e0cb7d0 100644
>> --- a/Documentation/devicetree/bindings/arm/rockchip.yaml
>> +++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
>> @@ -92,6 +92,11 @@ properties:
>>             - const: friendlyarm,nanopc-t4
>>             - const: rockchip,rk3399
>>   
>> +      - description: FriendlyElec NanoPi M4
>> +        items:
>> +          - const: friendlyarm,nanopi-m4
>> +          - const: rockchip,rk3399
>> +
> 
> When we hashed out the Rockchip yaml thingy, there also
> came up the possibility of grouping the similar boards together
> into an enum, see the rk3399-firefly or the rk3288-evb-* for example.
> 
> So the binding for both could possibly become:
> 
>        - description: FriendlyElec NanoPi
>          items:
> 	  - enum:
>            	- friendlyarm,nanopi-m4
>            	- friendlyarm,nanopi-t4
>            - const: rockchip,rk3399
> 
> We didn't come up with a hard rule for all cases, but the
> Nano PI feels like it qualifies ;-)

...but I completely agree with that idea anyway - as the commit log 
alludes to, this was really just somewhere to move the existing nodes to 
without much thought involved. I'll give it a day or two for any more 
comments, then respin at least this patch and make sure the binding 
update goes to the maintainers properly.

Cheers,
Robin.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index bcc60c492a12..b4756e0cb7d0 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -92,6 +92,11 @@  properties:
           - const: friendlyarm,nanopc-t4
           - const: rockchip,rk3399
 
+      - description: FriendlyElec NanoPi M4
+        items:
+          - const: friendlyarm,nanopi-m4
+          - const: rockchip,rk3399
+
       - description: GeekBuying GeekBox
         items:
           - const: geekbuying,geekbox
diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 1c7406111dfd..91a669378605 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -17,6 +17,7 @@  dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-kevin.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-inx.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-gru-scarlet-kd.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopc-t4.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-roc-pc.dtb
 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-rock960.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts
new file mode 100644
index 000000000000..8d3f0ba29c72
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-m4.dts
@@ -0,0 +1,18 @@ 
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * FriendlyElec NanoPi M4 board device tree source
+ *
+ * Copyright (c) 2018 FriendlyElec Computer Tech. Co., Ltd.
+ * (http://www.friendlyarm.com)
+ *
+ * Copyright (c) 2018 Collabora Ltd.
+ * Copyright (c) 2019 Arm Ltd.
+ */
+
+/dts-v1/;
+#include "rk3399-nanopi4.dtsi"
+
+/ {
+	model = "FriendlyElec NanoPi M4";
+	compatible = "friendlyarm,nanopi-m4", "rockchip,rk3399";
+};