All of lore.kernel.org
 help / color / mirror / Atom feed
* [next PATCH] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema
@ 2021-12-09  2:42 ` Chunfeng Yun
  0 siblings, 0 replies; 9+ messages in thread
From: Chunfeng Yun @ 2021-12-09  2:42 UTC (permalink / raw)
  To: Srinivas Kandagatla, Rob Herring
  Cc: Matthias Brugger, Andrew-CT Chen, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek, Chunfeng Yun

Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 .../bindings/nvmem/mediatek,efuse.yaml        | 89 +++++++++++++++++++
 .../devicetree/bindings/nvmem/mtk-efuse.txt   | 43 ---------
 2 files changed, 89 insertions(+), 43 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
 delete mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt

diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
new file mode 100644
index 000000000000..7332195e7f00
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/mediatek,efuse.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek efuse device tree bindings
+
+description: |
+  MediaTek's efuse is used for storing calibration data, it can be accessed
+  on ARM devices usiong I/O mapped memory.
+
+maintainers:
+  - Andrew-CT Chen <andrew-ct.chen@mediatek.com>
+
+allOf:
+  - $ref: "nvmem.yaml#"
+
+properties:
+  $nodename:
+    pattern: "^efuse@[0-9a-f]+$"
+
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - mediatek,mt7622-efuse
+              - mediatek,mt7623-efuse
+              - mediatek,mt8173-efuse
+              - mediatek,mt8192-efuse
+              - mediatek,mt8195-efuse
+              - mediatek,mt8516-efuse
+          - const: mediatek,efuse
+      - const: mediatek,mt8173-efuse
+        deprecated: true
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+patternProperties:
+  "^.*@[0-9a-f]+$":
+    type: object
+
+    properties:
+      reg:
+        maxItems: 1
+
+      bits:
+        maxItems: 1
+
+    required:
+      - reg
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    efuse@10206000 {
+        compatible = "mediatek,mt8173-efuse";
+        reg = <0x10206000 0x1000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        u2_intr_p0: usb2-intr-p0@188 {
+            reg = <0x188 0x1>;
+            bits = <0 5>;
+        };
+
+        u2_intr_p1: usb2-intr-p1@188 {
+            reg = <0x188 0x2>;
+            bits = <5 5>;
+        };
+
+        thermal_calibration: calib@528 {
+            reg = <0x528 0xc>;
+        };
+    };
diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
deleted file mode 100644
index 39d529599444..000000000000
--- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-= Mediatek MTK-EFUSE device tree bindings =
-
-This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs.
-
-Required properties:
-- compatible: should be
-	      "mediatek,mt7622-efuse", "mediatek,efuse": for MT7622
-	      "mediatek,mt7623-efuse", "mediatek,efuse": for MT7623
-	      "mediatek,mt8173-efuse" or "mediatek,efuse": for MT8173
-	      "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192
-	      "mediatek,mt8195-efuse", "mediatek,efuse": for MT8195
-	      "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516
-- reg: Should contain registers location and length
-- bits: contain the bits range by offset and size
-
-= Data cells =
-Are child nodes of MTK-EFUSE, bindings of which as described in
-bindings/nvmem/nvmem.txt
-
-Example:
-
-	efuse: efuse@10206000 {
-		compatible = "mediatek,mt8173-efuse";
-		reg	   = <0 0x10206000 0 0x1000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
-
-		/* Data cells */
-		thermal_calibration: calib@528 {
-			reg = <0x528 0xc>;
-		};
-	};
-
-= Data consumers =
-Are device nodes which consume nvmem data cells.
-
-For example:
-
-	thermal {
-		...
-		nvmem-cells = <&thermal_calibration>;
-		nvmem-cell-names = "calibration";
-	};
-- 
2.18.0


^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [next PATCH] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema
@ 2021-12-09  2:42 ` Chunfeng Yun
  0 siblings, 0 replies; 9+ messages in thread
From: Chunfeng Yun @ 2021-12-09  2:42 UTC (permalink / raw)
  To: Srinivas Kandagatla, Rob Herring
  Cc: Matthias Brugger, Andrew-CT Chen, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek, Chunfeng Yun

Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 .../bindings/nvmem/mediatek,efuse.yaml        | 89 +++++++++++++++++++
 .../devicetree/bindings/nvmem/mtk-efuse.txt   | 43 ---------
 2 files changed, 89 insertions(+), 43 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
 delete mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt

diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
new file mode 100644
index 000000000000..7332195e7f00
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/mediatek,efuse.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek efuse device tree bindings
+
+description: |
+  MediaTek's efuse is used for storing calibration data, it can be accessed
+  on ARM devices usiong I/O mapped memory.
+
+maintainers:
+  - Andrew-CT Chen <andrew-ct.chen@mediatek.com>
+
+allOf:
+  - $ref: "nvmem.yaml#"
+
+properties:
+  $nodename:
+    pattern: "^efuse@[0-9a-f]+$"
+
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - mediatek,mt7622-efuse
+              - mediatek,mt7623-efuse
+              - mediatek,mt8173-efuse
+              - mediatek,mt8192-efuse
+              - mediatek,mt8195-efuse
+              - mediatek,mt8516-efuse
+          - const: mediatek,efuse
+      - const: mediatek,mt8173-efuse
+        deprecated: true
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+patternProperties:
+  "^.*@[0-9a-f]+$":
+    type: object
+
+    properties:
+      reg:
+        maxItems: 1
+
+      bits:
+        maxItems: 1
+
+    required:
+      - reg
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    efuse@10206000 {
+        compatible = "mediatek,mt8173-efuse";
+        reg = <0x10206000 0x1000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        u2_intr_p0: usb2-intr-p0@188 {
+            reg = <0x188 0x1>;
+            bits = <0 5>;
+        };
+
+        u2_intr_p1: usb2-intr-p1@188 {
+            reg = <0x188 0x2>;
+            bits = <5 5>;
+        };
+
+        thermal_calibration: calib@528 {
+            reg = <0x528 0xc>;
+        };
+    };
diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
deleted file mode 100644
index 39d529599444..000000000000
--- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-= Mediatek MTK-EFUSE device tree bindings =
-
-This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs.
-
-Required properties:
-- compatible: should be
-	      "mediatek,mt7622-efuse", "mediatek,efuse": for MT7622
-	      "mediatek,mt7623-efuse", "mediatek,efuse": for MT7623
-	      "mediatek,mt8173-efuse" or "mediatek,efuse": for MT8173
-	      "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192
-	      "mediatek,mt8195-efuse", "mediatek,efuse": for MT8195
-	      "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516
-- reg: Should contain registers location and length
-- bits: contain the bits range by offset and size
-
-= Data cells =
-Are child nodes of MTK-EFUSE, bindings of which as described in
-bindings/nvmem/nvmem.txt
-
-Example:
-
-	efuse: efuse@10206000 {
-		compatible = "mediatek,mt8173-efuse";
-		reg	   = <0 0x10206000 0 0x1000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
-
-		/* Data cells */
-		thermal_calibration: calib@528 {
-			reg = <0x528 0xc>;
-		};
-	};
-
-= Data consumers =
-Are device nodes which consume nvmem data cells.
-
-For example:
-
-	thermal {
-		...
-		nvmem-cells = <&thermal_calibration>;
-		nvmem-cell-names = "calibration";
-	};
-- 
2.18.0


_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* [next PATCH] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema
@ 2021-12-09  2:42 ` Chunfeng Yun
  0 siblings, 0 replies; 9+ messages in thread
From: Chunfeng Yun @ 2021-12-09  2:42 UTC (permalink / raw)
  To: Srinivas Kandagatla, Rob Herring
  Cc: Matthias Brugger, Andrew-CT Chen, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek, Chunfeng Yun

Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml

Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
---
 .../bindings/nvmem/mediatek,efuse.yaml        | 89 +++++++++++++++++++
 .../devicetree/bindings/nvmem/mtk-efuse.txt   | 43 ---------
 2 files changed, 89 insertions(+), 43 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
 delete mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt

diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
new file mode 100644
index 000000000000..7332195e7f00
--- /dev/null
+++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
@@ -0,0 +1,89 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/nvmem/mediatek,efuse.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: MediaTek efuse device tree bindings
+
+description: |
+  MediaTek's efuse is used for storing calibration data, it can be accessed
+  on ARM devices usiong I/O mapped memory.
+
+maintainers:
+  - Andrew-CT Chen <andrew-ct.chen@mediatek.com>
+
+allOf:
+  - $ref: "nvmem.yaml#"
+
+properties:
+  $nodename:
+    pattern: "^efuse@[0-9a-f]+$"
+
+  compatible:
+    oneOf:
+      - items:
+          - enum:
+              - mediatek,mt7622-efuse
+              - mediatek,mt7623-efuse
+              - mediatek,mt8173-efuse
+              - mediatek,mt8192-efuse
+              - mediatek,mt8195-efuse
+              - mediatek,mt8516-efuse
+          - const: mediatek,efuse
+      - const: mediatek,mt8173-efuse
+        deprecated: true
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+patternProperties:
+  "^.*@[0-9a-f]+$":
+    type: object
+
+    properties:
+      reg:
+        maxItems: 1
+
+      bits:
+        maxItems: 1
+
+    required:
+      - reg
+
+    additionalProperties: false
+
+required:
+  - compatible
+  - reg
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    efuse@10206000 {
+        compatible = "mediatek,mt8173-efuse";
+        reg = <0x10206000 0x1000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+
+        u2_intr_p0: usb2-intr-p0@188 {
+            reg = <0x188 0x1>;
+            bits = <0 5>;
+        };
+
+        u2_intr_p1: usb2-intr-p1@188 {
+            reg = <0x188 0x2>;
+            bits = <5 5>;
+        };
+
+        thermal_calibration: calib@528 {
+            reg = <0x528 0xc>;
+        };
+    };
diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
deleted file mode 100644
index 39d529599444..000000000000
--- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
+++ /dev/null
@@ -1,43 +0,0 @@
-= Mediatek MTK-EFUSE device tree bindings =
-
-This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs.
-
-Required properties:
-- compatible: should be
-	      "mediatek,mt7622-efuse", "mediatek,efuse": for MT7622
-	      "mediatek,mt7623-efuse", "mediatek,efuse": for MT7623
-	      "mediatek,mt8173-efuse" or "mediatek,efuse": for MT8173
-	      "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192
-	      "mediatek,mt8195-efuse", "mediatek,efuse": for MT8195
-	      "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516
-- reg: Should contain registers location and length
-- bits: contain the bits range by offset and size
-
-= Data cells =
-Are child nodes of MTK-EFUSE, bindings of which as described in
-bindings/nvmem/nvmem.txt
-
-Example:
-
-	efuse: efuse@10206000 {
-		compatible = "mediatek,mt8173-efuse";
-		reg	   = <0 0x10206000 0 0x1000>;
-		#address-cells = <1>;
-		#size-cells = <1>;
-
-		/* Data cells */
-		thermal_calibration: calib@528 {
-			reg = <0x528 0xc>;
-		};
-	};
-
-= Data consumers =
-Are device nodes which consume nvmem data cells.
-
-For example:
-
-	thermal {
-		...
-		nvmem-cells = <&thermal_calibration>;
-		nvmem-cell-names = "calibration";
-	};
-- 
2.18.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 9+ messages in thread

* Re: [next PATCH] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema
  2021-12-09  2:42 ` Chunfeng Yun
  (?)
