1 From db792e9adbf85ffc9d6b0b060ac3c8e3148c8992 Mon Sep 17 00:00:00 2001
2 From: Tianling Shen <cnsztl@gmail.com>
3 Date: Fri, 19 Mar 2021 13:16:27 +0800
4 Subject: [PATCH] rockchip: rk3399: Add support for FriendlyARM NanoPi R4S
6 This adds support for the NanoPi R4S from FriendlyArm.
9 1GB DDR3 or 4GB LPDDR4 RAM
10 Gigabit Ethernet (WAN)
11 Gigabit Ethernet (PCIe) (LAN)
17 Co-developed-by: Jensen Huang <jensenhuang@friendlyarm.com>
18 Signed-off-by: Jensen Huang <jensenhuang@friendlyarm.com>
20 Co-developed-by: Marty Jones <mj8263788@gmail.com>
21 Signed-off-by: Marty Jones <mj8263788@gmail.com>
22 [further adjustments, fixed format issues]
23 Signed-off-by: Tianling Shen <cnsztl@gmail.com>
24 Link: https://lore.kernel.org/r/20210319051627.814-2-cnsztl@gmail.com
25 Signed-off-by: Heiko Stuebner <heiko@sntech.de>
27 arch/arm64/boot/dts/rockchip/Makefile | 1 +
28 .../boot/dts/rockchip/rk3399-nanopi-r4s.dts | 133 +++++++++++++++++++++
29 2 files changed, 134 insertions(+)
30 create mode 100644 arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
32 --- a/arch/arm64/boot/dts/rockchip/Makefile
33 +++ b/arch/arm64/boot/dts/rockchip/Makefile
34 @@ -30,6 +30,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-le
35 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopc-t4.dtb
36 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-m4.dtb
37 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-neo4.dtb
38 +dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-nanopi-r4s.dtb
39 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-orangepi.dtb
40 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-pinebook-pro.dtb
41 dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3399-puma-haikou.dtb
43 +++ b/arch/arm64/boot/dts/rockchip/rk3399-nanopi-r4s.dts
45 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
47 + * FriendlyElec NanoPC-T4 board device tree source
49 + * Copyright (c) 2020 FriendlyElec Computer Tech. Co., Ltd.
50 + * (http://www.friendlyarm.com)
52 + * Copyright (c) 2018 Collabora Ltd.
54 + * Copyright (c) 2020 Jensen Huang <jensenhuang@friendlyarm.com>
55 + * Copyright (c) 2020 Marty Jones <mj8263788@gmail.com>
56 + * Copyright (c) 2021 Tianling Shen <cnsztl@gmail.com>
60 +#include "rk3399-nanopi4.dtsi"
63 + model = "FriendlyElec NanoPi R4S";
64 + compatible = "friendlyarm,nanopi-r4s", "rockchip,rk3399";
66 + /delete-node/ display-subsystem;
69 + pinctrl-0 = <&lan_led_pin>, <&sys_led_pin>, <&wan_led_pin>;
71 + /delete-node/ led-0;
74 + gpios = <&gpio1 RK_PA1 GPIO_ACTIVE_HIGH>;
75 + label = "green:lan";
79 + gpios = <&gpio0 RK_PB5 GPIO_ACTIVE_HIGH>;
81 + default-state = "on";
85 + gpios = <&gpio1 RK_PA0 GPIO_ACTIVE_HIGH>;
86 + label = "green:wan";
91 + pinctrl-0 = <&reset_button_pin>;
93 + /delete-node/ power;
96 + debounce-interval = <50>;
97 + gpios = <&gpio1 RK_PC6 GPIO_ACTIVE_LOW>;
99 + linux,code = <KEY_RESTART>;
104 + compatible = "regulator-fixed";
105 + regulator-name = "vdd_5v";
106 + regulator-always-on;
112 + status = "disabled";
116 + status = "disabled";
120 + max-link-speed = <1>;
122 + vpcie3v3-supply = <&vcc3v3_sys>;
127 + /delete-node/ status-led-pin;
129 + lan_led_pin: lan-led-pin {
130 + rockchip,pins = <1 RK_PA1 RK_FUNC_GPIO &pcfg_pull_none>;
133 + sys_led_pin: sys-led-pin {
134 + rockchip,pins = <0 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;
137 + wan_led_pin: wan-led-pin {
138 + rockchip,pins = <1 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
143 + /delete-node/ power-key;
145 + reset_button_pin: reset-button-pin {
146 + rockchip,pins = <1 RK_PC6 RK_FUNC_GPIO &pcfg_pull_up>;
152 + status = "disabled";
156 + status = "disabled";
160 + phy-supply = <&vdd_5v>;
164 + status = "disabled";
168 + status = "disabled";
176 + vin-supply = <&vcc5v0_sys>;