Skip to content

Commit a470ae1

Browse files
committed
mediatek: cudy nand: fix wrong nmbm configuration
Nmbm is mistakenly enabled on ubootmod builds of nand Cudy routers: ------------------------------------------------------------------------ [ 0.923433] spi-nand spi0.0: calibration result: 0x3 [ 0.928485] spi-nand spi0.0: ESMT SPI NAND was found. [ 0.933560] spi-nand spi0.0: 128 MiB, block size: 128 KiB, page size: 2048, OOB size: 64 [ 1.828275] Signature not found ------------------------------------------------------------------------- This commit disabled nmbm for such builds. Fixes: eb6dd61 ("mediatek: add cudy wr3000h-v1 ubootmod") Fixes: cfc17e8 ("mediatek: add cudy wr3000e-v1 ubootmod") Fixes: 6b3b7c7 ("mediatek: add cudy wr3000p-v1 ubootmod") Fixes: b7b4938 ("mediatek: add cudy wr3000s-v1 ubootmod") Fixes: 15df98f ("mediatek: add ubootmod layout for Cudy WBR3000UAX v1") Signed-off-by: Mikhail Zhilkin <csharper2005@gmail.com>
1 parent 7ea95a9 commit a470ae1

7 files changed

Lines changed: 36 additions & 3 deletions

target/linux/mediatek/dts/mt7981b-cudy-wbr3000uax-v1.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,12 @@
7979
};
8080
};
8181

82+
&spi_nand {
83+
mediatek,nmbm;
84+
mediatek,bmt-max-ratio = <1>;
85+
mediatek,bmt-max-reserved-blocks = <64>;
86+
};
87+
8288
&switch {
8389
ports {
8490
#address-cells = <1>;

target/linux/mediatek/dts/mt7981b-cudy-wr3000-nand.dtsi

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,6 @@
8585

8686
spi-tx-bus-width = <4>;
8787
spi-rx-bus-width = <4>;
88-
mediatek,nmbm;
89-
mediatek,bmt-max-ratio = <1>;
90-
mediatek,bmt-max-reserved-blocks = <64>;
9188

9289
partitions {
9390
compatible = "fixed-partitions";

target/linux/mediatek/dts/mt7981b-cudy-wr3000e-v1.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@
88
model = "Cudy WR3000E v1";
99
compatible = "cudy,wr3000e-v1", "mediatek,mt7981";
1010
};
11+
12+
&spi_nand {
13+
mediatek,nmbm;
14+
mediatek,bmt-max-ratio = <1>;
15+
mediatek,bmt-max-reserved-blocks = <64>;
16+
};

target/linux/mediatek/dts/mt7981b-cudy-wr3000h-v1.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@
88
model = "Cudy WR3000H v1";
99
compatible = "cudy,wr3000h-v1", "mediatek,mt7981";
1010
};
11+
12+
&spi_nand {
13+
mediatek,nmbm;
14+
mediatek,bmt-max-ratio = <1>;
15+
mediatek,bmt-max-reserved-blocks = <64>;
16+
};

target/linux/mediatek/dts/mt7981b-cudy-wr3000p-v1.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@
88
model = "Cudy WR3000P v1";
99
compatible = "cudy,wr3000p-v1", "mediatek,mt7981";
1010
};
11+
12+
&spi_nand {
13+
mediatek,nmbm;
14+
mediatek,bmt-max-ratio = <1>;
15+
mediatek,bmt-max-reserved-blocks = <64>;
16+
};

target/linux/mediatek/dts/mt7981b-cudy-wr3000s-v1.dts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@
88
model = "Cudy WR3000S v1";
99
compatible = "cudy,wr3000s-v1", "mediatek,mt7981";
1010
};
11+
12+
&spi_nand {
13+
mediatek,nmbm;
14+
mediatek,bmt-max-ratio = <1>;
15+
mediatek,bmt-max-reserved-blocks = <64>;
16+
};

target/linux/mediatek/dts/mt7981b-cudy-wr3000s-v1.dtsi

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@
5151
};
5252
};
5353

54+
&spi_nand {
55+
mediatek,nmbm;
56+
mediatek,bmt-max-ratio = <1>;
57+
mediatek,bmt-max-reserved-blocks = <64>;
58+
};
59+
5460
&switch {
5561
ports {
5662
#address-cells = <1>;

0 commit comments

Comments
 (0)