2023-03-23 12:38:50

by Tianling Shen

[permalink] [raw]
Subject: [PATCH 0/4] Add support for NanoPi R2C and OrangePi R1 Plus LTS

Hi, this patchset adds two new boards using the Motorcomm NIC which
got supported/fixed in kernel v6.3:

* FriendlyARM NanoPi R2C - yt8521s
* Xunlong OrangePi R1 Plus LTS - yt8531c

Tianling Shen (4):
dt-bindings: Add doc for FriendlyARM NanoPi R2C
arm64: dts: rockchip: Add FriendlyARM NanoPi R2C
dt-bindings: Add doc for Xunlong OrangePi R1 Plus LTS
arm64: dts: rockchip: Add Xunlong OrangePi R1 Plus LTS

.../devicetree/bindings/arm/rockchip.yaml | 12 ++++--
arch/arm64/boot/dts/rockchip/Makefile | 2 +
.../boot/dts/rockchip/rk3328-nanopi-r2c.dts | 40 +++++++++++++++++++
.../rockchip/rk3328-orangepi-r1-plus-lts.dts | 40 +++++++++++++++++++
4 files changed, 90 insertions(+), 4 deletions(-)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts
create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts

--
2.40.0


2023-03-23 12:39:01

by Tianling Shen

[permalink] [raw]
Subject: [PATCH 1/4] dt-bindings: Add doc for FriendlyARM NanoPi R2C

Add devicetree binding documentation for the FriendlyARM NanoPi R2C.

Signed-off-by: Tianling Shen <[email protected]>
---
Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index 6f4270f2bd9e..01df9a5a0cf5 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -185,9 +185,11 @@ properties:
- const: firefly,rk3566-roc-pc
- const: rockchip,rk3566

- - description: FriendlyElec NanoPi R2S
+ - description: FriendlyElec NanoPi R2C/S
items:
- - const: friendlyarm,nanopi-r2s
+ - enum:
+ - friendlyarm,nanopi-r2c
+ - friendlyarm,nanopi-r2s
- const: rockchip,rk3328

- description: FriendlyElec NanoPi4 series boards
--
2.40.0

2023-03-23 12:39:18

by Tianling Shen

[permalink] [raw]
Subject: [PATCH 2/4] arm64: dts: rockchip: Add FriendlyARM NanoPi R2C

The NanoPi R2C is a minor variant of NanoPi R2S with the on-board NIC
chip changed from rtl8211e to yt8521s, and otherwise identical to R2S.

