rockchip: add support for nanopc t6
authorxiaobo tian <peterwillcn@gmail.com>
Wed, 21 Aug 2024 06:40:27 +0000 (14:40 +0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 24 Aug 2024 12:55:02 +0000 (14:55 +0200)
SoC: Rockchip RK3588
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 encoder
NPU: 6TOPs, supports INT4/INT8/INT16/FP16
RAM: 64-bit 4GB/8GB/16GB LPDDR4X at 2133MHz
Flash: 32GB/64GB/256GB eMMC, at HS400 mode
microSD: support up to SDR104 mode
Ethernet: 2x PCIe 2.5G Ethernet

Signed-off-by: xiaobo tian <peterwillcn@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/16158
Signed-off-by: Hauke Mehrtens <hauke@hauke-m.de>
package/boot/uboot-rockchip/Makefile
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/120-arm64-dts-rockchip-add-led-aliases-and-stop-heartbeat-for-nanopc-t6.patch [new file with mode: 0644]
target/linux/rockchip/patches-6.6/121-arm64-dts-rockchip-lower-mmc-speed-for-nanopc-t6.patch [new file with mode: 0644]

index b2d5a6cc794da51e76c3e67b23b0a0df00b6abe3..79c3b71148160393b040cb99095c9e9ebf722037 100644 (file)
@@ -230,6 +230,13 @@ define U-Boot/rock5b-rk3588
     radxa_rock-5b
 endef
 
+define U-Boot/nanopc-t6-rk3588
+  $(U-Boot/rk3588/Default)
+  NAME:=NanoPC T6
+  BUILD_DEVICES:= \
+    friendlyarm_nanopc-t6
+endef
+
 
 # RK3588S boards
 
@@ -269,6 +276,7 @@ UBOOT_TARGETS := \
   radxa-e25-rk3568 \
   rock-3a-rk3568 \
   rock5b-rk3588 \
+  nanopc-t6-rk3588 \
   nanopi-r6s-rk3588s \
   rock5a-rk3588s
 
index 506ef672454f030f2c102d6d95370f310aabaa28..0e3bb8deaff747194ed6c750f62e372cc8f787ad 100644 (file)
@@ -7,6 +7,11 @@ rockchip_setup_interfaces()
        local board="$1"
 
        case "$board" in
+       friendlyarm,nanopc-t6|\
+       friendlyarm,nanopi-r5c|\
+       radxa,e25)
+               ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
+               ;;
        friendlyarm,nanopi-r2c|\
        friendlyarm,nanopi-r2c-plus|\
        friendlyarm,nanopi-r2s|\
@@ -17,10 +22,6 @@ rockchip_setup_interfaces()
        xunlong,orangepi-r1-plus-lts)
                ucidef_set_interfaces_lan_wan 'eth1' 'eth0'
                ;;
-       friendlyarm,nanopi-r5c|\
-       radxa,e25)
-               ucidef_set_interfaces_lan_wan 'eth0' 'eth1'
-               ;;
        friendlyarm,nanopi-r5s)
                ucidef_set_interfaces_lan_wan 'eth1 eth2' 'eth0'
                ;;
@@ -44,6 +45,7 @@ rockchip_setup_macs()
        local label_mac=""
 
        case "$board" in
+       friendlyarm,nanopc-t6|\
        friendlyarm,nanopi-r2c|\
        friendlyarm,nanopi-r2s)
                wan_mac=$(macaddr_generate_from_mmc_cid mmcblk0)
index 5716aaf4967cc85c3badf3c012d29f5c03edcbf2..db1bb2ba65c7ef4f8d52defa9d3b5d7e9082f6de 100644 (file)
@@ -29,6 +29,13 @@ set_interface_core() {
 }
 
 case "$(board_name)" in
+friendlyarm,nanopc-t6|\
+friendlyarm,nanopi-r5c|\
+radxa,e25|\
+sinovoip,rk3568-bpi-r2pro)
+       set_interface_core 2 "eth0"
+       set_interface_core 4 "eth1"
+       ;;
 friendlyarm,nanopi-r2c|\
 friendlyarm,nanopi-r2c-plus|\
 friendlyarm,nanopi-r2s|\
@@ -43,12 +50,6 @@ friendlyarm,nanopi-r4s-enterprise)
        set_interface_core 10 "eth0"
        set_interface_core 20 "eth1"
        ;;
-friendlyarm,nanopi-r5c|\
-radxa,e25|\
-sinovoip,rk3568-bpi-r2pro)
-       set_interface_core 2 "eth0"
-       set_interface_core 4 "eth1"
-       ;;
 friendlyarm,nanopi-r5s|\
 friendlyarm,nanopi-r6s)
        set_interface_core 2 "eth0"
index 5f62ae0dc5219d7a7613aa95939f4d3ce617cfa7..e7e33079fb0ee7cd41f8ce9c234e343688b054b3 100644 (file)
@@ -22,6 +22,14 @@ define Device/friendlyarm_nanopc-t4
 endef
 TARGET_DEVICES += friendlyarm_nanopc-t4
 
+define Device/friendlyarm_nanopc-t6
+  DEVICE_VENDOR := FriendlyARM
+  DEVICE_MODEL := NanoPC T6
+  SOC := rk3588
+  DEVICE_PACKAGES := kmod-r8169
+endef
+TARGET_DEVICES += friendlyarm_nanopc-t6
+
 define Device/friendlyarm_nanopi-r2c
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi R2C
diff --git a/target/linux/rockchip/patches-6.6/120-arm64-dts-rockchip-add-led-aliases-and-stop-heartbeat-for-nanopc-t6.patch b/target/linux/rockchip/patches-6.6/120-arm64-dts-rockchip-add-led-aliases-and-stop-heartbeat-for-nanopc-t6.patch
new file mode 100644 (file)
index 0000000..bef4b0f
--- /dev/null
@@ -0,0 +1,22 @@
+--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts
+@@ -19,6 +19,10 @@
+       aliases {
+               mmc0 = &sdhci;
+               mmc1 = &sdmmc;
++              led-boot = &sys_led;
++              led-failsafe = &sys_led;
++              led-running = &sys_led;
++              led-upgrade = &sys_led;
+       };
+       chosen {
+@@ -31,7 +35,7 @@
+               sys_led: led-0 {
+                       gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_HIGH>;
+                       label = "system-led";
+-                      linux,default-trigger = "heartbeat";
++                      default-state = "on";
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&sys_led_pin>;
+               };
diff --git a/target/linux/rockchip/patches-6.6/121-arm64-dts-rockchip-lower-mmc-speed-for-nanopc-t6.patch b/target/linux/rockchip/patches-6.6/121-arm64-dts-rockchip-lower-mmc-speed-for-nanopc-t6.patch
new file mode 100644 (file)
index 0000000..c73b807
--- /dev/null
@@ -0,0 +1,11 @@
+--- a/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3588-nanopc-t6.dts
+@@ -547,7 +547,7 @@
+       cap-mmc-highspeed;
+       cap-sd-highspeed;
+       disable-wp;
+-      sd-uhs-sdr104;
++      sd-uhs-sdr50;
+       vmmc-supply = <&vcc_3v3_s3>;
+       vqmmc-supply = <&vccio_sd_s0>;
+       status = "okay";