* [PATCH v2 01/17] dt-bindings: mtd: Accept nand related node names
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-19 6:28 ` Krzysztof Kozlowski
2023-06-06 17:52 ` [PATCH v2 02/17] dt-bindings: mtd: Create a file for raw NAND chip properties Miquel Raynal
` (21 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal
There is no addition there, but the mtd.yaml file is so generic, it can
be referenced by a wide variety of devices, including nand ones which
already define the node name to "nand@<cs>". Right now it does not lead
to any failure but when we will constrain more the schema, this will
become a problem because we want the mtd-wide properties like label or
partitions to be available for the callers.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/mtd.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mtd/mtd.yaml b/Documentation/devicetree/bindings/mtd/mtd.yaml
index 78da129e9985..589481b0b93d 100644
--- a/Documentation/devicetree/bindings/mtd/mtd.yaml
+++ b/Documentation/devicetree/bindings/mtd/mtd.yaml
@@ -12,7 +12,7 @@ maintainers:
properties:
$nodename:
- pattern: "^(flash|.*sram)(@.*)?$"
+ pattern: "^(flash|.*sram|nand)(@.*)?$"
label:
description:
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 01/17] dt-bindings: mtd: Accept nand related node names
2023-06-06 17:52 ` [PATCH v2 01/17] dt-bindings: mtd: Accept nand related node names Miquel Raynal
@ 2023-06-19 6:28 ` Krzysztof Kozlowski
0 siblings, 0 replies; 49+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-19 6:28 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
Rob Herring, Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni
On 06/06/2023 19:52, Miquel Raynal wrote:
> There is no addition there, but the mtd.yaml file is so generic, it can
> be referenced by a wide variety of devices, including nand ones which
> already define the node name to "nand@<cs>". Right now it does not lead
> to any failure but when we will constrain more the schema, this will
> become a problem because we want the mtd-wide properties like label or
> partitions to be available for the callers.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 02/17] dt-bindings: mtd: Create a file for raw NAND chip properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
2023-06-06 17:52 ` [PATCH v2 01/17] dt-bindings: mtd: Accept nand related node names Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-19 6:28 ` Krzysztof Kozlowski
2023-06-06 17:52 ` [PATCH v2 03/17] dt-bindings: mtd: Mark nand-ecc-placement deprecated Miquel Raynal
` (20 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal
In an effort to constrain as much as we can the existing binding, we
want to add "unevaluatedProperties: false" in all the NAND chip
descriptions part of NAND controller bindings. But in order to do that
properly, we also need to reference a file which contains all the
"allowed" properties. Right now this file is nand-chip.yaml but in
practice raw NAND controllers may use additional properties in their
NAND chip children node. These properties are listed under
nand-controller.yaml, which makes the "unevaluatedProperties" checks
fail while the description are valid. We need to move these NAND chip
related properties into another file, because we do not want to pollute
nand-chip.yaml which is also referenced by eg. SPI-NAND devices.
Let's create a raw-nand-chip.yaml file to reference all the properties a
raw NAND chip description can contain. The chain of inheritance becomes:
nand-controller.yaml <- raw-nand-chip.yaml
raw-nand-chip.yaml <- nand-chip.yaml
spi-nand.yaml <- nand-chip.yaml
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
.../bindings/mtd/nand-controller.yaml | 85 +--------------
.../bindings/mtd/raw-nand-chip.yaml | 102 ++++++++++++++++++
2 files changed, 104 insertions(+), 83 deletions(-)
create mode 100644 Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml
diff --git a/Documentation/devicetree/bindings/mtd/nand-controller.yaml b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
index efcd415f8641..140fed5acdb6 100644
--- a/Documentation/devicetree/bindings/mtd/nand-controller.yaml
+++ b/Documentation/devicetree/bindings/mtd/nand-controller.yaml
@@ -16,16 +16,6 @@ description: |
children nodes of the NAND controller. This representation should be
enforced even for simple controllers supporting only one chip.
- The ECC strength and ECC step size properties define the user
- desires in terms of correction capability of a controller. Together,
- they request the ECC engine to correct {strength} bit errors per
- {size} bytes.
-
- The interpretation of these parameters is implementation-defined, so
- not all implementations must support all possible
- combinations. However, implementations are encouraged to further
- specify the value(s) they support.
-
properties:
$nodename:
pattern: "^nand-controller(@.*)?"
@@ -51,79 +41,8 @@ properties:
patternProperties:
"^nand@[a-f0-9]$":
- $ref: "nand-chip.yaml#"
-
- properties:
- reg:
- description:
- Contains the chip-select IDs.
-
- nand-ecc-placement:
- description:
- Location of the ECC bytes. This location is unknown by default
- but can be explicitly set to "oob", if all ECC bytes are
- known to be stored in the OOB area, or "interleaved" if ECC
- bytes will be interleaved with regular data in the main area.
- $ref: /schemas/types.yaml#/definitions/string
- enum: [ oob, interleaved ]
-
- nand-bus-width:
- description:
- Bus width to the NAND chip
- $ref: /schemas/types.yaml#/definitions/uint32
- enum: [8, 16]
- default: 8
-
- nand-on-flash-bbt:
- description:
- With this property, the OS will search the device for a Bad
- Block Table (BBT). If not found, it will create one, reserve
- a few blocks at the end of the device to store it and update
- it as the device ages. Otherwise, the out-of-band area of a
- few pages of all the blocks will be scanned at boot time to
- find Bad Block Markers (BBM). These markers will help to
- build a volatile BBT in RAM.
- $ref: /schemas/types.yaml#/definitions/flag
-
- nand-ecc-maximize:
- description:
- Whether or not the ECC strength should be maximized. The
- maximum ECC strength is both controller and chip
- dependent. The ECC engine has to select the ECC config
- providing the best strength and taking the OOB area size
- constraint into account. This is particularly useful when
- only the in-band area is used by the upper layers, and you
- want to make your NAND as reliable as possible.
- $ref: /schemas/types.yaml#/definitions/flag
-
- nand-is-boot-medium:
- description:
- Whether or not the NAND chip is a boot medium. Drivers might
- use this information to select ECC algorithms supported by
- the boot ROM or similar restrictions.
- $ref: /schemas/types.yaml#/definitions/flag
-
- nand-rb:
- description:
- Contains the native Ready/Busy IDs.
- $ref: /schemas/types.yaml#/definitions/uint32-array
-
- rb-gpios:
- description:
- Contains one or more GPIO descriptor (the numper of descriptor
- depends on the number of R/B pins exposed by the flash) for the
- Ready/Busy pins. Active state refers to the NAND ready state and
- should be set to GPIOD_ACTIVE_HIGH unless the signal is inverted.
-
- wp-gpios:
- description:
- Contains one GPIO descriptor for the Write Protect pin.
- Active state refers to the NAND Write Protect state and should be
- set to GPIOD_ACTIVE_LOW unless the signal is inverted.
- maxItems: 1
-
- required:
- - reg
+ type: object
+ $ref: "raw-nand-chip.yaml#"
required:
- "#address-cells"
diff --git a/Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml b/Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml
new file mode 100644
index 000000000000..81b77ee6fb88
--- /dev/null
+++ b/Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Raw NAND Chip Common Properties
+
+maintainers:
+ - Miquel Raynal <miquel.raynal@bootlin.com>
+
+allOf:
+ - $ref: "nand-chip.yaml#"
+
+description: |
+ The ECC strength and ECC step size properties define the user
+ desires in terms of correction capability of a controller. Together,
+ they request the ECC engine to correct {strength} bit errors per
+ {size} bytes for a particular raw NAND chip.
+
+ The interpretation of these parameters is implementation-defined, so
+ not all implementations must support all possible
+ combinations. However, implementations are encouraged to further
+ specify the value(s) they support.
+
+properties:
+ $nodename:
+ pattern: "^nand@[a-f0-9]$"
+
+ reg:
+ description:
+ Contains the chip-select IDs.
+
+ nand-ecc-placement:
+ description:
+ Location of the ECC bytes. This location is unknown by default
+ but can be explicitly set to "oob", if all ECC bytes are
+ known to be stored in the OOB area, or "interleaved" if ECC
+ bytes will be interleaved with regular data in the main area.
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [ oob, interleaved ]
+
+ nand-bus-width:
+ description:
+ Bus width to the NAND chip
+ $ref: /schemas/types.yaml#/definitions/uint32
+ enum: [8, 16]
+ default: 8
+
+ nand-on-flash-bbt:
+ description:
+ With this property, the OS will search the device for a Bad
+ Block Table (BBT). If not found, it will create one, reserve
+ a few blocks at the end of the device to store it and update
+ it as the device ages. Otherwise, the out-of-band area of a
+ few pages of all the blocks will be scanned at boot time to
+ find Bad Block Markers (BBM). These markers will help to
+ build a volatile BBT in RAM.
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ nand-ecc-maximize:
+ description:
+ Whether or not the ECC strength should be maximized. The
+ maximum ECC strength is both controller and chip
+ dependent. The ECC engine has to select the ECC config
+ providing the best strength and taking the OOB area size
+ constraint into account. This is particularly useful when
+ only the in-band area is used by the upper layers, and you
+ want to make your NAND as reliable as possible.
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ nand-is-boot-medium:
+ description:
+ Whether or not the NAND chip is a boot medium. Drivers might
+ use this information to select ECC algorithms supported by
+ the boot ROM or similar restrictions.
+ $ref: /schemas/types.yaml#/definitions/flag
+
+ nand-rb:
+ description:
+ Contains the native Ready/Busy IDs.
+ $ref: /schemas/types.yaml#/definitions/uint32-array
+
+ rb-gpios:
+ description:
+ Contains one or more GPIO descriptor (the numper of descriptor
+ depends on the number of R/B pins exposed by the flash) for the
+ Ready/Busy pins. Active state refers to the NAND ready state and
+ should be set to GPIOD_ACTIVE_HIGH unless the signal is inverted.
+
+ wp-gpios:
+ description:
+ Contains one GPIO descriptor for the Write Protect pin.
+ Active state refers to the NAND Write Protect state and should be
+ set to GPIOD_ACTIVE_LOW unless the signal is inverted.
+ maxItems: 1
+
+required:
+ - reg
+
+# This is a generic file other binding inherit from and extend
+additionalProperties: true
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 02/17] dt-bindings: mtd: Create a file for raw NAND chip properties
2023-06-06 17:52 ` [PATCH v2 02/17] dt-bindings: mtd: Create a file for raw NAND chip properties Miquel Raynal
@ 2023-06-19 6:28 ` Krzysztof Kozlowski
2023-06-19 6:59 ` Miquel Raynal
0 siblings, 1 reply; 49+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-19 6:28 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
Rob Herring, Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni
On 06/06/2023 19:52, Miquel Raynal wrote:
> In an effort to constrain as much as we can the existing binding, we
> want to add "unevaluatedProperties: false" in all the NAND chip
> descriptions part of NAND controller bindings. But in order to do that
> properly, we also need to reference a file which contains all the
> "allowed" properties. Right now this file is nand-chip.yaml but in
> practice raw NAND controllers may use additional properties in their
> NAND chip children node. These properties are listed under
> nand-controller.yaml, which makes the "unevaluatedProperties" checks
> fail while the description are valid. We need to move these NAND chip
> related properties into another file, because we do not want to pollute
> nand-chip.yaml which is also referenced by eg. SPI-NAND devices.
>
> Let's create a raw-nand-chip.yaml file to reference all the properties a
> raw NAND chip description can contain. The chain of inheritance becomes:
> nand-controller.yaml <- raw-nand-chip.yaml
> raw-nand-chip.yaml <- nand-chip.yaml
> spi-nand.yaml <- nand-chip.yaml
...
> - The interpretation of these parameters is implementation-defined, so
> - not all implementations must support all possible
> - combinations. However, implementations are encouraged to further
> - specify the value(s) they support.
> -
> properties:
> $nodename:
> pattern: "^nand-controller(@.*)?"
> @@ -51,79 +41,8 @@ properties:
>
> patternProperties:
> "^nand@[a-f0-9]$":
> - $ref: "nand-chip.yaml#"
You work on some old tree, judging by email addresses you CC and by
this. I would expect here current next, but this is even pre v6.4-rc1!
Working on something older than current master branch doss not make any
sense.
> -
> - properties:
> - reg:
> - description:
> - Contains the chip-select IDs.
> -
> - nand-ecc-placement:
> - description:
> - Location of the ECC bytes. This location is unknown by default
> - but can be explicitly set to "oob", if all ECC bytes are
> - known to be stored in the OOB area, or "interleaved" if ECC
> - bytes will be interleaved with regular data in the main area.
> - $ref: /schemas/types.yaml#/definitions/string
> - enum: [ oob, interleaved ]
> -
> - nand-bus-width:
> - description:
> - Bus width to the NAND chip
> - $ref: /schemas/types.yaml#/definitions/uint32
> - enum: [8, 16]
> - default: 8
> -
> - nand-on-flash-bbt:
> - description:
> - With this property, the OS will search the device for a Bad
> - Block Table (BBT). If not found, it will create one, reserve
> - a few blocks at the end of the device to store it and update
> - it as the device ages. Otherwise, the out-of-band area of a
> - few pages of all the blocks will be scanned at boot time to
> - find Bad Block Markers (BBM). These markers will help to
> - build a volatile BBT in RAM.
> - $ref: /schemas/types.yaml#/definitions/flag
> -
> - nand-ecc-maximize:
> - description:
> - Whether or not the ECC strength should be maximized. The
> - maximum ECC strength is both controller and chip
> - dependent. The ECC engine has to select the ECC config
> - providing the best strength and taking the OOB area size
> - constraint into account. This is particularly useful when
> - only the in-band area is used by the upper layers, and you
> - want to make your NAND as reliable as possible.
> - $ref: /schemas/types.yaml#/definitions/flag
> -
> - nand-is-boot-medium:
> - description:
> - Whether or not the NAND chip is a boot medium. Drivers might
> - use this information to select ECC algorithms supported by
> - the boot ROM or similar restrictions.
> - $ref: /schemas/types.yaml#/definitions/flag
> -
> - nand-rb:
> - description:
> - Contains the native Ready/Busy IDs.
> - $ref: /schemas/types.yaml#/definitions/uint32-array
> -
> - rb-gpios:
> - description:
> - Contains one or more GPIO descriptor (the numper of descriptor
> - depends on the number of R/B pins exposed by the flash) for the
> - Ready/Busy pins. Active state refers to the NAND ready state and
> - should be set to GPIOD_ACTIVE_HIGH unless the signal is inverted.
> -
> - wp-gpios:
> - description:
> - Contains one GPIO descriptor for the Write Protect pin.
> - Active state refers to the NAND Write Protect state and should be
> - set to GPIOD_ACTIVE_LOW unless the signal is inverted.
> - maxItems: 1
> -
> - required:
> - - reg
> + type: object
> + $ref: "raw-nand-chip.yaml#"
Again, no quotes. We just removed them everywhere.
>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 02/17] dt-bindings: mtd: Create a file for raw NAND chip properties
2023-06-19 6:28 ` Krzysztof Kozlowski
@ 2023-06-19 6:59 ` Miquel Raynal
0 siblings, 0 replies; 49+ messages in thread
From: Miquel Raynal @ 2023-06-19 6:59 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree, Chris Packham, Thomas Petazzoni
Hi Krzysztof,
krzk@kernel.org wrote on Mon, 19 Jun 2023 08:28:28 +0200:
> On 06/06/2023 19:52, Miquel Raynal wrote:
> > In an effort to constrain as much as we can the existing binding, we
> > want to add "unevaluatedProperties: false" in all the NAND chip
> > descriptions part of NAND controller bindings. But in order to do that
> > properly, we also need to reference a file which contains all the
> > "allowed" properties. Right now this file is nand-chip.yaml but in
> > practice raw NAND controllers may use additional properties in their
> > NAND chip children node. These properties are listed under
> > nand-controller.yaml, which makes the "unevaluatedProperties" checks
> > fail while the description are valid. We need to move these NAND chip
> > related properties into another file, because we do not want to pollute
> > nand-chip.yaml which is also referenced by eg. SPI-NAND devices.
> >
> > Let's create a raw-nand-chip.yaml file to reference all the properties a
> > raw NAND chip description can contain. The chain of inheritance becomes:
> > nand-controller.yaml <- raw-nand-chip.yaml
> > raw-nand-chip.yaml <- nand-chip.yaml
> > spi-nand.yaml <- nand-chip.yaml
>
> ...
>
> > - The interpretation of these parameters is implementation-defined, so
> > - not all implementations must support all possible
> > - combinations. However, implementations are encouraged to further
> > - specify the value(s) they support.
> > -
> > properties:
> > $nodename:
> > pattern: "^nand-controller(@.*)?"
> > @@ -51,79 +41,8 @@ properties:
> >
> > patternProperties:
> > "^nand@[a-f0-9]$":
> > - $ref: "nand-chip.yaml#"
>
> You work on some old tree, judging by email addresses you CC and by
> this. I would expect here current next, but this is even pre v6.4-rc1!
> Working on something older than current master branch doss not make any
> sense.
This is really based on v6.4-rc1, I think Rob's tooling is applying the
patches against -rc1 so I try to keep the robots happy by picking that
tag as base. I know you are removing the quotes so I went through my
series and dropped them from all the files which now reference
raw-nand-chip.yaml, but of course I missed that one, I am sorry, I will
drop the quotes here as well.
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 03/17] dt-bindings: mtd: Mark nand-ecc-placement deprecated
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
2023-06-06 17:52 ` [PATCH v2 01/17] dt-bindings: mtd: Accept nand related node names Miquel Raynal
2023-06-06 17:52 ` [PATCH v2 02/17] dt-bindings: mtd: Create a file for raw NAND chip properties Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-19 6:34 ` Krzysztof Kozlowski
2023-06-06 17:52 ` [PATCH v2 04/17] dt-bindings: mtd: Describe nand-ecc-mode Miquel Raynal
` (19 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal
The nand-ecc-placement property has been deprecated for a long time
already, it does not really mean something useful for the ECC engines
and is anyway in the vast majority of cases totally useless. Just mark
it deprecated to avoid appealing people to use it.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml b/Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml
index 81b77ee6fb88..0b220e99450d 100644
--- a/Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml
+++ b/Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml
@@ -39,6 +39,7 @@ properties:
bytes will be interleaved with regular data in the main area.
$ref: /schemas/types.yaml#/definitions/string
enum: [ oob, interleaved ]
+ deprecated: true
nand-bus-width:
description:
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 03/17] dt-bindings: mtd: Mark nand-ecc-placement deprecated
2023-06-06 17:52 ` [PATCH v2 03/17] dt-bindings: mtd: Mark nand-ecc-placement deprecated Miquel Raynal
@ 2023-06-19 6:34 ` Krzysztof Kozlowski
0 siblings, 0 replies; 49+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-19 6:34 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
Rob Herring, Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni
On 06/06/2023 19:52, Miquel Raynal wrote:
> The nand-ecc-placement property has been deprecated for a long time
> already, it does not really mean something useful for the ECC engines
> and is anyway in the vast majority of cases totally useless. Just mark
> it deprecated to avoid appealing people to use it.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 04/17] dt-bindings: mtd: Describe nand-ecc-mode
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (2 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 03/17] dt-bindings: mtd: Mark nand-ecc-placement deprecated Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-19 6:51 ` Krzysztof Kozlowski
2023-06-06 17:52 ` [PATCH v2 05/17] dt-bindings: mtd: qcom: Fix a property position Miquel Raynal
` (18 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal
This property has been extensively used for almost two decades already,
a lot of device trees use it, this is not the preferred way to configure
the ECC engines but we cannot just ignore it. Describe the property,
list the exact strings which have once been supported and mark it
deprecated.
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml b/Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml
index 0b220e99450d..1251d3063e45 100644
--- a/Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml
+++ b/Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml
@@ -41,6 +41,14 @@ properties:
enum: [ oob, interleaved ]
deprecated: true
+ nand-ecc-mode:
+ description:
+ Legacy ECC configuration mixing the ECC engine choice and
+ configuration.
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [none, soft, soft_bch, hw, hw_syndrome, on-die]
+ deprecated: true
+
nand-bus-width:
description:
Bus width to the NAND chip
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 04/17] dt-bindings: mtd: Describe nand-ecc-mode
2023-06-06 17:52 ` [PATCH v2 04/17] dt-bindings: mtd: Describe nand-ecc-mode Miquel Raynal
@ 2023-06-19 6:51 ` Krzysztof Kozlowski
0 siblings, 0 replies; 49+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-19 6:51 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
Rob Herring, Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni
On 06/06/2023 19:52, Miquel Raynal wrote:
> This property has been extensively used for almost two decades already,
> a lot of device trees use it, this is not the preferred way to configure
> the ECC engines but we cannot just ignore it. Describe the property,
> list the exact strings which have once been supported and mark it
> deprecated.
>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 05/17] dt-bindings: mtd: qcom: Fix a property position
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (3 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 04/17] dt-bindings: mtd: Describe nand-ecc-mode Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-19 6:54 ` Krzysztof Kozlowski
2023-06-06 17:52 ` [PATCH v2 06/17] dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties Miquel Raynal
` (17 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal,
Manivannan Sadhasivam
qcom,boot-partitions is a NAND chip property, not a NAND controller
property. Move the description of the property into the NAND chip
section and just enable the property in the if/else block.
Fixes: 5278cc93a97f ("dt-bindings: mtd: qcom_nandc: document qcom,boot-partitions binding")
Cc: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
.../devicetree/bindings/mtd/qcom,nandc.yaml | 41 +++++++++++--------
1 file changed, 25 insertions(+), 16 deletions(-)
diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
index 07024ee45951..7217d8a64d14 100644
--- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
+++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
@@ -45,6 +45,22 @@ patternProperties:
enum:
- 512
+ qcom,boot-partitions:
+ $ref: /schemas/types.yaml#/definitions/uint32-matrix
+ items:
+ items:
+ - description: offset
+ - description: size
+ description:
+ Boot partition use a different layout where the 4 bytes of spare
+ data are not protected by ECC. Use this to declare these special
+ partitions by defining first the offset and then the size.
+
+ It's in the form of <offset1 size1 offset2 size2 offset3 ...>
+ and should be declared in ascending order.
+
+ Refer to the ipq8064 example on how to use this special binding.
+
allOf:
- $ref: "nand-controller.yaml#"
@@ -107,22 +123,15 @@ allOf:
- qcom,ipq806x-nand
then:
- properties:
- qcom,boot-partitions:
- $ref: /schemas/types.yaml#/definitions/uint32-matrix
- items:
- items:
- - description: offset
- - description: size
- description:
- Boot partition use a different layout where the 4 bytes of spare
- data are not protected by ECC. Use this to declare these special
- partitions by defining first the offset and then the size.
-
- It's in the form of <offset1 size1 offset2 size2 offset3 ...>
- and should be declared in ascending order.
-
- Refer to the ipq8064 example on how to use this special binding.
+ patternProperties:
+ "^nand@[a-f0-9]$":
+ properties:
+ qcom,boot-partitions: true
+ else:
+ patternProperties:
+ "^nand@[a-f0-9]$":
+ properties:
+ qcom,boot-partitions: false
required:
- compatible
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 05/17] dt-bindings: mtd: qcom: Fix a property position
2023-06-06 17:52 ` [PATCH v2 05/17] dt-bindings: mtd: qcom: Fix a property position Miquel Raynal
@ 2023-06-19 6:54 ` Krzysztof Kozlowski
2023-06-19 7:19 ` Miquel Raynal
0 siblings, 1 reply; 49+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-19 6:54 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
Rob Herring, Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Manivannan Sadhasivam
On 06/06/2023 19:52, Miquel Raynal wrote:
> qcom,boot-partitions is a NAND chip property, not a NAND controller
> property. Move the description of the property into the NAND chip
> section and just enable the property in the if/else block.
>
> Fixes: 5278cc93a97f ("dt-bindings: mtd: qcom_nandc: document qcom,boot-partitions binding")
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> .../devicetree/bindings/mtd/qcom,nandc.yaml | 41 +++++++++++--------
> 1 file changed, 25 insertions(+), 16 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> index 07024ee45951..7217d8a64d14 100644
> --- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> +++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> @@ -45,6 +45,22 @@ patternProperties:
> enum:
> - 512
>
> + qcom,boot-partitions:
> + $ref: /schemas/types.yaml#/definitions/uint32-matrix
> + items:
> + items:
> + - description: offset
> + - description: size
> + description:
> + Boot partition use a different layout where the 4 bytes of spare
> + data are not protected by ECC. Use this to declare these special
> + partitions by defining first the offset and then the size.
> +
> + It's in the form of <offset1 size1 offset2 size2 offset3 ...>
> + and should be declared in ascending order.
> +
> + Refer to the ipq8064 example on how to use this special binding.
> +
> allOf:
> - $ref: "nand-controller.yaml#"
Also based on some old tree.
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 05/17] dt-bindings: mtd: qcom: Fix a property position
2023-06-19 6:54 ` Krzysztof Kozlowski
@ 2023-06-19 7:19 ` Miquel Raynal
0 siblings, 0 replies; 49+ messages in thread
From: Miquel Raynal @ 2023-06-19 7:19 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree, Chris Packham, Thomas Petazzoni,
Manivannan Sadhasivam
Hi Krzysztof,
krzysztof.kozlowski@linaro.org wrote on Mon, 19 Jun 2023 08:54:13 +0200:
> On 06/06/2023 19:52, Miquel Raynal wrote:
> > qcom,boot-partitions is a NAND chip property, not a NAND controller
> > property. Move the description of the property into the NAND chip
> > section and just enable the property in the if/else block.
> >
> > Fixes: 5278cc93a97f ("dt-bindings: mtd: qcom_nandc: document qcom,boot-partitions binding")
> > Cc: Manivannan Sadhasivam <mani@kernel.org>
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> > .../devicetree/bindings/mtd/qcom,nandc.yaml | 41 +++++++++++--------
> > 1 file changed, 25 insertions(+), 16 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> > index 07024ee45951..7217d8a64d14 100644
> > --- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> > @@ -45,6 +45,22 @@ patternProperties:
> > enum:
> > - 512
> >
> > + qcom,boot-partitions:
> > + $ref: /schemas/types.yaml#/definitions/uint32-matrix
> > + items:
> > + items:
> > + - description: offset
> > + - description: size
> > + description:
> > + Boot partition use a different layout where the 4 bytes of spare
> > + data are not protected by ECC. Use this to declare these special
> > + partitions by defining first the offset and then the size.
> > +
> > + It's in the form of <offset1 size1 offset2 size2 offset3 ...>
> > + and should be declared in ascending order.
> > +
> > + Refer to the ipq8064 example on how to use this special binding.
> > +
> > allOf:
> > - $ref: "nand-controller.yaml#"
>
> Also based on some old tree.
I do have
1f79a611e74c ("dt-bindings: mtd: Drop unneeded quotes")
in my log, so I don't understand the quotes. When I re-generate the
patches, they no longer appear. I must have done something silly at
some point without noticing. My apologies. I'll "try" again.
> Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
>
> Best regards,
> Krzysztof
>
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 06/17] dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (4 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 05/17] dt-bindings: mtd: qcom: Fix a property position Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-06 22:27 ` Chris Packham
2023-06-06 17:52 ` [PATCH v2 07/17] dt-bindings: mtd: ingenic: " Miquel Raynal
` (16 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal,
Manivannan Sadhasivam
List all the possible properties in the NAND chip as per the example and
set unevaluatedProperties to false in the NAND chip section.
Cc: Manivannan Sadhasivam <mani@kernel.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/qcom,nandc.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
index 7217d8a64d14..581973f452ff 100644
--- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
+++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
@@ -34,7 +34,9 @@ properties:
patternProperties:
"^nand@[a-f0-9]$":
type: object
+ $ref: raw-nand-chip.yaml
properties:
+
nand-bus-width:
const: 8
@@ -61,6 +63,8 @@ patternProperties:
Refer to the ipq8064 example on how to use this special binding.
+ unevaluatedProperties: false
+
allOf:
- $ref: "nand-controller.yaml#"
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 06/17] dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties
2023-06-06 17:52 ` [PATCH v2 06/17] dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties Miquel Raynal
@ 2023-06-06 22:27 ` Chris Packham
2023-06-07 7:53 ` Miquel Raynal
0 siblings, 1 reply; 49+ messages in thread
From: Chris Packham @ 2023-06-06 22:27 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, Pratyush Yadav, Michael Walle,
linux-mtd@lists.infradead.org, Rob Herring, Krzysztof Kozlowski,
devicetree@vger.kernel.org
Cc: Thomas Petazzoni, Manivannan Sadhasivam
On 7/06/23 05:52, Miquel Raynal wrote:
> List all the possible properties in the NAND chip as per the example and
> set unevaluatedProperties to false in the NAND chip section.
>
> Cc: Manivannan Sadhasivam <mani@kernel.org>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> Documentation/devicetree/bindings/mtd/qcom,nandc.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> index 7217d8a64d14..581973f452ff 100644
> --- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> +++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> @@ -34,7 +34,9 @@ properties:
> patternProperties:
> "^nand@[a-f0-9]$":
> type: object
> + $ref: raw-nand-chip.yaml
> properties:
> +
> nand-bus-width:
> const: 8
>
> @@ -61,6 +63,8 @@ patternProperties:
>
> Refer to the ipq8064 example on how to use this special binding.
>
> + unevaluatedProperties: false
> +
> allOf:
> - $ref: "nand-controller.yaml#"
>
This doesn't appear to be working as intended. If I add the following
diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
index 581973f452ff..7a910a62c7b8 100644
--- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
+++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
@@ -220,6 +220,7 @@ examples:
partition@0 {
label = "boot-nand";
reg = <0 0x58a0000>;
+ nonsense;
};
partition@58a0000 {
Then I'd expect to get a complaint from `make mrproper; make
DT_CHECKER_FLAGS=-m dt_binding_check DT_SCHEMA_FILES=qcom,nandc.yaml`
but it seems to let this through.
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 06/17] dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties
2023-06-06 22:27 ` Chris Packham
@ 2023-06-07 7:53 ` Miquel Raynal
2023-06-07 20:47 ` Chris Packham
0 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-07 7:53 UTC (permalink / raw)
To: Chris Packham
Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd@lists.infradead.org,
Rob Herring, Krzysztof Kozlowski, devicetree@vger.kernel.org,
Thomas Petazzoni, Manivannan Sadhasivam
Hi Chris,
Chris.Packham@alliedtelesis.co.nz wrote on Tue, 6 Jun 2023 22:27:23
+0000:
> On 7/06/23 05:52, Miquel Raynal wrote:
> > List all the possible properties in the NAND chip as per the example and
> > set unevaluatedProperties to false in the NAND chip section.
> >
> > Cc: Manivannan Sadhasivam <mani@kernel.org>
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> > Documentation/devicetree/bindings/mtd/qcom,nandc.yaml | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> > index 7217d8a64d14..581973f452ff 100644
> > --- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> > +++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> > @@ -34,7 +34,9 @@ properties:
> > patternProperties:
> > "^nand@[a-f0-9]$":
> > type: object
> > + $ref: raw-nand-chip.yaml
> > properties:
> > +
> > nand-bus-width:
> > const: 8
> >
> > @@ -61,6 +63,8 @@ patternProperties:
> >
> > Refer to the ipq8064 example on how to use this special binding.
> >
> > + unevaluatedProperties: false
> > +
> > allOf:
> > - $ref: "nand-controller.yaml#"
> >
>
> This doesn't appear to be working as intended. If I add the following
>
> diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> index 581973f452ff..7a910a62c7b8 100644
> --- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> +++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
> @@ -220,6 +220,7 @@ examples:
> partition@0 {
> label = "boot-nand";
> reg = <0 0x58a0000>;
> + nonsense;
> };
>
> partition@58a0000 {
>
>
> Then I'd expect to get a complaint from `make mrproper; make
> DT_CHECKER_FLAGS=-m dt_binding_check DT_SCHEMA_FILES=qcom,nandc.yaml`
> but it seems to let this through.
I am just fixing the NAND chip node while this is a partition node. We
need to constrain more all the schemas, let's start with the beginning
:)
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 06/17] dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties
2023-06-07 7:53 ` Miquel Raynal
@ 2023-06-07 20:47 ` Chris Packham
0 siblings, 0 replies; 49+ messages in thread
From: Chris Packham @ 2023-06-07 20:47 UTC (permalink / raw)
To: Miquel Raynal
Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd@lists.infradead.org,
Rob Herring, Krzysztof Kozlowski, devicetree@vger.kernel.org,
Thomas Petazzoni, Manivannan Sadhasivam
On 7/06/23 19:53, Miquel Raynal wrote:
> Hi Chris,
>
> Chris.Packham@alliedtelesis.co.nz wrote on Tue, 6 Jun 2023 22:27:23
> +0000:
>
>> On 7/06/23 05:52, Miquel Raynal wrote:
>>> List all the possible properties in the NAND chip as per the example and
>>> set unevaluatedProperties to false in the NAND chip section.
>>>
>>> Cc: Manivannan Sadhasivam <mani@kernel.org>
>>> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
>>> ---
>>> Documentation/devicetree/bindings/mtd/qcom,nandc.yaml | 4 ++++
>>> 1 file changed, 4 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>>> index 7217d8a64d14..581973f452ff 100644
>>> --- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>>> +++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>>> @@ -34,7 +34,9 @@ properties:
>>> patternProperties:
>>> "^nand@[a-f0-9]$":
>>> type: object
>>> + $ref: raw-nand-chip.yaml
>>> properties:
>>> +
>>> nand-bus-width:
>>> const: 8
>>>
>>> @@ -61,6 +63,8 @@ patternProperties:
>>>
>>> Refer to the ipq8064 example on how to use this special binding.
>>>
>>> + unevaluatedProperties: false
>>> +
>>> allOf:
>>> - $ref: "nand-controller.yaml#"
>>>
>> This doesn't appear to be working as intended. If I add the following
>>
>> diff --git a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>> b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>> index 581973f452ff..7a910a62c7b8 100644
>> --- a/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>> +++ b/Documentation/devicetree/bindings/mtd/qcom,nandc.yaml
>> @@ -220,6 +220,7 @@ examples:
>> partition@0 {
>> label = "boot-nand";
>> reg = <0 0x58a0000>;
>> + nonsense;
>> };
>>
>> partition@58a0000 {
>>
>>
>> Then I'd expect to get a complaint from `make mrproper; make
>> DT_CHECKER_FLAGS=-m dt_binding_check DT_SCHEMA_FILES=qcom,nandc.yaml`
>> but it seems to let this through.
> I am just fixing the NAND chip node while this is a partition node. We
> need to constrain more all the schemas, let's start with the beginning
> :)
Ah OK. I just wasn't sure whether to wait for this to land or pile my
conversion on top.
What I really want to get to is the driver changes for the AC5 SoC.
Converting the schema started as "I should be able to knock that out in
30 mins on a Friday afternoon" but has snowballed significantly.
>
> Thanks,
> Miquèl
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 07/17] dt-bindings: mtd: ingenic: Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (5 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 06/17] dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-06 18:52 ` Rob Herring
2023-06-06 17:52 ` [PATCH v2 08/17] dt-bindings: mtd: sunxi: " Miquel Raynal
` (15 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal, Paul Cercueil
List all the possible properties in the NAND chip as per the example and
set unevaluatedProperties to false in the NAND chip section.
Cc: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/ingenic,nand.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml b/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
index a7bdb5d3675c..b9312ebefeb9 100644
--- a/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
@@ -39,7 +39,9 @@ properties:
patternProperties:
"^nand@[a-f0-9]$":
type: object
+ $ref: raw-nand-chip.yaml
properties:
+
rb-gpios:
description: GPIO specifier for the busy pin.
maxItems: 1
@@ -48,6 +50,8 @@ patternProperties:
description: GPIO specifier for the write-protect pin.
maxItems: 1
+ unevaluatedProperties: false
+
required:
- compatible
- reg
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 07/17] dt-bindings: mtd: ingenic: Prevent NAND chip unevaluated properties
2023-06-06 17:52 ` [PATCH v2 07/17] dt-bindings: mtd: ingenic: " Miquel Raynal
@ 2023-06-06 18:52 ` Rob Herring
2023-06-07 9:33 ` Miquel Raynal
0 siblings, 1 reply; 49+ messages in thread
From: Rob Herring @ 2023-06-06 18:52 UTC (permalink / raw)
To: Miquel Raynal
Cc: Tudor Ambarus, Rob Herring, Krzysztof Kozlowski, Chris Packham,
Pratyush Yadav, Vignesh Raghavendra, Thomas Petazzoni, linux-mtd,
devicetree, Michael Walle, Paul Cercueil, Richard Weinberger
On Tue, 06 Jun 2023 19:52:36 +0200, Miquel Raynal wrote:
> List all the possible properties in the NAND chip as per the example and
> set unevaluatedProperties to false in the NAND chip section.
>
> Cc: Paul Cercueil <paul@crapouillou.net>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> Documentation/devicetree/bindings/mtd/ingenic,nand.yaml | 4 ++++
> 1 file changed, 4 insertions(+)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mtd/ingenic,nand.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/ingenic,nand.example.dtb: nand-controller@1: nand@1: False schema does not allow {'reg': [[1]], 'nand-ecc-step-size': [[1024]], 'nand-ecc-strength': [[24]], 'nand-ecc-mode': ['hw'], 'nand-on-flash-bbt': True, 'pinctrl-names': ['default'], 'pinctrl-0': [[4294967295]], 'partitions': {'compatible': ['fixed-partitions'], '#address-cells': [[2]], '#size-cells': [[2]], 'partition@0': {'label': ['u-boot-spl'], 'reg': [[0, 0, 0, 8388608]]}, 'partition@800000': {'label': ['u-boot'], 'reg': [[0, 8388608, 0, 2097152]]}, 'partition@a00000': {'label': ['u-boot-env'], 'reg': [[0, 10485760, 0, 2097152]]}, 'partition@c00000': {'label': ['boot'], 'reg': [[0, 12582912, 0, 67108864]]}, 'partition@4c00000': {'label': ['system'], 'reg': [[0, 79691776, 1, 4215275520]]}}}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/ingenic,nand.example.dtb: nand-controller@1: nand@1: Unevaluated properties are not allowed ('nand-ecc-mode', 'nand-ecc-step-size', 'nand-ecc-strength', 'nand-on-flash-bbt', 'partitions', 'reg' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-8-miquel.raynal@bootlin.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 07/17] dt-bindings: mtd: ingenic: Prevent NAND chip unevaluated properties
2023-06-06 18:52 ` Rob Herring
@ 2023-06-07 9:33 ` Miquel Raynal
2023-06-08 15:20 ` Rob Herring
0 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-07 9:33 UTC (permalink / raw)
To: Rob Herring
Cc: Tudor Ambarus, Rob Herring, Krzysztof Kozlowski, Chris Packham,
Pratyush Yadav, Vignesh Raghavendra, Thomas Petazzoni, linux-mtd,
devicetree, Michael Walle, Paul Cercueil, Richard Weinberger
Hi Rob,
robh@kernel.org wrote on Tue, 06 Jun 2023 12:52:00 -0600:
> On Tue, 06 Jun 2023 19:52:36 +0200, Miquel Raynal wrote:
> > List all the possible properties in the NAND chip as per the example and
> > set unevaluatedProperties to false in the NAND chip section.
> >
> > Cc: Paul Cercueil <paul@crapouillou.net>
> > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > ---
> > Documentation/devicetree/bindings/mtd/ingenic,nand.yaml | 4 ++++
> > 1 file changed, 4 insertions(+)
> >
>
> My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> on your patch (DT_CHECKER_FLAGS is new in v5.13):
>
> yamllint warnings/errors:
>
> dtschema/dtc warnings/errors:
> ./Documentation/devicetree/bindings/mtd/ingenic,nand.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml
It seems like your automated tooling failed to apply the second patch
in this series (creating raw-nand-chip.yaml). It says "sha1 information
is lacking or useless". This work is based on a recent -rc so I'm not
sure what is "lacking or useless" in this case.
Anyway, do you plan to give this series a look anyway? Or should I
rebase against a specific branch?
Thanks,
Miquèl
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/ingenic,nand.example.dtb: nand-controller@1: nand@1: False schema does not allow {'reg': [[1]], 'nand-ecc-step-size': [[1024]], 'nand-ecc-strength': [[24]], 'nand-ecc-mode': ['hw'], 'nand-on-flash-bbt': True, 'pinctrl-names': ['default'], 'pinctrl-0': [[4294967295]], 'partitions': {'compatible': ['fixed-partitions'], '#address-cells': [[2]], '#size-cells': [[2]], 'partition@0': {'label': ['u-boot-spl'], 'reg': [[0, 0, 0, 8388608]]}, 'partition@800000': {'label': ['u-boot'], 'reg': [[0, 8388608, 0, 2097152]]}, 'partition@a00000': {'label': ['u-boot-env'], 'reg': [[0, 10485760, 0, 2097152]]}, 'partition@c00000': {'label': ['boot'], 'reg': [[0, 12582912, 0, 67108864]]}, 'partition@4c00000': {'label': ['system'], 'reg': [[0, 79691776, 1, 4215275520]]}}}
> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
> /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/ingenic,nand.example.dtb: nand-controller@1: nand@1: Unevaluated properties are not allowed ('nand-ecc-mode', 'nand-ecc-step-size', 'nand-ecc-strength', 'nand-on-flash-bbt', 'partitions', 'reg' were unexpected)
> From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/ingenic,nand.yaml
>
> doc reference errors (make refcheckdocs):
>
> See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-8-miquel.raynal@bootlin.com
>
> The base for the series is generally the latest rc1. A different dependency
> should be noted in *this* patch.
>
> If you already ran 'make dt_binding_check' and didn't see the above
> error(s), then make sure 'yamllint' is installed and dt-schema is up to
> date:
>
> pip3 install dtschema --upgrade
>
> Please check and re-submit after running the above command yourself. Note
> that DT_SCHEMA_FILES can be set to your schema file to speed up checking
> your schema. However, it must be unset to test all examples with your schema.
>
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 07/17] dt-bindings: mtd: ingenic: Prevent NAND chip unevaluated properties
2023-06-07 9:33 ` Miquel Raynal
@ 2023-06-08 15:20 ` Rob Herring
2023-06-09 8:36 ` Miquel Raynal
0 siblings, 1 reply; 49+ messages in thread
From: Rob Herring @ 2023-06-08 15:20 UTC (permalink / raw)
To: Miquel Raynal
Cc: Tudor Ambarus, Krzysztof Kozlowski, Chris Packham, Pratyush Yadav,
Vignesh Raghavendra, Thomas Petazzoni, linux-mtd, devicetree,
Michael Walle, Paul Cercueil, Richard Weinberger
On Wed, Jun 07, 2023 at 11:33:14AM +0200, Miquel Raynal wrote:
> Hi Rob,
>
> robh@kernel.org wrote on Tue, 06 Jun 2023 12:52:00 -0600:
>
> > On Tue, 06 Jun 2023 19:52:36 +0200, Miquel Raynal wrote:
> > > List all the possible properties in the NAND chip as per the example and
> > > set unevaluatedProperties to false in the NAND chip section.
> > >
> > > Cc: Paul Cercueil <paul@crapouillou.net>
> > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > > ---
> > > Documentation/devicetree/bindings/mtd/ingenic,nand.yaml | 4 ++++
> > > 1 file changed, 4 insertions(+)
> > >
> >
> > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> > on your patch (DT_CHECKER_FLAGS is new in v5.13):
> >
> > yamllint warnings/errors:
> >
> > dtschema/dtc warnings/errors:
> > ./Documentation/devicetree/bindings/mtd/ingenic,nand.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml
>
> It seems like your automated tooling failed to apply the second patch
> in this series (creating raw-nand-chip.yaml). It says "sha1 information
> is lacking or useless". This work is based on a recent -rc so I'm not
> sure what is "lacking or useless" in this case.
The base used is rc1.
> Anyway, do you plan to give this series a look anyway? Or should I
> rebase against a specific branch?
Yes, I'll leave it in the queue. I'm just getting back after being out a
month.
Rob
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 07/17] dt-bindings: mtd: ingenic: Prevent NAND chip unevaluated properties
2023-06-08 15:20 ` Rob Herring
@ 2023-06-09 8:36 ` Miquel Raynal
0 siblings, 0 replies; 49+ messages in thread
From: Miquel Raynal @ 2023-06-09 8:36 UTC (permalink / raw)
To: Rob Herring
Cc: Tudor Ambarus, Krzysztof Kozlowski, Chris Packham, Pratyush Yadav,
Vignesh Raghavendra, Thomas Petazzoni, linux-mtd, devicetree,
Michael Walle, Paul Cercueil, Richard Weinberger
Hi Rob,
robh@kernel.org wrote on Thu, 8 Jun 2023 09:20:41 -0600:
> On Wed, Jun 07, 2023 at 11:33:14AM +0200, Miquel Raynal wrote:
> > Hi Rob,
> >
> > robh@kernel.org wrote on Tue, 06 Jun 2023 12:52:00 -0600:
> >
> > > On Tue, 06 Jun 2023 19:52:36 +0200, Miquel Raynal wrote:
> > > > List all the possible properties in the NAND chip as per the example and
> > > > set unevaluatedProperties to false in the NAND chip section.
> > > >
> > > > Cc: Paul Cercueil <paul@crapouillou.net>
> > > > Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> > > > ---
> > > > Documentation/devicetree/bindings/mtd/ingenic,nand.yaml | 4 ++++
> > > > 1 file changed, 4 insertions(+)
> > > >
> > >
> > > My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
> > > on your patch (DT_CHECKER_FLAGS is new in v5.13):
> > >
> > > yamllint warnings/errors:
> > >
> > > dtschema/dtc warnings/errors:
> > > ./Documentation/devicetree/bindings/mtd/ingenic,nand.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml
> >
> > It seems like your automated tooling failed to apply the second patch
> > in this series (creating raw-nand-chip.yaml). It says "sha1 information
> > is lacking or useless". This work is based on a recent -rc so I'm not
> > sure what is "lacking or useless" in this case.
>
> The base used is rc1.
Ack.
>
> > Anyway, do you plan to give this series a look anyway? Or should I
> > rebase against a specific branch?
>
> Yes, I'll leave it in the queue. I'm just getting back after being out a
> month.
Sure. Good luck with your month-old backlog :)
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 08/17] dt-bindings: mtd: sunxi: Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (6 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 07/17] dt-bindings: mtd: ingenic: " Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-06 18:52 ` Rob Herring
2023-06-06 17:52 ` [PATCH v2 09/17] dt-bindings: mtd: meson: " Miquel Raynal
` (14 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal, Maxime Ripard,
Chen-Yu Tsai, Jernej Skrabec, Samuel Holland
nand-ecc-mode is a generic property which may apply to any raw NAND
chip, it does not need to be listed in each controller
description. Instead, let's reference the raw NAND chip description file
which contains the property. The description contained
"additionalProperties: false" which is wrong as other properties such as
partitions might very well be added in the final .dts, and anyway needs
to be converted into "unexpectedProperties: false" to fit the property
change new requirements.
Cc: Maxime Ripard <mripard@kernel.org>
Cc: Chen-Yu Tsai <wens@csie.org>
Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
Cc: Samuel Holland <samuel@sholland.org>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
.../devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml b/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml
index e7ec0c59bca6..f9bb695e13d4 100644
--- a/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml
@@ -49,13 +49,12 @@ properties:
patternProperties:
"^nand@[a-f0-9]$":
type: object
+ $ref: raw-nand-chip.yaml
properties:
reg:
minimum: 0
maximum: 7
- nand-ecc-mode: true
-
nand-ecc-algo:
const: bch
@@ -75,7 +74,7 @@ patternProperties:
minimum: 0
maximum: 1
- additionalProperties: false
+ unevaluatedProperties: false
required:
- compatible
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 08/17] dt-bindings: mtd: sunxi: Prevent NAND chip unevaluated properties
2023-06-06 17:52 ` [PATCH v2 08/17] dt-bindings: mtd: sunxi: " Miquel Raynal
@ 2023-06-06 18:52 ` Rob Herring
0 siblings, 0 replies; 49+ messages in thread
From: Rob Herring @ 2023-06-06 18:52 UTC (permalink / raw)
To: Miquel Raynal
Cc: Chris Packham, devicetree, Michael Walle, Maxime Ripard,
Richard Weinberger, Tudor Ambarus, Thomas Petazzoni, Rob Herring,
linux-mtd, Krzysztof Kozlowski, Jernej Skrabec,
Vignesh Raghavendra, Samuel Holland, Pratyush Yadav, Chen-Yu Tsai
On Tue, 06 Jun 2023 19:52:37 +0200, Miquel Raynal wrote:
> nand-ecc-mode is a generic property which may apply to any raw NAND
> chip, it does not need to be listed in each controller
> description. Instead, let's reference the raw NAND chip description file
> which contains the property. The description contained
> "additionalProperties: false" which is wrong as other properties such as
> partitions might very well be added in the final .dts, and anyway needs
> to be converted into "unexpectedProperties: false" to fit the property
> change new requirements.
>
> Cc: Maxime Ripard <mripard@kernel.org>
> Cc: Chen-Yu Tsai <wens@csie.org>
> Cc: Jernej Skrabec <jernej.skrabec@gmail.com>
> Cc: Samuel Holland <samuel@sholland.org>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> .../devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mtd/allwinner,sun4i-a10-nand.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-9-miquel.raynal@bootlin.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 09/17] dt-bindings: mtd: meson: Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (7 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 08/17] dt-bindings: mtd: sunxi: " Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-06 18:52 ` Rob Herring
2023-06-06 17:52 ` [PATCH v2 10/17] dt-bindings: mtd: brcmnand: " Miquel Raynal
` (13 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal, Liang Yang
Ensure all raw NAND chip properties are valid by referencing the
relevant schema and set unevaluatedProperties to false in the NAND chip
section to avoid spurious additions of random properties.
Cc: Liang Yang <liang.yang@amlogic.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
index 28fb9a7dd70f..00810b04dcde 100644
--- a/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
@@ -40,6 +40,7 @@ properties:
patternProperties:
"^nand@[0-7]$":
type: object
+ $ref: raw-nand-chip.yaml
properties:
reg:
minimum: 0
@@ -58,6 +59,8 @@ patternProperties:
meson-gxl-nfc 8, 16, 24, 30, 40, 50, 60
meson-axg-nfc 8
+ unevaluatedProperties: false
+
required:
- compatible
- reg
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 09/17] dt-bindings: mtd: meson: Prevent NAND chip unevaluated properties
2023-06-06 17:52 ` [PATCH v2 09/17] dt-bindings: mtd: meson: " Miquel Raynal
@ 2023-06-06 18:52 ` Rob Herring
0 siblings, 0 replies; 49+ messages in thread
From: Rob Herring @ 2023-06-06 18:52 UTC (permalink / raw)
To: Miquel Raynal
Cc: Richard Weinberger, Rob Herring, Pratyush Yadav, Liang Yang,
Krzysztof Kozlowski, linux-mtd, Michael Walle, Chris Packham,
Thomas Petazzoni, Vignesh Raghavendra, devicetree, Tudor Ambarus
On Tue, 06 Jun 2023 19:52:38 +0200, Miquel Raynal wrote:
> Ensure all raw NAND chip properties are valid by referencing the
> relevant schema and set unevaluatedProperties to false in the NAND chip
> section to avoid spurious additions of random properties.
>
> Cc: Liang Yang <liang.yang@amlogic.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.example.dtb: nand-controller@ffe07800: nand@0: False schema does not allow {'reg': [[0]]}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/amlogic,meson-nand.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-10-miquel.raynal@bootlin.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 10/17] dt-bindings: mtd: brcmnand: Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (8 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 09/17] dt-bindings: mtd: meson: " Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-06 18:52 ` Rob Herring
2023-06-06 17:52 ` [PATCH v2 11/17] dt-bindings: mtd: denali: " Miquel Raynal
` (12 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal, Brian Norris,
Kamal Dasu
Ensure all raw NAND chip properties are valid by referencing the
relevant schema and set unevaluatedProperties to false in the NAND chip
section to avoid spurious additions of random properties.
Cc: Brian Norris <computersforpeace@gmail.com>
Cc: Kamal Dasu <kdasu.kdev@gmail.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
index 1571024aa119..f57e96374e67 100644
--- a/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
+++ b/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
@@ -114,6 +114,7 @@ properties:
patternProperties:
"^nand@[a-f0-9]$":
type: object
+ $ref: raw-nand-chip.yaml
properties:
compatible:
const: brcm,nandcs
@@ -136,6 +137,8 @@ patternProperties:
layout.
$ref: /schemas/types.yaml#/definitions/uint32
+ unevaluatedProperties: false
+
allOf:
- $ref: nand-controller.yaml#
- if:
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 10/17] dt-bindings: mtd: brcmnand: Prevent NAND chip unevaluated properties
2023-06-06 17:52 ` [PATCH v2 10/17] dt-bindings: mtd: brcmnand: " Miquel Raynal
@ 2023-06-06 18:52 ` Rob Herring
0 siblings, 0 replies; 49+ messages in thread
From: Rob Herring @ 2023-06-06 18:52 UTC (permalink / raw)
To: Miquel Raynal
Cc: linux-mtd, Rob Herring, devicetree, Brian Norris, Kamal Dasu,
Michael Walle, Chris Packham, Krzysztof Kozlowski, Pratyush Yadav,
Richard Weinberger, Tudor Ambarus, Thomas Petazzoni,
Vignesh Raghavendra
On Tue, 06 Jun 2023 19:52:39 +0200, Miquel Raynal wrote:
> Ensure all raw NAND chip properties are valid by referencing the
> relevant schema and set unevaluatedProperties to false in the NAND chip
> section to avoid spurious additions of random properties.
>
> Cc: Brian Norris <computersforpeace@gmail.com>
> Cc: Kamal Dasu <kdasu.kdev@gmail.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/brcm,brcmnand.example.dtb: nand-controller@f0442800: nand@1: False schema does not allow {'compatible': ['brcm,nandcs'], 'reg': [[1]], 'nand-on-flash-bbt': True, 'nand-ecc-strength': [[12]], 'nand-ecc-step-size': [[512]], '#address-cells': [[1]], '#size-cells': [[1]]}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/brcm,brcmnand.example.dtb: nand-controller@f0442800: nand@1: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'nand-ecc-strength', 'nand-on-flash-bbt', 'reg' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/brcm,brcmnand.example.dtb: nand-controller@10000200: nand@0: False schema does not allow {'compatible': ['brcm,nandcs'], 'reg': [[0]], 'nand-on-flash-bbt': True, 'nand-ecc-strength': [[1]], 'nand-ecc-step-size': [[512]], '#address-cells': [[1]], '#size-cells': [[1]]}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/brcm,brcmnand.example.dtb: nand-controller@10000200: nand@0: Unevaluated properties are not allowed ('#address-cells', '#size-cells', 'nand-ecc-strength', 'nand-on-flash-bbt', 'reg' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/brcm,brcmnand.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-11-miquel.raynal@bootlin.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 11/17] dt-bindings: mtd: denali: Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (9 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 10/17] dt-bindings: mtd: brcmnand: " Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-06 18:52 ` Rob Herring
2023-06-06 17:52 ` [PATCH v2 12/17] dt-bindings: mtd: intel: " Miquel Raynal
` (11 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal, Masahiro Yamada
Ensure all raw NAND chip properties are valid by referencing the
relevant schema and set unevaluatedProperties to false in the NAND chip
section to avoid spurious additions of random properties.
Doing this in one location also saves us from dupplicating the
description of the NAND chip object.
Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/denali,nand.yaml | 9 ++++++---
1 file changed, 6 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/mtd/denali,nand.yaml b/Documentation/devicetree/bindings/mtd/denali,nand.yaml
index 0be83ad42970..81f95538d415 100644
--- a/Documentation/devicetree/bindings/mtd/denali,nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/denali,nand.yaml
@@ -63,6 +63,12 @@ properties:
minItems: 1
maxItems: 2
+patternProperties:
+ "^nand@[a-f0-9]$":
+ type: object
+ $ref: raw-nand-chip.yaml
+ unevaluatedProperties: false
+
allOf:
- $ref: nand-controller.yaml
@@ -74,7 +80,6 @@ allOf:
then:
patternProperties:
"^nand@[a-f0-9]$":
- type: object
properties:
nand-ecc-strength:
enum:
@@ -92,7 +97,6 @@ allOf:
then:
patternProperties:
"^nand@[a-f0-9]$":
- type: object
properties:
nand-ecc-strength:
enum:
@@ -111,7 +115,6 @@ allOf:
then:
patternProperties:
"^nand@[a-f0-9]$":
- type: object
properties:
nand-ecc-strength:
enum:
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 11/17] dt-bindings: mtd: denali: Prevent NAND chip unevaluated properties
2023-06-06 17:52 ` [PATCH v2 11/17] dt-bindings: mtd: denali: " Miquel Raynal
@ 2023-06-06 18:52 ` Rob Herring
0 siblings, 0 replies; 49+ messages in thread
From: Rob Herring @ 2023-06-06 18:52 UTC (permalink / raw)
To: Miquel Raynal
Cc: Richard Weinberger, Michael Walle, Krzysztof Kozlowski,
Thomas Petazzoni, Rob Herring, Vignesh Raghavendra, devicetree,
linux-mtd, Tudor Ambarus, Masahiro Yamada, Pratyush Yadav,
Chris Packham
On Tue, 06 Jun 2023 19:52:40 +0200, Miquel Raynal wrote:
> Ensure all raw NAND chip properties are valid by referencing the
> relevant schema and set unevaluatedProperties to false in the NAND chip
> section to avoid spurious additions of random properties.
>
> Doing this in one location also saves us from dupplicating the
> description of the NAND chip object.
>
> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> Documentation/devicetree/bindings/mtd/denali,nand.yaml | 9 ++++++---
> 1 file changed, 6 insertions(+), 3 deletions(-)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mtd/denali,nand.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/denali,nand.example.dtb: nand-controller@ff900000: nand@0: False schema does not allow {'reg': [[0]]}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/denali,nand.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/denali,nand.example.dtb: nand-controller@ff900000: nand@0: Unevaluated properties are not allowed ('reg' was unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/denali,nand.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-12-miquel.raynal@bootlin.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 12/17] dt-bindings: mtd: intel: Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (10 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 11/17] dt-bindings: mtd: denali: " Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-06 18:52 ` Rob Herring
2023-06-06 17:52 ` [PATCH v2 13/17] dt-bindings: mtd: rockchip: " Miquel Raynal
` (10 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal, Vadivel Murugan
nand-ecc-mode is a generic property which may apply to any raw NAND
chip, it does not need to be listed in each controller
description. Instead, let's reference the raw NAND chip description file
which contains the property. The description contained
"additionalProperties: false" which is wrong as other properties such as
partitions might very well be added in the final .dts, and anyway needs
to be converted into "unexpectedProperties: false" to fit the property
change new requirements.
Cc: Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml b/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml
index 8c62c7d3d0cd..7fa6c659d0d4 100644
--- a/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml
+++ b/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml
@@ -42,17 +42,16 @@ properties:
patternProperties:
"^nand@[a-f0-9]$":
type: object
+ $ref: raw-nand-chip.yaml
properties:
reg:
minimum: 0
maximum: 1
- nand-ecc-mode: true
-
nand-ecc-algo:
const: hw
- additionalProperties: false
+ unevaluatedProperties: false
required:
- compatible
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 12/17] dt-bindings: mtd: intel: Prevent NAND chip unevaluated properties
2023-06-06 17:52 ` [PATCH v2 12/17] dt-bindings: mtd: intel: " Miquel Raynal
@ 2023-06-06 18:52 ` Rob Herring
0 siblings, 0 replies; 49+ messages in thread
From: Rob Herring @ 2023-06-06 18:52 UTC (permalink / raw)
To: Miquel Raynal
Cc: Krzysztof Kozlowski, Tudor Ambarus, Michael Walle, Pratyush Yadav,
Thomas Petazzoni, linux-mtd, Vignesh Raghavendra,
Richard Weinberger, devicetree, Chris Packham, Rob Herring,
Vadivel Murugan
On Tue, 06 Jun 2023 19:52:41 +0200, Miquel Raynal wrote:
> nand-ecc-mode is a generic property which may apply to any raw NAND
> chip, it does not need to be listed in each controller
> description. Instead, let's reference the raw NAND chip description file
> which contains the property. The description contained
> "additionalProperties: false" which is wrong as other properties such as
> partitions might very well be added in the final .dts, and anyway needs
> to be converted into "unexpectedProperties: false" to fit the property
> change new requirements.
>
> Cc: Vadivel Murugan <vadivel.muruganx.ramuthevar@linux.intel.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.example.dtb: nand-controller@e0f00000: nand@0: False schema does not allow {'reg': [[0]], 'nand-ecc-mode': ['hw']}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.example.dtb: nand-controller@e0f00000: nand@0: Unevaluated properties are not allowed ('nand-ecc-mode' was unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/intel,lgm-ebunand.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-13-miquel.raynal@bootlin.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 13/17] dt-bindings: mtd: rockchip: Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (11 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 12/17] dt-bindings: mtd: intel: " Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-06 18:52 ` Rob Herring
2023-06-06 17:52 ` [PATCH v2 14/17] dt-bindings: mtd: stm32: " Miquel Raynal
` (9 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal, Heiko Stuebner
List all the possible properties in the NAND chip as per the example and
set unevaluatedProperties to false in the NAND chip section.
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
.../devicetree/bindings/mtd/rockchip,nand-controller.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/rockchip,nand-controller.yaml b/Documentation/devicetree/bindings/mtd/rockchip,nand-controller.yaml
index 566f330851f7..3672632e2ffa 100644
--- a/Documentation/devicetree/bindings/mtd/rockchip,nand-controller.yaml
+++ b/Documentation/devicetree/bindings/mtd/rockchip,nand-controller.yaml
@@ -57,6 +57,7 @@ properties:
patternProperties:
"^nand@[0-7]$":
type: object
+ $ref: raw-nand-chip.yaml
properties:
reg:
minimum: 0
@@ -116,6 +117,8 @@ patternProperties:
Only used in combination with 'nand-is-boot-medium'.
+ unevaluatedProperties: false
+
required:
- compatible
- reg
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 13/17] dt-bindings: mtd: rockchip: Prevent NAND chip unevaluated properties
2023-06-06 17:52 ` [PATCH v2 13/17] dt-bindings: mtd: rockchip: " Miquel Raynal
@ 2023-06-06 18:52 ` Rob Herring
0 siblings, 0 replies; 49+ messages in thread
From: Rob Herring @ 2023-06-06 18:52 UTC (permalink / raw)
To: Miquel Raynal
Cc: Rob Herring, Krzysztof Kozlowski, Richard Weinberger, linux-mtd,
Vignesh Raghavendra, devicetree, Michael Walle, Tudor Ambarus,
Chris Packham, Thomas Petazzoni, Pratyush Yadav, Heiko Stuebner
On Tue, 06 Jun 2023 19:52:42 +0200, Miquel Raynal wrote:
> List all the possible properties in the NAND chip as per the example and
> set unevaluatedProperties to false in the NAND chip section.
>
> Cc: Heiko Stuebner <heiko@sntech.de>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> .../devicetree/bindings/mtd/rockchip,nand-controller.yaml | 3 +++
> 1 file changed, 3 insertions(+)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mtd/rockchip,nand-controller.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/rockchip,nand-controller.example.dtb: nand-controller@ff4b0000: nand@0: False schema does not allow {'reg': [[0]], 'label': ['rk-nand'], 'nand-bus-width': [[8]], 'nand-ecc-mode': ['hw'], 'nand-ecc-step-size': [[1024]], 'nand-ecc-strength': [[16]], 'nand-is-boot-medium': True, 'rockchip,boot-blks': [[8]], 'rockchip,boot-ecc-strength': [[16]]}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/rockchip,nand-controller.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/rockchip,nand-controller.example.dtb: nand-controller@ff4b0000: nand@0: Unevaluated properties are not allowed ('label', 'nand-is-boot-medium' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/rockchip,nand-controller.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-14-miquel.raynal@bootlin.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 14/17] dt-bindings: mtd: stm32: Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (12 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 13/17] dt-bindings: mtd: rockchip: " Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-06 17:52 ` [PATCH v2 15/17] dt-bindings: mtd: mediatek: Reference raw-nand-chip.yaml Miquel Raynal
` (8 subsequent siblings)
22 siblings, 0 replies; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal, Maxime Coquelin,
Alexandre Torgue, Christophe Kerello
List all the possible properties in the NAND chip as per the example and
set unevaluatedProperties to false in the NAND chip section.
Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>
Cc: Christophe Kerello <christophe.kerello@foss.st.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml b/Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml
index 19cf1f18b61c..17011b64d83d 100644
--- a/Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml
+++ b/Documentation/devicetree/bindings/mtd/st,stm32-fmc2-nand.yaml
@@ -37,6 +37,7 @@ properties:
patternProperties:
"^nand@[a-f0-9]$":
type: object
+ $ref: raw-nand-chip.yaml
properties:
nand-ecc-step-size:
const: 512
@@ -44,6 +45,8 @@ patternProperties:
nand-ecc-strength:
enum: [1, 4, 8]
+ unevaluatedProperties: false
+
allOf:
- $ref: "nand-controller.yaml#"
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* [PATCH v2 15/17] dt-bindings: mtd: mediatek: Reference raw-nand-chip.yaml
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (13 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 14/17] dt-bindings: mtd: stm32: " Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-06 18:52 ` Rob Herring
2023-06-06 17:52 ` [PATCH v2 16/17] dt-bindings: mtd: mediatek: Prevent NAND chip unevaluated properties Miquel Raynal
` (7 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal, Matthias Brugger,
AngeloGioacchino Del Regno, Xiangsheng Hou
The mediatek NAND controller should reference the new raw-nand-chip.yaml
binding instead of the original nand-chip.yaml which does not contain
*all* the properties that may be used to fully describe the NAND
devices, certain properties being actually described under
nand-controller.yaml.
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml b/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml
index a6e7f123eda7..ab10b90077b6 100644
--- a/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml
+++ b/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml
@@ -40,7 +40,7 @@ properties:
patternProperties:
"^nand@[a-f0-9]$":
- $ref: nand-chip.yaml#
+ $ref: raw-nand-chip.yaml#
unevaluatedProperties: false
properties:
reg:
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 15/17] dt-bindings: mtd: mediatek: Reference raw-nand-chip.yaml
2023-06-06 17:52 ` [PATCH v2 15/17] dt-bindings: mtd: mediatek: Reference raw-nand-chip.yaml Miquel Raynal
@ 2023-06-06 18:52 ` Rob Herring
0 siblings, 0 replies; 49+ messages in thread
From: Rob Herring @ 2023-06-06 18:52 UTC (permalink / raw)
To: Miquel Raynal
Cc: Rob Herring, devicetree, Pratyush Yadav, Richard Weinberger,
Krzysztof Kozlowski, Chris Packham, Vignesh Raghavendra,
Xiangsheng Hou, linux-mtd, Matthias Brugger,
AngeloGioacchino Del Regno, Tudor Ambarus, Thomas Petazzoni,
Michael Walle
On Tue, 06 Jun 2023 19:52:44 +0200, Miquel Raynal wrote:
> The mediatek NAND controller should reference the new raw-nand-chip.yaml
> binding instead of the original nand-chip.yaml which does not contain
> *all* the properties that may be used to fully describe the NAND
> devices, certain properties being actually described under
> nand-controller.yaml.
>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Cc: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
./Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml: Unable to find schema file matching $id: http://devicetree.org/schemas/mtd/raw-nand-chip.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.example.dtb: nand-controller@1100d000: nand@0: False schema does not allow {'reg': [[0]], 'nand-on-flash-bbt': True, 'nand-ecc-mode': ['hw'], 'nand-ecc-step-size': [[1024]], 'nand-ecc-strength': [[24]], 'partitions': {'compatible': ['fixed-partitions'], '#address-cells': [[1]], '#size-cells': [[1]], 'preloader@0': {'label': ['pl'], 'read-only': True, 'reg': [[0, 4194304]]}, 'android@400000': {'label': ['android'], 'reg': [[4194304, 314572800]]}}}
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.example.dtb: nand-controller@1100d000: nand@0: Unevaluated properties are not allowed ('nand-ecc-step-size', 'nand-ecc-strength', 'partitions' were unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-16-miquel.raynal@bootlin.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 16/17] dt-bindings: mtd: mediatek: Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (14 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 15/17] dt-bindings: mtd: mediatek: Reference raw-nand-chip.yaml Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-06 18:52 ` Rob Herring
2023-06-06 17:52 ` [PATCH v2 17/17] dt-bindings: mtd: ti,am654: Prevent " Miquel Raynal
` (6 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal, Matthias Brugger,
AngeloGioacchino Del Regno, Xiangsheng Hou
nand-on-flash-bbt is a generic property which may apply to any raw NAND
chip, it does not need to be listed in each controller
description. The raw NAND chip description file which contains the
property is already referenced, so no need to mention the property here
again.
Cc: Matthias Brugger <matthias.bgg@gmail.com>
Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Cc: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml | 1 -
1 file changed, 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml b/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml
index ab10b90077b6..ab503a33a269 100644
--- a/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml
+++ b/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml
@@ -45,7 +45,6 @@ patternProperties:
properties:
reg:
maximum: 1
- nand-on-flash-bbt: true
nand-ecc-mode:
const: hw
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 16/17] dt-bindings: mtd: mediatek: Prevent NAND chip unevaluated properties
2023-06-06 17:52 ` [PATCH v2 16/17] dt-bindings: mtd: mediatek: Prevent NAND chip unevaluated properties Miquel Raynal
@ 2023-06-06 18:52 ` Rob Herring
0 siblings, 0 replies; 49+ messages in thread
From: Rob Herring @ 2023-06-06 18:52 UTC (permalink / raw)
To: Miquel Raynal
Cc: Rob Herring, AngeloGioacchino Del Regno, devicetree,
Pratyush Yadav, Vignesh Raghavendra, Tudor Ambarus, linux-mtd,
Chris Packham, Matthias Brugger, Richard Weinberger,
Michael Walle, Xiangsheng Hou, Thomas Petazzoni,
Krzysztof Kozlowski
On Tue, 06 Jun 2023 19:52:45 +0200, Miquel Raynal wrote:
> nand-on-flash-bbt is a generic property which may apply to any raw NAND
> chip, it does not need to be listed in each controller
> description. The raw NAND chip description file which contains the
> property is already referenced, so no need to mention the property here
> again.
>
> Cc: Matthias Brugger <matthias.bgg@gmail.com>
> Cc: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
> Cc: Xiangsheng Hou <xiangsheng.hou@mediatek.com>
> Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
> ---
> Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml | 1 -
> 1 file changed, 1 deletion(-)
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.example.dtb: nand-controller@1100d000: nand@0: Unevaluated properties are not allowed ('nand-on-flash-bbt' was unexpected)
From schema: /builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/mtd/mediatek,mtk-nfc.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20230606175246.190465-17-miquel.raynal@bootlin.com
The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
^ permalink raw reply [flat|nested] 49+ messages in thread
* [PATCH v2 17/17] dt-bindings: mtd: ti,am654: Prevent unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (15 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 16/17] dt-bindings: mtd: mediatek: Prevent NAND chip unevaluated properties Miquel Raynal
@ 2023-06-06 17:52 ` Miquel Raynal
2023-06-09 20:51 ` [PATCH v2 00/17] Prevent NAND chip " Rob Herring
` (5 subsequent siblings)
22 siblings, 0 replies; 49+ messages in thread
From: Miquel Raynal @ 2023-06-06 17:52 UTC (permalink / raw)
To: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Miquel Raynal
Reference mtd-physmap.yaml which contains all the relevant properties
for this device. Add "unevaluatedProperties: false" to avoid any
spurious addition of random properties.
Cc: Vignesh Raghavendra <vigneshr@ti.com>
Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com>
---
Documentation/devicetree/bindings/mtd/ti,am654-hbmc.yaml | 2 ++
1 file changed, 2 insertions(+)
diff --git a/Documentation/devicetree/bindings/mtd/ti,am654-hbmc.yaml b/Documentation/devicetree/bindings/mtd/ti,am654-hbmc.yaml
index 4774c92e7fc4..df4fdc02456d 100644
--- a/Documentation/devicetree/bindings/mtd/ti,am654-hbmc.yaml
+++ b/Documentation/devicetree/bindings/mtd/ti,am654-hbmc.yaml
@@ -30,6 +30,8 @@ properties:
patternProperties:
"^flash@[0-1],[0-9a-f]+$":
type: object
+ $ref: mtd-physmap.yaml
+ unevaluatedProperties: false
required:
- compatible
--
2.34.1
^ permalink raw reply related [flat|nested] 49+ messages in thread
* Re: [PATCH v2 00/17] Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (16 preceding siblings ...)
2023-06-06 17:52 ` [PATCH v2 17/17] dt-bindings: mtd: ti,am654: Prevent " Miquel Raynal
@ 2023-06-09 20:51 ` Rob Herring
2023-06-10 9:27 ` Krzysztof Kozlowski
` (4 subsequent siblings)
22 siblings, 0 replies; 49+ messages in thread
From: Rob Herring @ 2023-06-09 20:51 UTC (permalink / raw)
To: Miquel Raynal
Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Krzysztof Kozlowski,
devicetree, Chris Packham, Thomas Petazzoni, Alexandre Torgue,
AngeloGioacchino Del Regno, Brian Norris, Chen-Yu Tsai,
Christophe Kerello, Heiko Stuebner, Jernej Skrabec, Kamal Dasu,
Liang Yang, Manivannan Sadhasivam, Masahiro Yamada,
Matthias Brugger, Maxime Coquelin, Maxime Ripard, Paul Cercueil,
Samuel Holland, Vadivel Murugan, Xiangsheng Hou
On Tue, Jun 06, 2023 at 07:52:29PM +0200, Miquel Raynal wrote:
> As discussed with Krzysztof and Chris, it seems like each NAND
> controller binding should actually restrain the properties allowed in
> the NAND chip node with its own "unevaluatedProperties: false". This
> only works if we reference a yaml schema which contains all the possible
> properties *in the NAND chip node*. Indeed, the NAND controller yaml
> schema contains properties for the NAND chip which are not evaluated
> with this construction.
>
> Link: https://lore.kernel.org/all/a23dd485-a3d9-e31f-be3e-0ab293fcfc4a@linaro.org/
>
> While converting Marvell controller bindings, Chris explicitly pointed
> similar bindings which would also trigger errors when using
> "unevaluatedProperties: false" because of the problem mentioned above.
>
> Here is an attempt at making this logic more robust:
> * All NAND chip properties which are specific to the raw NAND world are
> moved into a raw-nand-chip.yaml file.
> * raw-nand-chip.yaml is referenced by all NAND controller bindings when
> the NAND chip must be further constrained.
> * raw-nand-chip.yaml and spi-nand.yaml reference nand-chip.yaml.
>
> These change made me realize the qcom,boot-partition property
> description was broken, and a few other descriptions needed small
> updates. Here is a batch of updates to fix all these.
>
> Thanks,
> Miquèl
>
> Miquel Raynal (17):
> dt-bindings: mtd: Accept nand related node names
> dt-bindings: mtd: Create a file for raw NAND chip properties
> dt-bindings: mtd: Mark nand-ecc-placement deprecated
> dt-bindings: mtd: Describe nand-ecc-mode
> dt-bindings: mtd: qcom: Fix a property position
> dt-bindings: mtd: qcom: Prevent NAND chip unevaluated properties
> dt-bindings: mtd: ingenic: Prevent NAND chip unevaluated properties
> dt-bindings: mtd: sunxi: Prevent NAND chip unevaluated properties
> dt-bindings: mtd: meson: Prevent NAND chip unevaluated properties
> dt-bindings: mtd: brcmnand: Prevent NAND chip unevaluated properties
> dt-bindings: mtd: denali: Prevent NAND chip unevaluated properties
> dt-bindings: mtd: intel: Prevent NAND chip unevaluated properties
> dt-bindings: mtd: rockchip: Prevent NAND chip unevaluated properties
> dt-bindings: mtd: stm32: Prevent NAND chip unevaluated properties
> dt-bindings: mtd: mediatek: Reference raw-nand-chip.yaml
> dt-bindings: mtd: mediatek: Prevent NAND chip unevaluated properties
> dt-bindings: mtd: ti,am654: Prevent unevaluated properties
>
> .../mtd/allwinner,sun4i-a10-nand.yaml | 5 +-
> .../bindings/mtd/amlogic,meson-nand.yaml | 3 +
> .../bindings/mtd/brcm,brcmnand.yaml | 3 +
> .../devicetree/bindings/mtd/denali,nand.yaml | 9 +-
> .../devicetree/bindings/mtd/ingenic,nand.yaml | 4 +
> .../bindings/mtd/intel,lgm-ebunand.yaml | 5 +-
> .../bindings/mtd/mediatek,mtk-nfc.yaml | 3 +-
> .../devicetree/bindings/mtd/mtd.yaml | 2 +-
> .../bindings/mtd/nand-controller.yaml | 85 +-------------
> .../devicetree/bindings/mtd/qcom,nandc.yaml | 45 ++++---
> .../bindings/mtd/raw-nand-chip.yaml | 111 ++++++++++++++++++
> .../mtd/rockchip,nand-controller.yaml | 3 +
> .../bindings/mtd/st,stm32-fmc2-nand.yaml | 3 +
> .../bindings/mtd/ti,am654-hbmc.yaml | 2 +
> 14 files changed, 172 insertions(+), 111 deletions(-)
> create mode 100644 Documentation/devicetree/bindings/mtd/raw-nand-chip.yaml
For the series:
Reviewed-by: Rob Herring <robh@kernel.org>
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 00/17] Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (17 preceding siblings ...)
2023-06-09 20:51 ` [PATCH v2 00/17] Prevent NAND chip " Rob Herring
@ 2023-06-10 9:27 ` Krzysztof Kozlowski
2023-06-13 11:43 ` Miquel Raynal
2023-09-27 7:20 ` Maxime Ripard
` (3 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Krzysztof Kozlowski @ 2023-06-10 9:27 UTC (permalink / raw)
To: Miquel Raynal, Richard Weinberger, Vignesh Raghavendra,
Tudor Ambarus, Pratyush Yadav, Michael Walle, linux-mtd,
Rob Herring, Krzysztof Kozlowski, devicetree
Cc: Chris Packham, Thomas Petazzoni, Alexandre Torgue,
AngeloGioacchino Del Regno, Brian Norris, Chen-Yu Tsai,
Christophe Kerello, Heiko Stuebner, Jernej Skrabec, Kamal Dasu,
Liang Yang, Manivannan Sadhasivam, Masahiro Yamada,
Matthias Brugger, Maxime Coquelin, Maxime Ripard, Paul Cercueil,
Samuel Holland, Vadivel Murugan, Xiangsheng Hou
On 06/06/2023 19:52, Miquel Raynal wrote:
> As discussed with Krzysztof and Chris, it seems like each NAND
> controller binding should actually restrain the properties allowed in
> the NAND chip node with its own "unevaluatedProperties: false". This
> only works if we reference a yaml schema which contains all the possible
> properties *in the NAND chip node*. Indeed, the NAND controller yaml
> schema contains properties for the NAND chip which are not evaluated
> with this construction.
>
> Link: https://lore.kernel.org/all/a23dd485-a3d9-e31f-be3e-0ab293fcfc4a@linaro.org/
Please rebase on latest kernel. This is some very old tree if you CC
this address.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 00/17] Prevent NAND chip unevaluated properties
2023-06-10 9:27 ` Krzysztof Kozlowski
@ 2023-06-13 11:43 ` Miquel Raynal
2023-06-15 8:26 ` Miquel Raynal
0 siblings, 1 reply; 49+ messages in thread
From: Miquel Raynal @ 2023-06-13 11:43 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree, Chris Packham, Thomas Petazzoni,
Alexandre Torgue, AngeloGioacchino Del Regno, Brian Norris,
Chen-Yu Tsai, Christophe Kerello, Heiko Stuebner, Jernej Skrabec,
Kamal Dasu, Liang Yang, Manivannan Sadhasivam, Masahiro Yamada,
Matthias Brugger, Maxime Coquelin, Maxime Ripard, Paul Cercueil,
Samuel Holland, Vadivel Murugan, Xiangsheng Hou
Hi Krzysztof,
krzk@kernel.org wrote on Sat, 10 Jun 2023 11:27:55 +0200:
> On 06/06/2023 19:52, Miquel Raynal wrote:
> > As discussed with Krzysztof and Chris, it seems like each NAND
> > controller binding should actually restrain the properties allowed in
> > the NAND chip node with its own "unevaluatedProperties: false". This
> > only works if we reference a yaml schema which contains all the possible
> > properties *in the NAND chip node*. Indeed, the NAND controller yaml
> > schema contains properties for the NAND chip which are not evaluated
> > with this construction.
> >
> > Link: https://lore.kernel.org/all/a23dd485-a3d9-e31f-be3e-0ab293fcfc4a@linaro.org/
>
> Please rebase on latest kernel. This is some very old tree if you CC
> this address.
Sorry for the trouble, it was a hardcoded address on my side. I've
updated the address to
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
The series is based on v6.4-rc1. Against what branch/tag do you want it
to be rebased?
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 00/17] Prevent NAND chip unevaluated properties
2023-06-13 11:43 ` Miquel Raynal
@ 2023-06-15 8:26 ` Miquel Raynal
0 siblings, 0 replies; 49+ messages in thread
From: Miquel Raynal @ 2023-06-15 8:26 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Richard Weinberger, Vignesh Raghavendra, Tudor Ambarus,
Pratyush Yadav, Michael Walle, linux-mtd, Rob Herring,
Krzysztof Kozlowski, devicetree, Chris Packham, Thomas Petazzoni,
Alexandre Torgue, AngeloGioacchino Del Regno, Brian Norris,
Chen-Yu Tsai, Christophe Kerello, Heiko Stuebner, Jernej Skrabec,
Kamal Dasu, Liang Yang, Manivannan Sadhasivam, Masahiro Yamada,
Matthias Brugger, Maxime Coquelin, Maxime Ripard, Paul Cercueil,
Samuel Holland, Vadivel Murugan, Xiangsheng Hou
Hi Krzysztof,
miquel.raynal@bootlin.com wrote on Tue, 13 Jun 2023 13:43:50 +0200:
> Hi Krzysztof,
>
> krzk@kernel.org wrote on Sat, 10 Jun 2023 11:27:55 +0200:
>
> > On 06/06/2023 19:52, Miquel Raynal wrote:
> > > As discussed with Krzysztof and Chris, it seems like each NAND
> > > controller binding should actually restrain the properties allowed in
> > > the NAND chip node with its own "unevaluatedProperties: false". This
> > > only works if we reference a yaml schema which contains all the possible
> > > properties *in the NAND chip node*. Indeed, the NAND controller yaml
> > > schema contains properties for the NAND chip which are not evaluated
> > > with this construction.
> > >
> > > Link: https://lore.kernel.org/all/a23dd485-a3d9-e31f-be3e-0ab293fcfc4a@linaro.org/
> >
> > Please rebase on latest kernel. This is some very old tree if you CC
> > this address.
>
> Sorry for the trouble, it was a hardcoded address on my side. I've
> updated the address to
>
> Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>
>
> The series is based on v6.4-rc1. Against what branch/tag do you want it
> to be rebased?
When I asked this question I forgot I usually apply mtd bindings in my
own tree :) I usually do it after receiving at least one R-by on the
whole series, but here as I'm the author I would just like to get
confirmation from you Krzysztof that I can go ahead (or if you prefer
to take it, or maybe want to give this another look later).
Thanks,
Miquèl
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 00/17] Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (18 preceding siblings ...)
2023-06-10 9:27 ` Krzysztof Kozlowski
@ 2023-09-27 7:20 ` Maxime Ripard
2023-09-27 15:35 ` Maxime Ripard
2023-09-27 7:20 ` Maxime Ripard
` (2 subsequent siblings)
22 siblings, 1 reply; 49+ messages in thread
From: Maxime Ripard @ 2023-09-27 7:20 UTC (permalink / raw)
To: Miquel Raynal
Cc: devicetree, linux-mtd, Alexandre Torgue,
AngeloGioacchino Del Regno, Brian Norris, Chen-Yu Tsai,
Chris Packham, Christophe Kerello, Heiko Stuebner, Jernej Skrabec,
Kamal Dasu, Krzysztof Kozlowski, Liang Yang,
Manivannan Sadhasivam, Masahiro Yamada, Matthias Brugger,
Maxime Coquelin, Maxime Ripard, Michael Walle, Paul Cercueil,
Pratyush Yadav, Richard Weinberger, Rob Herring, Samuel Holland,
Thomas Petazzoni, Tudor Ambarus, Vadivel Murugan,
Vignesh Raghavendra, Xiangsheng Hou
On Tue, 6 Jun 2023 19:52:29 +0200, Miquel Raynal wrote:
> As discussed with Krzysztof and Chris, it seems like each NAND
> controller binding should actually restrain the properties allowed in
> the NAND chip node with its own "unevaluatedProperties: false". This
> only works if we reference a yaml schema which contains all the possible
> properties *in the NAND chip node*. Indeed, the NAND controller yaml
>
> [ ... ]
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Tested-by: Maxime Ripard <mripard@kernel.org>
Thanks!
Maxime
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 00/17] Prevent NAND chip unevaluated properties
2023-09-27 7:20 ` Maxime Ripard
@ 2023-09-27 15:35 ` Maxime Ripard
0 siblings, 0 replies; 49+ messages in thread
From: Maxime Ripard @ 2023-09-27 15:35 UTC (permalink / raw)
To: Miquel Raynal
Cc: devicetree, linux-mtd, Alexandre Torgue,
AngeloGioacchino Del Regno, Brian Norris, Chen-Yu Tsai,
Chris Packham, Christophe Kerello, Heiko Stuebner, Jernej Skrabec,
Kamal Dasu, Krzysztof Kozlowski, Liang Yang,
Manivannan Sadhasivam, Masahiro Yamada, Matthias Brugger,
Maxime Coquelin, Michael Walle, Paul Cercueil, Pratyush Yadav,
Richard Weinberger, Rob Herring, Samuel Holland, Thomas Petazzoni,
Tudor Ambarus, Vadivel Murugan, Vignesh Raghavendra,
Xiangsheng Hou
[-- Attachment #1: Type: text/plain, Size: 741 bytes --]
On Wed, Sep 27, 2023 at 07:20:12AM +0000, Maxime Ripard wrote:
> On Tue, 6 Jun 2023 19:52:29 +0200, Miquel Raynal wrote:
> > As discussed with Krzysztof and Chris, it seems like each NAND
> > controller binding should actually restrain the properties allowed in
> > the NAND chip node with its own "unevaluatedProperties: false". This
> > only works if we reference a yaml schema which contains all the possible
> > properties *in the NAND chip node*. Indeed, the NAND controller yaml
> >
> > [ ... ]
>
> Acked-by: Maxime Ripard <mripard@kernel.org>
> Reviewed-by: Maxime Ripard <mripard@kernel.org>
> Tested-by: Maxime Ripard <mripard@kernel.org>
Erm, sorry for the noise, I ended up sending those by mistake...
Maxime
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 00/17] Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (19 preceding siblings ...)
2023-09-27 7:20 ` Maxime Ripard
@ 2023-09-27 7:20 ` Maxime Ripard
2023-09-27 7:20 ` Maxime Ripard
2023-09-27 7:21 ` Maxime Ripard
22 siblings, 0 replies; 49+ messages in thread
From: Maxime Ripard @ 2023-09-27 7:20 UTC (permalink / raw)
To: Miquel Raynal
Cc: devicetree, linux-mtd, Alexandre Torgue,
AngeloGioacchino Del Regno, Brian Norris, Chen-Yu Tsai,
Chris Packham, Christophe Kerello, Heiko Stuebner, Jernej Skrabec,
Kamal Dasu, Krzysztof Kozlowski, Liang Yang,
Manivannan Sadhasivam, Masahiro Yamada, Matthias Brugger,
Maxime Coquelin, Maxime Ripard, Michael Walle, Paul Cercueil,
Pratyush Yadav, Richard Weinberger, Rob Herring, Samuel Holland,
Thomas Petazzoni, Tudor Ambarus, Vadivel Murugan,
Vignesh Raghavendra, Xiangsheng Hou
On Tue, 6 Jun 2023 19:52:29 +0200, Miquel Raynal wrote:
> As discussed with Krzysztof and Chris, it seems like each NAND
> controller binding should actually restrain the properties allowed in
> the NAND chip node with its own "unevaluatedProperties: false". This
> only works if we reference a yaml schema which contains all the possible
> properties *in the NAND chip node*. Indeed, the NAND controller yaml
>
> [ ... ]
Thanks!
Maxime
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 00/17] Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (20 preceding siblings ...)
2023-09-27 7:20 ` Maxime Ripard
@ 2023-09-27 7:20 ` Maxime Ripard
2023-09-27 7:21 ` Maxime Ripard
22 siblings, 0 replies; 49+ messages in thread
From: Maxime Ripard @ 2023-09-27 7:20 UTC (permalink / raw)
To: Miquel Raynal
Cc: devicetree, linux-mtd, Alexandre Torgue,
AngeloGioacchino Del Regno, Brian Norris, Chen-Yu Tsai,
Chris Packham, Christophe Kerello, Heiko Stuebner, Jernej Skrabec,
Kamal Dasu, Krzysztof Kozlowski, Liang Yang,
Manivannan Sadhasivam, Masahiro Yamada, Matthias Brugger,
Maxime Coquelin, Maxime Ripard, Michael Walle, Paul Cercueil,
Pratyush Yadav, Richard Weinberger, Rob Herring, Samuel Holland,
Thomas Petazzoni, Tudor Ambarus, Vadivel Murugan,
Vignesh Raghavendra, Xiangsheng Hou
On Tue, 6 Jun 2023 19:52:29 +0200, Miquel Raynal wrote:
> As discussed with Krzysztof and Chris, it seems like each NAND
> controller binding should actually restrain the properties allowed in
> the NAND chip node with its own "unevaluatedProperties: false". This
> only works if we reference a yaml schema which contains all the possible
> properties *in the NAND chip node*. Indeed, the NAND controller yaml
>
> [ ... ]
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Thanks!
Maxime
^ permalink raw reply [flat|nested] 49+ messages in thread
* Re: [PATCH v2 00/17] Prevent NAND chip unevaluated properties
2023-06-06 17:52 [PATCH v2 00/17] Prevent NAND chip unevaluated properties Miquel Raynal
` (21 preceding siblings ...)
2023-09-27 7:20 ` Maxime Ripard
@ 2023-09-27 7:21 ` Maxime Ripard
22 siblings, 0 replies; 49+ messages in thread
From: Maxime Ripard @ 2023-09-27 7:21 UTC (permalink / raw)
To: Miquel Raynal
Cc: devicetree, linux-mtd, Alexandre Torgue,
AngeloGioacchino Del Regno, Brian Norris, Chen-Yu Tsai,
Chris Packham, Christophe Kerello, Heiko Stuebner, Jernej Skrabec,
Kamal Dasu, Krzysztof Kozlowski, Liang Yang,
Manivannan Sadhasivam, Masahiro Yamada, Matthias Brugger,
Maxime Coquelin, Maxime Ripard, Michael Walle, Paul Cercueil,
Pratyush Yadav, Richard Weinberger, Rob Herring, Samuel Holland,
Thomas Petazzoni, Tudor Ambarus, Vadivel Murugan,
Vignesh Raghavendra, Xiangsheng Hou
On Tue, 6 Jun 2023 19:52:29 +0200, Miquel Raynal wrote:
> As discussed with Krzysztof and Chris, it seems like each NAND
> controller binding should actually restrain the properties allowed in
> the NAND chip node with its own "unevaluatedProperties: false". This
> only works if we reference a yaml schema which contains all the possible
> properties *in the NAND chip node*. Indeed, the NAND controller yaml
>
> [ ... ]
Acked-by: Maxime Ripard <mripard@kernel.org>
Reviewed-by: Maxime Ripard <mripard@kernel.org>
Thanks!
Maxime
^ permalink raw reply [flat|nested] 49+ messages in thread