68958d87c940fdbf36185e49a6be55a1e558e090
[openwrt/staging/ansuel.git] /
1 From 7db9ff164813afb343024d37731ab797ed7f507e Mon Sep 17 00:00:00 2001
2 From: Sebastian Kropatsch <seb-dev@mail.de>
3 Date: Thu, 11 Jul 2024 12:15:18 +0200
4 Subject: [PATCH] board: rockchip: Add FriendlyElec NanoPi R6S
5
6 The NanoPi R6S is a SBC by FriendlyElec based on the Rockchip RK3588s.
7 It comes with 4GB or 8GB of RAM, a microSD card slot, 32GB eMMC storage,
8 one RTL8211F 1GbE and two RTL8125 2.5GbE Ethernet ports, one USB 2.0
9 Type-A and one USB 3.0 Type-A port, a HDMI port, a 12-pin GPIO FPC
10 connector, a fan connector, IR receiver as well as some buttons and LEDs.
11
12 Add initial support for this board using the upstream devicetree sources.
13
14 Kernel commit:
15 f1b11f43b3e9 ("arm64: dts: rockchip: Add support for NanoPi R6S")
16
17 Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
18 Signed-off-by: Sebastian Kropatsch <seb-dev@mail.de>
19 ---
20 arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi | 3 +
21 arch/arm/mach-rockchip/rk3588/Kconfig | 13 +++
22 board/friendlyelec/nanopi-r6s-rk3588s/Kconfig | 12 +++
23 .../nanopi-r6s-rk3588s/MAINTAINERS | 7 ++
24 configs/nanopi-r6s-rk3588s_defconfig | 82 +++++++++++++++++++
25 doc/board/rockchip/rockchip.rst | 1 +
26 include/configs/nanopi-r6s-rk3588s.h | 12 +++
27 7 files changed, 130 insertions(+)
28 create mode 100644 arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi
29 create mode 100644 board/friendlyelec/nanopi-r6s-rk3588s/Kconfig
30 create mode 100644 board/friendlyelec/nanopi-r6s-rk3588s/MAINTAINERS
31 create mode 100644 configs/nanopi-r6s-rk3588s_defconfig
32 create mode 100644 include/configs/nanopi-r6s-rk3588s.h
33
34 --- /dev/null
35 +++ b/arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi
36 @@ -0,0 +1,3 @@
37 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
38 +
39 +#include "rk3588s-u-boot.dtsi"
40 --- a/arch/arm/mach-rockchip/rk3588/Kconfig
41 +++ b/arch/arm/mach-rockchip/rk3588/Kconfig
42 @@ -78,6 +78,18 @@ config TARGET_NANOPCT6_RK3588
43 Power: 5.5*2.1mm DC Jack, 12VDC input
44 Dimensions: 110x80x1.6mm (without case) / 86x114.5x30mm (with case)
45
46 +config TARGET_NANOPI_R6S_RK3588S
47 + bool "FriendlyElec NanoPi R6S"
48 + select BOARD_LATE_INIT
49 + help
50 + The NanoPi R6S is a SBC by FriendlyElec based on the Rockchip
51 + RK3588s.
52 + It comes with 4GB or 8GB of RAM, a microSD card slot, 32GB eMMC
53 + storage, one RTL8211F 1GbE and two RTL8125 2.5GbE Ethernet ports,
54 + one USB 2.0 Type-A and one USB 3.0 Type-A port, a HDMI port, a
55 + 12-pin GPIO FPC connector, a fan connector, IR receiver as well
56 + as some buttons and LEDs.
57 +
58 config TARGET_NOVA_RK3588
59 bool "Indiedroid Nova RK3588"
60 select BOARD_LATE_INIT
61 @@ -232,6 +244,7 @@ config TEXT_BASE
62
63 source "board/edgeble/neural-compute-module-6/Kconfig"
64 source "board/friendlyelec/nanopc-t6-rk3588/Kconfig"
65 +source "board/friendlyelec/nanopi-r6s-rk3588s/Kconfig"
66 source "board/indiedroid/nova/Kconfig"
67 source "board/pine64/quartzpro64-rk3588/Kconfig"
68 source "board/turing/turing-rk1-rk3588/Kconfig"
69 --- /dev/null
70 +++ b/board/friendlyelec/nanopi-r6s-rk3588s/Kconfig
71 @@ -0,0 +1,12 @@
72 +if TARGET_NANOPI_R6S_RK3588S
73 +
74 +config SYS_BOARD
75 + default "nanopi-r6s-rk3588s"
76 +
77 +config SYS_VENDOR
78 + default "friendlyelec"
79 +
80 +config SYS_CONFIG_NAME
81 + default "nanopi-r6s-rk3588s"
82 +
83 +endif
84 --- /dev/null
85 +++ b/board/friendlyelec/nanopi-r6s-rk3588s/MAINTAINERS
86 @@ -0,0 +1,7 @@
87 +NANOPI-R6S
88 +M: Sebastian Kropatsch <seb-dev@mail.de>
89 +S: Maintained
90 +F: arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi
91 +F: board/friendlyelec/nanopi-r6s-rk3588s
92 +F: configs/nanopi-r6s-rk3588s_defconfig
93 +F: include/configs/nanopi-r6s-rk3588s.h
94 --- /dev/null
95 +++ b/configs/nanopi-r6s-rk3588s_defconfig
96 @@ -0,0 +1,82 @@
97 +CONFIG_ARM=y
98 +CONFIG_SKIP_LOWLEVEL_INIT=y
99 +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
100 +CONFIG_COUNTER_FREQUENCY=24000000
101 +CONFIG_ARCH_ROCKCHIP=y
102 +CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3588s-nanopi-r6s"
103 +CONFIG_ROCKCHIP_RK3588=y
104 +CONFIG_SPL_SERIAL=y
105 +CONFIG_TARGET_NANOPI_R6S_RK3588S=y
106 +CONFIG_DEBUG_UART_BASE=0xFEB50000
107 +CONFIG_DEBUG_UART_CLOCK=24000000
108 +CONFIG_SYS_LOAD_ADDR=0xc00800
109 +CONFIG_PCI=y
110 +CONFIG_DEBUG_UART=y
111 +CONFIG_FIT=y
112 +CONFIG_FIT_VERBOSE=y
113 +CONFIG_SPL_FIT_SIGNATURE=y
114 +CONFIG_SPL_LOAD_FIT=y
115 +CONFIG_LEGACY_IMAGE_FORMAT=y
116 +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588s-nanopi-r6s.dtb"
117 +# CONFIG_DISPLAY_CPUINFO is not set
118 +CONFIG_DISPLAY_BOARDINFO_LATE=y
119 +CONFIG_SPL_MAX_SIZE=0x40000
120 +CONFIG_SPL_PAD_TO=0x7f8000
121 +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
122 +CONFIG_SPL_ATF=y
123 +CONFIG_CMD_GPIO=y
124 +CONFIG_CMD_PWM=y
125 +CONFIG_CMD_GPT=y
126 +CONFIG_CMD_I2C=y
127 +CONFIG_CMD_MMC=y
128 +CONFIG_CMD_PCI=y
129 +CONFIG_CMD_USB=y
130 +CONFIG_CMD_ROCKUSB=y
131 +# CONFIG_CMD_SETEXPR is not set
132 +CONFIG_CMD_REGULATOR=y
133 +# CONFIG_SPL_DOS_PARTITION is not set
134 +CONFIG_SPL_OF_CONTROL=y
135 +CONFIG_OF_LIVE=y
136 +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
137 +CONFIG_SPL_DM_SEQ_ALIAS=y
138 +CONFIG_SPL_REGMAP=y
139 +CONFIG_SPL_SYSCON=y
140 +CONFIG_SPL_CLK=y
141 +# CONFIG_USB_FUNCTION_FASTBOOT is not set
142 +CONFIG_ROCKCHIP_GPIO=y
143 +CONFIG_SYS_I2C_ROCKCHIP=y
144 +CONFIG_MISC=y
145 +CONFIG_SUPPORT_EMMC_RPMB=y
146 +CONFIG_MMC_DW=y
147 +CONFIG_MMC_DW_ROCKCHIP=y
148 +CONFIG_MMC_SDHCI=y
149 +CONFIG_MMC_SDHCI_SDMA=y
150 +CONFIG_MMC_SDHCI_ROCKCHIP=y
151 +# CONFIG_SPI_FLASH is not set
152 +CONFIG_PHY_REALTEK=y
153 +CONFIG_DWC_ETH_QOS=y
154 +CONFIG_DWC_ETH_QOS_ROCKCHIP=y
155 +CONFIG_RTL8169=y
156 +CONFIG_PCIE_DW_ROCKCHIP=y
157 +CONFIG_PHY_ROCKCHIP_INNO_USB2=y
158 +CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
159 +CONFIG_PHY_ROCKCHIP_USBDP=y
160 +CONFIG_SPL_PINCTRL=y
161 +CONFIG_PWM_ROCKCHIP=y
162 +CONFIG_SPL_RAM=y
163 +CONFIG_BAUDRATE=1500000
164 +CONFIG_DEBUG_UART_SHIFT=2
165 +CONFIG_SYS_NS16550_MEM32=y
166 +CONFIG_SYSRESET=y
167 +CONFIG_USB=y
168 +CONFIG_USB_XHCI_HCD=y
169 +CONFIG_USB_EHCI_HCD=y
170 +CONFIG_USB_EHCI_GENERIC=y
171 +CONFIG_USB_OHCI_HCD=y
172 +CONFIG_USB_OHCI_GENERIC=y
173 +CONFIG_USB_DWC3=y
174 +CONFIG_USB_DWC3_GENERIC=y
175 +CONFIG_USB_GADGET=y
176 +CONFIG_USB_GADGET_DOWNLOAD=y
177 +CONFIG_USB_FUNCTION_ROCKUSB=y
178 +CONFIG_ERRNO_STR=y
179 --- /dev/null
180 +++ b/include/configs/nanopi-r6s-rk3588s.h
181 @@ -0,0 +1,12 @@
182 +/* SPDX-License-Identifier: GPL-2.0+ */
183 +
184 +#ifndef __NANOPI_R6S_RK3588S_H
185 +#define __NANOPI_R6S_RK3588S_H
186 +
187 +#define ROCKCHIP_DEVICE_SETTINGS \
188 + "stdout=serial,vidconsole\0" \
189 + "stderr=serial,vidconsole\0"
190 +
191 +#include <configs/rk3588_common.h>
192 +
193 +#endif /* __NANOPI_R6S_RK3588S_H */