Commit f0dcb5bd authored by Miquel Raynal's avatar Miquel Raynal

dt-bindings: mtd: nand-controller: Harmonize the property types

Harmonize the different properties in this file by:
* dropping the non-necessary allOf's
* always defining the keywords in the following order:
    - first the "description" (when relevant),
    - then the "type"/"$ref" and the other generic keywords ("enum",
      "default", etc).
Signed-off-by: default avatarMiquel Raynal <miquel.raynal@bootlin.com>
Reviewed-by: default avatarRob Herring <robh@kernel.org>
Link: https://lore.kernel.org/linux-mtd/20211216111654.238086-4-miquel.raynal@bootlin.com
parent 0e7f1b55
...@@ -39,8 +39,6 @@ properties: ...@@ -39,8 +39,6 @@ properties:
ranges: true ranges: true
cs-gpios: cs-gpios:
minItems: 1
maxItems: 8
description: description:
Array of chip-select available to the controller. The first Array of chip-select available to the controller. The first
entries are a 1:1 mapping of the available chip-select on the entries are a 1:1 mapping of the available chip-select on the
...@@ -48,6 +46,8 @@ properties: ...@@ -48,6 +46,8 @@ properties:
chip-select as needed may follow and should be phandles of GPIO chip-select as needed may follow and should be phandles of GPIO
lines. 'reg' entries of the NAND chip subnodes become indexes of lines. 'reg' entries of the NAND chip subnodes become indexes of
this array when this property is present. this array when this property is present.
minItems: 1
maxItems: 8
patternProperties: patternProperties:
"^nand@[a-f0-9]$": "^nand@[a-f0-9]$":
...@@ -58,8 +58,6 @@ patternProperties: ...@@ -58,8 +58,6 @@ patternProperties:
Contains the chip-select IDs. Contains the chip-select IDs.
nand-ecc-engine: nand-ecc-engine:
allOf:
- $ref: /schemas/types.yaml#/definitions/phandle
description: | description: |
A phandle on the hardware ECC engine if any. There are A phandle on the hardware ECC engine if any. There are
basically three possibilities: basically three possibilities:
...@@ -69,24 +67,24 @@ patternProperties: ...@@ -69,24 +67,24 @@ patternProperties:
case the phandle should reference the node itself. case the phandle should reference the node itself.
3/ The ECC engine is external, in this case the phandle should 3/ The ECC engine is external, in this case the phandle should
reference the specific ECC engine node. reference the specific ECC engine node.
$ref: /schemas/types.yaml#/definitions/phandle
nand-use-soft-ecc-engine: nand-use-soft-ecc-engine:
type: boolean
description: Use a software ECC engine. description: Use a software ECC engine.
type: boolean
nand-no-ecc-engine: nand-no-ecc-engine:
type: boolean
description: Do not use any ECC correction. description: Do not use any ECC correction.
type: boolean
nand-ecc-placement: nand-ecc-placement:
allOf:
- $ref: /schemas/types.yaml#/definitions/string
- enum: [ oob, interleaved ]
description: description:
Location of the ECC bytes. This location is unknown by default Location of the ECC bytes. This location is unknown by default
but can be explicitly set to "oob", if all ECC bytes are but can be explicitly set to "oob", if all ECC bytes are
known to be stored in the OOB area, or "interleaved" if ECC known to be stored in the OOB area, or "interleaved" if ECC
bytes will be interleaved with regular data in the main area. bytes will be interleaved with regular data in the main area.
$ref: /schemas/types.yaml#/definitions/string
enum: [ oob, interleaved ]
nand-ecc-algo: nand-ecc-algo:
description: description:
...@@ -102,7 +100,6 @@ patternProperties: ...@@ -102,7 +100,6 @@ patternProperties:
default: 8 default: 8
nand-on-flash-bbt: nand-on-flash-bbt:
$ref: /schemas/types.yaml#/definitions/flag
description: description:
With this property, the OS will search the device for a Bad With this property, the OS will search the device for a Bad
Block Table (BBT). If not found, it will create one, reserve Block Table (BBT). If not found, it will create one, reserve
...@@ -111,6 +108,7 @@ patternProperties: ...@@ -111,6 +108,7 @@ patternProperties:
few pages of all the blocks will be scanned at boot time to few pages of all the blocks will be scanned at boot time to
find Bad Block Markers (BBM). These markers will help to find Bad Block Markers (BBM). These markers will help to
build a volatile BBT in RAM. build a volatile BBT in RAM.
$ref: /schemas/types.yaml#/definitions/flag
nand-ecc-strength: nand-ecc-strength:
description: description:
...@@ -125,7 +123,6 @@ patternProperties: ...@@ -125,7 +123,6 @@ patternProperties:
minimum: 1 minimum: 1
nand-ecc-maximize: nand-ecc-maximize:
$ref: /schemas/types.yaml#/definitions/flag
description: description:
Whether or not the ECC strength should be maximized. The Whether or not the ECC strength should be maximized. The
maximum ECC strength is both controller and chip maximum ECC strength is both controller and chip
...@@ -134,18 +131,19 @@ patternProperties: ...@@ -134,18 +131,19 @@ patternProperties:
constraint into account. This is particularly useful when constraint into account. This is particularly useful when
only the in-band area is used by the upper layers, and you only the in-band area is used by the upper layers, and you
want to make your NAND as reliable as possible. want to make your NAND as reliable as possible.
$ref: /schemas/types.yaml#/definitions/flag
nand-is-boot-medium: nand-is-boot-medium:
$ref: /schemas/types.yaml#/definitions/flag
description: description:
Whether or not the NAND chip is a boot medium. Drivers might Whether or not the NAND chip is a boot medium. Drivers might
use this information to select ECC algorithms supported by use this information to select ECC algorithms supported by
the boot ROM or similar restrictions. the boot ROM or similar restrictions.
$ref: /schemas/types.yaml#/definitions/flag
nand-rb: nand-rb:
$ref: /schemas/types.yaml#/definitions/uint32-array
description: description:
Contains the native Ready/Busy IDs. Contains the native Ready/Busy IDs.
$ref: /schemas/types.yaml#/definitions/uint32-array
rb-gpios: rb-gpios:
description: description:
...@@ -155,11 +153,11 @@ patternProperties: ...@@ -155,11 +153,11 @@ patternProperties:
should be set to GPIOD_ACTIVE_HIGH unless the signal is inverted. should be set to GPIOD_ACTIVE_HIGH unless the signal is inverted.
secure-regions: secure-regions:
$ref: /schemas/types.yaml#/definitions/uint64-matrix
description: description:
Regions in the NAND chip which are protected using a secure element Regions in the NAND chip which are protected using a secure element
like Trustzone. This property contains the start address and size of like Trustzone. This property contains the start address and size of
the secure regions present. the secure regions present.
$ref: /schemas/types.yaml#/definitions/uint64-matrix
required: required:
- reg - reg
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment