Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nanopi-r5s: bump blobs & u-boot enhancements for UMS/otg/bootorder #6833

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
36 changes: 36 additions & 0 deletions config/boards/nanopi-r5s.csc
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,39 @@ function post_family_tweaks__nanopir5s_udev_network_interfaces() {
SUBSYSTEM=="net", ACTION=="add", KERNELS=="0001:01:00.0", NAME:="lan2"
EOF
}

function post_config_uboot_target__extra_configs_for_nanopi-r5s() {
display_alert "u-boot for ${BOARD}" "u-boot: enable preboot & flash all LEDs in preboot" "info"
run_host_command_logged scripts/config --enable CONFIG_USE_PREBOOT
run_host_command_logged scripts/config --set-str CONFIG_PREBOOT "'led led-power on; led led-lan1 on; led led-lan2 on; led led-wan on; sleep 0.1; led led-lan1 off; led led-lan2 off; led led-wan off'" # double quotes required due to run_host_command_logged's quirks

display_alert "u-boot for ${BOARD}" "u-boot: enable EFI debugging command" "info"
run_host_command_logged scripts/config --enable CMD_EFIDEBUG
run_host_command_logged scripts/config --enable CMD_NVEDIT_EFI

display_alert "u-boot for ${BOARD}" "u-boot: enable more compression support" "info"
run_host_command_logged scripts/config --enable CONFIG_LZO
run_host_command_logged scripts/config --enable CONFIG_BZIP2
run_host_command_logged scripts/config --enable CONFIG_ZSTD

display_alert "u-boot for ${BOARD}" "u-boot: enable gpio LED support" "info"
run_host_command_logged scripts/config --enable CONFIG_LED
run_host_command_logged scripts/config --enable CONFIG_LED_GPIO

display_alert "u-boot for ${BOARD}" "u-boot: enable networking cmds" "info"
run_host_command_logged scripts/config --enable CONFIG_CMD_NFS
run_host_command_logged scripts/config --enable CONFIG_CMD_WGET
run_host_command_logged scripts/config --enable CONFIG_CMD_DNS
run_host_command_logged scripts/config --enable CONFIG_PROT_TCP
run_host_command_logged scripts/config --enable CONFIG_PROT_TCP_SACK

# UMS, RockUSB, gadget stuff
declare -a enable_configs=("CONFIG_CMD_USB_MASS_STORAGE" "CONFIG_USB_GADGET" "USB_GADGET_DOWNLOAD" "CONFIG_USB_FUNCTION_ROCKUSB" "CONFIG_USB_FUNCTION_ACM" "CONFIG_CMD_ROCKUSB" "CONFIG_CMD_USB_MASS_STORAGE")
for config in "${enable_configs[@]}"; do
display_alert "u-boot for ${BOARD}/${BRANCH}" "u-boot: enable ${config}" "info"
run_host_command_logged scripts/config --enable "${config}"
done
# Auto-enabled by the above, force off...
run_host_command_logged scripts/config --disable USB_FUNCTION_FASTBOOT

}
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <[email protected]>
Date: Wed, 16 Aug 2023 13:54:31 +0200
Subject: rockchip-common: boot USB devices first, then sd, then nvme, then
emmc

---
include/configs/rockchip-common.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/configs/rockchip-common.h b/include/configs/rockchip-common.h
index 111111111111..222222222222 100644
--- a/include/configs/rockchip-common.h
+++ b/include/configs/rockchip-common.h
@@ -13,7 +13,7 @@

#ifndef CONFIG_SPL_BUILD

-#define BOOT_TARGETS "mmc1 mmc0 nvme scsi usb pxe dhcp spi"
+#define BOOT_TARGETS "usb mmc1 nvme scsi mmc0 pxe dhcp spi"

#ifdef CONFIG_ARM64
#define ROOT_UUID "B921B045-1DF0-41C3-AF44-4C6F280D3FAE;\0"
--
Armbian

26 changes: 26 additions & 0 deletions patch/u-boot/v2024.04/board_nanopi-r5s/0002-usb-otg-mode.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: Ricardo Pardini <[email protected]>
Date: Sat, 29 Jun 2024 15:00:54 +0200
Subject: nanopi-r5s: u-boot: 2024.04: usb otg in u-boot for working
UMS/RockUSB

---
arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi | 4 ++++
1 file changed, 4 insertions(+)

diff --git a/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi b/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi
+++ b/arch/arm/dts/rk3568-nanopi-r5s-u-boot.dtsi
@@ -24,3 +24,7 @@
/delete-property/ regulator-always-on;
/delete-property/ regulator-boot-on;
};
+
+&usb_host0_xhci {
+ dr_mode = "otg";
+};
\ No newline at end of file
--
Armbian