mediatek: change dts to use the new snand driver
[openwrt/openwrt.git] / target / linux / mediatek / patches-5.10 / 131-dts-mt7622-add-snand-support.patch
index 5f89d58b06c12111ef3917e9be9287f26343e417..fe136c247476a0e71e6e6ca92a97111536c95940 100644 (file)
@@ -1,17 +1,18 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7622.dtsi
-@@ -561,6 +561,19 @@
+@@ -561,6 +561,20 @@
                status = "disabled";
        };
  
-+      snfi: spi@1100d000 {
-+              compatible = "mediatek,mt7622-snfi";
-+              reg = <0 0x1100d000 0 0x1000>;
++      snand: snfi@1100d000 {
++              compatible = "mediatek,mt7622-snand";
++              reg = <0 0x1100d000 0 0x1000>, <0 0x1100e000 0 0x1000>;
++              reg-names = "nfi", "ecc";
 +              interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>;
 +              clocks = <&pericfg CLK_PERI_NFI_PD>,
-+                       <&pericfg CLK_PERI_SNFI_PD>;
-+              clock-names = "nfi_clk", "spi_clk";
-+              ecc-engine = <&bch>;
++                       <&pericfg CLK_PERI_SNFI_PD>,
++                       <&pericfg CLK_PERI_NFIECC_PD>;
++              clock-names = "nfi_clk", "pad_clk", "ecc_clk";
 +              #address-cells = <1>;
 +              #size-cells = <0>;
 +              status = "disabled";
                             "mediatek,mt8173-nor";
 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-@@ -85,7 +85,7 @@
- };
- &bch {
--      status = "disabled";
-+      status = "okay";
- };
- &btif {
-@@ -529,6 +529,62 @@
+@@ -529,6 +529,55 @@
        status = "disabled";
  };
  
-+&snfi {
++&snand {
++      mediatek,quad-spi;
 +      pinctrl-names = "default";
 +      pinctrl-0 = <&serial_nand_pins>;
 +      status = "okay";
 +
-+      spi_nand@0 {
++      partitions {
++              compatible = "fixed-partitions";
 +              #address-cells = <1>;
 +              #size-cells = <1>;
-+              compatible = "spi-nand";
-+              spi-max-frequency = <104000000>;
-+              reg = <0>;
-+
-+              partitions {
-+                      compatible = "fixed-partitions";
-+                      #address-cells = <1>;
-+                      #size-cells = <1>;
 +
-+                      partition@0 {
-+                              label = "Preloader";
-+                              reg = <0x00000 0x0080000>;
-+                              read-only;
-+                      };
++              partition@0 {
++                      label = "Preloader";
++                      reg = <0x00000 0x0080000>;
++                      read-only;
++              };
 +
-+                      partition@80000 {
-+                              label = "ATF";
-+                              reg = <0x80000 0x0040000>;
-+                      };
++              partition@80000 {
++                      label = "ATF";
++                      reg = <0x80000 0x0040000>;
++              };
 +
-+                      partition@c0000 {
-+                              label = "Bootloader";
-+                              reg = <0xc0000 0x0080000>;
-+                      };
++              partition@c0000 {
++                      label = "Bootloader";
++                      reg = <0xc0000 0x0080000>;
++              };
 +
-+                      partition@140000 {
-+                              label = "Config";
-+                              reg = <0x140000 0x0080000>;
-+                      };
++              partition@140000 {
++                      label = "Config";
++                      reg = <0x140000 0x0080000>;
++              };
 +
-+                      partition@1c0000 {
-+                              label = "Factory";
-+                              reg = <0x1c0000 0x0100000>;
-+                      };
++              partition@1c0000 {
++                      label = "Factory";
++                      reg = <0x1c0000 0x0100000>;
++              };
 +
-+                      partition@200000 {
-+                              label = "firmware";
-+                              reg = <0x2c0000 0x2000000>;
-+                      };
++              partition@200000 {
++                      label = "firmware";
++                      reg = <0x2c0000 0x2000000>;
++              };
 +
-+                      partition@2200000 {
-+                              label = "User_data";
-+                              reg = <0x22c0000 0x4000000>;
-+                      };
++              partition@2200000 {
++                      label = "User_data";
++                      reg = <0x22c0000 0x4000000>;
 +              };
 +      };
 +};