From 55c46cbabd76d271b02cf1a9739dc28cc7a058c1 Mon Sep 17 00:00:00 2001 From: Antonio Flores Date: Tue, 27 Aug 2024 16:36:02 -0400 Subject: [PATCH] rockchip: add FriendlyElec NanoPi R6C MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Hardware Spec -SoC: Rockchip RK3588S CPU: Quad-core ARM Cortex-A76(up to 2.4GHz) and quad-core Cortex-A55 CPU (up to 1.8GHz) GPU: Mali-G610 MP4, compatible with OpenGLES 1.1, 2.0, and 3.2, OpenCL up to 2.2 and Vulkan1.2 VPU: 8K@60fps H.265 and VP9 decoder, 8K@30fps H.264 decoder, 4K@60fps AV1 decoder, 8K@30fps H.264 and H.265 NPU: 6TOPs, supports INT4/INT8/INT16/FP16 -RAM: 64-bit 4GB/8GB LPDDR4X at 2133MHz -Flash: 32GB/None eMMC, at HS400 mode -Ethernet: one Native Gigabit Ethernet, and one PCIe 2.5G Ethernet -USB: one USB 3.0 Type-A and one USB 2.0 Type-A -PCIe: one M.2 Key M connector with PCIe 2.1 x1 -HDMI: compatible with HDMI2.1, HDMI2.0, and HDMI1.4 operation support up to 7680x4320@60Hz Support RGB/YUV(up to 10bit) format -microSD: support up to SDR104 mode -GPIO: 30-pin 2.54mm header connector up to 1x SPI, 3x UARTs, 3x I2Cs, 2x SPDIFs, 1x I2Ss, 3x PWMs, 20x GPIOs -Debug: UART via 3-Pin 2.54mm header, or on-board USB-C to UART -LEDs: 4 x GPIO Controlled LED (SYS, WAN, LAN, LED1) -others: 2 Pin 1.27/1.25mm RTC battery input connector for low power RTC IC HYM8563TS MASK button for eMMC update one user button -Power supply: USB-C, support PD, 5V/9V/12V/20V input -PCB: 8 Layer, 62x90x1.6mm -Ambient Operating Temperature: 0℃ to 70℃ Installation: Uncompress the OpenWrt sysupgrade and write image to the SD card using dd (dd if=*.img of=/*) eMMC Installation: Boot from the SD card Uncompress the OpenWrt sysupgrade image fash to eMMC : dd if=*.img of=/dev/mmcblk1 sync remove SD card reboot Signed-off-by: Antonio Flores Link: https://github.com/openwrt/openwrt/pull/16275 Signed-off-by: Hauke Mehrtens --- .../armv8/base-files/etc/board.d/01_leds | 4 ++ .../armv8/base-files/etc/board.d/02_network | 2 + .../etc/hotplug.d/net/40-net-smp-affinity | 1 + target/linux/rockchip/image/armv8.mk | 8 ++++ ...-rockchip-Add-support-for-NanoPi-R6C.patch | 42 +++++++++++++++++++ 5 files changed, 57 insertions(+) create mode 100644 target/linux/rockchip/patches-6.6/054-v6.9-arm64-dts-rockchip-Add-support-for-NanoPi-R6C.patch diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds index 6f6dfbf73e..0b88fd4528 100644 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/01_leds @@ -28,6 +28,10 @@ friendlyarm,nanopi-r5s) ucidef_set_led_netdev "lan1" "LAN1" "green:lan-1" "eth1" ucidef_set_led_netdev "lan2" "LAN2" "green:lan-2" "eth2" ;; +friendlyarm,nanopi-r6c) + ucidef_set_led_netdev "wan" "WAN" "wan_led" "eth0" + ucidef_set_led_netdev "lan1" "LAN1" "lan1_led" "eth1" + ;; friendlyarm,nanopi-r6s) ucidef_set_led_netdev "wan" "WAN" "wan_led" "eth1" ucidef_set_led_netdev "lan1" "LAN1" "lan1_led" "eth2" diff --git a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network index 078ecfaabe..193bfd9024 100644 --- a/target/linux/rockchip/armv8/base-files/etc/board.d/02_network +++ b/target/linux/rockchip/armv8/base-files/etc/board.d/02_network @@ -18,6 +18,7 @@ rockchip_setup_interfaces() friendlyarm,nanopi-r2s|\ friendlyarm,nanopi-r4s|\ friendlyarm,nanopi-r4s-enterprise|\ + friendlyarm,nanopi-r6c|\ radxa,rockpi-e|\ xunlong,orangepi-r1-plus|\ xunlong,orangepi-r1-plus-lts) @@ -64,6 +65,7 @@ rockchip_setup_macs() lan_mac=$(macaddr_setbit_la "$wan_mac") ;; friendlyarm,nanopi-r5c|\ + friendlyarm,nanopi-r6c|\ friendlyarm,nanopi-r6s) wan_mac=$(macaddr_generate_from_mmc_cid mmcblk*) lan_mac=$(macaddr_add "$wan_mac" 1) diff --git a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity index db1bb2ba65..c876bfe0ae 100644 --- a/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity +++ b/target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity @@ -31,6 +31,7 @@ set_interface_core() { case "$(board_name)" in friendlyarm,nanopc-t6|\ friendlyarm,nanopi-r5c|\ +friendlyarm,nanopi-r6c|\ radxa,e25|\ sinovoip,rk3568-bpi-r2pro) set_interface_core 2 "eth0" diff --git a/target/linux/rockchip/image/armv8.mk b/target/linux/rockchip/image/armv8.mk index 8bbdf0b3d7..c867037d0e 100644 --- a/target/linux/rockchip/image/armv8.mk +++ b/target/linux/rockchip/image/armv8.mk @@ -89,6 +89,14 @@ define Device/friendlyarm_nanopi-r5s endef TARGET_DEVICES += friendlyarm_nanopi-r5s +define Device/friendlyarm_nanopi-r6c + DEVICE_VENDOR := FriendlyARM + DEVICE_MODEL := NanoPi R6C + SOC := rk3588s + DEVICE_PACKAGES := kmod-r8169 +endef +TARGET_DEVICES += friendlyarm_nanopi-r6c + define Device/friendlyarm_nanopi-r6s DEVICE_VENDOR := FriendlyARM DEVICE_MODEL := NanoPi R6S diff --git a/target/linux/rockchip/patches-6.6/054-v6.9-arm64-dts-rockchip-Add-support-for-NanoPi-R6C.patch b/target/linux/rockchip/patches-6.6/054-v6.9-arm64-dts-rockchip-Add-support-for-NanoPi-R6C.patch new file mode 100644 index 0000000000..7e2b083cf8 --- /dev/null +++ b/target/linux/rockchip/patches-6.6/054-v6.9-arm64-dts-rockchip-Add-support-for-NanoPi-R6C.patch @@ -0,0 +1,42 @@ +From d5f1d7437451dbd86a91747793ecd7842e0ce88f Mon Sep 17 00:00:00 2001 +From: Muhammed Efe Cetin +Date: Sat, 30 Dec 2023 14:18:01 +0300 +Subject: [PATCH] arm64: dts: rockchip: Add support for NanoPi R6C + +NanoPi R6C is mostly same as R6S variant. It has M2 port instead of a +NIC port and different led labeling. + +Signed-off-by: Muhammed Efe Cetin +Link: https://lore.kernel.org/r/0f9ee0baa6c9de4d54dd6d13957ca15a63ec934f.1703934548.git.efectn@protonmail.com +Signed-off-by: Heiko Stuebner +--- + arch/arm64/boot/dts/rockchip/Makefile | 1 + + .../arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts | 14 ++++++++++++++ + 2 files changed, 15 insertions(+) + create mode 100644 arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts + +--- a/arch/arm64/boot/dts/rockchip/Makefile ++++ b/arch/arm64/boot/dts/rockchip/Makefile +@@ -109,4 +109,5 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588-ro + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-indiedroid-nova.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-khadas-edge2.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6s.dtb ++dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-nanopi-r6c.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += rk3588s-rock-5a.dtb +--- /dev/null ++++ b/arch/arm64/boot/dts/rockchip/rk3588s-nanopi-r6c.dts +@@ -0,0 +1,14 @@ ++// SPDX-License-Identifier: (GPL-2.0+ OR MIT) ++ ++/dts-v1/; ++ ++#include "rk3588s-nanopi-r6s.dts" ++ ++/ { ++ model = "FriendlyElec NanoPi R6C"; ++ compatible = "friendlyarm,nanopi-r6c", "rockchip,rk3588s"; ++}; ++ ++&lan2_led { ++ label = "user_led"; ++}; -- 2.30.2