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
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.
12 Add initial support for this board using the upstream devicetree sources.
15 f1b11f43b3e9 ("arm64: dts: rockchip: Add support for NanoPi R6S")
17 Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
18 Signed-off-by: Sebastian Kropatsch <seb-dev@mail.de>
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
35 +++ b/arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi
37 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
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)
46 +config TARGET_NANOPI_R6S_RK3588S
47 + bool "FriendlyElec NanoPi R6S"
48 + select BOARD_LATE_INIT
50 + The NanoPi R6S is a SBC by FriendlyElec based on the Rockchip
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.
58 config TARGET_NOVA_RK3588
59 bool "Indiedroid Nova RK3588"
60 select BOARD_LATE_INIT
61 @@ -232,6 +244,7 @@ config TEXT_BASE
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"
70 +++ b/board/friendlyelec/nanopi-r6s-rk3588s/Kconfig
72 +if TARGET_NANOPI_R6S_RK3588S
75 + default "nanopi-r6s-rk3588s"
78 + default "friendlyelec"
80 +config SYS_CONFIG_NAME
81 + default "nanopi-r6s-rk3588s"
85 +++ b/board/friendlyelec/nanopi-r6s-rk3588s/MAINTAINERS
88 +M: Sebastian Kropatsch <seb-dev@mail.de>
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
95 +++ b/configs/nanopi-r6s-rk3588s_defconfig
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
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
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
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
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
141 +# CONFIG_USB_FUNCTION_FASTBOOT is not set
142 +CONFIG_ROCKCHIP_GPIO=y
143 +CONFIG_SYS_I2C_ROCKCHIP=y
145 +CONFIG_SUPPORT_EMMC_RPMB=y
147 +CONFIG_MMC_DW_ROCKCHIP=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
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
163 +CONFIG_BAUDRATE=1500000
164 +CONFIG_DEBUG_UART_SHIFT=2
165 +CONFIG_SYS_NS16550_MEM32=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
174 +CONFIG_USB_DWC3_GENERIC=y
176 +CONFIG_USB_GADGET_DOWNLOAD=y
177 +CONFIG_USB_FUNCTION_ROCKUSB=y
180 +++ b/include/configs/nanopi-r6s-rk3588s.h
182 +/* SPDX-License-Identifier: GPL-2.0+ */
184 +#ifndef __NANOPI_R6S_RK3588S_H
185 +#define __NANOPI_R6S_RK3588S_H
187 +#define ROCKCHIP_DEVICE_SETTINGS \
188 + "stdout=serial,vidconsole\0" \
189 + "stderr=serial,vidconsole\0"
191 +#include <configs/rk3588_common.h>
193 +#endif /* __NANOPI_R6S_RK3588S_H */