Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions config/boards/mekotronics-r58x-4g.csc
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@ function post_family_config__mekor58x_4g_use_mainline_uboot() {
declare -g BOOTCONFIG="mekotronics-r58x-4g-rk3588_defconfig" # mainline
declare -g BOOTDELAY=1
declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git"
declare -g BOOTBRANCH="tag:v2026.01"
declare -g BOOTPATCHDIR="v2026.01"
declare -g BOOTBRANCH="tag:v2026.04-rc2"
declare -g BOOTPATCHDIR="v2026.04"
declare -g BOOTDIR="u-boot-${BOARD}"

declare -g UBOOT_TARGET_MAP="BL31=bl31.elf ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin"
Expand All @@ -54,6 +54,20 @@ function pre_config_uboot_target__mekor58x_4g_patch_rockchip_common_boot_order()
regular_git diff -u include/configs/rockchip-common.h || true
}

function pre_config_uboot_target__ekor58x_4g_patch_uboot_dtsi_for_ums() {
[[ "${BRANCH}" == "vendor" ]] && return 0 # Not for 'vendor' branch, which uses 2017.09 vendor u-boot from Radxa

display_alert "u-boot for ${BOARD}" "u-boot: add to u-boot dtsi for UMS" "info" # avoid a patch, just append to the dtsi file
# Append to the t6 u-boot dtsi file with stuff for enabling gadget/otg/peripheral mode
cat <<- EOD >> arch/arm/dts/rk3588-blueberry-edge-v12-linux-u-boot.dtsi
#include "rk3588-generic-u-boot.dtsi"
&u2phy0 { status = "okay"; };
&u2phy0_otg { status = "okay"; };
&usbdp_phy0 { status = "okay"; };
&usb_host0_xhci { dr_mode = "peripheral"; maximum-speed = "high-speed"; status = "okay"; };
EOD
}

function post_config_uboot_target__extra_configs_for_mekor58x_4g_mainline_environment_in_spi() {
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable board-specific configs" "info"
run_host_command_logged scripts/config --enable CONFIG_CMD_MISC
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,17 @@

};

sound {
compatible = "audio-graph-card";
label = "rockchip,es8388";
widgets = "Microphone", "Mic Jack",
"Headphone", "Headphones";
routing = "LINPUT2", "Mic Jack",
"Headphones", "LOUT1",
"Headphones", "ROUT1";
dais = <&i2s0_8ch_p0>;
};

vcc12v_dcin: vcc12v-dcin {
compatible = "regulator-fixed";
regulator-name = "vcc12v_dcin";
Expand Down Expand Up @@ -90,6 +101,20 @@
pinctrl-0 = <&vcc5v0_host_en>;
};

vcc5v0_otg: vcc5v0-otg-regulator {
compatible = "regulator-fixed";
regulator-name = "vcc5v0_otg";
regulator-boot-on;
regulator-always-on;
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
enable-active-high;
gpio = <&gpio4 RK_PA7 GPIO_ACTIVE_HIGH>;
vin-supply = <&vcc5v0_sys>;
pinctrl-names = "default";
pinctrl-0 = <&vcc5v0_otg_en>;
};

vcc_1v1_nldo_s3: vcc-1v1-nldo-s3 {
compatible = "regulator-fixed";
regulator-name = "vcc_1v1_nldo_s3";
Expand Down Expand Up @@ -251,7 +276,6 @@
};

&hdmi0 {
enable-gpios = <&gpio4 RK_PB1 GPIO_ACTIVE_HIGH>;
status = "okay";
};

Expand Down Expand Up @@ -349,6 +373,26 @@
};
};

&i2c3 {
status = "okay";

es8388: audio-codec@10 {
compatible = "everest,es8388", "everest,es8328";
reg = <0x10>;
clocks = <&cru I2S0_8CH_MCLKOUT>;
clock-names = "mclk";
assigned-clocks = <&cru I2S0_8CH_MCLKOUT>;
assigned-clock-rates = <12288000>;
#sound-dai-cells = <0>;

port {
es8316_p0_0: endpoint {
remote-endpoint = <&i2s0_8ch_p0_0>;
};
};
};
};

// Unknown where this is wired to, maybe some header pins. Found on vendor DT.
&i2c5 {
pinctrl-names = "default";
Expand All @@ -373,6 +417,24 @@
};
};

// analog sound
&i2s0_8ch {
pinctrl-names = "default";
pinctrl-0 = <&i2s0_lrck
&i2s0_sclk
&i2s0_sdi0
&i2s0_sdo0>;
status = "okay";

i2s0_8ch_p0: port {
i2s0_8ch_p0_0: endpoint {
dai-format = "i2s";
mclk-fs = <256>;
remote-endpoint = <&es8316_p0_0>;
};
};
};

//hdmi0 sound
&i2s5_8ch {
status = "okay";
Expand Down Expand Up @@ -445,16 +507,6 @@
status = "okay";
};

/* @TODO
modem {
compatible = "rockchip,modem";
power-on_gpio = <&gpio0 0x1d 0x00>;
reset_gpio = <&gpio0 0x00 0x00>;
status = "okay";
};
*/


&pinctrl {

gpio-leds {
Expand Down Expand Up @@ -519,6 +571,16 @@
};
};

usb-typec {
usbc0_int: usbc0-int { // @TODO missing fusb302
rockchip,pins = <3 RK_PC7 RK_FUNC_GPIO &pcfg_pull_up>;
};

vcc5v0_otg_en: vcc5v0-otg-en {
rockchip,pins = <4 RK_PA7 RK_FUNC_GPIO &pcfg_pull_none>;
};
};

};

&sata0 {
Expand Down Expand Up @@ -920,6 +982,10 @@
};
};

&usbdp_phy1 {
rockchip,dp-lane-mux = <0 1 2 3>;
status = "okay";
};

&u2phy0 {
status = "okay";
Expand All @@ -937,15 +1003,13 @@
status = "okay";
};

// XHCI (USB3) stuff is disabled, as it all depends on the fusb302 USB-C controller
// the blue ports on the front of the board, labelled "USB3", arent really USB3, but USB2.
&u2phy1 { // for usbdp_phy1 which is also usb_host1_xhci
status = "disabled";
status = "okay";
};

&u2phy1_otg { // for usb_host1_xhci
&u2phy1_otg {
phy-supply = <&vcc5v0_host>;
status = "disabled";
status = "okay";
};

// USB 2.0 stuff that somewhat works:
Expand Down Expand Up @@ -975,6 +1039,11 @@
status = "okay";
};

&usb_host0_xhci {
dr_mode = "host";
status = "okay";
};

&usb_host1_ehci {
status = "okay";
};
Expand All @@ -983,6 +1052,11 @@
status = "okay";
};

&usb_host1_xhci {
dr_mode = "host";
status = "okay";
};

&vop {
status = "okay";
};
Expand Down

This file was deleted.

Loading