mbox series

[v2,00/11] dt-bindings: Convert Arm Ltd. peripherals to DT schema

Message ID 20220506140533.3566431-1-andre.przywara@arm.com
Headers show
Series dt-bindings: Convert Arm Ltd. peripherals to DT schema | expand

Message

Andre Przywara May 6, 2022, 2:05 p.m. UTC
Hi,

this drop fixes the review comments from Krzysztof and Rob (many
thanks for that!). Changelog below.

=================
In an effort to get the FVP DTs to pass the automated DT bindings checks,
this series collects some DT schema binding conversions for various
Arm Ltd. IP devices.
This is mostly for old IP, but it's still used by the FVPs, for which we
have DTs in the tree.

Please have a look!

Cheers,
Andre

Changelog:
v1 .. v2:
- all: fix indentation in examples (4 spaces)
- all: drop line break preservation in descriptions
- smmu-v3: tighten IRQ ordering to only allow certain combinations
- spe-pmu: move new .yaml file into perf/ directory
- sp810: don't require fixed clock output names
- sp810: explain optional assigned-clock properties
- pl041/pl051: rename binding file name
- pl041/pl051: use generic node name in example nodes
- vexpress-sysreg: specify additionalProperties
- vexpress-sysreg: disallow uppercase hex letters in node name address
- vexpress-config: specify additionalProperties
- hdlcd/mali-dp: use properties/port instead of $defs/port-base

Andre Przywara (11):
  dt-bindings: iommu: arm,smmu-v3: make PRI IRQ optional
  dt-bindings: arm: spe-pmu: convert to DT schema
  dt-bindings: arm: sp810: convert to DT schema
  dt-bindings: sound: add Arm PL041 AACI DT schema
  dt-bindings: serio: add Arm PL050 DT schema
  dt-bindings: arm: convert vexpress-sysregs to DT schema
  dt-bindings: arm: convert vexpress-config to DT schema
  dt-bindings: display: convert PL110/PL111 to DT schema
  dt-bindings: display: convert Arm HDLCD to DT schema
  dt-bindings: display: convert Arm Mali-DP to DT schema
  dt-bindings: display: convert Arm Komeda to DT schema

 .../devicetree/bindings/arm/sp810.txt         |  46 ---
 .../devicetree/bindings/arm/sp810.yaml        |  80 +++++
 .../devicetree/bindings/arm/spe-pmu.txt       |  20 --
 .../bindings/arm/vexpress-config.yaml         | 285 ++++++++++++++++++
 .../bindings/arm/vexpress-sysreg.txt          | 103 -------
 .../bindings/arm/vexpress-sysreg.yaml         |  90 ++++++
 .../devicetree/bindings/display/arm,hdlcd.txt |  79 -----
 .../bindings/display/arm,hdlcd.yaml           |  89 ++++++
 .../bindings/display/arm,komeda.txt           |  78 -----
 .../bindings/display/arm,komeda.yaml          | 130 ++++++++
 .../bindings/display/arm,malidp.txt           |  68 -----
 .../bindings/display/arm,malidp.yaml          | 116 +++++++
 .../devicetree/bindings/display/arm,pl11x.txt | 110 -------
 .../bindings/display/arm,pl11x.yaml           | 174 +++++++++++
 .../bindings/iommu/arm,smmu-v3.yaml           |  16 +-
 .../devicetree/bindings/perf/spe-pmu.yaml     |  40 +++
 .../devicetree/bindings/serio/arm,pl050.yaml  |  67 ++++
 .../devicetree/bindings/sound/arm,pl041.yaml  |  62 ++++
 18 files changed, 1144 insertions(+), 509 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/arm/sp810.txt
 create mode 100644 Documentation/devicetree/bindings/arm/sp810.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/spe-pmu.txt
 create mode 100644 Documentation/devicetree/bindings/arm/vexpress-config.yaml
 delete mode 100644 Documentation/devicetree/bindings/arm/vexpress-sysreg.txt
 create mode 100644 Documentation/devicetree/bindings/arm/vexpress-sysreg.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/arm,hdlcd.txt
 create mode 100644 Documentation/devicetree/bindings/display/arm,hdlcd.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/arm,komeda.txt
 create mode 100644 Documentation/devicetree/bindings/display/arm,komeda.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/arm,malidp.txt
 create mode 100644 Documentation/devicetree/bindings/display/arm,malidp.yaml
 delete mode 100644 Documentation/devicetree/bindings/display/arm,pl11x.txt
 create mode 100644 Documentation/devicetree/bindings/display/arm,pl11x.yaml
 create mode 100644 Documentation/devicetree/bindings/perf/spe-pmu.yaml
 create mode 100644 Documentation/devicetree/bindings/serio/arm,pl050.yaml
 create mode 100644 Documentation/devicetree/bindings/sound/arm,pl041.yaml