@ 2021-12-15 16:56   ` Rob Herring
  -1 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2021-12-15 16:56 UTC (permalink / raw)
  To: Chunfeng Yun
  Cc: Srinivas Kandagatla, Matthias Brugger, Andrew-CT Chen,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, Dec 09, 2021 at 10:42:13AM +0800, Chunfeng Yun wrote:
> Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml
> 
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  .../bindings/nvmem/mediatek,efuse.yaml        | 89 +++++++++++++++++++
>  .../devicetree/bindings/nvmem/mtk-efuse.txt   | 43 ---------
>  2 files changed, 89 insertions(+), 43 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
>  delete mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> 
> diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> new file mode 100644
> index 000000000000..7332195e7f00
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> @@ -0,0 +1,89 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/nvmem/mediatek,efuse.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek efuse device tree bindings
> +
> +description: |
> +  MediaTek's efuse is used for storing calibration data, it can be accessed
> +  on ARM devices usiong I/O mapped memory.
> +
> +maintainers:
> +  - Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> +
> +allOf:
> +  - $ref: "nvmem.yaml#"
> +
> +properties:
> +  $nodename:
> +    pattern: "^efuse@[0-9a-f]+$"
> +
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - mediatek,mt7622-efuse
> +              - mediatek,mt7623-efuse
> +              - mediatek,mt8173-efuse
> +              - mediatek,mt8192-efuse
> +              - mediatek,mt8195-efuse
> +              - mediatek,mt8516-efuse
> +          - const: mediatek,efuse
> +      - const: mediatek,mt8173-efuse
> +        deprecated: true
> +
> +  reg:
> +    maxItems: 1
> +

All of: 

> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 1
> +
> +patternProperties:
> +  "^.*@[0-9a-f]+$":
> +    type: object
> +
> +    properties:
> +      reg:
> +        maxItems: 1
> +
> +      bits:
> +        maxItems: 1
> +
> +    required:
> +      - reg
> +
> +    additionalProperties: false

...this is covered by nvmem.yaml and can be dropped.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    efuse@10206000 {
> +        compatible = "mediatek,mt8173-efuse";
> +        reg = <0x10206000 0x1000>;
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +
> +        u2_intr_p0: usb2-intr-p0@188 {
> +            reg = <0x188 0x1>;
> +            bits = <0 5>;
> +        };
> +
> +        u2_intr_p1: usb2-intr-p1@188 {
> +            reg = <0x188 0x2>;
> +            bits = <5 5>;
> +        };
> +
> +        thermal_calibration: calib@528 {
> +            reg = <0x528 0xc>;
> +        };
> +    };
> diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> deleted file mode 100644
> index 39d529599444..000000000000
> --- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> +++ /dev/null
> @@ -1,43 +0,0 @@
> -= Mediatek MTK-EFUSE device tree bindings =
> -
> -This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs.
> -
> -Required properties:
> -- compatible: should be
> -	      "mediatek,mt7622-efuse", "mediatek,efuse": for MT7622
> -	      "mediatek,mt7623-efuse", "mediatek,efuse": for MT7623
> -	      "mediatek,mt8173-efuse" or "mediatek,efuse": for MT8173
> -	      "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192
> -	      "mediatek,mt8195-efuse", "mediatek,efuse": for MT8195
> -	      "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516
> -- reg: Should contain registers location and length
> -- bits: contain the bits range by offset and size
> -
> -= Data cells =
> -Are child nodes of MTK-EFUSE, bindings of which as described in
> -bindings/nvmem/nvmem.txt
> -
> -Example:
> -
> -	efuse: efuse@10206000 {
> -		compatible = "mediatek,mt8173-efuse";
> -		reg	   = <0 0x10206000 0 0x1000>;
> -		#address-cells = <1>;
> -		#size-cells = <1>;
> -
> -		/* Data cells */
> -		thermal_calibration: calib@528 {
> -			reg = <0x528 0xc>;
> -		};
> -	};
> -
> -= Data consumers =
> -Are device nodes which consume nvmem data cells.
> -
> -For example:
> -
> -	thermal {
> -		...
> -		nvmem-cells = <&thermal_calibration>;
> -		nvmem-cell-names = "calibration";
> -	};
> -- 
> 2.18.0
> 
> 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [next PATCH] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema
@ 2021-12-15 16:56   ` Rob Herring
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2021-12-15 16:56 UTC (permalink / raw)
  To: Chunfeng Yun
  Cc: Srinivas Kandagatla, Matthias Brugger, Andrew-CT Chen,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, Dec 09, 2021 at 10:42:13AM +0800, Chunfeng Yun wrote:
> Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml
> 
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  .../bindings/nvmem/mediatek,efuse.yaml        | 89 +++++++++++++++++++
>  .../devicetree/bindings/nvmem/mtk-efuse.txt   | 43 ---------
>  2 files changed, 89 insertions(+), 43 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
>  delete mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> 
> diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> new file mode 100644
> index 000000000000..7332195e7f00
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> @@ -0,0 +1,89 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/nvmem/mediatek,efuse.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek efuse device tree bindings
> +
> +description: |
> +  MediaTek's efuse is used for storing calibration data, it can be accessed
> +  on ARM devices usiong I/O mapped memory.
> +
> +maintainers:
> +  - Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> +
> +allOf:
> +  - $ref: "nvmem.yaml#"
> +
> +properties:
> +  $nodename:
> +    pattern: "^efuse@[0-9a-f]+$"
> +
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - mediatek,mt7622-efuse
> +              - mediatek,mt7623-efuse
> +              - mediatek,mt8173-efuse
> +              - mediatek,mt8192-efuse
> +              - mediatek,mt8195-efuse
> +              - mediatek,mt8516-efuse
> +          - const: mediatek,efuse
> +      - const: mediatek,mt8173-efuse
> +        deprecated: true
> +
> +  reg:
> +    maxItems: 1
> +

All of: 

> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 1
> +
> +patternProperties:
> +  "^.*@[0-9a-f]+$":
> +    type: object
> +
> +    properties:
> +      reg:
> +        maxItems: 1
> +
> +      bits:
> +        maxItems: 1
> +
> +    required:
> +      - reg
> +
> +    additionalProperties: false

...this is covered by nvmem.yaml and can be dropped.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    efuse@10206000 {
> +        compatible = "mediatek,mt8173-efuse";
> +        reg = <0x10206000 0x1000>;
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +
> +        u2_intr_p0: usb2-intr-p0@188 {
> +            reg = <0x188 0x1>;
> +            bits = <0 5>;
> +        };
> +
> +        u2_intr_p1: usb2-intr-p1@188 {
> +            reg = <0x188 0x2>;
> +            bits = <5 5>;
> +        };
> +
> +        thermal_calibration: calib@528 {
> +            reg = <0x528 0xc>;
> +        };
> +    };
> diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> deleted file mode 100644
> index 39d529599444..000000000000
> --- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> +++ /dev/null
> @@ -1,43 +0,0 @@
> -= Mediatek MTK-EFUSE device tree bindings =
> -
> -This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs.
> -
> -Required properties:
> -- compatible: should be
> -	      "mediatek,mt7622-efuse", "mediatek,efuse": for MT7622
> -	      "mediatek,mt7623-efuse", "mediatek,efuse": for MT7623
> -	      "mediatek,mt8173-efuse" or "mediatek,efuse": for MT8173
> -	      "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192
> -	      "mediatek,mt8195-efuse", "mediatek,efuse": for MT8195
> -	      "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516
> -- reg: Should contain registers location and length
> -- bits: contain the bits range by offset and size
> -
> -= Data cells =
> -Are child nodes of MTK-EFUSE, bindings of which as described in
> -bindings/nvmem/nvmem.txt
> -
> -Example:
> -
> -	efuse: efuse@10206000 {
> -		compatible = "mediatek,mt8173-efuse";
> -		reg	   = <0 0x10206000 0 0x1000>;
> -		#address-cells = <1>;
> -		#size-cells = <1>;
> -
> -		/* Data cells */
> -		thermal_calibration: calib@528 {
> -			reg = <0x528 0xc>;
> -		};
> -	};
> -
> -= Data consumers =
> -Are device nodes which consume nvmem data cells.
> -
> -For example:
> -
> -	thermal {
> -		...
> -		nvmem-cells = <&thermal_calibration>;
> -		nvmem-cell-names = "calibration";
> -	};
> -- 
> 2.18.0
> 
> 

