rockchip: add Firefly ROC-RK3328-CC support
authorTianling Shen <cnsztl@immortalwrt.org>
Fri, 7 Apr 2023 15:50:49 +0000 (23:50 +0800)
committerTianling Shen <cnsztl@immortalwrt.org>
Tue, 9 May 2023 05:30:22 +0000 (13:30 +0800)
Hardware
--------
RockChip RK3328 ARM64 (4 cores)
4GB DDR4 RAM
1x 1000 Base-T
2 LEDs (POWER / USER)
HDMI 2.0
3.5mm TRRS AV jack
Micro-SD slot
eMMC slot
1x USB 3.0 Port
2x USB 2.0 Port

Installation
------------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card using
dd.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
target/linux/rockchip/image/armv8.mk
target/linux/rockchip/patches-5.15/100-rockchip-use-system-LED-for-OpenWrt.patch
target/linux/rockchip/patches-5.15/103-arm64-rockchip-add-OF-node-for-USB-eth-on-NanoPi-R2S.patch

index f95416323ddadf923d3860e7413190273da9d883..86e7cec9799f02f2088264a0c71228fa4b052c97 100644 (file)
@@ -5,6 +5,16 @@
 # FIT will be loaded at 0x02080000. Leave 16M for that, align it to 2M and load the kernel after it.
 KERNEL_LOADADDR := 0x03200000
 
+define Device/firefly_roc-rk3328-cc
+  DEVICE_VENDOR := Firefly
+  DEVICE_MODEL := ROC-RK3328-CC
+  SOC := rk3328
+  DEVICE_DTS := rockchip/rk3328-roc-cc
+  UBOOT_DEVICE_NAME := roc-cc-rk3328
+  IMAGE/sysupgrade.img.gz := boot-common | boot-script nanopi-r2s | pine64-img | gzip | append-metadata
+endef
+TARGET_DEVICES += firefly_roc-rk3328-cc
+
 define Device/friendlyarm_nanopi-r2s
   DEVICE_VENDOR := FriendlyARM
   DEVICE_MODEL := NanoPi R2S
index 5ec7952bfeaf88dbbd9b92e9476cbe2ebec6ec16..4b963f33483e157ed1b80f18ed73422c6533ce1b 100644 (file)
@@ -15,17 +15,29 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
 
 --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
 +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
-@@ -18,6 +18,13 @@
+@@ -16,6 +16,11 @@
+       aliases {
+               ethernet1 = &rtl8153;
                mmc0 = &sdmmc;
-       };
-+      aliases {
++
 +              led-boot = &sys_led;
 +              led-failsafe = &sys_led;
 +              led-running = &sys_led;
 +              led-upgrade = &sys_led;
-+      };
-+
+       };
        chosen {
-               stdout-path = "serial2:1500000n8";
+--- a/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
++++ b/arch/arm64/boot/dts/rockchip/rk3328-roc-cc.dts
+@@ -13,6 +13,11 @@
+       aliases {
+               mmc0 = &sdmmc;
+               mmc1 = &emmc;
++
++              led-boot = &power_led;
++              led-failsafe = &power_led;
++              led-running = &power_led;
++              led-upgrade = &power_led;
        };
+       chosen {
index 5fe60d1adecc6ed11e03b008d03428ea538ab712..2221077c97ced8d5fca1c28678a5dbab17e6e8eb 100644 (file)
@@ -14,7 +14,7 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
 
 --- a/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
 +++ b/arch/arm64/boot/dts/rockchip/rk3328-nanopi-r2s.dts
-@@ -404,6 +404,7 @@
+@@ -402,6 +402,7 @@
        rtl8153: device@2 {
                compatible = "usbbda,8153";
                reg = <2>;