Comments

Rob Herring (Arm) May 6, 2022, 10:39 p.m. UTC | #1
On Fri, 06 May 2022 15:05:30 +0100, Andre Przywara wrote:
> The Arm PL110 and PL111 are IP blocks that provide a display engine with
> an LCD interface, being able to drive a variety of LC panels.
> 
> Convert the binding over to DT schema, to the DTs can be automatically
> checked.
> This still contains the deprecated "arm,pl11x,tft-r0g0b0-pads" property,
> because this is used by several DTs in the tree.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>  .../devicetree/bindings/display/arm,pl11x.txt | 110 -----------
>  .../bindings/display/arm,pl11x.yaml           | 174 ++++++++++++++++++
>  2 files changed, 174 insertions(+), 110 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/display/arm,pl11x.txt
>  create mode 100644 Documentation/devicetree/bindings/display/arm,pl11x.yaml
> 

Running 'make dtbs_check' with the schema in this patch gives the
following warnings. Consider if they are expected or the schema is
incorrect. These may not be new warnings.

Note that it is not yet a requirement to have 0 warnings for dtbs_check.
This will change in the future.

Full log is available here: https://patchwork.ozlabs.org/patch/


clcd@10020000: 'oneOf' conditional failed, one must be fixed:
	arch/arm/boot/dts/arm-realview-eb-11mp-bbrevd-ctrevb.dtb
	arch/arm/boot/dts/arm-realview-eb-11mp-bbrevd.dtb
	arch/arm/boot/dts/arm-realview-eb-11mp-ctrevb.dtb
	arch/arm/boot/dts/arm-realview-eb-11mp.dtb
	arch/arm/boot/dts/arm-realview-eb-a9mp-bbrevd.dtb
	arch/arm/boot/dts/arm-realview-eb-a9mp.dtb

clcd@31040000: 'interrupt-names' is a required property
	arch/arm/boot/dts/lpc3250-phy3250.dtb

clcd@60000000: 'clock-names' is a required property
	arch/arm/boot/dts/spear300-evb.dtb

clcd@60000000: 'clocks' is a required property
	arch/arm/boot/dts/spear300-evb.dtb

clcd@60000000: 'interrupt-names' is a required property
	arch/arm/boot/dts/spear300-evb.dtb

clcd@60000000: 'port' is a required property
	arch/arm/boot/dts/spear300-evb.dtb

clcd@90000000: 'clock-names' is a required property
	arch/arm/boot/dts/spear320-hmi.dtb

clcd@90000000: 'clocks' is a required property
	arch/arm/boot/dts/spear320-hmi.dtb

clcd@90000000: 'interrupt-names' is a required property
	arch/arm/boot/dts/spear320-hmi.dtb

clcd@90000000: 'port' is a required property
	arch/arm/boot/dts/spear320-hmi.dtb

clcd@c0000000: 'interrupt-names' is a required property
	arch/arm/boot/dts/integratorcp.dtb

clcd@c0000000: 'port@0' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/integratorcp.dtb

clcd@c0000000: 'port' is a required property
	arch/arm/boot/dts/integratorcp.dtb

clcd@fc200000: 'clock-names' is a required property
	arch/arm/boot/dts/spear600-evb.dtb

clcd@fc200000: 'clocks' is a required property
	arch/arm/boot/dts/spear600-evb.dtb

clcd@fc200000: 'interrupt-names' is a required property
	arch/arm/boot/dts/spear600-evb.dtb