_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [next PATCH] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema
@ 2021-12-15 16:56   ` Rob Herring
  0 siblings, 0 replies; 9+ messages in thread
From: Rob Herring @ 2021-12-15 16:56 UTC (permalink / raw)
  To: Chunfeng Yun
  Cc: Srinivas Kandagatla, Matthias Brugger, Andrew-CT Chen,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Thu, Dec 09, 2021 at 10:42:13AM +0800, Chunfeng Yun wrote:
> Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml
> 
> Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> ---
>  .../bindings/nvmem/mediatek,efuse.yaml        | 89 +++++++++++++++++++
>  .../devicetree/bindings/nvmem/mtk-efuse.txt   | 43 ---------
>  2 files changed, 89 insertions(+), 43 deletions(-)
>  create mode 100644 Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
>  delete mode 100644 Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> 
> diff --git a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> new file mode 100644
> index 000000000000..7332195e7f00
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> @@ -0,0 +1,89 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/nvmem/mediatek,efuse.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: MediaTek efuse device tree bindings
> +
> +description: |
> +  MediaTek's efuse is used for storing calibration data, it can be accessed
> +  on ARM devices usiong I/O mapped memory.
> +
> +maintainers:
> +  - Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> +
> +allOf:
> +  - $ref: "nvmem.yaml#"
> +
> +properties:
> +  $nodename:
> +    pattern: "^efuse@[0-9a-f]+$"
> +
> +  compatible:
> +    oneOf:
> +      - items:
> +          - enum:
> +              - mediatek,mt7622-efuse
> +              - mediatek,mt7623-efuse
> +              - mediatek,mt8173-efuse
> +              - mediatek,mt8192-efuse
> +              - mediatek,mt8195-efuse
> +              - mediatek,mt8516-efuse
> +          - const: mediatek,efuse
> +      - const: mediatek,mt8173-efuse
> +        deprecated: true
> +
> +  reg:
> +    maxItems: 1
> +

All of: 

> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 1
> +
> +patternProperties:
> +  "^.*@[0-9a-f]+$":
> +    type: object
> +
> +    properties:
> +      reg:
> +        maxItems: 1
> +
> +      bits:
> +        maxItems: 1
> +
> +    required:
> +      - reg
> +
> +    additionalProperties: false

...this is covered by nvmem.yaml and can be dropped.

> +
> +required:
> +  - compatible
> +  - reg
> +
> +unevaluatedProperties: false
> +
> +examples:
> +  - |
> +    efuse@10206000 {
> +        compatible = "mediatek,mt8173-efuse";
> +        reg = <0x10206000 0x1000>;
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +
> +        u2_intr_p0: usb2-intr-p0@188 {
> +            reg = <0x188 0x1>;
> +            bits = <0 5>;
> +        };
> +
> +        u2_intr_p1: usb2-intr-p1@188 {
> +            reg = <0x188 0x2>;
> +            bits = <5 5>;
> +        };
> +
> +        thermal_calibration: calib@528 {
> +            reg = <0x528 0xc>;
> +        };
> +    };
> diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> deleted file mode 100644
> index 39d529599444..000000000000
> --- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> +++ /dev/null
> @@ -1,43 +0,0 @@
> -= Mediatek MTK-EFUSE device tree bindings =
> -
> -This binding is intended to represent MTK-EFUSE which is found in most Mediatek SOCs.
> -
> -Required properties:
> -- compatible: should be
> -	      "mediatek,mt7622-efuse", "mediatek,efuse": for MT7622
> -	      "mediatek,mt7623-efuse", "mediatek,efuse": for MT7623
> -	      "mediatek,mt8173-efuse" or "mediatek,efuse": for MT8173
> -	      "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192
> -	      "mediatek,mt8195-efuse", "mediatek,efuse": for MT8195
> -	      "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516
> -- reg: Should contain registers location and length
> -- bits: contain the bits range by offset and size
> -
> -= Data cells =
> -Are child nodes of MTK-EFUSE, bindings of which as described in
> -bindings/nvmem/nvmem.txt
> -
> -Example:
> -
> -	efuse: efuse@10206000 {
> -		compatible = "mediatek,mt8173-efuse";
> -		reg	   = <0 0x10206000 0 0x1000>;
> -		#address-cells = <1>;
> -		#size-cells = <1>;
> -
> -		/* Data cells */
> -		thermal_calibration: calib@528 {
> -			reg = <0x528 0xc>;
> -		};
> -	};
> -
> -= Data consumers =
> -Are device nodes which consume nvmem data cells.
> -
> -For example:
> -
> -	thermal {
> -		...
> -		nvmem-cells = <&thermal_calibration>;
> -		nvmem-cell-names = "calibration";
> -	};
> -- 
> 2.18.0
> 
> 

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [next PATCH] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema
  2021-12-15 16:56   ` Rob Herring
  (?)
