[openwrt/openwrt] uboot-rockchip: add nanopi r6s rk3588s board support
LEDE Commits
lede-commits at lists.infradead.org
Sun Aug 11 10:00:09 PDT 2024
hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7ac6739a4ca989b0027ee3a893c4172052689a7d
commit 7ac6739a4ca989b0027ee3a893c4172052689a7d
Author: Ben Whitten <ben.whitten at gmail.com>
AuthorDate: Thu Jul 13 21:52:58 2023 +0100
uboot-rockchip: add nanopi r6s rk3588s board support
Backporting support for the NanoPi R6S from upstream
uboot.
Signed-off-by: Ben Whitten <ben.whitten at gmail.com>
Link: https://github.com/openwrt/openwrt/pull/15607
Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
package/boot/uboot-rockchip/Makefile | 19 +-
...oard-rockchip-Add-FriendlyElec-NanoPi-R6S.patch | 193 +++++++++++++++++++++
2 files changed, 211 insertions(+), 1 deletion(-)
diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile
index 307fcff5f7..d127d7108d 100644
--- a/package/boot/uboot-rockchip/Makefile
+++ b/package/boot/uboot-rockchip/Makefile
@@ -213,6 +213,22 @@ define U-Boot/rock-3a-rk3568
radxa_rock-3a
endef
+# RK3588 boards
+
+define U-Boot/Default/rk3588
+ BUILD_SUBTARGET:=armv8
+ DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3588
+ ATF:=rk3588_bl31_v1.45.elf
+ TPL:=rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin
+endef
+
+define U-Boot/nanopi-r6s-rk3588s
+ $(U-Boot/Default/rk3588)
+ NAME:=NanoPi R6S
+ BUILD_DEVICES:= \
+ friendlyarm_nanopi-r6s
+endef
+
UBOOT_TARGETS := \
nanopc-t4-rk3399 \
nanopi-r4s-rk3399 \
@@ -233,7 +249,8 @@ UBOOT_TARGETS := \
nanopi-r5c-rk3568 \
nanopi-r5s-rk3568 \
radxa-e25-rk3568 \
- rock-3a-rk3568
+ rock-3a-rk3568 \
+ nanopi-r6s-rk3588s
UBOOT_CONFIGURE_VARS += USE_PRIVATE_LIBGCC=yes
diff --git a/package/boot/uboot-rockchip/patches/106-board-rockchip-Add-FriendlyElec-NanoPi-R6S.patch b/package/boot/uboot-rockchip/patches/106-board-rockchip-Add-FriendlyElec-NanoPi-R6S.patch
new file mode 100644
index 0000000000..68958d87c9
--- /dev/null
+++ b/package/boot/uboot-rockchip/patches/106-board-rockchip-Add-FriendlyElec-NanoPi-R6S.patch
@@ -0,0 +1,193 @@
+From 7db9ff164813afb343024d37731ab797ed7f507e Mon Sep 17 00:00:00 2001
+From: Sebastian Kropatsch <seb-dev at mail.de>
+Date: Thu, 11 Jul 2024 12:15:18 +0200
+Subject: [PATCH] board: rockchip: Add FriendlyElec NanoPi R6S
+
+The NanoPi R6S is a SBC by FriendlyElec based on the Rockchip RK3588s.
+It comes with 4GB or 8GB of RAM, a microSD card slot, 32GB eMMC storage,
+one RTL8211F 1GbE and two RTL8125 2.5GbE Ethernet ports, one USB 2.0
+Type-A and one USB 3.0 Type-A port, a HDMI port, a 12-pin GPIO FPC
+connector, a fan connector, IR receiver as well as some buttons and LEDs.
+
+Add initial support for this board using the upstream devicetree sources.
+
+Kernel commit:
+f1b11f43b3e9 ("arm64: dts: rockchip: Add support for NanoPi R6S")
+
+Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
+Signed-off-by: Sebastian Kropatsch <seb-dev at mail.de>
+---
+ arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi | 3 +
+ arch/arm/mach-rockchip/rk3588/Kconfig | 13 +++
+ board/friendlyelec/nanopi-r6s-rk3588s/Kconfig | 12 +++
+ .../nanopi-r6s-rk3588s/MAINTAINERS | 7 ++
+ configs/nanopi-r6s-rk3588s_defconfig | 82 +++++++++++++++++++
+ doc/board/rockchip/rockchip.rst | 1 +
+ include/configs/nanopi-r6s-rk3588s.h | 12 +++
+ 7 files changed, 130 insertions(+)
+ create mode 100644 arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi
+ create mode 100644 board/friendlyelec/nanopi-r6s-rk3588s/Kconfig
+ create mode 100644 board/friendlyelec/nanopi-r6s-rk3588s/MAINTAINERS
+ create mode 100644 configs/nanopi-r6s-rk3588s_defconfig
+ create mode 100644 include/configs/nanopi-r6s-rk3588s.h
+
+--- /dev/null
++++ b/arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi
+@@ -0,0 +1,3 @@
++// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
++
++#include "rk3588s-u-boot.dtsi"
+--- a/arch/arm/mach-rockchip/rk3588/Kconfig
++++ b/arch/arm/mach-rockchip/rk3588/Kconfig
+@@ -78,6 +78,18 @@ config TARGET_NANOPCT6_RK3588
+ Power: 5.5*2.1mm DC Jack, 12VDC input
+ Dimensions: 110x80x1.6mm (without case) / 86x114.5x30mm (with case)
+
++config TARGET_NANOPI_R6S_RK3588S
++ bool "FriendlyElec NanoPi R6S"
++ select BOARD_LATE_INIT
++ help
++ The NanoPi R6S is a SBC by FriendlyElec based on the Rockchip
++ RK3588s.
++ It comes with 4GB or 8GB of RAM, a microSD card slot, 32GB eMMC
++ storage, one RTL8211F 1GbE and two RTL8125 2.5GbE Ethernet ports,
++ one USB 2.0 Type-A and one USB 3.0 Type-A port, a HDMI port, a
++ 12-pin GPIO FPC connector, a fan connector, IR receiver as well
++ as some buttons and LEDs.
++
+ config TARGET_NOVA_RK3588
+ bool "Indiedroid Nova RK3588"
+ select BOARD_LATE_INIT
+@@ -232,6 +244,7 @@ config TEXT_BASE
+
+ source "board/edgeble/neural-compute-module-6/Kconfig"
+ source "board/friendlyelec/nanopc-t6-rk3588/Kconfig"
++source "board/friendlyelec/nanopi-r6s-rk3588s/Kconfig"
+ source "board/indiedroid/nova/Kconfig"
+ source "board/pine64/quartzpro64-rk3588/Kconfig"
+ source "board/turing/turing-rk1-rk3588/Kconfig"
+--- /dev/null
++++ b/board/friendlyelec/nanopi-r6s-rk3588s/Kconfig
+@@ -0,0 +1,12 @@
++if TARGET_NANOPI_R6S_RK3588S
++
++config SYS_BOARD
++ default "nanopi-r6s-rk3588s"
++
++config SYS_VENDOR
++ default "friendlyelec"
++
++config SYS_CONFIG_NAME
++ default "nanopi-r6s-rk3588s"
++
++endif
+--- /dev/null
++++ b/board/friendlyelec/nanopi-r6s-rk3588s/MAINTAINERS
+@@ -0,0 +1,7 @@
++NANOPI-R6S
++M: Sebastian Kropatsch <seb-dev at mail.de>
++S: Maintained
++F: arch/arm/dts/rk3588s-nanopi-r6s-u-boot.dtsi
++F: board/friendlyelec/nanopi-r6s-rk3588s
++F: configs/nanopi-r6s-rk3588s_defconfig
++F: include/configs/nanopi-r6s-rk3588s.h
+--- /dev/null
++++ b/configs/nanopi-r6s-rk3588s_defconfig
+@@ -0,0 +1,82 @@
++CONFIG_ARM=y
++CONFIG_SKIP_LOWLEVEL_INIT=y
++CONFIG_SYS_HAS_NONCACHED_MEMORY=y
++CONFIG_COUNTER_FREQUENCY=24000000
++CONFIG_ARCH_ROCKCHIP=y
++CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3588s-nanopi-r6s"
++CONFIG_ROCKCHIP_RK3588=y
++CONFIG_SPL_SERIAL=y
++CONFIG_TARGET_NANOPI_R6S_RK3588S=y
++CONFIG_DEBUG_UART_BASE=0xFEB50000
++CONFIG_DEBUG_UART_CLOCK=24000000
++CONFIG_SYS_LOAD_ADDR=0xc00800
++CONFIG_PCI=y
++CONFIG_DEBUG_UART=y
++CONFIG_FIT=y
++CONFIG_FIT_VERBOSE=y
++CONFIG_SPL_FIT_SIGNATURE=y
++CONFIG_SPL_LOAD_FIT=y
++CONFIG_LEGACY_IMAGE_FORMAT=y
++CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588s-nanopi-r6s.dtb"
++# CONFIG_DISPLAY_CPUINFO is not set
++CONFIG_DISPLAY_BOARDINFO_LATE=y
++CONFIG_SPL_MAX_SIZE=0x40000
++CONFIG_SPL_PAD_TO=0x7f8000
++# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
++CONFIG_SPL_ATF=y
++CONFIG_CMD_GPIO=y
++CONFIG_CMD_PWM=y
++CONFIG_CMD_GPT=y
++CONFIG_CMD_I2C=y
++CONFIG_CMD_MMC=y
++CONFIG_CMD_PCI=y
++CONFIG_CMD_USB=y
++CONFIG_CMD_ROCKUSB=y
++# CONFIG_CMD_SETEXPR is not set
++CONFIG_CMD_REGULATOR=y
++# CONFIG_SPL_DOS_PARTITION is not set
++CONFIG_SPL_OF_CONTROL=y
++CONFIG_OF_LIVE=y
++CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
++CONFIG_SPL_DM_SEQ_ALIAS=y
++CONFIG_SPL_REGMAP=y
++CONFIG_SPL_SYSCON=y
++CONFIG_SPL_CLK=y
++# CONFIG_USB_FUNCTION_FASTBOOT is not set
++CONFIG_ROCKCHIP_GPIO=y
++CONFIG_SYS_I2C_ROCKCHIP=y
++CONFIG_MISC=y
++CONFIG_SUPPORT_EMMC_RPMB=y
++CONFIG_MMC_DW=y
++CONFIG_MMC_DW_ROCKCHIP=y
++CONFIG_MMC_SDHCI=y
++CONFIG_MMC_SDHCI_SDMA=y
++CONFIG_MMC_SDHCI_ROCKCHIP=y
++# CONFIG_SPI_FLASH is not set
++CONFIG_PHY_REALTEK=y
++CONFIG_DWC_ETH_QOS=y
++CONFIG_DWC_ETH_QOS_ROCKCHIP=y
++CONFIG_RTL8169=y
++CONFIG_PCIE_DW_ROCKCHIP=y
++CONFIG_PHY_ROCKCHIP_INNO_USB2=y
++CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
++CONFIG_PHY_ROCKCHIP_USBDP=y
++CONFIG_SPL_PINCTRL=y
++CONFIG_PWM_ROCKCHIP=y
++CONFIG_SPL_RAM=y
++CONFIG_BAUDRATE=1500000
++CONFIG_DEBUG_UART_SHIFT=2
++CONFIG_SYS_NS16550_MEM32=y
++CONFIG_SYSRESET=y
++CONFIG_USB=y
++CONFIG_USB_XHCI_HCD=y
++CONFIG_USB_EHCI_HCD=y
++CONFIG_USB_EHCI_GENERIC=y
++CONFIG_USB_OHCI_HCD=y
++CONFIG_USB_OHCI_GENERIC=y
++CONFIG_USB_DWC3=y
++CONFIG_USB_DWC3_GENERIC=y
++CONFIG_USB_GADGET=y
++CONFIG_USB_GADGET_DOWNLOAD=y
++CONFIG_USB_FUNCTION_ROCKUSB=y
++CONFIG_ERRNO_STR=y
+--- /dev/null
++++ b/include/configs/nanopi-r6s-rk3588s.h
+@@ -0,0 +1,12 @@
++/* SPDX-License-Identifier: GPL-2.0+ */
++
++#ifndef __NANOPI_R6S_RK3588S_H
++#define __NANOPI_R6S_RK3588S_H
++
++#define ROCKCHIP_DEVICE_SETTINGS \
++ "stdout=serial,vidconsole\0" \
++ "stderr=serial,vidconsole\0"
++
++#include <configs/rk3588_common.h>
++
++#endif /* __NANOPI_R6S_RK3588S_H */
More information about the lede-commits
mailing list