CONFIG_MMC_HS200_SUPPORT=y
CONFIG_MMC_MTK=y
CONFIG_MTD=y
+--- a/arch/arm/dts/mt7988-rfb.dts
++++ b/arch/arm/dts/mt7988-rfb.dts
+@@ -144,6 +144,23 @@
+ compatible = "spi-nand";
+ reg = <0>;
+ spi-max-frequency = <52000000>;
++
++ partitions {
++ compatible = "fixed-partitions";
++ #address-cells = <1>;
++ #size-cells = <1>;
++
++ partition@0 {
++ label = "bl2";
++ reg = <0x0 0x200000>;
++ };
++
++ partition@200000 {
++ label = "ubi";
++ reg = <0x200000 0x7e00000>;
++ compatible = "linux,ubi";
++ };
++ };
+ };
+ };
+
--- /dev/null
+// SPDX-License-Identifier: (GPL-2.0 OR MIT)
+
+/dts-v1/;
+/plugin/;
+
+/ {
+ compatible = "mediatek,mt7988a-rfb", "mediatek,mt7988a";
+
+ fragment@0 {
+ target = <&ubi_part>;
+
+ __overlay__ {
+ volumes {
+ ubi_factory: ubi-volume-factory {
+ volname = "factory";
+
+ nvmem-layout {
+ compatible = "fixed-layout";
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ eeprom_wmac: eeprom@0 {
+ reg = <0x0 0x1e00>;
+ };
+
+ gmac2_mac: eeprom@fffee {
+ reg = <0xfffee 0x6>;
+ };
+
+ gmac1_mac: eeprom@ffff4 {
+ reg = <0xffff4 0x6>;
+ };
+
+ gmac0_mac: eeprom@ffffa {
+ reg = <0xffffa 0x6>;
+ };
+ };
+ };
+ };
+ };
+ };
+
+ fragment@1 {
+ target = <&pcie0>;
+ __overlay__ {
+ pcie@0,0 {
+ reg = <0x0000 0 0 0 0>;
+
+ wifi@0,0 {
+ compatible = "mediatek,mt76";
+ reg = <0x0000 0 0 0 0>;
+ nvmem-cell-names = "eeprom";
+ nvmem-cells = <&eeprom_wmac>;
+ };
+ };
+ };
+ };
+
+ fragment@2 {
+ target = <&gmac0>;
+ __overlay__ {
+ nvmem-cell-names = "mac-address";
+ nvmem-cells = <&gmac0_mac>;
+ };
+ };
+
+ fragment@3 {
+ target = <&gmac1>;
+ __overlay__ {
+ nvmem-cell-names = "mac-address";
+ nvmem-cells = <&gmac1_mac>;
+ };
+ };
+
+ fragment@4 {
+ target = <&gmac2>;
+ __overlay__ {
+ nvmem-cell-names = "mac-address";
+ nvmem-cells = <&gmac2_mac>;
+ };
+ };
+};
spi-max-frequency = <52000000>;
spi-tx-bus-width = <4>;
spi-rx-bus-width = <4>;
- mediatek,nmbm;
- mediatek,bmt-max-ratio = <1>;
- mediatek,bmt-max-reserved-blocks = <64>;
partitions {
compatible = "fixed-partitions";
partition@0 {
label = "BL2";
- reg = <0x00000 0x0100000>;
+ reg = <0x00000 0x0200000>;
read-only;
};
- partition@100000 {
- label = "u-boot-env";
- reg = <0x0100000 0x0080000>;
- };
+ ubi_part: partition@200000 {
+ label = "ubi";
+ reg = <0x0200000 0x7e00000>;
+ compatible = "linux,ubi";
- partition@180000 {
- label = "Factory";
- reg = <0x180000 0x0400000>;
- };
+ volumes {
+ ubi-volume-ubootenv {
+ volname = "ubootenv";
+ nvmem-layout {
+ compatible = "u-boot,env-redundant-bool-layout";
+ };
+ };
- partition@580000 {
- label = "FIP";
- reg = <0x580000 0x0200000>;
- };
+ ubi-volume-ubootenv2 {
+ volname = "ubootenv2";
+ nvmem-layout {
+ compatible = "u-boot,env-redundant-bool-layout";
+ };
+ };
- partition@780000 {
- label = "ubi";
- reg = <0x780000 0x7080000>;
+ ubi_root: ubi-volume-fit {
+ volname = "fit";
+ };
+
+ };
};
};
};
};
};
+
+ fragment@1 {
+ target-path = "/chosen";
+ __overlay__ {
+ rootdisk-spim-nand = <&ubi_root>;
+ };
+ };
};
bananapi,bpi-r3-mini|\
bananapi,bpi-r4|\
bananapi,bpi-r4-poe|\
+ mediatek,mt7988a-rfb|\
jdcloud,re-cp-03|\
tplink,tl-xdr4288|\
tplink,tl-xdr6086|\
mt7988a-rfb-sd \
mt7988a-rfb-snfi-nand \
mt7988a-rfb-spim-nand \
+ mt7988a-rfb-spim-nand-factory \
mt7988a-rfb-spim-nor \
mt7988a-rfb-eth1-aqr \
mt7988a-rfb-eth1-i2p5g-phy \
ARTIFACT/emmc-bl31-uboot.fip := mt7988-bl31-uboot rfb-emmc
ARTIFACT/nor-preloader.bin := mt7988-bl2 nor-comb
ARTIFACT/nor-bl31-uboot.fip := mt7988-bl31-uboot rfb-nor
- ARTIFACT/snand-preloader.bin := mt7988-bl2 spim-nand-comb
+ ARTIFACT/snand-preloader.bin := mt7988-bl2 spim-nand-ubi-comb
ARTIFACT/snand-bl31-uboot.fip := mt7988-bl31-uboot rfb-snand
ARTIFACT/sdcard.img.gz := mt798x-gpt sdmmc |\
pad-to 17k | mt7988-bl2 sdmmc-comb |\