@ 2021-12-17 10:12     ` Chunfeng Yun
  -1 siblings, 0 replies; 9+ messages in thread
From: Chunfeng Yun @ 2021-12-17 10:12 UTC (permalink / raw)
  To: Rob Herring
  Cc: Srinivas Kandagatla, Matthias Brugger, Andrew-CT Chen,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Wed, 2021-12-15 at 10:56 -0600, Rob Herring wrote:
> On Thu, Dec 09, 2021 at 10:42:13AM +0800, Chunfeng Yun wrote:
> > Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml
> > 
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> >  .../bindings/nvmem/mediatek,efuse.yaml        | 89
> > +++++++++++++++++++
> >  .../devicetree/bindings/nvmem/mtk-efuse.txt   | 43 ---------
> >  2 files changed, 89 insertions(+), 43 deletions(-)
> >  create mode 100644
> > Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> >  delete mode 100644 Documentation/devicetree/bindings/nvmem/mtk-
> > efuse.txt
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> > b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> > new file mode 100644
> > index 000000000000..7332195e7f00
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> > @@ -0,0 +1,89 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/nvmem/mediatek,efuse.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: MediaTek efuse device tree bindings
> > +
> > +description: |
> > +  MediaTek's efuse is used for storing calibration data, it can be
> > accessed
> > +  on ARM devices usiong I/O mapped memory.
> > +
> > +maintainers:
> > +  - Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> > +
> > +allOf:
> > +  - $ref: "nvmem.yaml#"
> > +
> > +properties:
> > +  $nodename:
> > +    pattern: "^efuse@[0-9a-f]+$"
> > +
> > +  compatible:
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - mediatek,mt7622-efuse
> > +              - mediatek,mt7623-efuse
> > +              - mediatek,mt8173-efuse
> > +              - mediatek,mt8192-efuse
> > +              - mediatek,mt8195-efuse
> > +              - mediatek,mt8516-efuse
> > +          - const: mediatek,efuse
> > +      - const: mediatek,mt8173-efuse
> > +        deprecated: true
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> 
> All of: 
> 
> > +  "#address-cells":
> > +    const: 1
> > +
> > +  "#size-cells":
> > +    const: 1
> > +
> > +patternProperties:
> > +  "^.*@[0-9a-f]+$":
> > +    type: object
> > +
> > +    properties:
> > +      reg:
> > +        maxItems: 1
> > +
> > +      bits:
> > +        maxItems: 1
> > +
> > +    required:
> > +      - reg
> > +
> > +    additionalProperties: false
> 
> ...this is covered by nvmem.yaml and can be dropped.
Ok, thanks

> 
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    efuse@10206000 {
> > +        compatible = "mediatek,mt8173-efuse";
> > +        reg = <0x10206000 0x1000>;
> > +        #address-cells = <1>;
> > +        #size-cells = <1>;
> > +
> > +        u2_intr_p0: usb2-intr-p0@188 {
> > +            reg = <0x188 0x1>;
> > +            bits = <0 5>;
> > +        };
> > +
> > +        u2_intr_p1: usb2-intr-p1@188 {
> > +            reg = <0x188 0x2>;
> > +            bits = <5 5>;
> > +        };
> > +
> > +        thermal_calibration: calib@528 {
> > +            reg = <0x528 0xc>;
> > +        };
> > +    };
> > diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> > b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> > deleted file mode 100644
> > index 39d529599444..000000000000
> > --- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> > +++ /dev/null
> > @@ -1,43 +0,0 @@
> > -= Mediatek MTK-EFUSE device tree bindings =
> > -
> > -This binding is intended to represent MTK-EFUSE which is found in
> > most Mediatek SOCs.
> > -
> > -Required properties:
> > -- compatible: should be
> > -	      "mediatek,mt7622-efuse", "mediatek,efuse": for MT7622
> > -	      "mediatek,mt7623-efuse", "mediatek,efuse": for MT7623
> > -	      "mediatek,mt8173-efuse" or "mediatek,efuse": for MT8173
> > -	      "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192
> > -	      "mediatek,mt8195-efuse", "mediatek,efuse": for MT8195
> > -	      "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516
> > -- reg: Should contain registers location and length
> > -- bits: contain the bits range by offset and size
> > -
> > -= Data cells =
> > -Are child nodes of MTK-EFUSE, bindings of which as described in
> > -bindings/nvmem/nvmem.txt
> > -
> > -Example:
> > -
> > -	efuse: efuse@10206000 {
> > -		compatible = "mediatek,mt8173-efuse";
> > -		reg	   = <0 0x10206000 0 0x1000>;
> > -		#address-cells = <1>;
> > -		#size-cells = <1>;
> > -
> > -		/* Data cells */
> > -		thermal_calibration: calib@528 {
> > -			reg = <0x528 0xc>;
> > -		};
> > -	};
> > -
> > -= Data consumers =
> > -Are device nodes which consume nvmem data cells.
> > -
> > -For example:
> > -
> > -	thermal {
> > -		...
> > -		nvmem-cells = <&thermal_calibration>;
> > -		nvmem-cell-names = "calibration";
> > -	};
> > -- 
> > 2.18.0
> > 
> > 

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [next PATCH] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema
@ 2021-12-17 10:12     ` Chunfeng Yun
  0 siblings, 0 replies; 9+ messages in thread
From: Chunfeng Yun @ 2021-12-17 10:12 UTC (permalink / raw)
  To: Rob Herring
  Cc: Srinivas Kandagatla, Matthias Brugger, Andrew-CT Chen,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Wed, 2021-12-15 at 10:56 -0600, Rob Herring wrote:
> On Thu, Dec 09, 2021 at 10:42:13AM +0800, Chunfeng Yun wrote:
> > Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml
> > 
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> >  .../bindings/nvmem/mediatek,efuse.yaml        | 89
> > +++++++++++++++++++
> >  .../devicetree/bindings/nvmem/mtk-efuse.txt   | 43 ---------
> >  2 files changed, 89 insertions(+), 43 deletions(-)
> >  create mode 100644
> > Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> >  delete mode 100644 Documentation/devicetree/bindings/nvmem/mtk-
> > efuse.txt
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> > b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> > new file mode 100644
> > index 000000000000..7332195e7f00
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> > @@ -0,0 +1,89 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/nvmem/mediatek,efuse.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: MediaTek efuse device tree bindings
> > +
> > +description: |
> > +  MediaTek's efuse is used for storing calibration data, it can be
> > accessed
> > +  on ARM devices usiong I/O mapped memory.
> > +
> > +maintainers:
> > +  - Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> > +
> > +allOf:
> > +  - $ref: "nvmem.yaml#"
> > +
> > +properties:
> > +  $nodename:
> > +    pattern: "^efuse@[0-9a-f]+$"
> > +
> > +  compatible:
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - mediatek,mt7622-efuse
> > +              - mediatek,mt7623-efuse
> > +              - mediatek,mt8173-efuse
> > +              - mediatek,mt8192-efuse
> > +              - mediatek,mt8195-efuse
> > +              - mediatek,mt8516-efuse
> > +          - const: mediatek,efuse
> > +      - const: mediatek,mt8173-efuse
> > +        deprecated: true
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> 
> All of: 
> 
> > +  "#address-cells":
> > +    const: 1
> > +
> > +  "#size-cells":
> > +    const: 1
> > +
> > +patternProperties:
> > +  "^.*@[0-9a-f]+$":
> > +    type: object
> > +
> > +    properties:
> > +      reg:
> > +        maxItems: 1
> > +
> > +      bits:
> > +        maxItems: 1
> > +
> > +    required:
> > +      - reg
> > +
> > +    additionalProperties: false
> 
> ...this is covered by nvmem.yaml and can be dropped.
Ok, thanks

