uboot-mediatek: improve BPi-R64 support

* allow MAC address from U-Boot env to be inhertied
 * allow eMMC installation to succeed also without recovery present
   on the SD Card.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
This commit is contained in:
Daniel Golle 2021-03-05 19:07:54 +00:00
parent 3a187fa718
commit 51ef823f95
No known key found for this signature in database
GPG Key ID: 5A8F39C31C3217CA
2 changed files with 14 additions and 6 deletions

View File

@ -1,6 +1,14 @@
--- a/arch/arm/dts/mt7622-bananapi-bpi-r64.dts
+++ b/arch/arm/dts/mt7622-bananapi-bpi-r64.dts
@@ -27,6 +27,42 @@
@@ -20,6 +20,7 @@
aliases {
spi0 = &snfi;
+ ethernet0 = &eth;
};
memory@40000000 {
@@ -27,6 +29,42 @@
reg = <0x40000000 0x40000000>;
};
@ -43,7 +51,7 @@
reg_1p8v: regulator-1p8v {
compatible = "regulator-fixed";
regulator-name = "fixed-1.8V";
@@ -139,11 +163,12 @@
@@ -139,11 +177,12 @@
};
@ -58,7 +66,7 @@
/* "I2S2_OUT, "I2S4_IN"", "I2S3_IN", "I2S2_IN",
* "I2S4_OUT", "I2S3_OUT" are used as DAT0, DAT1,
* DAT2, DAT3, CMD, CLK for SD respectively.
@@ -164,7 +189,6 @@
@@ -164,7 +203,6 @@
pins = "TXD3";
bias-pull-up;
};
@ -66,7 +74,7 @@
};
};
@@ -199,7 +223,7 @@
@@ -199,7 +237,7 @@
status = "okay";
bus-width = <8>;
max-frequency = <50000000>;
@ -75,7 +83,7 @@
vmmc-supply = <&reg_3p3v>;
vqmmc-supply = <&reg_3p3v>;
non-removable;
@@ -207,14 +231,15 @@
@@ -207,14 +245,15 @@
&mmc1 {
pinctrl-names = "default";

View File

@ -164,7 +164,7 @@
+emmc_write_hdr=mmc dev 0 0 && mmc erase 0x0 0x40 && mmc write $loadaddr 0x0 0x40
+emmc_write_bl3=mmc dev 0 0 && mmc erase 0x1000 0x800 && mmc write $loadaddr 0x1000 0x800
+emmc_write_recovery=iminfo $loadaddr && mmc dev 0 && part start mmc 0 $part_recovery part_addr && part size mmc 0 $part_recovery part_size && run mmc_write_vol
+emmc_init=run sdmmc_read_emmc_hdr && run emmc_write_hdr && run sdmmc_read_emmc_bl3 && run emmc_write_bl3 && run sdmmc_read_recovery && run emmc_write_recovery && run sdmmc_read_emmc_bl2 && run emmc_write_bl2 ; env default bootcmd ; saveenv ; saveenv
+emmc_init=run sdmmc_read_emmc_bl2 && run emmc_write_bl2 && run sdmmc_read_emmc_hdr && run emmc_write_hdr && run sdmmc_read_emmc_bl3 && run emmc_write_bl3 && run sdmmc_read_recovery && run emmc_write_recovery ; env default bootcmd ; saveenv ; saveenv
+sdmmc_write_production=iminfo $fileaddr && mmc dev 1 && part start mmc 1 $part_default part_addr && part size mmc 1 $part_default part_size && run mmc_write_vol
+sdmmc_write_recovery=iminfo $fileaddr && mmc dev 1 && part start mmc 1 $part_recovery part_addr && part size mmc 1 $part_recovery part_size && run mmc_write_vol
+sdmmc_read_production=mmc dev 1 && part start mmc 1 $part_default part_addr && part size mmc 1 $part_default part_size && run mmc_read_vol