diff mbox series

dt-bindings: nvmem: mxs-ocotp: Document fsl,ocotp

Message ID 20231010114034.3660226-1-festevam@gmail.com
State Changes Requested
Headers show
Series dt-bindings: nvmem: mxs-ocotp: Document fsl,ocotp | expand

Checks

Context Check Description
robh/checkpatch success
robh/patch-applied success
robh/dtbs-check warning build log
robh/dt-meta-schema success

Commit Message

Fabio Estevam Oct. 10, 2023, 11:40 a.m. UTC
From: Fabio Estevam <festevam@denx.de>

Both imx23.dtsi and imx28.dtsi describe the OCOTP nodes in
the format:

compatible = "fsl,imx28-ocotp", "fsl,ocotp";

Document the "fsl,ocotp" entry to fix the following schema
warning:

efuse@8002c000: compatible: ['fsl,imx23-ocotp', 'fsl,ocotp'] is too long
from schema $id: http://devicetree.org/schemas/nvmem/mxs-ocotp.yaml#

Signed-off-by: Fabio Estevam <festevam@denx.de>
---
 Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

Comments

Conor Dooley Oct. 10, 2023, 3:44 p.m. UTC | #1
On Tue, Oct 10, 2023 at 08:40:34AM -0300, Fabio Estevam wrote:
> From: Fabio Estevam <festevam@denx.de>
> 
> Both imx23.dtsi and imx28.dtsi describe the OCOTP nodes in
> the format:
> 
> compatible = "fsl,imx28-ocotp", "fsl,ocotp";
> 
> Document the "fsl,ocotp" entry to fix the following schema
> warning:
> 
> efuse@8002c000: compatible: ['fsl,imx23-ocotp', 'fsl,ocotp'] is too long
> from schema $id: http://devicetree.org/schemas/nvmem/mxs-ocotp.yaml#

Seemingly the driver actually relies on "fsl,ocotop" being present. This
patch probably then needs to grow a fixes tag, since it is incorrect?

Cheers,
Conor.

> 
> Signed-off-by: Fabio Estevam <festevam@denx.de>
> ---
>  Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml | 10 ++++++----
>  1 file changed, 6 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml
> index f43186f98607..d9287be89877 100644
> --- a/Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml
> +++ b/Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml
> @@ -15,9 +15,11 @@ allOf:
>  
>  properties:
>    compatible:
> -    enum:
> -      - fsl,imx23-ocotp
> -      - fsl,imx28-ocotp
> +    items:
> +      - enum:
> +          - fsl,imx23-ocotp
> +          - fsl,imx28-ocotp
> +      - const: fsl,ocotp
>  
>    reg:
>      maxItems: 1
> @@ -35,7 +37,7 @@ unevaluatedProperties: false
>  examples:
>    - |
>      ocotp: efuse@8002c000 {
> -        compatible = "fsl,imx28-ocotp";
> +        compatible = "fsl,imx28-ocotp", "fsl,ocotp";
>          #address-cells = <1>;
>          #size-cells = <1>;
>          reg = <0x8002c000 0x2000>;
> -- 
> 2.34.1
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml b/Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml
index f43186f98607..d9287be89877 100644
--- a/Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml
+++ b/Documentation/devicetree/bindings/nvmem/mxs-ocotp.yaml
@@ -15,9 +15,11 @@  allOf:
 
 properties:
   compatible:
-    enum:
-      - fsl,imx23-ocotp
-      - fsl,imx28-ocotp
+    items:
+      - enum:
+          - fsl,imx23-ocotp
+          - fsl,imx28-ocotp
+      - const: fsl,ocotp
 
   reg:
     maxItems: 1
@@ -35,7 +37,7 @@  unevaluatedProperties: false
 examples:
   - |
     ocotp: efuse@8002c000 {
-        compatible = "fsl,imx28-ocotp";
+        compatible = "fsl,imx28-ocotp", "fsl,ocotp";
         #address-cells = <1>;
         #size-cells = <1>;
         reg = <0x8002c000 0x2000>;