linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Sudeep Holla <sudeep.holla@arm.com>
To: devicetree@vger.kernel.org
Cc: linux-arm-kernel@lists.infradead.org,
	Rob Herring <robh+dt@kernel.org>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Florian Fainelli <f.fainelli@gmail.com>,
	Jim Quinlan <jim2101024@gmail.com>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Etienne Carriere <etienne.carriere@linaro.org>,
	Peter Hilber <peter.hilber@opensynergy.com>
Subject: Re: [PATCH 8/8] dt-bindings: firmware: arm,scmi: Convert to json schema
Date: Wed, 26 May 2021 19:35:15 +0100	[thread overview]
Message-ID: <20210526183455.q6wmhm6qjggu65hs@bogus> (raw)
In-Reply-To: <20210526182807.548118-9-sudeep.holla@arm.com>

On Wed, May 26, 2021 at 07:28:07PM +0100, Sudeep Holla wrote:
> Convert the old text format binding for System Control and Management Interface
> (SCMI) Message Protocol into the new and shiny YAML format.
> 
> Cc: Rob Herring <robh+dt@kernel.org>
> Cc: Cristian Marussi <cristian.marussi@arm.com>
> Cc: Florian Fainelli <f.fainelli@gmail.com>
> Cc: Jim Quinlan <jim2101024@gmail.com>
> Cc: Etienne Carriere <etienne.carriere@linaro.org>
> Cc: Peter Hilber <peter.hilber@opensynergy.com>
> Signed-off-by: Sudeep Holla <sudeep.holla@arm.com>
> ---
>  .../devicetree/bindings/arm/arm,scmi.txt      | 224 ---------------
>  .../bindings/firmware/arm,scmi.yaml           | 270 ++++++++++++++++++
>  2 files changed, 270 insertions(+), 224 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/arm/arm,scmi.txt
>  create mode 100644 Documentation/devicetree/bindings/firmware/arm,scmi.yaml
> 
> Hi,
> 
> I have converted all the bindings except the below regulator part of the
> binding. This needs to be addressed before merging ofcourse. Just posting
> the remaining changes to get feedback and also ask suggestion for the below:
> 
>         scmi_voltage: protocol@17 {
>           reg = <0x17>;
>           regulators {
>             regulator_devX: regulator@0 {
>               reg = <0x0>;
>               regulator-max-microvolt = <3300000>;
>             };
> 
>             regulator_devY: regulator@9 {
>               reg = <0x9>;
>               regulator-min-microvolt = <500000>;
>               regulator-max-microvolt = <4200000>;
>             };
>           };
>         };
> 
> I will reply with things I have tried separately to avoid confusion with this
> the patch here.
>

Below is the patch I have tried. I even started without a separate binding
for scmi regulator. Irrespective of what I have tried so far, I keep getting
the same error, I even added '#address-cells' and '#size-cells' to the node
but makes no difference.

