[openwrt/openwrt] uboot-envtools: filogic: add support for BananaPi R4

LEDE Commits lede-commits at lists.infradead.org
Thu Feb 15 11:35:09 PST 2024


dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1192554d562f9fbf7ae59c5b8e2e1c7323967846

commit 1192554d562f9fbf7ae59c5b8e2e1c7323967846
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Mon Nov 27 04:01:33 2023 +0000

    uboot-envtools: filogic: add support for BananaPi R4
    
    Add environment settings for the BananaPi BPI-R4 router board which
    can boot from (and store its bootloader environment on) micro SD card,
    SPI-NAND and eMMC.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/boot/uboot-envtools/files/mediatek_filogic          | 13 +++++++++++++
 .../arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts     | 12 ++++++++++++
 2 files changed, 25 insertions(+)

diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic
index 01d816d991..1050277292 100644
--- a/package/boot/uboot-envtools/files/mediatek_filogic
+++ b/package/boot/uboot-envtools/files/mediatek_filogic
@@ -52,6 +52,19 @@ bananapi,bpi-r3)
 		;;
 	esac
 	;;
+bananapi,bpi-r4)
+	. /lib/upgrade/platform.sh
+
+	bootdev="$(platform_get_bootdev)"
+	case "$bootdev" in
+	ubi*)
+		ubootenv_add_ubi_default
+		;;
+	mmc*)
+		ubootenv_add_mmc_default "${bootdev%%p[0-9]*}"
+		;;
+	esac
+	;;
 cmcc,rax3000m)
 	case "$(cmdline_get_var root)" in
 	/dev/mmc*)
diff --git a/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index b4bf3400ff..416958428f 100644
--- a/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -386,6 +386,18 @@
 	status = "okay";
 };
 
+&uart1 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart1_2_lite_pins>;
+};
+
+&uart2 {
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&uart2_3_pins>;
+};
+
 &watchdog {
 	status = "okay";
 };




More information about the lede-commits mailing list