mediatek: add an upstreamed spi-nand driver
[openwrt/openwrt.git] / target / linux / mediatek / dts / mt7622-elecom-wrc-2533gent.dts
index 867982b06116a8af8f287af51314263edcb2f54f..3e061ef945cb33fd7f17a92872f44c9a5c1d5c8f 100644 (file)
        status = "okay";
 };
 
-&snand {
-       mediatek,quad-spi;
+&bch {
+       status = "okay";
+};
+
+&snfi {
        pinctrl-names = "default";
        pinctrl-0 = <&serial_nand_pins>;
        status = "okay";
-
-       partitions {
-               compatible = "fixed-partitions";
-               #address-cells = <1>;
-               #size-cells = <1>;
-
-               partition@0 {
-                       label = "Preloader";
-                       reg = <0x00000 0x0080000>;
-                       read-only;
-               };
-
-               partition@80000 {
-                       label = "ATF";
-                       reg = <0x80000 0x0040000>;
-                       read-only;
-               };
-
-               partition@c0000 {
-                       label = "uboot";
-                       reg = <0xc0000 0x0080000>;
-                       read-only;
-               };
-
-               partition@140000 {
-                       label = "uboot-env";
-                       reg = <0x140000 0x0080000>;
-                       read-only;
-               };
-
-               factory: partition@1c0000 {
-                       label = "factory";
-                       reg = <0x1c0000 0x0040000>;
-                       read-only;
-               };
-
-               partition@200000 {
-                       label = "firmware";
-                       reg = <0x200000 0x2000000>;
-               };
-
-               partition@2200000 {
-                       label = "reserved";
-                       reg = <0x2200000 0x4000000>;
+       flash@0 {
+               compatible = "spi-nand";
+               reg = <0>;
+               spi-tx-bus-width = <4>;
+               spi-rx-bus-width = <4>;
+               nand-ecc-engine = <&snfi>;
+
+               partitions {
+                       compatible = "fixed-partitions";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+
+                       partition@0 {
+                               label = "Preloader";
+                               reg = <0x00000 0x0080000>;
+                               read-only;
+                       };
+
+                       partition@80000 {
+                               label = "ATF";
+                               reg = <0x80000 0x0040000>;
+                               read-only;
+                       };
+
+                       partition@c0000 {
+                               label = "uboot";
+                               reg = <0xc0000 0x0080000>;
+                               read-only;
+                       };
+
+                       partition@140000 {
+                               label = "uboot-env";
+                               reg = <0x140000 0x0080000>;
+                               read-only;
+                       };
+
+                       factory: partition@1c0000 {
+                               label = "factory";
+                               reg = <0x1c0000 0x0040000>;
+                               read-only;
+                       };
+
+                       partition@200000 {
+                               label = "firmware";
+                               reg = <0x200000 0x2000000>;
+                       };
+
+                       partition@2200000 {
+                               label = "reserved";
+                               reg = <0x2200000 0x4000000>;
+                       };
                };
        };
 };