1 From f59d40aa5598063396164b3248f0f8ed6591e3db Mon Sep 17 00:00:00 2001
2 From: Sebastian Kropatsch <seb-dev@mail.de>
3 Date: Thu, 11 Jul 2024 12:15:17 +0200
4 Subject: [PATCH] board: rockchip: Add FriendlyElec NanoPi R6C
6 The NanoPi R6C is a SBC by FriendlyElec based on the Rockchip RK3588s.
7 It comes with 4GB or 8GB of RAM, a microSD card slot, optional 32GB eMMC
8 storage, one M.2 M-Key connector, one RTL8211F 1GbE and one RTL8125
9 2.5GbE Ethernet port, one USB 2.0 Type-A and one USB 3.0 Type-A port, a
10 HDMI port, a 30-pin GPIO header as well as multiple buttons and LEDs.
12 Add initial support for this board using the upstream devicetree sources.
14 Tested in U-Boot proper:
15 - Booting from eMMC works
16 - 1GbE Ethernet works using the eth_eqos driver (tested by ping)
17 - 2.5GbE Ethernet works using the eth_rtl8169 driver (tested by ping),
18 but the status LEDs on this specific port currently aren't working
19 - NVMe SSD in M.2 socket does get recognized (tested with `nvme scan`
20 followed by `nvme details`)
23 d5f1d7437451 ("arm64: dts: rockchip: Add support for NanoPi R6C")
25 Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
26 Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
27 Signed-off-by: Sebastian Kropatsch <seb-dev@mail.de>
29 arch/arm/dts/rk3588s-nanopi-r6c-u-boot.dtsi | 3 +
30 arch/arm/mach-rockchip/rk3588/Kconfig | 13 +++
31 board/friendlyelec/nanopi-r6c-rk3588s/Kconfig | 12 +++
32 .../nanopi-r6c-rk3588s/MAINTAINERS | 7 ++
33 configs/nanopi-r6c-rk3588s_defconfig | 83 +++++++++++++++++++
34 doc/board/rockchip/rockchip.rst | 1 +
35 include/configs/nanopi-r6c-rk3588s.h | 12 +++
36 7 files changed, 131 insertions(+)
37 create mode 100644 arch/arm/dts/rk3588s-nanopi-r6c-u-boot.dtsi
38 create mode 100644 board/friendlyelec/nanopi-r6c-rk3588s/Kconfig
39 create mode 100644 board/friendlyelec/nanopi-r6c-rk3588s/MAINTAINERS
40 create mode 100644 configs/nanopi-r6c-rk3588s_defconfig
41 create mode 100644 include/configs/nanopi-r6c-rk3588s.h
44 +++ b/arch/arm/dts/rk3588s-nanopi-r6c-u-boot.dtsi
46 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
48 +#include "rk3588s-u-boot.dtsi"
49 --- a/arch/arm/mach-rockchip/rk3588/Kconfig
50 +++ b/arch/arm/mach-rockchip/rk3588/Kconfig
51 @@ -90,6 +90,18 @@ config TARGET_NANOPI_R6S_RK3588S
52 12-pin GPIO FPC connector, a fan connector, IR receiver as well
53 as some buttons and LEDs.
55 +config TARGET_NANOPI_R6C_RK3588S
56 + bool "FriendlyElec NanoPi R6C"
57 + select BOARD_LATE_INIT
59 + The NanoPi R6C is a SBC by FriendlyElec based on the Rockchip
61 + It comes with 4GB or 8GB of RAM, a microSD card slot, optional 32GB
62 + eMMC storage, one M.2 M-Key connector, one RTL8211F 1GbE and one
63 + RTL8125 2.5GbE Ethernet port, one USB 2.0 Type-A and one USB 3.0
64 + Type-A port, a HDMI port, a 30-pin GPIO header as well as some
67 config TARGET_NOVA_RK3588
68 bool "Indiedroid Nova RK3588"
69 select BOARD_LATE_INIT
70 @@ -245,6 +257,7 @@ config TEXT_BASE
71 source "board/edgeble/neural-compute-module-6/Kconfig"
72 source "board/friendlyelec/nanopc-t6-rk3588/Kconfig"
73 source "board/friendlyelec/nanopi-r6s-rk3588s/Kconfig"
74 +source "board/friendlyelec/nanopi-r6c-rk3588s/Kconfig"
75 source "board/indiedroid/nova/Kconfig"
76 source "board/pine64/quartzpro64-rk3588/Kconfig"
77 source "board/turing/turing-rk1-rk3588/Kconfig"
79 +++ b/board/friendlyelec/nanopi-r6c-rk3588s/Kconfig
81 +if TARGET_NANOPI_R6C_RK3588S
84 + default "nanopi-r6c-rk3588s"
87 + default "friendlyelec"
89 +config SYS_CONFIG_NAME
90 + default "nanopi-r6c-rk3588s"
94 +++ b/board/friendlyelec/nanopi-r6c-rk3588s/MAINTAINERS
97 +M: Sebastian Kropatsch <seb-dev@mail.de>
99 +F: arch/arm/dts/rk3588s-nanopi-r6c-u-boot.dtsi
100 +F: board/friendlyelec/nanopi-r6c-rk3588s
101 +F: configs/nanopi-r6c-rk3588s_defconfig
102 +F: include/configs/nanopi-r6c-rk3588s.h
104 +++ b/configs/nanopi-r6c-rk3588s_defconfig
107 +CONFIG_SKIP_LOWLEVEL_INIT=y
108 +CONFIG_SYS_HAS_NONCACHED_MEMORY=y
109 +CONFIG_COUNTER_FREQUENCY=24000000
110 +CONFIG_ARCH_ROCKCHIP=y
111 +CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3588s-nanopi-r6c"
112 +CONFIG_ROCKCHIP_RK3588=y
114 +CONFIG_TARGET_NANOPI_R6C_RK3588S=y
115 +CONFIG_DEBUG_UART_BASE=0xFEB50000
116 +CONFIG_DEBUG_UART_CLOCK=24000000
117 +CONFIG_SYS_LOAD_ADDR=0xc00800
121 +CONFIG_FIT_VERBOSE=y
122 +CONFIG_SPL_FIT_SIGNATURE=y
123 +CONFIG_SPL_LOAD_FIT=y
124 +CONFIG_LEGACY_IMAGE_FORMAT=y
125 +CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588s-nanopi-r6c.dtb"
126 +# CONFIG_DISPLAY_CPUINFO is not set
127 +CONFIG_DISPLAY_BOARDINFO_LATE=y
128 +CONFIG_SPL_MAX_SIZE=0x40000
129 +CONFIG_SPL_PAD_TO=0x7f8000
130 +# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
139 +CONFIG_CMD_ROCKUSB=y
140 +# CONFIG_CMD_SETEXPR is not set
141 +CONFIG_CMD_REGULATOR=y
142 +# CONFIG_SPL_DOS_PARTITION is not set
143 +CONFIG_SPL_OF_CONTROL=y
145 +CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
146 +CONFIG_SPL_DM_SEQ_ALIAS=y
150 +# CONFIG_USB_FUNCTION_FASTBOOT is not set
151 +CONFIG_ROCKCHIP_GPIO=y
152 +CONFIG_SYS_I2C_ROCKCHIP=y
154 +CONFIG_SUPPORT_EMMC_RPMB=y
156 +CONFIG_MMC_DW_ROCKCHIP=y
158 +CONFIG_MMC_SDHCI_SDMA=y
159 +CONFIG_MMC_SDHCI_ROCKCHIP=y
160 +# CONFIG_SPI_FLASH is not set
161 +CONFIG_PHY_REALTEK=y
162 +CONFIG_DWC_ETH_QOS=y
163 +CONFIG_DWC_ETH_QOS_ROCKCHIP=y
166 +CONFIG_PCIE_DW_ROCKCHIP=y
167 +CONFIG_PHY_ROCKCHIP_INNO_USB2=y
168 +CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
169 +CONFIG_PHY_ROCKCHIP_USBDP=y
170 +CONFIG_SPL_PINCTRL=y
171 +CONFIG_PWM_ROCKCHIP=y
173 +CONFIG_BAUDRATE=1500000
174 +CONFIG_DEBUG_UART_SHIFT=2
175 +CONFIG_SYS_NS16550_MEM32=y
178 +CONFIG_USB_XHCI_HCD=y
179 +CONFIG_USB_EHCI_HCD=y
180 +CONFIG_USB_EHCI_GENERIC=y
181 +CONFIG_USB_OHCI_HCD=y
182 +CONFIG_USB_OHCI_GENERIC=y
184 +CONFIG_USB_DWC3_GENERIC=y
186 +CONFIG_USB_GADGET_DOWNLOAD=y
187 +CONFIG_USB_FUNCTION_ROCKUSB=y
189 --- a/doc/board/rockchip/rockchip.rst
190 +++ b/doc/board/rockchip/rockchip.rst
191 @@ -126,6 +126,7 @@ List of mainline supported Rockchip boar
192 - Edgeble Neural Compute Module 6A SoM - Neu6a (neu6a-io-rk3588)
193 - Edgeble Neural Compute Module 6B SoM - Neu6b (neu6b-io-rk3588)
194 - FriendlyElec NanoPC-T6 (nanopc-t6-rk3588)
195 + - FriendlyElec NanoPi R6C (nanopi-r6c-rk3588s)
196 - Generic RK3588S/RK3588 (generic-rk3588)
197 - Indiedroid Nova (nova-rk3588s)
198 - Pine64 QuartzPro64 (quartzpro64-rk3588)
200 +++ b/include/configs/nanopi-r6c-rk3588s.h
202 +/* SPDX-License-Identifier: GPL-2.0+ */
204 +#ifndef __NANOPI_R6C_RK3588S_H
205 +#define __NANOPI_R6C_RK3588S_H
207 +#define ROCKCHIP_DEVICE_SETTINGS \
208 + "stdout=serial,vidconsole\0" \
209 + "stderr=serial,vidconsole\0"
211 +#include <configs/rk3588_common.h>
213 +#endif /* __NANOPI_R6C_RK3588S_H */