Add support for NanoPi R2C and OrangePi R1 Plus LTS
Subsystems (2)
cover 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
Signature · 1 line
2.40.0
PATCH 1/4 dt-bindings: Add doc for FriendlyARM NanoPi R2C
Add devicetree binding documentation for the FriendlyARM NanoPi R2C.
--- Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/arm/rockchip.yaml +4 -2
@@ -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
Signature · 1 line
2.40.0
PATCH 2/4 arm64: dts: rockchip: Add FriendlyARM NanoPi R2C
In reply to Tianling ShenThe 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.
--- 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
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -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
arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2c.dts new file +40 -0
@@ -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 = <ð_phy_reset_pin>; + pinctrl-names = "default"; + reset-assert-us = <10000>; + reset-deassert-us = <50000>; + reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + }; + }; +};
Signature · 1 line
2.40.0
PATCH 3/4 dt-bindings: Add doc for Xunlong OrangePi R1 Plus LTS
In reply to Tianling ShenAdd devicetree binding documentation for the
Xunlong OrangePi R1 Plus LTS.
--- Documentation/devicetree/bindings/arm/rockchip.yaml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/arm/rockchip.yaml +4 -2
@@ -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
Signature · 1 line
2.40.0
PATCH 4/4 arm64: dts: rockchip: Add Xunlong OrangePi R1 Plus LTS
In reply to Tianling ShenThe 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.
--- 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
arch/arm64/boot/dts/rockchip/Makefile +1 -0
@@ -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
arch/arm64/boot/dts/rockchip/rk3328-orangepi-r1-plus-lts.dts new file +40 -0
@@ -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 = <ð_phy_reset_pin>; + pinctrl-names = "default"; + reset-assert-us = <15000>; + reset-deassert-us = <50000>; + reset-gpios = <&gpio1 RK_PC2 GPIO_ACTIVE_LOW>; + }; + }; +};
Signature · 1 line
2.40.0
Re: [PATCH 1/4] dt-bindings: Add doc for FriendlyARM NanoPi R2C
In reply to Tianling ShenHello,
Documentation/devicetree/bindings/arm/rockchip.yaml properties: · line 188
Quoted 2 lines · Tianling Shen
Documentation/devicetree/bindings/arm/rockchip.yaml +1
-1- - description: FriendlyElec NanoPi R2S + - description: FriendlyElec NanoPi R2C/S
Maybe do like for the following one:
Quoted 1 line
- description: FriendlyElec NanoPi4 series boards
- description: FriendlyElec NanoPi R2 series boards
Regards
Signature · 1 line
Vincent Legoll
Re: [PATCH 1/4] dt-bindings: Add doc for FriendlyARM NanoPi R2C
Hi Vincent,
Quoted 4 lines · Vincent Legoll
Hello,
On Thu, Mar 23, 2023 at 1:38 PM Tianling Shen <[email protected]> wrote:
Quoted 8 lines
Documentation/devicetree/bindings/arm/rockchip.yaml properties: · line 188
Quoted 2 lines
Documentation/devicetree/bindings/arm/rockchip.yaml +1
-1- - description: FriendlyElec NanoPi R2S + - description: FriendlyElec NanoPi R2C/SMaybe do like for the following one:
Quoted 1 line
- description: FriendlyElec NanoPi4 series boards
- description: FriendlyElec NanoPi R2 series boards
Sounds good! I will apply your suggestion in v2.
Thanks,
Tianling.
Quoted 5 lines
Regards
--
Vincent Legoll