[PATCH 8/8] dt-bindings: firmware: arm, scmi: Convert to json schema
Rob Herring
robh+dt at kernel.org
Thu May 27 13:15:42 PDT 2021
On Wed, May 26, 2021 at 1:35 PM Sudeep Holla <sudeep.holla at arm.com> wrote:
>
> 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 at kernel.org>
> > Cc: Cristian Marussi <cristian.marussi at arm.com>
> > Cc: Florian Fainelli <f.fainelli at gmail.com>
> > Cc: Jim Quinlan <jim2101024 at gmail.com>
> > Cc: Etienne Carriere <etienne.carriere at linaro.org>
> > Cc: Peter Hilber <peter.hilber at opensynergy.com>
> > Signed-off-by: Sudeep Holla <sudeep.holla at 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 at 17 {
> > reg = <0x17>;
> > regulators {
> > regulator_devX: regulator at 0 {
> > reg = <0x0>;
> > regulator-max-microvolt = <3300000>;
> > };
> >
> > regulator_devY: regulator at 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 at 17/regulators/regulator at 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 at 17/regulators/regulator at 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 at 17/regulators/regulator at 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 at 17/regulators/regulator at 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 at 17/regulators/regulator at 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 at 17/regulators/regulator at 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 at 17'
property in addition to the pattern.
> + type: object
> + $ref: "/schemas/regulator/arm,scmi-regulator.yaml#"
> +
More information about the linux-arm-kernel
mailing list