nand.txt 2.5 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. * NAND chip and NAND controller generic binding
  2. NAND controller/NAND chip representation:
  3. The NAND controller should be represented with its own DT node, and all
  4. NAND chips attached to this controller should be defined as children nodes
  5. of the NAND controller. This representation should be enforced even for
  6. simple controllers supporting only one chip.
  7. Mandatory NAND controller properties:
  8. - #address-cells: depends on your controller. Should at least be 1 to
  9. encode the CS line id.
  10. - #size-cells: depends on your controller. Put zero unless you need a
  11. mapping between CS lines and dedicated memory regions
  12. Optional NAND controller properties
  13. - ranges: only needed if you need to define a mapping between CS lines and
  14. memory regions
  15. Optional NAND chip properties:
  16. - nand-ecc-mode : String, operation mode of the NAND ecc mode.
  17. Supported values are: "none", "soft", "hw", "hw_syndrome",
  18. "hw_oob_first".
  19. Deprecated values:
  20. "soft_bch": use "soft" and nand-ecc-algo instead
  21. - nand-ecc-algo: string, algorithm of NAND ECC.
  22. Supported values are: "hamming", "bch".
  23. - nand-bus-width : 8 or 16 bus width if not present 8
  24. - nand-on-flash-bbt: boolean to enable on flash bbt option if not present false
  25. - nand-ecc-strength: integer representing the number of bits to correct
  26. per ECC step.
  27. - nand-ecc-step-size: integer representing the number of data bytes
  28. that are covered by a single ECC step.
  29. - nand-ecc-maximize: boolean used to specify that you want to maximize ECC
  30. strength. The maximum ECC strength is both controller and
  31. chip dependent. The controller side has to select the ECC
  32. config providing the best strength and taking the OOB area
  33. size constraint into account.
  34. This is particularly useful when only the in-band area is
  35. used by the upper layers, and you want to make your NAND
  36. as reliable as possible.
  37. The ECC strength and ECC step size properties define the correction capability
  38. of a controller. Together, they say a controller can correct "{strength} bit
  39. errors per {size} bytes".
  40. The interpretation of these parameters is implementation-defined, so not all
  41. implementations must support all possible combinations. However, implementations
  42. are encouraged to further specify the value(s) they support.
  43. Example:
  44. nand-controller {
  45. #address-cells = <1>;
  46. #size-cells = <0>;
  47. /* controller specific properties */
  48. nand@0 {
  49. reg = <0>;
  50. nand-ecc-mode = "soft";
  51. nand-ecc-algo = "bch";
  52. /* controller specific properties */
  53. };
  54. };