clcd@fc200000: 'port' is a required property
	arch/arm/boot/dts/spear600-evb.dtb

display@1000000: 'interrupt-names' is a required property
	arch/arm/boot/dts/integratorap-im-pd1.dtb

display@1000000: 'port@0' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/integratorap-im-pd1.dtb

display@1000000: 'port' is a required property
	arch/arm/boot/dts/integratorap-im-pd1.dtb

display@10120000: 'interrupt-names' is a required property
	arch/arm/boot/dts/versatile-ab.dtb
	arch/arm/boot/dts/versatile-ab-ib2.dtb
	arch/arm/boot/dts/versatile-pb.dtb

display@10120000: 'port@0' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/versatile-ab.dtb
	arch/arm/boot/dts/versatile-ab-ib2.dtb
	arch/arm/boot/dts/versatile-pb.dtb

display@10120000: 'port' is a required property
	arch/arm/boot/dts/versatile-ab.dtb
	arch/arm/boot/dts/versatile-ab-ib2.dtb
	arch/arm/boot/dts/versatile-pb.dtb

lcd@C0000000: 'interrupt-names' is a required property
	arch/arm/boot/dts/nspire-clp.dtb
	arch/arm/boot/dts/nspire-cx.dtb
	arch/arm/boot/dts/nspire-tp.dtb

lcd-controller@40008000: 'resets' does not match any of the regexes: 'pinctrl-[0-9]+'
	arch/arm/boot/dts/lpc4337-ciaa.dtb
	arch/arm/boot/dts/lpc4350-hitex-eval.dtb
	arch/arm/boot/dts/lpc4357-ea4357-devkit.dtb
	arch/arm/boot/dts/lpc4357-myd-lpc4357.dtb
Krzysztof Kozlowski May 7, 2022, 4:40 p.m. UTC | #2
On 06/05/2022 16:05, Andre Przywara wrote:
> The Arm PL050 "Keyboard/Mouse Interface" is an Arm system IP providing a
> PS/2 compatible serial interface.
> 
> Add a simple DT schema binding, based on the TRM[1], the existing DTs and
> the Linux driver.
> 
> [1] https://developer.arm.com/documentation/ddi0143/latest


Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>


Best regards,
Krzysztof
Rob Herring May 9, 2022, 7:15 p.m. UTC | #3
On Fri, May 6, 2022 at 9:05 AM Andre Przywara <andre.przywara@arm.com> wrote:
>
> Hi,
>
> this drop fixes the review comments from Krzysztof and Rob (many
> thanks for that!). Changelog below.
>
> =================
> In an effort to get the FVP DTs to pass the automated DT bindings checks,
> this series collects some DT schema binding conversions for various
> Arm Ltd. IP devices.
> This is mostly for old IP, but it's still used by the FVPs, for which we
> have DTs in the tree.
>
> Please have a look!
>
> Cheers,
> Andre
>
> Changelog:
> v1 .. v2:
> - all: fix indentation in examples (4 spaces)
> - all: drop line break preservation in descriptions
> - smmu-v3: tighten IRQ ordering to only allow certain combinations
> - spe-pmu: move new .yaml file into perf/ directory
> - sp810: don't require fixed clock output names
> - sp810: explain optional assigned-clock properties
> - pl041/pl051: rename binding file name
> - pl041/pl051: use generic node name in example nodes
> - vexpress-sysreg: specify additionalProperties
> - vexpress-sysreg: disallow uppercase hex letters in node name address
> - vexpress-config: specify additionalProperties
> - hdlcd/mali-dp: use properties/port instead of $defs/port-base
>
> Andre Przywara (11):
>   dt-bindings: iommu: arm,smmu-v3: make PRI IRQ optional
>   dt-bindings: arm: spe-pmu: convert to DT schema
>   dt-bindings: arm: sp810: convert to DT schema
>   dt-bindings: sound: add Arm PL041 AACI DT schema
>   dt-bindings: serio: add Arm PL050 DT schema
>   dt-bindings: arm: convert vexpress-sysregs to DT schema
>   dt-bindings: arm: convert vexpress-config to DT schema
>   dt-bindings: display: convert PL110/PL111 to DT schema
>   dt-bindings: display: convert Arm HDLCD to DT schema
>   dt-bindings: display: convert Arm Mali-DP to DT schema
>   dt-bindings: display: convert Arm Komeda to DT schema

