1*f126890aSEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2*f126890aSEmmanuel Vadot%YAML 1.2 3*f126890aSEmmanuel Vadot--- 4*f126890aSEmmanuel Vadot$id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml# 5*f126890aSEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml# 6*f126890aSEmmanuel Vadot 7*f126890aSEmmanuel Vadottitle: Raw NAND Chip Common Properties 8*f126890aSEmmanuel Vadot 9*f126890aSEmmanuel Vadotmaintainers: 10*f126890aSEmmanuel Vadot - Miquel Raynal <miquel.raynal@bootlin.com> 11*f126890aSEmmanuel Vadot 12*f126890aSEmmanuel VadotallOf: 13*f126890aSEmmanuel Vadot - $ref: nand-chip.yaml# 14*f126890aSEmmanuel Vadot 15*f126890aSEmmanuel Vadotdescription: | 16*f126890aSEmmanuel Vadot The ECC strength and ECC step size properties define the user 17*f126890aSEmmanuel Vadot desires in terms of correction capability of a controller. Together, 18*f126890aSEmmanuel Vadot they request the ECC engine to correct {strength} bit errors per 19*f126890aSEmmanuel Vadot {size} bytes for a particular raw NAND chip. 20*f126890aSEmmanuel Vadot 21*f126890aSEmmanuel Vadot The interpretation of these parameters is implementation-defined, so 22*f126890aSEmmanuel Vadot not all implementations must support all possible 23*f126890aSEmmanuel Vadot combinations. However, implementations are encouraged to further 24*f126890aSEmmanuel Vadot specify the value(s) they support. 25*f126890aSEmmanuel Vadot 26*f126890aSEmmanuel Vadotproperties: 27*f126890aSEmmanuel Vadot $nodename: 28*f126890aSEmmanuel Vadot pattern: "^nand@[a-f0-9]$" 29*f126890aSEmmanuel Vadot 30*f126890aSEmmanuel Vadot reg: 31*f126890aSEmmanuel Vadot description: 32*f126890aSEmmanuel Vadot Contains the chip-select IDs. 33*f126890aSEmmanuel Vadot 34*f126890aSEmmanuel Vadot nand-ecc-placement: 35*f126890aSEmmanuel Vadot description: 36*f126890aSEmmanuel Vadot Location of the ECC bytes. This location is unknown by default 37*f126890aSEmmanuel Vadot but can be explicitly set to "oob", if all ECC bytes are 38*f126890aSEmmanuel Vadot known to be stored in the OOB area, or "interleaved" if ECC 39*f126890aSEmmanuel Vadot bytes will be interleaved with regular data in the main area. 40*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 41*f126890aSEmmanuel Vadot enum: [ oob, interleaved ] 42*f126890aSEmmanuel Vadot deprecated: true 43*f126890aSEmmanuel Vadot 44*f126890aSEmmanuel Vadot nand-ecc-mode: 45*f126890aSEmmanuel Vadot description: 46*f126890aSEmmanuel Vadot Legacy ECC configuration mixing the ECC engine choice and 47*f126890aSEmmanuel Vadot configuration. 48*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/string 49*f126890aSEmmanuel Vadot enum: [none, soft, soft_bch, hw, hw_syndrome, on-die] 50*f126890aSEmmanuel Vadot deprecated: true 51*f126890aSEmmanuel Vadot 52*f126890aSEmmanuel Vadot nand-bus-width: 53*f126890aSEmmanuel Vadot description: 54*f126890aSEmmanuel Vadot Bus width to the NAND chip 55*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32 56*f126890aSEmmanuel Vadot enum: [8, 16] 57*f126890aSEmmanuel Vadot default: 8 58*f126890aSEmmanuel Vadot 59*f126890aSEmmanuel Vadot nand-on-flash-bbt: 60*f126890aSEmmanuel Vadot description: 61*f126890aSEmmanuel Vadot With this property, the OS will search the device for a Bad 62*f126890aSEmmanuel Vadot Block Table (BBT). If not found, it will create one, reserve 63*f126890aSEmmanuel Vadot a few blocks at the end of the device to store it and update 64*f126890aSEmmanuel Vadot it as the device ages. Otherwise, the out-of-band area of a 65*f126890aSEmmanuel Vadot few pages of all the blocks will be scanned at boot time to 66*f126890aSEmmanuel Vadot find Bad Block Markers (BBM). These markers will help to 67*f126890aSEmmanuel Vadot build a volatile BBT in RAM. 68*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 69*f126890aSEmmanuel Vadot 70*f126890aSEmmanuel Vadot nand-ecc-maximize: 71*f126890aSEmmanuel Vadot description: 72*f126890aSEmmanuel Vadot Whether or not the ECC strength should be maximized. The 73*f126890aSEmmanuel Vadot maximum ECC strength is both controller and chip 74*f126890aSEmmanuel Vadot dependent. The ECC engine has to select the ECC config 75*f126890aSEmmanuel Vadot providing the best strength and taking the OOB area size 76*f126890aSEmmanuel Vadot constraint into account. This is particularly useful when 77*f126890aSEmmanuel Vadot only the in-band area is used by the upper layers, and you 78*f126890aSEmmanuel Vadot want to make your NAND as reliable as possible. 79*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 80*f126890aSEmmanuel Vadot 81*f126890aSEmmanuel Vadot nand-is-boot-medium: 82*f126890aSEmmanuel Vadot description: 83*f126890aSEmmanuel Vadot Whether or not the NAND chip is a boot medium. Drivers might 84*f126890aSEmmanuel Vadot use this information to select ECC algorithms supported by 85*f126890aSEmmanuel Vadot the boot ROM or similar restrictions. 86*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/flag 87*f126890aSEmmanuel Vadot 88*f126890aSEmmanuel Vadot nand-rb: 89*f126890aSEmmanuel Vadot description: 90*f126890aSEmmanuel Vadot Contains the native Ready/Busy IDs. 91*f126890aSEmmanuel Vadot $ref: /schemas/types.yaml#/definitions/uint32-array 92*f126890aSEmmanuel Vadot 93*f126890aSEmmanuel Vadot rb-gpios: 94*f126890aSEmmanuel Vadot description: 95*f126890aSEmmanuel Vadot Contains one or more GPIO descriptor (the numper of descriptor 96*f126890aSEmmanuel Vadot depends on the number of R/B pins exposed by the flash) for the 97*f126890aSEmmanuel Vadot Ready/Busy pins. Active state refers to the NAND ready state and 98*f126890aSEmmanuel Vadot should be set to GPIOD_ACTIVE_HIGH unless the signal is inverted. 99*f126890aSEmmanuel Vadot 100*f126890aSEmmanuel Vadot wp-gpios: 101*f126890aSEmmanuel Vadot description: 102*f126890aSEmmanuel Vadot Contains one GPIO descriptor for the Write Protect pin. 103*f126890aSEmmanuel Vadot Active state refers to the NAND Write Protect state and should be 104*f126890aSEmmanuel Vadot set to GPIOD_ACTIVE_LOW unless the signal is inverted. 105*f126890aSEmmanuel Vadot maxItems: 1 106*f126890aSEmmanuel Vadot 107*f126890aSEmmanuel Vadotrequired: 108*f126890aSEmmanuel Vadot - reg 109*f126890aSEmmanuel Vadot 110*f126890aSEmmanuel Vadot# This is a generic file other binding inherit from and extend 111*f126890aSEmmanuel VadotadditionalProperties: true 112