Signed-off-by: Tianling Shen <[email protected]>
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../boot/dts/rockchip/rk3328-nanopi-r2c.dts | 40 +++++++++++++++++++
2 files changed, 41 insertions(+)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index a315a8117b0f..0bdcddd221f8 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -14,6 +14,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go2-v11.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3326-odroid-go3.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-a1.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts
new file mode 100644
index 000000000000..a07a26b944a0
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd.
+ * (http://www.friendlyarm.com)
+ *
+ * Copyright (c) 2021-2023 Tianling Shen <[email protected]>
+ */
+
+/dts-v1/;
+#include "rk3328-nanopi-r2s.dts"
+
+/ {
+ model = "FriendlyElec NanoPi R2C";
+ compatible = "friendlyarm,nanopi-r2c", "rockchip,rk3328";
+};
+
+&gmac2io {
+ phy-handle = <&yt8521s>;
+ tx_delay = <0x22>;
+ rx_delay = <0x12>;
+
+ mdio {
+ /delete-node/ ethernet-phy@1;
+
+ yt8521s: ethernet-phy@3 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <3>;
+
+ motorcomm,clk-out-frequency-hz = <125000000>;
+ motorcomm,keep-pll-enabled;
+ motorcomm,auto-sleep-disabled;
+
+ pinctrl-0 = <&eth_phy_reset_pin>;
+ pinctrl-names = "default";
+ reset-assert-us = <10000>;
+ reset-deassert-us = <50000>;
+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
--
2.40.0

2023-03-23 12:39:51

by Tianling Shen

[permalink] [raw]
Subject: [PATCH 3/4] dt-bindings: Add doc for Xunlong OrangePi R1 Plus LTS

Add devicetree binding documentation for the
Xunlong OrangePi R1 Plus LTS.

Signed-off-by: Tianling Shen <[email protected]>
---
Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/Documentation/devicetree/bindings/arm/rockchip.yaml b/Documentation/devicetree/bindings/arm/rockchip.yaml
index 01df9a5a0cf5..210213a1eaa9 100644
--- a/Documentation/devicetree/bindings/arm/rockchip.yaml
+++ b/Documentation/devicetree/bindings/arm/rockchip.yaml
@@ -831,9 +831,11 @@ properties:
- const: tronsmart,orion-r68-meta
- const: rockchip,rk3368

- - description: Xunlong Orange Pi R1 Plus
+ - description: Xunlong Orange Pi R1 Plus / LTS
items:
- - const: xunlong,orangepi-r1-plus
+ - enum:
+ - xunlong,orangepi-r1-plus
+ - xunlong,orangepi-r1-plus-lts
- const: rockchip,rk3328

- description: Zkmagic A95X Z2
--
2.40.0

2023-03-23 12:50:20

by Vincent Legoll

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: Add doc for FriendlyARM NanoPi R2C

Hello,

On Thu, Mar 23, 2023 at 1:38 PM Tianling Shen <[email protected]> wrote:
> - - description: FriendlyElec NanoPi R2S
> + - description: FriendlyElec NanoPi R2C/S

Maybe do like for the following one:

> - description: FriendlyElec NanoPi4 series boards

- description: FriendlyElec NanoPi R2 series boards

Regards

--
Vincent Legoll

2023-03-23 13:12:17

by Tianling Shen

[permalink] [raw]
Subject: [PATCH 4/4] arm64: dts: rockchip: Add Xunlong OrangePi R1 Plus LTS

The OrangePi R1 Plus LTS is a minor variant of OrangePi R1 Plus with
the on-board NIC chip changed from rtl8211e to yt8531c, and otherwise
identical to OrangePi R1 Plus.

Signed-off-by: Tianling Shen <[email protected]>
---
arch/arm64/boot/dts/rockchip/Makefile | 1 +
.../rockchip/rk3328-orangepi-r1-plus-lts.dts | 40 +++++++++++++++++++
2 files changed, 41 insertions(+)
create mode 100644 arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts

diff --git a/arch/arm64/boot/dts/rockchip/Makefile b/arch/arm64/boot/dts/rockchip/Makefile
index 0bdcddd221f8..2d585bbb8f3a 100644
--- a/arch/arm64/boot/dts/rockchip/Makefile
+++ b/arch/arm64/boot/dts/rockchip/Makefile
@@ -17,6 +17,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-evb.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2c.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-nanopi-r2s.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus.dtb
+dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-orangepi-r1-plus-lts.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock64.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-rock-pi-e.dtb
dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3328-roc-cc.dtb
diff --git a/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
new file mode 100644
index 000000000000..5d7d567283e5
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts
@@ -0,0 +1,40 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+/*
+ * Copyright (c) 2016 Xunlong Software. Co., Ltd.
+ * (http://www.orangepi.org)
+ *
+ * Copyright (c) 2021-2023 Tianling Shen <[email protected]>
+ */
+
+/dts-v1/;
+#include "rk3328-orangepi-r1-plus.dts"
+
+/ {
+ model = "Xunlong Orange Pi R1 Plus LTS";
+ compatible = "xunlong,orangepi-r1-plus-lts", "rockchip,rk3328";
+};
+
+&gmac2io {
+ phy-handle = <&yt8531c>;
+ tx_delay = <0x19>;
+ rx_delay = <0x05>;
+
+ mdio {
+ /delete-node/ ethernet-phy@1;
+
+ yt8531c: ethernet-phy@0 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0>;
+
+ motorcomm,clk-out-frequency-hz = <125000000>;
+ motorcomm,keep-pll-enabled;
+ motorcomm,auto-sleep-disabled;
+
+ pinctrl-0 = <&eth_phy_reset_pin>;
+ pinctrl-names = "default";
+ reset-assert-us = <15000>;
+ reset-deassert-us = <50000>;
+ reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>;
+ };
+ };
+};
--
2.40.0

2023-03-24 08:18:07

by Tianling Shen

[permalink] [raw]
Subject: Re: [PATCH 1/4] dt-bindings: Add doc for FriendlyARM NanoPi R2C

Hi Vincent,

On Thu, Mar 23, 2023 at 8:44 PM Vincent Legoll <[email protected]> wrote:
>
> Hello,
>
> On Thu, Mar 23, 2023 at 1:38 PM Tianling Shen <[email protected]> wrote:
> > - - description: FriendlyElec NanoPi R2S
> > + - description: FriendlyElec NanoPi R2C/S
>
> Maybe do like for the following one:
>
> > - description: FriendlyElec NanoPi4 series boards
>
> - description: FriendlyElec NanoPi R2 series boards

Sounds good! I will apply your suggestion in v2.

Thanks,
Tianling.

>
> Regards
>
> --
> Vincent Legoll