I've applied the whole series. I made pl11x interrupts optional as
Realview EB doesn't have an interrupt, and I squashed in the
'arm,malidp-arqos-value' property addition.

Thanks,
Rob
Carsten Haitzler May 13, 2022, 10:42 a.m. UTC | #4
That seems sensible to me. It matches the kind of DT content I know 
works. It's certainly more detailed now.

On 5/6/22 15:05, Andre Przywara wrote:
> The Arm Komeda (aka Mali-D71) is a display controller that scans out a
> framebuffer and hands a signal to a digital encoder to generate a DVI
> or HDMI signal. It supports up to two pipelines, each frame can be
> composed of up to four layers.
> 
> Convert the existing DT binding to DT schema.
> 
> Signed-off-by: Andre Przywara <andre.przywara@arm.com>
> ---
>   .../bindings/display/arm,komeda.txt           |  78 -----------
>   .../bindings/display/arm,komeda.yaml          | 130 ++++++++++++++++++
>   2 files changed, 130 insertions(+), 78 deletions(-)
>   delete mode 100644 Documentation/devicetree/bindings/display/arm,komeda.txt
>   create mode 100644 Documentation/devicetree/bindings/display/arm,komeda.yaml
> 
> diff --git a/Documentation/devicetree/bindings/display/arm,komeda.txt b/Documentation/devicetree/bindings/display/arm,komeda.txt
> deleted file mode 100644
> index 8513695ee47fe..0000000000000
> --- a/Documentation/devicetree/bindings/display/arm,komeda.txt
> +++ /dev/null
> @@ -1,78 +0,0 @@
> -Device Tree bindings for Arm Komeda display driver
> -
> -Required properties:
> -- compatible: Should be "arm,mali-d71"
> -- reg: Physical base address and length of the registers in the system
> -- interrupts: the interrupt line number of the device in the system
> -- clocks: A list of phandle + clock-specifier pairs, one for each entry
> -    in 'clock-names'
> -- clock-names: A list of clock names. It should contain:
> -      - "aclk": for the main processor clock
> -- #address-cells: Must be 1
> -- #size-cells: Must be 0
> -- iommus: configure the stream id to IOMMU, Must be configured if want to
> -    enable iommu in display. for how to configure this node please reference
> -        devicetree/bindings/iommu/arm,smmu-v3.txt,
> -        devicetree/bindings/iommu/iommu.txt
> -
> -Required properties for sub-node: pipeline@nq
> -Each device contains one or two pipeline sub-nodes (at least one), each
> -pipeline node should provide properties:
> -- reg: Zero-indexed identifier for the pipeline
> -- clocks: A list of phandle + clock-specifier pairs, one for each entry
> -    in 'clock-names'
> -- clock-names: should contain:
> -      - "pxclk": pixel clock
> -
> -- port: each pipeline connect to an encoder input port. The connection is
> -    modeled using the OF graph bindings specified in
> -    Documentation/devicetree/bindings/graph.txt
> -
> -Optional properties:
> -  - memory-region: phandle to a node describing memory (see
> -    Documentation/devicetree/bindings/reserved-memory/reserved-memory.txt)
> -    to be used for the framebuffer; if not present, the framebuffer may
> -    be located anywhere in memory.
> -
> -Example:
> -/ {
> -	...
> -
> -	dp0: display@c00000 {
> -		#address-cells = <1>;
> -		#size-cells = <0>;
> -		compatible = "arm,mali-d71";
> -		reg = <0xc00000 0x20000>;
> -		interrupts = <0 168 4>;
> -		clocks = <&dpu_aclk>;
> -		clock-names = "aclk";
> -		iommus = <&smmu 0>, <&smmu 1>, <&smmu 2>, <&smmu 3>,
> -			<&smmu 4>, <&smmu 5>, <&smmu 6>, <&smmu 7>,
> -			<&smmu 8>, <&smmu 9>;
> -
> -		dp0_pipe0: pipeline@0 {
> -			clocks = <&fpgaosc2>;
> -			clock-names = "pxclk";
> -			reg = <0>;
> -
> -			port {
> -				dp0_pipe0_out: endpoint {
> -					remote-endpoint = <&db_dvi0_in>;
> -				};
> -			};
> -		};
> -
> -		dp0_pipe1: pipeline@1 {
> -			clocks = <&fpgaosc2>;
> -			clock-names = "pxclk";
> -			reg = <1>;
> -
> -			port {
> -				dp0_pipe1_out: endpoint {
> -					remote-endpoint = <&db_dvi1_in>;
> -				};
> -			};
> -		};
> -	};
> -	...
> -};
> diff --git a/Documentation/devicetree/bindings/display/arm,komeda.yaml b/Documentation/devicetree/bindings/display/arm,komeda.yaml
> new file mode 100644
> index 0000000000000..9f4aade97f10a
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/arm,komeda.yaml
> @@ -0,0 +1,130 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/arm,komeda.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Arm Komeda display processor
> +
> +maintainers:
> +  - Liviu Dudau <Liviu.Dudau@arm.com>
> +  - Andre Przywara <andre.przywara@arm.com>
> +
> +description:
> +  The Arm Mali D71 display processor supports up to two displays with up
> +  to a 4K resolution each. Each pipeline can be composed of up to four
> +  layers. It is typically connected to a digital display connector like HDMI.
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - items:
> +          - const: arm,mali-d32
> +          - const: arm,mali-d71
> +      - const: arm,mali-d71
> +
> +  reg:
> +    maxItems: 1
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  clock-names:
> +    const: aclk
> +
> +  clocks:
> +    maxItems: 1
> +    description: The main DPU processor clock
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 0
> +
> +  memory-region:
> +    maxItems: 1
> +    description:
> +      Phandle to a node describing memory to be used for the framebuffer.
> +      If not present, the framebuffer may be located anywhere in memory.
> +
> +  iommus:
> +    description:
> +      The stream IDs for each of the used pipelines, each four IDs for the
> +      four layers, plus one for the write-back stream.
> +    minItems: 5
> +    maxItems: 10
> +
> +patternProperties:
> +  '^pipeline@[01]$':
> +    type: object
> +    description:
> +      clocks
> +
> +    properties:
> +      reg:
> +        enum: [ 0, 1 ]
> +
> +      clock-names:
> +        const: pxclk
> +
> +      clocks:
> +        maxItems: 1
> +        description: The input reference for the pixel clock.
> +
> +      port:
> +        $ref: /schemas/graph.yaml#/$defs/port-base
> +        unevaluatedProperties: false
> +
> +additionalProperties: false
> +
> +required:
> +  - "#address-cells"
> +  - "#size-cells"
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clock-names
> +  - clocks
> +  - pipeline@0
> +
> +examples:
> +  - |
> +    display@c00000 {
> +        #address-cells = <1>;
> +        #size-cells = <0>;
> +        compatible = "arm,mali-d71";
> +        reg = <0xc00000 0x20000>;
> +        interrupts = <168>;
> +        clocks = <&dpu_aclk>;
> +        clock-names = "aclk";
> +        iommus = <&smmu 0>, <&smmu 1>, <&smmu 2>, <&smmu 3>,
> +                 <&smmu 8>,
> +                 <&smmu 4>, <&smmu 5>, <&smmu 6>, <&smmu 7>,
> +                 <&smmu 9>;
> +
> +        dp0_pipe0: pipeline@0 {
> +            clocks = <&fpgaosc2>;
> +            clock-names = "pxclk";
> +            reg = <0>;
> +
> +            port {
> +                dp0_pipe0_out: endpoint {
> +                    remote-endpoint = <&db_dvi0_in>;
> +                };
> +            };
> +        };
> +
> +        dp0_pipe1: pipeline@1 {
> +            clocks = <&fpgaosc2>;
> +            clock-names = "pxclk";
> +            reg = <1>;
> +
> +            port {
> +                dp0_pipe1_out: endpoint {
> +                    remote-endpoint = <&db_dvi1_in>;
> +                };
> +            };
> +        };
> +    };
> +...