rockchip: add Rock 5B support

Hardware
--------
RockChip RK3588 ARM64 (8 cores)
4/8/16GB LPDDR4X RAM
2500 Base-T (PCIe, rtl8125b)
RGB LED
8/16/32/64/128GB eMMC on-board
Micro-SD Slot
USB 2.0 Port
Headphone
USB PD 2.0 12/15/20V

Install
--------
Uncompress the OpenWrt sysupgrade and write it to a micro SD card or
internal eMMC using dd.

Signed-off-by: Tianling Shen <cnsztl@immortalwrt.org>
This commit is contained in:
Tianling Shen
2023-07-12 19:13:44 +08:00
parent 1052c82fe7
commit 816b7f95f0
5 changed files with 81 additions and 12 deletions

View File

@@ -141,6 +141,16 @@ define Device/pine64_rockpro64
endef
TARGET_DEVICES += pine64_rockpro64
define Device/radxa_rock-5b
DEVICE_VENDOR := Radxa
DEVICE_MODEL := ROCK 5B
SOC := rk3588
UBOOT_DEVICE_NAME := rock5b-rk3588
BOOT_FLOW := pine64-img
DEVICE_PACKAGES := kmod-r8125
endef
TARGET_DEVICES += radxa_rock-5b
define Device/radxa_rock-pi-4a
DEVICE_VENDOR := Radxa
DEVICE_MODEL := ROCK Pi 4A

View File

@@ -269,3 +269,57 @@ Signed-off-by: David Bauer <mail@david-bauer.net>
};
chosen: chosen {
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -3,6 +3,8 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/leds/common.h>
+#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3588.dtsi"
/ {
@@ -12,6 +14,11 @@
aliases {
mmc0 = &sdhci;
serial2 = &uart2;
+
+ led-boot = &status_led;
+ led-failsafe = &status_led;
+ led-running = &status_led;
+ led-upgrade = &status_led;
};
chosen {
@@ -43,6 +50,17 @@
#cooling-cells = <2>;
};
+ gpio-leds {
+ compatible = "gpio-leds";
+ pinctrl-names = "default";
+ pinctrl-0 = <&status_led_pin>;
+
+ status_led: led-status {
+ gpios = <&gpio0 RK_PB7 GPIO_ACTIVE_HIGH>;
+ label = "blue:status";
+ };
+ };
+
vcc5v0_sys: vcc5v0-sys-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_sys";
@@ -196,6 +214,12 @@
};
};
+ gpio-leds {
+ status_led_pin: led-status-pin {
+ rockchip,pins = <0 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
sound {
hp_detect: hp-detect {
rockchip,pins = <1 RK_PD5 RK_FUNC_GPIO &pcfg_pull_none>;

View File

@@ -17,15 +17,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -3,6 +3,7 @@
/dts-v1/;
#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/pinctrl/rockchip.h>
#include "rk3588.dtsi"
/ {
@@ -61,6 +62,20 @@
@@ -79,6 +79,20 @@
regulator-max-microvolt = <1100000>;
vin-supply = <&vcc5v0_sys>;
};
@@ -46,7 +38,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
};
&cpu_b0 {
@@ -565,3 +580,46 @@
@@ -589,3 +603,46 @@
pinctrl-0 = <&uart2m0_xfer>;
status = "okay";
};

View File

@@ -13,7 +13,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -63,6 +63,15 @@
@@ -80,6 +80,15 @@
vin-supply = <&vcc5v0_sys>;
};
@@ -29,7 +29,7 @@ Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
vcc5v0_host: vcc5v0-host-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_host";
@@ -623,3 +632,14 @@
@@ -646,3 +655,14 @@
};
};
};

View File

@@ -37,3 +37,16 @@
&saradc {
vref-supply = <&vcca_1v8>;
status = "okay";
--- a/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-rock-5b.dts
@@ -254,6 +254,10 @@
status = "okay";
};
+&rng {
+ status = "okay";
+};
+
&saradc {
vref-supply = <&avcc_1v8_s0>;
status = "okay";