Thread (28 messages) 28 messages, 5 authors, 2021-06-01

Re: [PATCH 8/8] dt-bindings: firmware: arm,scmi: Convert to json schema

From: Rob Herring <robh+dt@kernel.org>
Date: 2021-05-27 20:15:58
Also in: linux-arm-kernel

On Wed, May 26, 2021 at 1:35 PM Sudeep Holla [off-list ref] wrote:
quoted hunk ↗ jump to hunk
On Wed, May 26, 2021 at 07:28:07PM +0100, Sudeep Holla wrote:
quoted
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 <redacted>
Cc: Peter Hilber <redacted>
Signed-off-by: Sudeep Holla <redacted>
---
 .../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]+$':
You need to create the whole hierarchy. This is defining 'regulator@*'
nodes at the top level of the binding. You need 'regulators' property
under 'protocol@??' and then this under 'regulators.

Is the protocol number fixed? If so, you can add a 'protocol@17'
property in addition to the pattern.
+    type: object
+    $ref: "/schemas/regulator/arm,scmi-regulator.yaml#"
+
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help