mkspi: apply MKSPI specific U-Boot changes

Based on official MKS armbian repo
This commit is contained in:
Maxim Medvedev 2024-12-08 15:32:49 +01:00 committed by Igor
parent f1e0ade2e2
commit 9eaf5e5140

View File

@ -0,0 +1,185 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Maxim Medvedev <redrathnure@gmail.com>
Date: Sun, 8 Dec 2024 14:28:06 +0000
Subject: apply MKSPI specific U-Boot changes
---
arch/arm/dts/rk3328-mkspi.dts | 47 +++++++---
configs/mkspi-rk3328_defconfig | 4 +-
2 files changed, 36 insertions(+), 15 deletions(-)
diff --git a/arch/arm/dts/rk3328-mkspi.dts b/arch/arm/dts/rk3328-mkspi.dts
index 20ca255664..27f414c4be 100755
--- a/arch/arm/dts/rk3328-mkspi.dts
+++ b/arch/arm/dts/rk3328-mkspi.dts
@@ -7,12 +7,12 @@
/dts-v1/;
#include "rk3328.dtsi"
/ {
- model = "Firefly roc-rk3328-cc";
- compatible = "firefly,roc-rk3328-cc", "rockchip,rk3328";
+ model = "Makerbase MKS-PI";
+ compatible = "mks,rk3328-mkspi", "rockchip,rk3328";
aliases {
mmc0 = &sdmmc;
mmc1 = &emmc;
};
@@ -49,25 +49,27 @@
vin-supply = <&vcc_io>;
};
vcc_sdio: sdmmcio-regulator {
compatible = "regulator-gpio";
- gpios = <&grf_gpio 0 GPIO_ACTIVE_HIGH>;
- states = <1800000 0x1>,
- <3300000 0x0>;
+ gpios = <&gpio2 RK_PC4 GPIO_ACTIVE_HIGH>;
+ pinctrl-0 = <&sdio_vcc_pin>;
+ pinctrl-names = "default";
+ states = <1800000 0x0>,
+ <3300000 0x1>;
regulator-name = "vcc_sdio";
regulator-type = "voltage";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <3300000>;
regulator-always-on;
- vin-supply = <&vcc_sys>;
+ vin-supply = <&vcc_io>;
};
vcc_host1_5v: vcc_otg_5v: vcc-host1-5v-regulator {
compatible = "regulator-fixed";
enable-active-high;
- gpio = <&gpio1 RK_PD2 GPIO_ACTIVE_HIGH>;
+ gpio = <&gpio0 RK_PA2 GPIO_ACTIVE_HIGH>;
pinctrl-names = "default";
pinctrl-0 = <&usb20_host_drv>;
regulator-name = "vcc_host1_5v";
regulator-always-on;
vin-supply = <&vcc_sys>;
@@ -110,15 +112,19 @@
};
};
};
&analog_sound {
- status = "okay";
+ status = "disabled";
};
&codec {
- status = "okay";
+ status = "disabled";
+};
+
+&gmac2phy {
+ status = "okay";
};
&cpu0 {
cpu-supply = <&vdd_arm>;
};
@@ -163,11 +169,15 @@
snps,reset-delays-us = <0 10000 50000>;
snps,rxpbl = <0x4>;
snps,txpbl = <0x4>;
tx_delay = <0x24>;
rx_delay = <0x18>;
- status = "okay";
+ status = "disabled";
+};
+
+&gpu {
+ mali-supply = <&vdd_logic>;
};
&hdmi {
status = "okay";
};
@@ -301,26 +311,32 @@
status = "okay";
vccio1-supply = <&vcc_io>;
vccio2-supply = <&vcc18_emmc>;
vccio3-supply = <&vcc_sdio>;
- vccio4-supply = <&vcc_18>;
+ vccio4-supply = <&vcc_io>;
vccio5-supply = <&vcc_io>;
vccio6-supply = <&vcc_io>;
pmuio-supply = <&vcc_io>;
};
&pinctrl {
pmic {
pmic_int_l: pmic-int-l {
- rockchip,pins = <1 RK_PD0 RK_FUNC_GPIO &pcfg_pull_up>;
+ rockchip,pins = <2 RK_PA6 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
usb2 {
usb20_host_drv: usb20-host-drv {
- rockchip,pins = <1 RK_PD2 RK_FUNC_GPIO &pcfg_pull_none>;
+ rockchip,pins = <0 RK_PA2 RK_FUNC_GPIO &pcfg_pull_none>;
+ };
+ };
+
+ sd {
+ sdio_vcc_pin: sdio-vcc-pin {
+ rockchip,pins = <2 RK_PC4 RK_FUNC_GPIO &pcfg_pull_up>;
};
};
};
&sdmmc {
@@ -354,10 +370,15 @@
&u2phy_otg {
status = "okay";
};
+&uart0 {
+ pinctrl-0 = <&uart0_xfer &uart0_cts>;
+ status = "okay";
+};
+
&uart2 {
status = "okay";
};
&usb20_otg {
diff --git a/configs/mkspi-rk3328_defconfig b/configs/mkspi-rk3328_defconfig
index 1514ee63bb..2c80464d5a 100755
--- a/configs/mkspi-rk3328_defconfig
+++ b/configs/mkspi-rk3328_defconfig
@@ -5,11 +5,11 @@ CONFIG_COUNTER_FREQUENCY=24000000
CONFIG_ARCH_ROCKCHIP=y
CONFIG_SYS_TEXT_BASE=0x00200000
CONFIG_SPL_GPIO=y
CONFIG_NR_DRAM_BANKS=1
CONFIG_ENV_OFFSET=0x3F8000
-CONFIG_DEFAULT_DEVICE_TREE="rk3328-roc-cc"
+CONFIG_DEFAULT_DEVICE_TREE="rk3328-mkspi"
CONFIG_ROCKCHIP_RK3328=y
CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y
CONFIG_TPL_LIBCOMMON_SUPPORT=y
CONFIG_TPL_LIBGENERIC_SUPPORT=y
CONFIG_SPL_DRIVERS_MISC=y
@@ -21,11 +21,11 @@ CONFIG_DEBUG_UART=y
CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
# CONFIG_ANDROID_BOOT_IMAGE is not set
CONFIG_FIT=y
CONFIG_FIT_VERBOSE=y
CONFIG_SPL_LOAD_FIT=y
-CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-roc-cc.dtb"
+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-mkspi.dtb"
# CONFIG_DISPLAY_CPUINFO is not set
CONFIG_DISPLAY_BOARDINFO_LATE=y
CONFIG_MISC_INIT_R=y
# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
CONFIG_TPL_SYS_MALLOC_SIMPLE=y
--
Created with Armbian build tools https://github.com/armbian/build