Devicetree
 help / color / mirror / Atom feed
From: Rob Herring <robh@kernel.org>
To: Corentin Labbe <clabbe@baylibre.com>
Cc: daniel.lezcano@linaro.org, tglx@linutronix.de,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] dt-bindings: timer: Convert faraday,fttmr010 to yaml
Date: Tue, 8 Feb 2022 07:29:26 -0600	[thread overview]
Message-ID: <YgJwNuas1D/NVjGU@robh.at.kernel.org> (raw)
In-Reply-To: <20220126160021.3537591-1-clabbe@baylibre.com>

On Wed, Jan 26, 2022 at 04:00:21PM +0000, Corentin Labbe wrote:
> Converts timer/faraday,fttmr010.txt to yaml.
> 
> Signed-off-by: Corentin Labbe <clabbe@baylibre.com>
> ---
> Changes since v1:
> - added moxart example
> - relaxed some contraints as driver only support one clock and one
>   interrupt (as used by moxa,moxart-timer)
> 
>  .../bindings/timer/faraday,fttmr010.txt       | 38 --------
>  .../bindings/timer/faraday,fttmr010.yaml      | 88 +++++++++++++++++++
>  2 files changed, 88 insertions(+), 38 deletions(-)
>  delete mode 100644 Documentation/devicetree/bindings/timer/faraday,fttmr010.txt
>  create mode 100644 Documentation/devicetree/bindings/timer/faraday,fttmr010.yaml
> 
> diff --git a/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt b/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt
> deleted file mode 100644
> index 3cb2f4c98d64..000000000000
> --- a/Documentation/devicetree/bindings/timer/faraday,fttmr010.txt
> +++ /dev/null
> @@ -1,38 +0,0 @@
> -Faraday Technology timer
> -
> -This timer is a generic IP block from Faraday Technology, embedded in the
> -Cortina Systems Gemini SoCs and other designs.
> -
> -Required properties:
> -
> -- compatible : Must be one of
> -  "faraday,fttmr010"
> -  "cortina,gemini-timer", "faraday,fttmr010"
> -  "moxa,moxart-timer", "faraday,fttmr010"
> -  "aspeed,ast2400-timer"
> -  "aspeed,ast2500-timer"
> -  "aspeed,ast2600-timer"
> -
> -- reg : Should contain registers location and length
> -- interrupts : Should contain the three timer interrupts usually with
> -  flags for falling edge
> -
> -Optionally required properties:
> -
> -- clocks : a clock to provide the tick rate for "faraday,fttmr010"
> -- clock-names : should be "EXTCLK" and "PCLK" for the external tick timer
> -  and peripheral clock respectively, for "faraday,fttmr010"
> -- syscon : a phandle to the global Gemini system controller if the compatible
> -  type is "cortina,gemini-timer"
> -
> -Example:
> -
> -timer@43000000 {
> -	compatible = "faraday,fttmr010";
> -	reg = <0x43000000 0x1000>;
> -	interrupts = <14 IRQ_TYPE_EDGE_FALLING>, /* Timer 1 */
> -		   <15 IRQ_TYPE_EDGE_FALLING>, /* Timer 2 */
> -		   <16 IRQ_TYPE_EDGE_FALLING>; /* Timer 3 */
> -	clocks = <&extclk>, <&pclk>;
> -	clock-names = "EXTCLK", "PCLK";
> -};
> diff --git a/Documentation/devicetree/bindings/timer/faraday,fttmr010.yaml b/Documentation/devicetree/bindings/timer/faraday,fttmr010.yaml
> new file mode 100644
> index 000000000000..db9fb171ea49
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/timer/faraday,fttmr010.yaml
> @@ -0,0 +1,88 @@
> +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/timer/faraday,fttmr010.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Faraday Technology timer
> +
> +maintainers:
> +  - Linus Walleij <linus.walleij@linaro.org>
> +
> +description: |

Don't need '|' if there's no formatting.

> +  This timer is a generic IP block from Faraday Technology, embedded in the
> +  Cortina Systems Gemini SoCs and other designs.
> +
> +properties:
> +  compatible:
> +    oneOf:
> +      - const: faraday,fttmr010
> +      - items:
> +          - const: cortina,gemini-timer
> +          - const: faraday,fttmr010
> +      - items:
> +          - const: moxa,moxart-timer
> +          - const: faraday,fttmr010
> +      - const: aspeed,ast2400-timer
> +      - const: aspeed,ast2500-timer
> +      - const: aspeed,ast2600-timer
> +
> +  reg:
> +    maxItems: 1
> +
> +  resets:
> +    maxItems: 1
> +
> +  interrupts:
> +    minItems: 1
> +    maxItems: 3
> +    description: Should contain the three timer interrupts usually with flags for falling edge
> +
> +  clocks:
> +    minItems: 1
> +    maxItems: 2
> +
> +  clock-names:
> +    minItems: 1
> +    items:
> +      - const: "PCLK"
> +      - const: "EXTCLK"

Don't need quotes here.

> +
> +  syscon:
> +    $ref: /schemas/types.yaml#/definitions/phandle
> +    maxItems: 1

'phandle' is already 1 item. so drop.

> +
> +required:
> +  - compatible
> +  - reg
> +  - interrupts
> +  - clocks
> +  - clock-names
> +
> +additionalProperties: false
> +
> +examples:
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    /* taken from arch/arm/boot/dts/gemini.dtsi */

Drop

> +    timer@43000000 {
> +      compatible = "faraday,fttmr010";
> +      reg = <0x43000000 0x1000>;
> +      interrupts = <14 IRQ_TYPE_EDGE_FALLING>, /* Timer 1 */
> +                   <15 IRQ_TYPE_EDGE_FALLING>, /* Timer 2 */
> +                   <16 IRQ_TYPE_EDGE_FALLING>; /* Timer 3 */
> +      clocks = <&extclk>, <&pclk>;
> +      clock-names = "PCLK", "EXTCLK";
> +      syscon = <&syscon>;
> +    };
> +  - |
> +    #include <dt-bindings/interrupt-controller/irq.h>
> +    /* taken from arch/arm/boot/dts/moxart.dtsi */

Drop

> +    timer: timer@98400000 {

Drop unused labels.

> +      compatible = "moxa,moxart-timer", "faraday,fttmr010";
> +      reg = <0x98400000 0x42>;
> +      interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
> +      clocks = <&clk_apb>;
> +      clock-names = "PCLK";
> +    };
> +...
> -- 
> 2.34.1
> 
> 

      parent reply	other threads:[~2022-02-08 13:30 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26 16:00 [PATCH v2] dt-bindings: timer: Convert faraday,fttmr010 to yaml Corentin Labbe
2022-01-26 22:10 ` Rob Herring
2022-02-08 13:29 ` Rob Herring [this message]

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=YgJwNuas1D/NVjGU@robh.at.kernel.org \
    --to=robh@kernel.org \
    --cc=clabbe@baylibre.com \
    --cc=daniel.lezcano@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tglx@linutronix.de \
    /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