Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: mtd: mtk-nand: Update properties description

Update ecc step size, ecc strength, and parity bits supported on
each MTK NAND controller.

Signed-off-by: Xiaolei Li <xiaolei.li@mediatek.com>
Signed-off-by: Boris Brezillon <boris.brezillon@bootlin.com>

authored by

Xiaolei Li and committed by
Boris Brezillon
bb415dff 4baf6819

+19 -5
+19 -5
Documentation/devicetree/bindings/mtd/mtk-nand.txt
··· 50 50 - nand-on-flash-bbt: Store BBT on NAND Flash. 51 51 - nand-ecc-mode: the NAND ecc mode (check driver for supported modes) 52 52 - nand-ecc-step-size: Number of data bytes covered by a single ECC step. 53 - valid values: 512 and 1024. 53 + valid values: 54 + 512 and 1024 on mt2701 and mt2712. 55 + 512 only on mt7622. 54 56 1024 is recommended for large page NANDs. 55 57 - nand-ecc-strength: Number of bits to correct per ECC step. 56 - The valid values that the controller supports are: 4, 6, 57 - 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 32, 36, 40, 44, 58 - 48, 52, 56, 60. 58 + The valid values that each controller supports: 59 + mt2701: 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 60 + 32, 36, 40, 44, 48, 52, 56, 60. 61 + mt2712: 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 28, 62 + 32, 36, 40, 44, 48, 52, 56, 60, 68, 72, 80. 63 + mt7622: 4, 6, 8, 10, 12, 14, 16. 59 64 The strength should be calculated as follows: 60 - E = (S - F) * 8 / 14 65 + E = (S - F) * 8 / B 61 66 S = O / (P / Q) 62 67 E : nand-ecc-strength. 63 68 S : spare size per sector. ··· 71 66 O : oob size. 72 67 P : page size. 73 68 Q : nand-ecc-step-size. 69 + B : number of parity bits needed to correct 70 + 1 bitflip. 71 + According to MTK NAND controller design, 72 + this number depends on max ecc step size 73 + that MTK NAND controller supports. 74 + If max ecc step size supported is 1024, 75 + then it should be always 14. And if max 76 + ecc step size is 512, then it should be 77 + always 13. 74 78 If the result does not match any one of the listed 75 79 choices above, please select the smaller valid value from 76 80 the list.