mirror of
https://github.com/armbian/build.git
synced 2026-01-06 09:58:46 -08:00
Rock5B-Plus and Rock5T: Use upstream u-boot (#8918)
This commit is contained in:
@@ -27,18 +27,16 @@ function post_family_tweaks__rock5b_naming_audios() {
|
||||
return 0
|
||||
}
|
||||
|
||||
# Mainline u-boot tree
|
||||
# see rock-5b.conf and https://github.com/armbian/build/pull/7135
|
||||
function post_family_config_branch_edge__rock-5b_use_mainline_uboot() {
|
||||
display_alert "$BOARD" "mainline (next branch) u-boot overrides for $BOARD / $BRANCH" "info"
|
||||
# Mainline u-boot tree - use post_family_config hook to override family config
|
||||
function post_family_config__rock5b_plus_use_mainline_uboot() {
|
||||
display_alert "$BOARD" "Mainline U-Boot overrides for $BOARD - $BRANCH" "info"
|
||||
|
||||
# temporary override until DT in armbian/rockchip-linux is renamed
|
||||
declare -g BOOT_FDT_FILE="rockchip/rk3588-rock-5b-plus.dtb"
|
||||
declare -g BOOTCONFIG="rock5b-rk3588_defconfig"
|
||||
declare -g BOOTDELAY=1
|
||||
declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git"
|
||||
declare -g BOOTBRANCH="tag:v2025.04"
|
||||
declare -g BOOTPATCHDIR="v2025.04"
|
||||
declare -g BOOTBRANCH="tag:v2025.10"
|
||||
declare -g BOOTPATCHDIR="v2025.10"
|
||||
declare -g BOOTDIR="u-boot-${BOARD}"
|
||||
declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin u-boot-rockchip-spi.bin"
|
||||
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd # disable stuff from rockchip64_common; we're using binman here which does all the work already
|
||||
@@ -53,9 +51,8 @@ function post_family_config_branch_edge__rock-5b_use_mainline_uboot() {
|
||||
}
|
||||
}
|
||||
|
||||
function post_config_uboot_target__extra_configs_for_rock5b_mainline_environment_in_spi() {
|
||||
[[ "${BRANCH}" != "edge" ]] && return 0
|
||||
|
||||
function post_config_uboot_target__extra_configs_for_rock5b_mainline_environment_in_spi() {
|
||||
display_alert "$BOARD" "u-boot configs for ${BOOTBRANCH} u-boot config BRANCH=${BRANCH}" "info"
|
||||
run_host_command_logged scripts/config --set-val CONFIG_ENV_IS_NOWHERE "n"
|
||||
run_host_command_logged scripts/config --set-val CONFIG_ENV_IS_IN_SPI_FLASH "y"
|
||||
|
||||
@@ -15,7 +15,7 @@ IMAGE_PARTITION_TABLE="gpt"
|
||||
declare -g UEFI_EDK2_BOARD_ID="rock-5t" # This _only_ used for uefi-edk2-rk3588 extension
|
||||
|
||||
function post_family_tweaks__rock5b_naming_audios() {
|
||||
display_alert "$BOARD" "Renaming rock5b audios" "info"
|
||||
display_alert "$BOARD" "Renaming rock5t audios" "info"
|
||||
|
||||
mkdir -p $SDCARD/etc/udev/rules.d/
|
||||
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-hdmi1-sound", ENV{SOUND_DESCRIPTION}="HDMI1 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules
|
||||
@@ -25,4 +25,39 @@ function post_family_tweaks__rock5b_naming_audios() {
|
||||
echo 'SUBSYSTEM=="sound", ENV{ID_PATH}=="platform-es8316-sound", ENV{SOUND_DESCRIPTION}="ES8316 Audio"' >> $SDCARD/etc/udev/rules.d/90-naming-audios.rules
|
||||
|
||||
return 0
|
||||
}
|
||||
}
|
||||
|
||||
# Mainline u-boot tree - use post_family_config hook to override family config
|
||||
function post_family_config__rock5t_use_mainline_uboot() {
|
||||
display_alert "$BOARD" "Mainline U-Boot overrides for $BOARD - $BRANCH" "info"
|
||||
|
||||
declare -g BOOT_FDT_FILE="rockchip/rk3588-rock-5t.dtb"
|
||||
declare -g BOOTCONFIG="rock5t-rk3588_defconfig"
|
||||
declare -g BOOTDELAY=1
|
||||
declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git"
|
||||
declare -g BOOTBRANCH="tag:v2025.04"
|
||||
declare -g BOOTPATCHDIR="v2025.04"
|
||||
declare -g BOOTDIR="u-boot-${BOARD}"
|
||||
declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin u-boot-rockchip-spi.bin"
|
||||
unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd # disable stuff from rockchip64_common; we're using binman here which does all the work already
|
||||
|
||||
# Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go
|
||||
function write_uboot_platform() {
|
||||
dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 conv=notrunc status=none
|
||||
}
|
||||
|
||||
function write_uboot_platform_mtd() {
|
||||
flashcp -v -p "$1/u-boot-rockchip-spi.bin" /dev/mtd0
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function post_config_uboot_target__extra_configs_for_rock5b_mainline_environment_in_spi() {
|
||||
display_alert "$BOARD" "u-boot configs for ${BOOTBRANCH} u-boot config BRANCH=${BRANCH}" "info"
|
||||
run_host_command_logged scripts/config --set-val CONFIG_ENV_IS_NOWHERE "n"
|
||||
run_host_command_logged scripts/config --set-val CONFIG_ENV_IS_IN_SPI_FLASH "y"
|
||||
run_host_command_logged scripts/config --set-val CONFIG_ENV_SECT_SIZE_AUTO "y"
|
||||
run_host_command_logged scripts/config --set-val CONFIG_ENV_OVERWRITE "y"
|
||||
run_host_command_logged scripts/config --set-val CONFIG_ENV_SIZE "0x20000"
|
||||
run_host_command_logged scripts/config --set-val CONFIG_ENV_OFFSET "0xc00000"
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,124 @@
|
||||
From 72217a692f1b47375c47c749897e63d4a188c03a Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
Date: Fri, 9 May 2025 11:35:13 +0200
|
||||
Subject: [PATCH] [HACK] add ROCK 5T dts to upstream dir
|
||||
|
||||
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
---
|
||||
.../src/arm64/rockchip/rk3588-rock-5t.dts | 105 ++++++++++++++++++
|
||||
1 file changed, 105 insertions(+)
|
||||
create mode 100644 dts/upstream/src/arm64/rockchip/rk3588-rock-5t.dts
|
||||
|
||||
diff --git a/dts/upstream/src/arm64/rockchip/rk3588-rock-5t.dts b/dts/upstream/src/arm64/rockchip/rk3588-rock-5t.dts
|
||||
new file mode 100644
|
||||
index 00000000000..258c7400301
|
||||
--- /dev/null
|
||||
+++ b/dts/upstream/src/arm64/rockchip/rk3588-rock-5t.dts
|
||||
@@ -0,0 +1,105 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+
|
||||
+/dts-v1/;
|
||||
+
|
||||
+#include "rk3588-rock-5b-5bp-5t.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ model = "Radxa ROCK 5T";
|
||||
+ compatible = "radxa,rock-5t", "rockchip,rk3588";
|
||||
+
|
||||
+ analog-sound {
|
||||
+ compatible = "audio-graph-card";
|
||||
+ label = "rk3588-es8316";
|
||||
+
|
||||
+ widgets = "Microphone", "Mic Jack",
|
||||
+ "Headphone", "Headphones";
|
||||
+
|
||||
+ routing = "MIC2", "Mic Jack",
|
||||
+ "Headphones", "HPOL",
|
||||
+ "Headphones", "HPOR";
|
||||
+
|
||||
+ dais = <&i2s0_8ch_p0>;
|
||||
+ hp-det-gpios = <&gpio4 RK_PC3 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&hp_detect>;
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ compatible = "gpio-leds";
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&led_rgb_b>;
|
||||
+
|
||||
+ led_rgb_b {
|
||||
+ function = LED_FUNCTION_STATUS;
|
||||
+ color = <LED_COLOR_ID_BLUE>;
|
||||
+ gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_HIGH>;
|
||||
+ linux,default-trigger = "heartbeat";
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ rfkill {
|
||||
+ compatible = "rfkill-gpio";
|
||||
+ label = "rfkill-m2-wlan";
|
||||
+ radio-type = "wlan";
|
||||
+ shutdown-gpios = <&gpio1 RK_PB0 GPIO_ACTIVE_HIGH>;
|
||||
+ };
|
||||
+
|
||||
+ vcc3v3_pcie2x1l1: regulator-vcc3v3-pcie2x1l2 {
|
||||
+ compatible = "regulator-fixed";
|
||||
+ regulator-name = "vcc3v3_pcie2x1l1";
|
||||
+ regulator-min-microvolt = <3300000>;
|
||||
+ regulator-max-microvolt = <3300000>;
|
||||
+ startup-delay-us = <5000>;
|
||||
+ vin-supply = <&vcc_3v3_s3>;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&hdmi_receiver {
|
||||
+ hpd-gpios = <&gpio2 RK_PB7 GPIO_ACTIVE_LOW>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pcie2x1l1 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie2_1_rst>;
|
||||
+ reset-gpios = <&gpio4 RK_PA2 GPIO_ACTIVE_HIGH>;
|
||||
+ vpcie3v3-supply = <&vcc3v3_pcie2x1l1>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&pinctrl {
|
||||
+ hdmirx {
|
||||
+ hdmirx_hpd: hdmirx-5v-detection {
|
||||
+ rockchip,pins = <2 RK_PB7 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ leds {
|
||||
+ led_rgb_b: led-rgb-b {
|
||||
+ rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ pcie2 {
|
||||
+ pcie2_1_rst: pcie2-1-rst {
|
||||
+ rockchip,pins = <4 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ pcie2_0_vcc3v3_en: pcie2-0-vcc-en {
|
||||
+ rockchip,pins = <2 RK_PC0 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+
|
||||
+ sound {
|
||||
+ hp_detect: hp-detect {
|
||||
+ rockchip,pins = <4 RK_PC3 RK_FUNC_GPIO &pcfg_pull_none>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&vcc3v3_pcie2x1l0 {
|
||||
+ gpios = <&gpio2 RK_PC0 GPIO_ACTIVE_HIGH>;
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&pcie2_0_vcc3v3_en>;
|
||||
+ status = "okay";
|
||||
+};
|
||||
--
|
||||
GitLab
|
||||
@@ -0,0 +1,323 @@
|
||||
From 79954f1b4f1291431bdf8e175eac60154938a089 Mon Sep 17 00:00:00 2001
|
||||
From: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
Date: Fri, 9 May 2025 11:37:46 +0200
|
||||
Subject: [PATCH] board: radxa: add ROCK 5T support
|
||||
|
||||
The ROCK 5T is quite similar to the ROCK 5B+. Since we can't tell it
|
||||
apart from the ROCK 5B+ based on memory type, as both always ship with
|
||||
LPDDR5, add it as its own separate board without the auto FDT detection.
|
||||
|
||||
Signed-off-by: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
---
|
||||
arch/arm/dts/rk3588-rock-5t-u-boot.dtsi | 77 ++++++++++++++++
|
||||
arch/arm/mach-rockchip/rk3588/Kconfig | 28 ++++++
|
||||
board/radxa/rock5t-rk3588/Kconfig | 12 +++
|
||||
board/radxa/rock5t-rk3588/MAINTAINERS | 7 ++
|
||||
configs/rock5t-rk3588_defconfig | 111 ++++++++++++++++++++++++
|
||||
include/configs/rock5t-rk3588.h | 14 +++
|
||||
6 files changed, 249 insertions(+)
|
||||
create mode 100644 arch/arm/dts/rk3588-rock-5t-u-boot.dtsi
|
||||
create mode 100644 board/radxa/rock5t-rk3588/Kconfig
|
||||
create mode 100644 board/radxa/rock5t-rk3588/MAINTAINERS
|
||||
create mode 100644 configs/rock5t-rk3588_defconfig
|
||||
create mode 100644 include/configs/rock5t-rk3588.h
|
||||
|
||||
diff --git a/arch/arm/dts/rk3588-rock-5t-u-boot.dtsi b/arch/arm/dts/rk3588-rock-5t-u-boot.dtsi
|
||||
new file mode 100644
|
||||
index 00000000000..c9440382587
|
||||
--- /dev/null
|
||||
+++ b/arch/arm/dts/rk3588-rock-5t-u-boot.dtsi
|
||||
@@ -0,0 +1,77 @@
|
||||
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
|
||||
+/*
|
||||
+ * Copyright (c) 2025 Collabora Ltd.
|
||||
+ */
|
||||
+
|
||||
+#include <dt-bindings/usb/pd.h>
|
||||
+#include "rk3588-u-boot.dtsi"
|
||||
+
|
||||
+/ {
|
||||
+ leds {
|
||||
+ led_rgb_b {
|
||||
+ default-state = "on";
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&fspim2_pins {
|
||||
+ bootph-pre-ram;
|
||||
+ bootph-some-ram;
|
||||
+};
|
||||
+
|
||||
+&i2c4 {
|
||||
+ pinctrl-names = "default";
|
||||
+ pinctrl-0 = <&i2c4m1_xfer>;
|
||||
+ status = "okay";
|
||||
+
|
||||
+ usbc0: usb-typec@22 {
|
||||
+ compatible = "fcs,fusb302";
|
||||
+ reg = <0x22>;
|
||||
+ interrupt-parent = <&gpio3>;
|
||||
+ interrupts = <RK_PB4 IRQ_TYPE_LEVEL_LOW>;
|
||||
+ pinctrl-names = "default";
|
||||
+ status = "okay";
|
||||
+
|
||||
+ usb_con: connector {
|
||||
+ compatible = "usb-c-connector";
|
||||
+ label = "USB-C";
|
||||
+ data-role = "dual";
|
||||
+ power-role = "sink";
|
||||
+ try-power-role = "sink";
|
||||
+ op-sink-microwatt = <1000000>;
|
||||
+ sink-pdos =
|
||||
+ <PDO_FIXED(5000, 3000, PDO_FIXED_USB_COMM)>,
|
||||
+ <PDO_VAR(5000, 20000, 5000)>;
|
||||
+ };
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&sdhci {
|
||||
+ cap-mmc-highspeed;
|
||||
+ mmc-hs200-1_8v;
|
||||
+};
|
||||
+
|
||||
+&sfc {
|
||||
+ flash@0 {
|
||||
+ bootph-pre-ram;
|
||||
+ bootph-some-ram;
|
||||
+ };
|
||||
+};
|
||||
+
|
||||
+&u2phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&u2phy0_otg {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usbdp_phy0 {
|
||||
+ status = "okay";
|
||||
+};
|
||||
+
|
||||
+&usb_host0_xhci {
|
||||
+ dr_mode = "peripheral";
|
||||
+ maximum-speed = "high-speed";
|
||||
+ status = "okay";
|
||||
+};
|
||||
diff --git a/arch/arm/mach-rockchip/rk3588/Kconfig b/arch/arm/mach-rockchip/rk3588/Kconfig
|
||||
index 155b8f00ca2..1deb7597bb2 100644
|
||||
--- a/arch/arm/mach-rockchip/rk3588/Kconfig
|
||||
+++ b/arch/arm/mach-rockchip/rk3588/Kconfig
|
||||
@@ -302,6 +302,33 @@ config TARGET_ROCK_5C_RK3588S
|
||||
2x USB 2.0 Type-A HOST port
|
||||
1x USB Type-C 5V power port
|
||||
|
||||
+config TARGET_ROCK5T_RK3588
|
||||
+ bool "Radxa ROCK5T RK3588 board"
|
||||
+ select BOARD_LATE_INIT
|
||||
+ help
|
||||
+ Radxa ROCK5T is a Rockchip RK3588 based SBC (Single Board Computer)
|
||||
+ by Radxa.
|
||||
+
|
||||
+ Specification:
|
||||
+
|
||||
+ Rockchip Rk3588 SoC
|
||||
+ 4x ARM Cortex-A76, 4x ARM Cortex-A55
|
||||
+ 4/8/16/24/32GB memory LPDDR5
|
||||
+ Mali G610MC4 GPU
|
||||
+ 2x 4-lane or 4x 2-lane MIPI CSI input
|
||||
+ soldered eMMC (optional)
|
||||
+ SPI flash for bootloader
|
||||
+ uSD slot
|
||||
+ 2x USB 2.0 Type-A, 2x USB 3.1 Gen1 Type-A, 1x USB 3.1 Gen1 Type-C
|
||||
+ 2x HDMI 2.1 output, 1x HDMI input
|
||||
+ 2x 2.5 Gbps Ethernet port
|
||||
+ 2x M.2 M-key connector, PCIe 3 2-lanes each
|
||||
+ On-board PCIe Wi-Fi/BT module
|
||||
+ 40-pin IO header including UART, SPI, I2C and 5V DC power in
|
||||
+ USB PD over USB Type-C
|
||||
+ 5.5mm OD x 2.5mm ID barrel jack power input
|
||||
+ Size: 110mm x 82mm
|
||||
+
|
||||
config TARGET_SIGE7_RK3588
|
||||
bool "ArmSoM Sige7 RK3588 board"
|
||||
select BOARD_LATE_INIT
|
||||
@@ -440,6 +467,7 @@ source "board/pine64/quartzpro64-rk3588/Kconfig"
|
||||
source "board/turing/turing-rk1-rk3588/Kconfig"
|
||||
source "board/radxa/rock5a-rk3588s/Kconfig"
|
||||
source "board/radxa/rock5b-rk3588/Kconfig"
|
||||
+source "board/radxa/rock5t-rk3588/Kconfig"
|
||||
source "board/radxa/rock-5-itx-rk3588/Kconfig"
|
||||
source "board/radxa/rock-5c-rk3588s/Kconfig"
|
||||
source "board/rockchip/evb_rk3588/Kconfig"
|
||||
diff --git a/board/radxa/rock5t-rk3588/Kconfig b/board/radxa/rock5t-rk3588/Kconfig
|
||||
new file mode 100644
|
||||
index 00000000000..82613ab3c2e
|
||||
--- /dev/null
|
||||
+++ b/board/radxa/rock5t-rk3588/Kconfig
|
||||
@@ -0,0 +1,12 @@
|
||||
+if TARGET_ROCK5T_RK3588
|
||||
+
|
||||
+config SYS_BOARD
|
||||
+ default "rock5t-rk3588"
|
||||
+
|
||||
+config SYS_VENDOR
|
||||
+ default "radxa"
|
||||
+
|
||||
+config SYS_CONFIG_NAME
|
||||
+ default "rock5t-rk3588"
|
||||
+
|
||||
+endif
|
||||
diff --git a/board/radxa/rock5t-rk3588/MAINTAINERS b/board/radxa/rock5t-rk3588/MAINTAINERS
|
||||
new file mode 100644
|
||||
index 00000000000..677fe7d971b
|
||||
--- /dev/null
|
||||
+++ b/board/radxa/rock5t-rk3588/MAINTAINERS
|
||||
@@ -0,0 +1,7 @@
|
||||
+ROCK5T-RK3588
|
||||
+M: Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
|
||||
+S: Maintained
|
||||
+F: board/radxa/rock5t-rk3588
|
||||
+F: include/configs/rock5t-rk3588.h
|
||||
+F: configs/rock5t-rk3588_defconfig
|
||||
+F: arch/arm/dts/rk3588-rock-5t-u-boot.dtsi
|
||||
diff --git a/configs/rock5t-rk3588_defconfig b/configs/rock5t-rk3588_defconfig
|
||||
new file mode 100644
|
||||
index 00000000000..fa27c549758
|
||||
--- /dev/null
|
||||
+++ b/configs/rock5t-rk3588_defconfig
|
||||
@@ -0,0 +1,111 @@
|
||||
+CONFIG_ARM=y
|
||||
+CONFIG_SKIP_LOWLEVEL_INIT=y
|
||||
+CONFIG_SYS_HAS_NONCACHED_MEMORY=y
|
||||
+CONFIG_COUNTER_FREQUENCY=24000000
|
||||
+CONFIG_ARCH_ROCKCHIP=y
|
||||
+CONFIG_SF_DEFAULT_SPEED=24000000
|
||||
+CONFIG_SF_DEFAULT_MODE=0x2000
|
||||
+CONFIG_DEFAULT_DEVICE_TREE="rockchip/rk3588-rock-5t"
|
||||
+CONFIG_ROCKCHIP_RK3588=y
|
||||
+CONFIG_ROCKCHIP_SPI_IMAGE=y
|
||||
+CONFIG_SPL_SERIAL=y
|
||||
+CONFIG_TARGET_ROCK5T_RK3588=y
|
||||
+CONFIG_SYS_LOAD_ADDR=0xc00800
|
||||
+CONFIG_SF_DEFAULT_BUS=5
|
||||
+CONFIG_DEBUG_UART_BASE=0xFEB50000
|
||||
+CONFIG_DEBUG_UART_CLOCK=24000000
|
||||
+CONFIG_SPL_SPI_FLASH_SUPPORT=y
|
||||
+CONFIG_SPL_SPI=y
|
||||
+CONFIG_PCI=y
|
||||
+CONFIG_DEBUG_UART=y
|
||||
+CONFIG_AHCI=y
|
||||
+CONFIG_FIT=y
|
||||
+CONFIG_FIT_VERBOSE=y
|
||||
+CONFIG_SPL_FIT_SIGNATURE=y
|
||||
+CONFIG_SPL_LOAD_FIT=y
|
||||
+CONFIG_LEGACY_IMAGE_FORMAT=y
|
||||
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3588-rock-5t.dtb"
|
||||
+# CONFIG_DISPLAY_CPUINFO is not set
|
||||
+CONFIG_DISPLAY_BOARDINFO_LATE=y
|
||||
+CONFIG_SPL_MAX_SIZE=0x40000
|
||||
+CONFIG_SPL_PAD_TO=0x7f8000
|
||||
+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
|
||||
+CONFIG_SPL_SPI_LOAD=y
|
||||
+CONFIG_SYS_SPI_U_BOOT_OFFS=0x60000
|
||||
+CONFIG_SPL_ATF=y
|
||||
+CONFIG_CMD_TCPM=y
|
||||
+CONFIG_CMD_GPIO=y
|
||||
+CONFIG_CMD_GPT=y
|
||||
+CONFIG_CMD_I2C=y
|
||||
+CONFIG_CMD_MMC=y
|
||||
+CONFIG_CMD_PCI=y
|
||||
+CONFIG_CMD_USB=y
|
||||
+CONFIG_CMD_ROCKUSB=y
|
||||
+CONFIG_CMD_USB_MASS_STORAGE=y
|
||||
+# CONFIG_CMD_SETEXPR is not set
|
||||
+CONFIG_CMD_REGULATOR=y
|
||||
+# CONFIG_SPL_DOS_PARTITION is not set
|
||||
+CONFIG_SPL_OF_CONTROL=y
|
||||
+CONFIG_OF_LIVE=y
|
||||
+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
|
||||
+CONFIG_SPL_DM_SEQ_ALIAS=y
|
||||
+CONFIG_SPL_REGMAP=y
|
||||
+CONFIG_SPL_SYSCON=y
|
||||
+CONFIG_AHCI_PCI=y
|
||||
+CONFIG_DWC_AHCI=y
|
||||
+CONFIG_SPL_CLK=y
|
||||
+# CONFIG_USB_FUNCTION_FASTBOOT is not set
|
||||
+CONFIG_ROCKCHIP_GPIO=y
|
||||
+CONFIG_SYS_I2C_ROCKCHIP=y
|
||||
+CONFIG_LED=y
|
||||
+CONFIG_LED_GPIO=y
|
||||
+CONFIG_MISC=y
|
||||
+CONFIG_SUPPORT_EMMC_RPMB=y
|
||||
+CONFIG_MMC_DW=y
|
||||
+CONFIG_MMC_DW_ROCKCHIP=y
|
||||
+CONFIG_MMC_SDHCI=y
|
||||
+CONFIG_MMC_SDHCI_SDMA=y
|
||||
+CONFIG_MMC_SDHCI_ROCKCHIP=y
|
||||
+CONFIG_SPI_FLASH_SFDP_SUPPORT=y
|
||||
+CONFIG_SPI_FLASH_MACRONIX=y
|
||||
+CONFIG_SPI_FLASH_XTX=y
|
||||
+CONFIG_PHYLIB=y
|
||||
+CONFIG_RTL8169=y
|
||||
+CONFIG_NVME_PCI=y
|
||||
+CONFIG_PCIE_DW_ROCKCHIP=y
|
||||
+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
|
||||
+CONFIG_PHY_ROCKCHIP_NANENG_COMBOPHY=y
|
||||
+CONFIG_PHY_ROCKCHIP_USBDP=y
|
||||
+CONFIG_SPL_PINCTRL=y
|
||||
+CONFIG_PWM_ROCKCHIP=y
|
||||
+CONFIG_SPL_RAM=y
|
||||
+CONFIG_SCSI=y
|
||||
+CONFIG_BAUDRATE=1500000
|
||||
+CONFIG_DEBUG_UART_SHIFT=2
|
||||
+CONFIG_SYS_NS16550_MEM32=y
|
||||
+CONFIG_ROCKCHIP_SFC=y
|
||||
+CONFIG_SYSRESET=y
|
||||
+CONFIG_USB=y
|
||||
+CONFIG_USB_XHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_HCD=y
|
||||
+CONFIG_USB_EHCI_GENERIC=y
|
||||
+CONFIG_USB_OHCI_HCD=y
|
||||
+CONFIG_USB_OHCI_GENERIC=y
|
||||
+CONFIG_USB_DWC3=y
|
||||
+CONFIG_USB_DWC3_GENERIC=y
|
||||
+CONFIG_SPL_USB_DWC3_GENERIC=y
|
||||
+CONFIG_TYPEC_TCPM=y
|
||||
+CONFIG_TYPEC_FUSB302=y
|
||||
+CONFIG_USB_HOST_ETHER=y
|
||||
+CONFIG_USB_ETHER_ASIX=y
|
||||
+CONFIG_USB_ETHER_ASIX88179=y
|
||||
+CONFIG_USB_ETHER_LAN75XX=y
|
||||
+CONFIG_USB_ETHER_LAN78XX=y
|
||||
+CONFIG_USB_ETHER_MCS7830=y
|
||||
+CONFIG_USB_ETHER_RTL8152=y
|
||||
+CONFIG_USB_ETHER_SMSC95XX=y
|
||||
+CONFIG_USB_GADGET=y
|
||||
+CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
+CONFIG_USB_FUNCTION_ROCKUSB=y
|
||||
+CONFIG_ERRNO_STR=y
|
||||
+CONFIG_NET_PREFER_ROM_MAC_ADDR=y
|
||||
diff --git a/include/configs/rock5t-rk3588.h b/include/configs/rock5t-rk3588.h
|
||||
new file mode 100644
|
||||
index 00000000000..a0e2e84e9ff
|
||||
--- /dev/null
|
||||
+++ b/include/configs/rock5t-rk3588.h
|
||||
@@ -0,0 +1,14 @@
|
||||
+/* SPDX-License-Identifier: GPL-2.0+
|
||||
+ * Copyright (c) 2025 Collabora Ltd.
|
||||
+ */
|
||||
+
|
||||
+#ifndef __ROCK5T_RK3588_H
|
||||
+#define __ROCK5T_RK3588_H
|
||||
+
|
||||
+#define ROCKCHIP_DEVICE_SETTINGS \
|
||||
+ "stdout=serial,vidconsole\0" \
|
||||
+ "stderr=serial,vidconsole\0"
|
||||
+
|
||||
+#include <configs/rk3588_common.h>
|
||||
+
|
||||
+#endif /* __ROCK5T_RK3588_H */
|
||||
--
|
||||
GitLab
|
||||
@@ -0,0 +1,20 @@
|
||||
From 4491dae1a3408161be4d665e986aa2d5987c9251 Mon Sep 17 00:00:00 2001
|
||||
From: Detlev Casanova <detlev.casanova@collabora.com>
|
||||
Date: Mon, 22 Apr 2024 09:56:19 -0400
|
||||
Subject: [PATCH] configs/rock5b: Set NET_PREFER_ROM_MAC_ADDR to y
|
||||
|
||||
---
|
||||
configs/rock5b-rk3588_defconfig | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/configs/rock5b-rk3588_defconfig b/configs/rock5b-rk3588_defconfig
|
||||
index 6349e879145..9c1e5df0924 100644
|
||||
--- a/configs/rock5b-rk3588_defconfig
|
||||
+++ b/configs/rock5b-rk3588_defconfig
|
||||
@@ -108,3 +108,4 @@ CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_GADGET_DOWNLOAD=y
|
||||
CONFIG_USB_FUNCTION_ROCKUSB=y
|
||||
CONFIG_ERRNO_STR=y
|
||||
+CONFIG_NET_PREFER_ROM_MAC_ADDR=y
|
||||
--
|
||||
GitLab
|
||||
@@ -0,0 +1,96 @@
|
||||
From 698bf35ed797f2a9ffdbeea5e83ea4ad7ed5a7b2 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
Date: Wed, 2 Apr 2025 19:54:47 +0200
|
||||
Subject: [PATCH] board: rock5b-rk3588: add ROCK 5B+ support
|
||||
|
||||
The ROCK 5B and ROCK 5B+ are quite similar, but there are also a
|
||||
few changes, which require a different device tree. Most of the
|
||||
changes are not easily detectable at runtime, but it is possible
|
||||
to tell the boards apart by checking the memory type. All ROCK
|
||||
5B models use LPDDR4 and all ROCK 5B+ models use LPDDR5.
|
||||
|
||||
Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
|
||||
---
|
||||
board/radxa/rock5b-rk3588/rock5b-rk3588.c | 65 +++++++++++++++++++++++
|
||||
1 file changed, 65 insertions(+)
|
||||
|
||||
diff --git a/board/radxa/rock5b-rk3588/rock5b-rk3588.c b/board/radxa/rock5b-rk3588/rock5b-rk3588.c
|
||||
index fc2f69db224..afe10ca0d16 100644
|
||||
--- a/board/radxa/rock5b-rk3588/rock5b-rk3588.c
|
||||
+++ b/board/radxa/rock5b-rk3588/rock5b-rk3588.c
|
||||
@@ -5,6 +5,10 @@
|
||||
|
||||
#include <fdtdec.h>
|
||||
#include <fdt_support.h>
|
||||
+#include <linux/bitfield.h>
|
||||
+#include <linux/bitops.h>
|
||||
+#include <env.h>
|
||||
+#include <asm/io.h>
|
||||
|
||||
#ifdef CONFIG_OF_BOARD_SETUP
|
||||
int ft_board_setup(void *blob, struct bd_info *bd)
|
||||
@@ -14,3 +18,64 @@ int ft_board_setup(void *blob, struct bd_info *bd)
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
+
|
||||
+enum {
|
||||
+ ROCKCHIP_DDR4 = 0,
|
||||
+ ROCKCHIP_DDR2 = 2,
|
||||
+ ROCKCHIP_DDR3 = 3,
|
||||
+ ROCKCHIP_LPDDR2 = 5,
|
||||
+ ROCKCHIP_LPDDR3 = 6,
|
||||
+ ROCKCHIP_LPDDR4 = 7,
|
||||
+ ROCKCHIP_LPDDR4X = 8,
|
||||
+ ROCKCHIP_LPDDR5 = 9,
|
||||
+ ROCKCHIP_DDR5 = 10,
|
||||
+ ROCKCHIP_UNUSED = 0xFF
|
||||
+};
|
||||
+
|
||||
+#define RK3588_PMUGRF_BASE_ADDR 0xfd58a000
|
||||
+#define RK3588_PMUGRF_OS_REG2 0x208
|
||||
+#define RK3588_PMUGRF_OS_REG2_DRAMTYPE_INFO GENMASK(15, 13)
|
||||
+#define RK3588_PMUGRF_OS_REG3 0x20c
|
||||
+#define RK3588_PMUGRF_OS_REG3_SYSREG_VERSION GENMASK(31, 28)
|
||||
+#define RK3588_PMUGRF_OS_REG3_DRAMTYPE_INFO_V3 GENMASK(13, 12)
|
||||
+
|
||||
+static int rk3588_get_memory_type(void)
|
||||
+{
|
||||
+ u32 reg2 = readl(RK3588_PMUGRF_BASE_ADDR + RK3588_PMUGRF_OS_REG2);
|
||||
+ u32 reg3 = readl(RK3588_PMUGRF_BASE_ADDR + RK3588_PMUGRF_OS_REG3);
|
||||
+ u32 ddr_type;
|
||||
+
|
||||
+ /* lower 3 bits of the DDR type */
|
||||
+ ddr_type = FIELD_GET(RK3588_PMUGRF_OS_REG2_DRAMTYPE_INFO, reg2);
|
||||
+
|
||||
+ /*
|
||||
+ * For version three and higher the upper two bits of the DDR type are
|
||||
+ * in RK3588_PMUGRF_OS_REG3
|
||||
+ */
|
||||
+ if (FIELD_GET(RK3588_PMUGRF_OS_REG3_SYSREG_VERSION, reg3) >= 0x3)
|
||||
+ ddr_type |= FIELD_GET(RK3588_PMUGRF_OS_REG3_DRAMTYPE_INFO_V3, reg3) << 3;
|
||||
+
|
||||
+ return ddr_type;
|
||||
+}
|
||||
+
|
||||
+static const char* rock5_get_model_devicetree(void)
|
||||
+{
|
||||
+ switch (rk3588_get_memory_type()) {
|
||||
+ case ROCKCHIP_LPDDR5:
|
||||
+ return "rockchip/rk3588-rock-5b-plus.dtb";
|
||||
+ case ROCKCHIP_LPDDR4:
|
||||
+ default:
|
||||
+ return "rockchip/rk3588-rock-5b.dtb";
|
||||
+ }
|
||||
+}
|
||||
+
|
||||
+int board_fit_config_name_match(const char *name)
|
||||
+{
|
||||
+ return strcmp(name, rock5_get_model_devicetree());
|
||||
+}
|
||||
+
|
||||
+int rk_board_late_init(void)
|
||||
+{
|
||||
+ env_set("fdtfile", rock5_get_model_devicetree());
|
||||
+ return 0;
|
||||
+}
|
||||
Reference in New Issue
Block a user