Documentation/devicetree/bindings/firmware/arm,scmi.example.dt.yaml
Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:62.19-31: Warning (reg_format): /example-0/firmware/scmi/protocol@17/regulators/regulator@0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:67.19-31: Warning (reg_format): /example-0/firmware/scmi/protocol@17/regulators/regulator@9:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1)
Documentation/devicetree/bindings/firmware/arm,scmi.example.dt.yaml: Warning (pci_device_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/firmware/arm,scmi.example.dt.yaml: Warning (pci_device_bus_num): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/firmware/arm,scmi.example.dt.yaml: Warning (simple_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/firmware/arm,scmi.example.dt.yaml: Warning (i2c_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/firmware/arm,scmi.example.dt.yaml: Warning (spi_bus_reg): Failed prerequisite 'reg_format'
Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:61.45-64.19: Warning (avoid_default_addr_size): /example-0/firmware/scmi/protocol@17/regulators/regulator@0: Relying on default #address-cells value
Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:61.45-64.19: Warning (avoid_default_addr_size): /example-0/firmware/scmi/protocol@17/regulators/regulator@0: Relying on default #size-cells value
Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:66.45-70.19: Warning (avoid_default_addr_size): /example-0/firmware/scmi/protocol@17/regulators/regulator@9: Relying on default #address-cells value
Documentation/devicetree/bindings/firmware/arm,scmi.example.dts:66.45-70.19: Warning (avoid_default_addr_size): /example-0/firmware/scmi/protocol@17/regulators/regulator@9: Relying on default #size-cells value
Documentation/devicetree/bindings/firmware/arm,scmi.example.dt.yaml: Warning (unique_unit_address): Failed prerequisite 'avoid_default_addr_size'
  CHECK   Documentation/devicetree/bindings/firmware/arm,scmi.example.dt.yaml


Regards,
Sudeep

--->8

diff --git c/Documentation/devicetree/bindings/firmware/arm,scmi.yaml i/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
index 36072585fc45..1fe23ef36adf 100644
--- c/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
+++ i/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
@@ -101,6 +101,10 @@ description: |
       '#thermal-sensor-cells':
         const: 1
 
+  '^regulator@[0-9]+$':
+    type: object
+    $ref: "/schemas/regulator/arm,scmi-regulator.yaml#"
+
 required:
   - compatible
   - shmem
@@ -173,6 +177,21 @@ description: |
 
         scmi_voltage: protocol@17 {
           reg = <0x17>;
+          #address-cells = <1>;
+          #size-cells = <0>;
+
+          regulators {
+            regulator_devX: regulator@0 {
+              reg = <0x0>;
+              regulator-max-microvolt = <3300000>;
+            };
+
+            regulator_devY: regulator@9 {
+              reg = <0x9>;
+              regulator-min-microvolt = <500000>;
+              regulator-max-microvolt = <4200000>;
+            };
+          };
         };
       };
     };
diff --git c/Documentation/devicetree/bindings/regulator/arm,scmi-regulator.yaml i/Documentation/devicetree/bindings/regulator/arm,scmi-regulator.yaml
new file mode 100644
index 000000000000..2111676e3494
--- /dev/null
+++ i/Documentation/devicetree/bindings/regulator/arm,scmi-regulator.yaml
@@ -0,0 +1,27 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/regulator/arm,scmi-regulator.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ARM SCMI controlled voltage regulators
+
+maintainers:
+  - Sudeep Holla <sudeep.holla@arm.com>
+
+description:
+  Any property defined as part of the core regulator binding, defined in
+  regulator.yaml, can also be used.
+
+allOf:
+  - $ref: "regulator.yaml#"
+
+properties:
+  reg:
+    maxItems: 1
+    description: Identifier for the voltage regulator.
+
+required:
+  - reg
+
+unevaluatedProperties: false

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

  reply	other threads:[~2021-05-26 19:56 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-26 18:27 [PATCH 0/8] dt-bindings: firmware: Convert SCPI and SCMI to json schema Sudeep Holla
2021-05-26 18:28 ` [PATCH 1/8] dt-bindings: firmware: arm, scpi: Move arm, scpi-shmem " Sudeep Holla
2021-05-27 20:25   ` Rob Herring
2021-05-31  8:15     ` Sudeep Holla
2021-05-31  8:20       ` Sudeep Holla
2021-06-01 13:37         ` Rob Herring
2021-06-01 13:53           ` Sudeep Holla
2021-05-26 18:28 ` [PATCH 2/8] dt-bindings: firmware: arm, scmi: Move arm, scmi-shmem " Sudeep Holla
2021-05-26 18:28 ` [PATCH 3/8] dt-bindings: firmware: juno, scpi: Move to sram.yaml " Sudeep Holla
2021-05-26 18:28 ` [PATCH 4/8] dt-bindings: firmware: amlogic, scpi: Move arm, scpi-shmem to " Sudeep Holla
2021-05-26 18:28 ` [PATCH 5/8] dt-bindings: firmware: arm,scpi: Convert " Sudeep Holla
2021-05-27 14:23   ` [PATCH 5/8] dt-bindings: firmware: arm, scpi: " Rob Herring
2021-05-27 16:17     ` [PATCH 5/8] dt-bindings: firmware: arm,scpi: " Sudeep Holla
2021-05-26 18:28 ` [PATCH 6/8] dt-bindings: mailbox : arm, mhu: Fix arm, scpi example used here Sudeep Holla
2021-05-27 14:23   ` Rob Herring
2021-05-27 16:25     ` Sudeep Holla
2021-05-27 20:07       ` Rob Herring
2021-05-31  8:17         ` Sudeep Holla
2021-05-26 18:28 ` [PATCH 7/8] dt-bindings: firmware: amlogic, scpi: Convert to json schema Sudeep Holla
2021-05-27 20:33   ` Rob Herring
2021-05-31  8:36     ` Sudeep Holla
2021-05-26 18:28 ` [PATCH 8/8] dt-bindings: firmware: arm,scmi: " Sudeep Holla
2021-05-26 18:35   ` Sudeep Holla [this message]
2021-05-27 20:15     ` [PATCH 8/8] dt-bindings: firmware: arm, scmi: " Rob Herring
2021-05-27  6:37   ` Etienne Carriere
2021-05-27 10:53     ` [PATCH 8/8] dt-bindings: firmware: arm,scmi: " Sudeep Holla
2021-05-27 10:33   ` Cristian Marussi
2021-05-27 10:49     ` Sudeep Holla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210526183455.q6wmhm6qjggu65hs@bogus \
    --to=sudeep.holla@arm.com \
    --cc=cristian.marussi@arm.com \
    --cc=devicetree@vger.kernel.org \
    --cc=etienne.carriere@linaro.org \
    --cc=f.fainelli@gmail.com \
    --cc=jim2101024@gmail.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=peter.hilber@opensynergy.com \
    --cc=robh+dt@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).