rockchip: add FriendlyElec NanoPi R6C
authorAntonio Flores <antflores627@gmail.com>
Tue, 27 Aug 2024 20:36:02 +0000 (16:36 -0400)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 22 Sep 2024 15:29:00 +0000 (17:29 +0200)
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 <antflores627@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16275
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
target/linux/rockchip/armv8/base-files/etc/board.d/01_leds
target/linux/rockchip/armv8/base-files/etc/board.d/02_network
target/linux/rockchip/armv8/base-files/etc/hotplug.d/net/40-net-smp-affinity
target/linux/rockchip/image/armv8.mk
target/linux/rockchip/patches-6.6/054-v6.9-arm64-dts-rockchip-Add-support-for-NanoPi-R6C.patch [new file with mode: 0644]

index 6f6dfbf73ebe3fdd23e81f9242c2288f802a1768..0b88fd4528201d5786327c451c8204ff7ed76ab7 100644 (file)
@@ -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"
index 078ecfaabe2fc2a81c05302b6721a87950aebe2f..193bfd90247da59b7198129b06106906be39b909 100644 (file)
@@ -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)
index db1bb2ba65c7ef4f8d52defa9d3b5d7e9082f6de..c876bfe0ae4b8364ca15d674ff2967351be2b28f 100644 (file)
@@ -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"
index 8bbdf0b3d747b2f9a2d6554a11164a73890c720e..c867037d0e2ccde12f087c583fb667671983f155 100644 (file)
@@ -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 (file)
index 0000000..7e2b083
--- /dev/null
@@ -0,0 +1,42 @@
+From d5f1d7437451dbd86a91747793ecd7842e0ce88f Mon Sep 17 00:00:00 2001
+From: Muhammed Efe Cetin <efectn@protonmail.com>
+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 <efectn@protonmail.com>
+Link: https://lore.kernel.org/r/0f9ee0baa6c9de4d54dd6d13957ca15a63ec934f.1703934548.git.efectn@protonmail.com
+Signed-off-by: Heiko Stuebner <heiko@sntech.de>
+---
+ 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";
++};