* [PATCH v3] dt-bindings: timer: Convert faraday,fttmr010 to yaml
@ 2022-02-09 9:00 Corentin Labbe
2022-02-09 9:07 ` Krzysztof Kozlowski
0 siblings, 1 reply; 3+ messages in thread
From: Corentin Labbe @ 2022-02-09 9:00 UTC (permalink / raw)
To: daniel.lezcano, krzysztof.kozlowski, robh+dt, tglx
Cc: devicetree, linux-kernel, Corentin Labbe
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)
Changes since v2:
- increased max size of interrupts
- fixed all issues reported by Rob https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20220126160021.3537591-1-clabbe@baylibre.com
All aspeed-bmc-vegman*dts are expected to fail and will be fixed via:
https://patchwork.ozlabs.org/project/linux-aspeed/patch/20220127141604.1163-1-a.kartashev@yadro.com/
.../bindings/timer/faraday,fttmr010.txt | 38 ------
.../bindings/timer/faraday,fttmr010.yaml | 108 ++++++++++++++++++
2 files changed, 108 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..02d842b827ce
--- /dev/null
+++ b/Documentation/devicetree/bindings/timer/faraday,fttmr010.yaml
@@ -0,0 +1,108 @@
+# 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:
+ 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: 10
+ 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
+
+ syscon:
+ $ref: /schemas/types.yaml#/definitions/phandle
+
+required:
+ - compatible
+ - reg
+ - interrupts
+ - clocks
+ - clock-names
+
+additionalProperties: true
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ 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>
+ timer@98400000 {
+ compatible = "moxa,moxart-timer", "faraday,fttmr010";
+ reg = <0x98400000 0x42>;
+ interrupts = <19 IRQ_TYPE_EDGE_FALLING>;
+ clocks = <&clk_apb>;
+ clock-names = "PCLK";
+ };
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+ #include <dt-bindings/interrupt-controller/arm-gic.h>
+ #include <dt-bindings/clock/ast2600-clock.h>
+ /* taken from arch/arm/boot/dts/aspeed-bmc-vegman.dtsi */
+ timer@1e782000 {
+ compatible = "aspeed,ast2600-timer";
+ reg = <0x1e782000 0x90>;
+ interrupts-extended = <&gic GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>,
+ <&gic GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>,
+ <&gic GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
+ <&gic GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>,
+ <&gic GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>,
+ <&gic GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>,
+ <&gic GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>,
+ <&gic GIC_SPI 23 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&syscon ASPEED_CLK_APB1>;
+ clock-names = "PCLK";
+ /* fttmr010,pwm-outputs = <5>; */
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_timer5_default>;
+ #pwm-cells = <3>;
+ };
+...
--
2.34.1
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH v3] dt-bindings: timer: Convert faraday,fttmr010 to yaml
2022-02-09 9:00 [PATCH v3] dt-bindings: timer: Convert faraday,fttmr010 to yaml Corentin Labbe
@ 2022-02-09 9:07 ` Krzysztof Kozlowski
2022-02-09 10:10 ` LABBE Corentin
0 siblings, 1 reply; 3+ messages in thread
From: Krzysztof Kozlowski @ 2022-02-09 9:07 UTC (permalink / raw)
To: Corentin Labbe, daniel.lezcano, robh+dt, tglx; +Cc: devicetree, linux-kernel
On 09/02/2022 10:00, Corentin Labbe wrote:
> Converts timer/faraday,fttmr010.txt to yaml.
s/Converts/Convert/
>
> 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)
> Changes since v2:
> - increased max size of interrupts
> - fixed all issues reported by Rob https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20220126160021.3537591-1-clabbe@baylibre.com
>
> All aspeed-bmc-vegman*dts are expected to fail and will be fixed via:
> https://patchwork.ozlabs.org/project/linux-aspeed/patch/20220127141604.1163-1-a.kartashev@yadro.com/
>
(...)
> +
> + syscon:
> + $ref: /schemas/types.yaml#/definitions/phandle
> +
> +required:
> + - compatible
> + - reg
> + - interrupts
> + - clocks
> + - clock-names
> +
> +additionalProperties: true
> +
This should be false (and was false in your v1).
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [PATCH v3] dt-bindings: timer: Convert faraday,fttmr010 to yaml
2022-02-09 9:07 ` Krzysztof Kozlowski
@ 2022-02-09 10:10 ` LABBE Corentin
0 siblings, 0 replies; 3+ messages in thread
From: LABBE Corentin @ 2022-02-09 10:10 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: daniel.lezcano, robh+dt, tglx, devicetree, linux-kernel
Le Wed, Feb 09, 2022 at 10:07:22AM +0100, Krzysztof Kozlowski a écrit :
> On 09/02/2022 10:00, Corentin Labbe wrote:
> > Converts timer/faraday,fttmr010.txt to yaml.
>
> s/Converts/Convert/
>
> >
> > 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)
> > Changes since v2:
> > - increased max size of interrupts
> > - fixed all issues reported by Rob https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20220126160021.3537591-1-clabbe@baylibre.com
> >
> > All aspeed-bmc-vegman*dts are expected to fail and will be fixed via:
> > https://patchwork.ozlabs.org/project/linux-aspeed/patch/20220127141604.1163-1-a.kartashev@yadro.com/
> >
>
> (...)
>
> > +
> > + syscon:
> > + $ref: /schemas/types.yaml#/definitions/phandle
> > +
> > +required:
> > + - compatible
> > + - reg
> > + - interrupts
> > + - clocks
> > + - clock-names
> > +
> > +additionalProperties: true
> > +
> This should be false (and was false in your v1).
>
Oups, sorry
I forgot to remove it, it was my first try to fix vegman DT.
Anyway I also forgotten to remove some property in example which will be no longer in vegman.
I will send a V4
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-02-09 11:43 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-02-09 9:00 [PATCH v3] dt-bindings: timer: Convert faraday,fttmr010 to yaml Corentin Labbe
2022-02-09 9:07 ` Krzysztof Kozlowski
2022-02-09 10:10 ` LABBE Corentin
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).