devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
To: Sebastian Reichel <sebastian.reichel@collabora.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Sebastian Reichel <sre@kernel.org>
Cc: Tony Lindgren <tony@atomide.com>,
	devicetree@vger.kernel.org, linux-omap@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH 3/3] dt-bindings: hsi: omap-ssi: convert to YAML
Date: Tue, 26 Mar 2024 08:26:54 +0100	[thread overview]
Message-ID: <8cd3158b-ed51-4a1f-a626-fa58c85d4aeb@linaro.org> (raw)
In-Reply-To: <20240325-hsi-dt-binding-v1-3-88e8e97c3aae@collabora.com>

On 25/03/2024 22:45, Sebastian Reichel wrote:
> Convert the legacy txt binding to modern YAML.
> No semantic change.

You deprecated a property: ti,hwmods. Also will be one more change:
ti,ssi-cawake-gpio->gpios

> 
> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
> ---
>  Documentation/devicetree/bindings/hsi/omap-ssi.txt | 102 -----------
>  .../devicetree/bindings/hsi/ti,omap-ssi.yaml       | 196 +++++++++++++++++++++
>  2 files changed, 196 insertions(+), 102 deletions(-)
> 

...

> diff --git a/Documentation/devicetree/bindings/hsi/ti,omap-ssi.yaml b/Documentation/devicetree/bindings/hsi/ti,omap-ssi.yaml
> new file mode 100644
> index 000000000000..eb82f85c25b6
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/hsi/ti,omap-ssi.yaml
> @@ -0,0 +1,196 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/hsi/ti,omap-ssi.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: SSI Controller on OMAP SoCs
> +
> +description:
> +  OMAP3's Synchronous Serial Interface (SSI) controller implements a
> +  legacy variant of MIPI's High Speed Synchronous Serial Interface (HSI),
> +  while the controller found inside OMAP4 is supposed to be fully compliant
> +  with the HSI standard.
> +
> +maintainers:
> +  - Sebastian Reichel <sre@kernel.org>
> +
> +properties:
> +  compatible:
> +    enum:
> +      - ti,omap3-ssi
> +      - ti,omap4-hsi
> +
> +  reg:
> +    items:
> +      - description: registers for sys
> +      - description: registers for gdd
> +
> +  reg-names:
> +    items:
> +      - const: sys
> +      - const: gdd
> +
> +  ranges: true
> +
> +  "#address-cells":
> +    const: 1
> +
> +  "#size-cells":
> +    const: 1
> +
> +  clocks:
> +    minItems: 1
> +    maxItems: 3
> +
> +  clock-names:
> +    minItems: 1
> +    maxItems: 3
> +
> +  interrupts:
> +    maxItems: 1
> +
> +  interrupt-names:
> +    const: gdd_mpu
> +
> +  ti,hwmods:
> +    const: ssi
> +    deprecated: true
> +
> +patternProperties:
> +  "[hs]si-port@[0-9a-f]+":

Does anything actually depends on the name? Can these be "port@[0-9a-f]+"?

> +    type: object
> +

Drop blank line.

> +    additionalProperties: false
> +
> +    properties:
> +      compatible:
> +        enum:
> +          - ti,omap3-ssi-port
> +          - ti,omap4-hsi-port
> +
> +      reg:
> +        items:
> +          - description: TX registers
> +          - description: RX registers
> +
> +      reg-names:
> +        items:
> +          - const: tx
> +          - const: rx
> +
> +      interrupts:
> +        items:
> +          - description: MPU interrupt 0
> +          - description: MPU interrupt 1
> +        minItems: 1
> +
> +      ti,ssi-cawake-gpio:

ti,ssi-cawake-gpios

> +        description: GPIO signifying CAWAKE events
> +        maxItems: 1
> +
> +      hsi-client:
> +        type: object

On this level, should be explicit: additionalProperties: true

> +        $ref: /schemas/hsi/hsi-client.yaml#
> +
> +    required:
> +      - compatible
> +      - reg
> +      - reg-names
> +      - interrupts
> +
> +    allOf:
> +      - if:
> +          properties:
> +            compatible:
> +              contains:
> +                const: ti,omap3-ssi-port
> +        then:
> +          properties:
> +            $nodename:
> +              pattern: "^ssi-port@(.*)?$"
> +            interrupts:
> +              minItems: 2
> +        else:
> +          properties:
> +            $nodename:
> +              pattern: "^hsi-port@(.*)?$"
> +            interrupts:
> +              maxItems: 1
> +
> +additionalProperties: false

This goes after allOf: block

> +
> +required:
> +  - compatible
> +  - reg
> +  - reg-names
> +  - ranges
> +  - "#address-cells"
> +  - "#size-cells"
> +  - clocks
> +  - clock-names
> +  - interrupts
> +  - interrupt-names
> +
> +allOf:
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: ti,omap3-ssi
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 3
> +        clock-names:
> +          items:
> +            - const: ssi_ssr_fck
> +            - const: ssi_sst_fck
> +            - const: ssi_ick
> +    else:
> +      properties:
> +        clocks:
> +          maxItems: 1
> +        clock-names:
> +          items:
> +            - const: hsi_fck
> +
> +examples:
> +  - |
> +    #include <dt-bindings/gpio/gpio.h>
> +    ssi-controller@48058000 {
> +        compatible = "ti,omap3-ssi";
> +        reg = <0x48058000 0x1000>,
> +              <0x48059000 0x1000>;
> +        reg-names = "sys", "gdd";
> +        ranges;
> +        #address-cells = <1>;
> +        #size-cells = <1>;
> +        clocks = <&ssi_ssr_fck>,
> +                 <&ssi_sst_fck>,
> +                 <&ssi_ick>;
> +        clock-names = "ssi_ssr_fck",
> +                      "ssi_sst_fck",
> +                      "ssi_ick";
> +        interrupts = <55>;
> +        interrupt-names = "gdd_mpu";
> +
> +        ssi-port@4805a000 {
> +                compatible = "ti,omap3-ssi-port";

Use 4 spaces for example indentation.

> +                reg = <0x4805a000 0x800>,


Best regards,
Krzysztof


  reply	other threads:[~2024-03-26  7:26 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-25 21:45 [PATCH 0/3] Convert MIPI HSI DT bindings to YAML Sebastian Reichel
2024-03-25 21:45 ` [PATCH 1/3] dt-bindings: hsi: hsi-client: convert " Sebastian Reichel
2024-03-26  7:18   ` Krzysztof Kozlowski
2024-03-26 12:45     ` Sebastian Reichel
2024-03-26 12:56       ` Krzysztof Kozlowski
2024-03-26 15:15         ` Sebastian Reichel
2024-03-26 16:08           ` Krzysztof Kozlowski
2024-03-25 21:45 ` [PATCH 2/3] dt-bindings: hsi: nokia-modem: " Sebastian Reichel
2024-03-26  7:21   ` Krzysztof Kozlowski
2024-03-26 13:00     ` Sebastian Reichel
2024-03-25 21:45 ` [PATCH 3/3] dt-bindings: hsi: omap-ssi: " Sebastian Reichel
2024-03-26  7:26   ` Krzysztof Kozlowski [this message]
2024-03-26 13:34     ` Sebastian Reichel

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=8cd3158b-ed51-4a1f-a626-fa58c85d4aeb@linaro.org \
    --to=krzysztof.kozlowski@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-omap@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sebastian.reichel@collabora.com \
    --cc=sre@kernel.org \
    --cc=tony@atomide.com \
    /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).