> 
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    efuse@10206000 {
> > +        compatible = "mediatek,mt8173-efuse";
> > +        reg = <0x10206000 0x1000>;
> > +        #address-cells = <1>;
> > +        #size-cells = <1>;
> > +
> > +        u2_intr_p0: usb2-intr-p0@188 {
> > +            reg = <0x188 0x1>;
> > +            bits = <0 5>;
> > +        };
> > +
> > +        u2_intr_p1: usb2-intr-p1@188 {
> > +            reg = <0x188 0x2>;
> > +            bits = <5 5>;
> > +        };
> > +
> > +        thermal_calibration: calib@528 {
> > +            reg = <0x528 0xc>;
> > +        };
> > +    };
> > diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> > b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> > deleted file mode 100644
> > index 39d529599444..000000000000
> > --- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> > +++ /dev/null
> > @@ -1,43 +0,0 @@
> > -= Mediatek MTK-EFUSE device tree bindings =
> > -
> > -This binding is intended to represent MTK-EFUSE which is found in
> > most Mediatek SOCs.
> > -
> > -Required properties:
> > -- compatible: should be
> > -	      "mediatek,mt7622-efuse", "mediatek,efuse": for MT7622
> > -	      "mediatek,mt7623-efuse", "mediatek,efuse": for MT7623
> > -	      "mediatek,mt8173-efuse" or "mediatek,efuse": for MT8173
> > -	      "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192
> > -	      "mediatek,mt8195-efuse", "mediatek,efuse": for MT8195
> > -	      "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516
> > -- reg: Should contain registers location and length
> > -- bits: contain the bits range by offset and size
> > -
> > -= Data cells =
> > -Are child nodes of MTK-EFUSE, bindings of which as described in
> > -bindings/nvmem/nvmem.txt
> > -
> > -Example:
> > -
> > -	efuse: efuse@10206000 {
> > -		compatible = "mediatek,mt8173-efuse";
> > -		reg	   = <0 0x10206000 0 0x1000>;
> > -		#address-cells = <1>;
> > -		#size-cells = <1>;
> > -
> > -		/* Data cells */
> > -		thermal_calibration: calib@528 {
> > -			reg = <0x528 0xc>;
> > -		};
> > -	};
> > -
> > -= Data consumers =
> > -Are device nodes which consume nvmem data cells.
> > -
> > -For example:
> > -
> > -	thermal {
> > -		...
> > -		nvmem-cells = <&thermal_calibration>;
> > -		nvmem-cell-names = "calibration";
> > -	};
> > -- 
> > 2.18.0
> > 
> > 
_______________________________________________
Linux-mediatek mailing list
Linux-mediatek@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-mediatek

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [next PATCH] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema
@ 2021-12-17 10:12     ` Chunfeng Yun
  0 siblings, 0 replies; 9+ messages in thread
From: Chunfeng Yun @ 2021-12-17 10:12 UTC (permalink / raw)
  To: Rob Herring
  Cc: Srinivas Kandagatla, Matthias Brugger, Andrew-CT Chen,
	devicetree, linux-kernel, linux-arm-kernel, linux-mediatek

On Wed, 2021-12-15 at 10:56 -0600, Rob Herring wrote:
> On Thu, Dec 09, 2021 at 10:42:13AM +0800, Chunfeng Yun wrote:
> > Convert mtk-efuse.txt to YAML schema mediatek,efuse.yaml
> > 
> > Signed-off-by: Chunfeng Yun <chunfeng.yun@mediatek.com>
> > ---
> >  .../bindings/nvmem/mediatek,efuse.yaml        | 89
> > +++++++++++++++++++
> >  .../devicetree/bindings/nvmem/mtk-efuse.txt   | 43 ---------
> >  2 files changed, 89 insertions(+), 43 deletions(-)
> >  create mode 100644
> > Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> >  delete mode 100644 Documentation/devicetree/bindings/nvmem/mtk-
> > efuse.txt
> > 
> > diff --git
> > a/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> > b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> > new file mode 100644
> > index 000000000000..7332195e7f00
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/nvmem/mediatek,efuse.yaml
> > @@ -0,0 +1,89 @@
> > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/nvmem/mediatek,efuse.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: MediaTek efuse device tree bindings
> > +
> > +description: |
> > +  MediaTek's efuse is used for storing calibration data, it can be
> > accessed
> > +  on ARM devices usiong I/O mapped memory.
> > +
> > +maintainers:
> > +  - Andrew-CT Chen <andrew-ct.chen@mediatek.com>
> > +
> > +allOf:
> > +  - $ref: "nvmem.yaml#"
> > +
> > +properties:
> > +  $nodename:
> > +    pattern: "^efuse@[0-9a-f]+$"
> > +
> > +  compatible:
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - mediatek,mt7622-efuse
> > +              - mediatek,mt7623-efuse
> > +              - mediatek,mt8173-efuse
> > +              - mediatek,mt8192-efuse
> > +              - mediatek,mt8195-efuse
> > +              - mediatek,mt8516-efuse
> > +          - const: mediatek,efuse
> > +      - const: mediatek,mt8173-efuse
> > +        deprecated: true
> > +
> > +  reg:
> > +    maxItems: 1
> > +
> 
> All of: 
> 
> > +  "#address-cells":
> > +    const: 1
> > +
> > +  "#size-cells":
> > +    const: 1
> > +
> > +patternProperties:
> > +  "^.*@[0-9a-f]+$":
> > +    type: object
> > +
> > +    properties:
> > +      reg:
> > +        maxItems: 1
> > +
> > +      bits:
> > +        maxItems: 1
> > +
> > +    required:
> > +      - reg
> > +
> > +    additionalProperties: false
> 
> ...this is covered by nvmem.yaml and can be dropped.
Ok, thanks

> 
> > +
> > +required:
> > +  - compatible
> > +  - reg
> > +
> > +unevaluatedProperties: false
> > +
> > +examples:
> > +  - |
> > +    efuse@10206000 {
> > +        compatible = "mediatek,mt8173-efuse";
> > +        reg = <0x10206000 0x1000>;
> > +        #address-cells = <1>;
> > +        #size-cells = <1>;
> > +
> > +        u2_intr_p0: usb2-intr-p0@188 {
> > +            reg = <0x188 0x1>;
> > +            bits = <0 5>;
> > +        };
> > +
> > +        u2_intr_p1: usb2-intr-p1@188 {
> > +            reg = <0x188 0x2>;
> > +            bits = <5 5>;
> > +        };
> > +
> > +        thermal_calibration: calib@528 {
> > +            reg = <0x528 0xc>;
> > +        };
> > +    };
> > diff --git a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> > b/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> > deleted file mode 100644
> > index 39d529599444..000000000000
> > --- a/Documentation/devicetree/bindings/nvmem/mtk-efuse.txt
> > +++ /dev/null
> > @@ -1,43 +0,0 @@
> > -= Mediatek MTK-EFUSE device tree bindings =
> > -
> > -This binding is intended to represent MTK-EFUSE which is found in
> > most Mediatek SOCs.
> > -
> > -Required properties:
> > -- compatible: should be
> > -	      "mediatek,mt7622-efuse", "mediatek,efuse": for MT7622
> > -	      "mediatek,mt7623-efuse", "mediatek,efuse": for MT7623
> > -	      "mediatek,mt8173-efuse" or "mediatek,efuse": for MT8173
> > -	      "mediatek,mt8192-efuse", "mediatek,efuse": for MT8192
> > -	      "mediatek,mt8195-efuse", "mediatek,efuse": for MT8195
> > -	      "mediatek,mt8516-efuse", "mediatek,efuse": for MT8516
> > -- reg: Should contain registers location and length
> > -- bits: contain the bits range by offset and size
> > -
> > -= Data cells =
> > -Are child nodes of MTK-EFUSE, bindings of which as described in
> > -bindings/nvmem/nvmem.txt
> > -
> > -Example:
> > -
> > -	efuse: efuse@10206000 {
> > -		compatible = "mediatek,mt8173-efuse";
> > -		reg	   = <0 0x10206000 0 0x1000>;
> > -		#address-cells = <1>;
> > -		#size-cells = <1>;
> > -
> > -		/* Data cells */
> > -		thermal_calibration: calib@528 {
> > -			reg = <0x528 0xc>;
> > -		};
> > -	};
> > -
> > -= Data consumers =
> > -Are device nodes which consume nvmem data cells.
> > -
> > -For example:
> > -
> > -	thermal {
> > -		...
> > -		nvmem-cells = <&thermal_calibration>;
> > -		nvmem-cell-names = "calibration";
> > -	};
> > -- 
> > 2.18.0
> > 
> > 
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2021-12-17 10:15 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-12-09  2:42 [next PATCH] dt-bindings: nvmem: convert mtk-efuse.txt to YAML schema Chunfeng Yun
2021-12-09  2:42 ` Chunfeng Yun
2021-12-09  2:42 ` Chunfeng Yun
2021-12-15 16:56 ` Rob Herring
2021-12-15 16:56   ` Rob Herring
2021-12-15 16:56   ` Rob Herring
2021-12-17 10:12   ` Chunfeng Yun
2021-12-17 10:12     ` Chunfeng Yun
2021-12-17 10:12     ` Chunfeng Yun

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.