Re: [PATCH v2 1/2] Add DT bindings schema for PVT controller

2020-09-28 Thread Rob Herring
On Mon, Sep 28, 2020 at 05:44:18PM +0800, Rahul Tanwar wrote:
> PVT controller (MR75203) is used to configure & control
> Moortec embedded analog IP which contains temprature sensor(TS),
> voltage monitor(VM) & process detector(PD) modules.
> 
> Add DT bindings schema for PVT controller.
> 
> Signed-off-by: Rahul Tanwar 
> ---
>  .../devicetree/bindings/hwmon/moortec,mr75203.yaml | 70 
> ++
>  1 file changed, 70 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
> 
> diff --git a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml 
> b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
> new file mode 100644
> index ..85461bfe
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
> @@ -0,0 +1,70 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hwmon/moortec,mr75203.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Moortec Semiconductor MR75203 PVT Controller bindings
> +
> +maintainers:
> +  - Rahul Tanwar 
> +
> +properties:
> +  compatible:
> +const: moortec,mr75203
> +
> +  reg:
> +items:
> +  - description: PVT common registers
> +  - description: PVT temprature sensor registers
> +  - description: PVT process detector registers
> +  - description: PVT voltage monitor registers
> +
> +  reg-names:
> +items:
> +  - const: common
> +  - const: ts
> +  - const: pd
> +  - const: vm
> +
> +  vm-map:

Needs a vendor prefix and type reference.

> +description:
> +  PVT controller has 5 VM (voltage monitor) sensors.
> +  vm-map defines CPU core to VM instance mapping. A
> +  value of 0xff means that VM sensor is unused.
> +maxItems: 5
> +
> +  clocks:
> +maxItems: 1
> +
> +  resets:
> +maxItems: 1
> +
> +  "#thermal-sensor-cells":
> +const: 1
> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - vm-map
> +  - clocks
> +  - resets
> +  - "#thermal-sensor-cells"
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +pvt: pvt@e068 {
> +compatible = "moortec,mr75203";
> +reg = <0xe068 0x80
> +   0xe0680080 0x180
> +   0xe0680200 0x200
> +   0xe0680400 0xc00>;
> +reg-names = "common", "ts", "pd", "vm";
> +vm-map = [03 01 04 ff ff];
> +clocks = <>;
> +resets = < 0x40 7>;
> +#thermal-sensor-cells = <1>;
> +};
> -- 
> 2.11.0
> 


Re: [PATCH v2 1/2] Add DT bindings schema for PVT controller

2020-09-28 Thread Rob Herring
On Mon, 28 Sep 2020 17:44:18 +0800, Rahul Tanwar wrote:
> PVT controller (MR75203) is used to configure & control
> Moortec embedded analog IP which contains temprature sensor(TS),
> voltage monitor(VM) & process detector(PD) modules.
> 
> Add DT bindings schema for PVT controller.
> 
> Signed-off-by: Rahul Tanwar 
> ---
>  .../devicetree/bindings/hwmon/moortec,mr75203.yaml | 70 
> ++
>  1 file changed, 70 insertions(+)
>  create mode 100644 
> Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
> 


My bot found errors running 'make dt_binding_check' on your patch:

/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/hwmon/moortec,mr75203.example.dt.yaml:
 example-0: pvt@e068:reg:0: [3764912128, 128, 3764912256, 384, 3764912640, 
512, 3764913152, 3072] is too long
From schema: 
/usr/local/lib/python3.8/dist-packages/dtschema/schemas/reg.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/hwmon/moortec,mr75203.example.dt.yaml:
 pvt@e068: reg: [[3764912128, 128, 3764912256, 384, 3764912640, 512, 
3764913152, 3072]] is too short
From schema: 
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/hwmon/moortec,mr75203.example.dt.yaml:
 pvt@e068: vm-map: [[3, 1, 4, 255, 255]] is too short
From schema: 
/builds/robherring/linux-dt-review/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml


See https://patchwork.ozlabs.org/patch/1372474

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure dt-schema is up to date:

pip3 install git+https://github.com/devicetree-org/dt-schema.git@master 
--upgrade

Please check and re-submit.



[PATCH v2 1/2] Add DT bindings schema for PVT controller

2020-09-28 Thread Rahul Tanwar
PVT controller (MR75203) is used to configure & control
Moortec embedded analog IP which contains temprature sensor(TS),
voltage monitor(VM) & process detector(PD) modules.

Add DT bindings schema for PVT controller.

Signed-off-by: Rahul Tanwar 
---
 .../devicetree/bindings/hwmon/moortec,mr75203.yaml | 70 ++
 1 file changed, 70 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml

diff --git a/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml 
b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
new file mode 100644
index ..85461bfe
--- /dev/null
+++ b/Documentation/devicetree/bindings/hwmon/moortec,mr75203.yaml
@@ -0,0 +1,70 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/hwmon/moortec,mr75203.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Moortec Semiconductor MR75203 PVT Controller bindings
+
+maintainers:
+  - Rahul Tanwar 
+
+properties:
+  compatible:
+const: moortec,mr75203
+
+  reg:
+items:
+  - description: PVT common registers
+  - description: PVT temprature sensor registers
+  - description: PVT process detector registers
+  - description: PVT voltage monitor registers
+
+  reg-names:
+items:
+  - const: common
+  - const: ts
+  - const: pd
+  - const: vm
+
+  vm-map:
+description:
+  PVT controller has 5 VM (voltage monitor) sensors.
+  vm-map defines CPU core to VM instance mapping. A
+  value of 0xff means that VM sensor is unused.
+maxItems: 5
+
+  clocks:
+maxItems: 1
+
+  resets:
+maxItems: 1
+
+  "#thermal-sensor-cells":
+const: 1
+
+required:
+  - compatible
+  - reg
+  - reg-names
+  - vm-map
+  - clocks
+  - resets
+  - "#thermal-sensor-cells"
+
+additionalProperties: false
+
+examples:
+  - |
+pvt: pvt@e068 {
+compatible = "moortec,mr75203";
+reg = <0xe068 0x80
+   0xe0680080 0x180
+   0xe0680200 0x200
+   0xe0680400 0xc00>;
+reg-names = "common", "ts", "pd", "vm";
+vm-map = [03 01 04 ff ff];
+clocks = <>;
+resets = < 0x40 7>;
+#thermal-sensor-cells = <1>;
+};
-- 
2.11.0