mediatek: wait for fitblk rootfs
[openwrt/staging/981213.git] / target / linux / mediatek / dts / mt7622-linksys-e8450-ubi.dts
index e78db1de6cf41e606d991ba4f92afc3e0c61783f..88538c8b0a6c4b5dce935a1aa7598317e58f8cf9 100644 (file)
        aliases {
                label-mac-device = &wan;
        };
+
+       chosen {
+               rootdisk = <&ubi_rootfs>;
+               bootargs = "earlycon=uart8250,mmio32,0x11002000 console=ttyS0,115200n1 swiotlb=512 ubi.block=0,fit root=/dev/fit0 rootwait";
+       };
 };
 
 &snand {
                };
 
                partition@80000 {
-                       label = "fip";
-                       reg = <0x80000 0x140000>;
-                       read-only;
-               };
+                       label = "ubi";
+                       reg = <0x80000 0x7f80000>;
+                       compatible = "linux,ubi";
 
-               factory: partition@1c0000 {
-                       label = "factory";
-                       reg = <0x1c0000 0x100000>;
-                       read-only;
+                       volumes {
+                               ubi-volume-ubootenv {
+                                       volname = "ubootenv";
+                                       nvmem-layout {
+                                               compatible = "u-boot,env-redundant-bool-layout";
+                                       };
+                               };
 
-                       nvmem-layout {
-                               compatible = "fixed-layout";
-                               #address-cells = <1>;
-                               #size-cells = <1>;
+                               ubi-volume-ubootenv2 {
+                                       volname = "ubootenv2";
+                                       nvmem-layout {
+                                               compatible = "u-boot,env-redundant-bool-layout";
+                                       };
+                               };
 
-                               macaddr_factory_7fff4: macaddr@7fff4 {
-                                       reg = <0x7fff4 0x6>;
+                               ubi_rootfs: ubi-volume-fit {
+                                       volname = "fit";
                                };
 
-                               macaddr_factory_7fffa: macaddr@7fffa {
-                                       reg = <0x7fffa 0x6>;
+                               ubi_factory: ubi-volume-factory {
+                                       volname = "factory";
                                };
                        };
                };
+       };
+};
+
+&ubi_factory {
+       nvmem-layout {
+               compatible = "fixed-layout";
+               #address-cells = <1>;
+               #size-cells = <1>;
+
+               eeprom_factory_0: eeprom@0 {
+                       reg = <0x0 0x4da8>; /* actual length 0x400 */
+               };
 
-               partition@300000 {
-                       label = "ubi";
-                       reg = <0x300000 0x7d00000>;
+               eeprom_factory_5000: eeprom@5000 {
+                       reg = <0x5000 0xe00>;
+               };
+
+               macaddr_factory_7fff4: macaddr@7fff4 {
+                       reg = <0x7fff4 0x6>;
+               };
+
+               macaddr_factory_7fffa: macaddr@7fffa {
+                       reg = <0x7fffa 0x6>;
                };
        };
 };
 
 &wmac {
-       mediatek,mtd-eeprom = <&factory 0x0>;
+       nvmem-cells = <&eeprom_factory_0>;
+       nvmem-cell-names = "eeprom";
        status = "okay";
 };
 
 &wmac1 {
-       mediatek,mtd-eeprom = <&factory 0x5000>;
+       nvmem-cells = <&eeprom_factory_5000>;
+       nvmem-cell-names = "eeprom";
 };
 
 &gmac0 {