Skip to contentSkip to conversation

Convert TI dmtimer binding to yaml

PATCH Applied Tony Lindgren 4 participants 8 messages Apr 14, 2022 – Apr 25, 2022

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v5 cover Convert TI dmtimer binding to yaml

Hi,

Here are v5 changes for TI dmtimer.

Regards,

Tony

Changes since v1:

- Improve yaml for various checks based on comments from Krzysztof and Nishanth

- Add checks for am4 timer as pointed out by Krzysztof and Rob

- Split am6 additions into a separate patch as suggested by Krzysztof

Changes since v2:

- Improve yaml for more checks based on comments from Grygorii and Krzysztof

Changes since v3:

- Simplify constraints for reg, clocks and clock-names as suggested by Krzysztof

- Use version number for patches too as suggested by Rob

Changes since v4:

- Drop duplicated items as noted by Krzysztof

Tony Lindgren (2):
dt-bindings: timer: Update TI timer to yaml
dt-bindings: timer: Add compatible for am6 for TI timer-dm

 .../bindings/pwm/pwm-omap-dmtimer.txt         |   2 +-
 .../bindings/timer/ti,timer-dm.yaml           | 152 ++++++++++++++++++
 .../devicetree/bindings/timer/ti,timer.txt    |  44 -----
 3 files changed, 153 insertions(+), 45 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/timer/ti,timer-dm.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/ti,timer.txt
Signature · 1 line
2.35.1
#1 lore raw

PATCH v5 1/2 dt-bindings: timer: Update TI timer to yaml

Let's update the TI timer binding to use yaml. As this binding is specific to the TI dual-mode timers also known as dm-timers, let's use file name ti,timer-dm.yaml to avoid confusion with other timers.

We add checks for the deprecated ti,hwmods property as done for other TI device driver bindings earlier.

We also correct the issue with the old binding that was out of date for several properties.

The am43 related timers are undocumented, but compatible with the am3 timers. Let's add the am43 timers too.

The dm814 and dm816 timers are missing, let's add them.

Some timers on some SoCs are dual mapped, like the ABE timers on omap4 and 5. The reg property maxItems must be updated to 2.

The timer clocks can be managed by the parent interconnect target module with no clocks assigned for the timer node. And in some cases, the SoC may need to configure additional system clock for the timer in addition to the functional clock.

The clock names are optional and not specific to the comptible property. For example, dra7 timers on l3 interconnect do not need clock-names, while the timers on dra7 l4 interconnect need them with both being compatible with ti,omap5430-timer.

Cc Daniel Lezcano <[email protected]>
Cc Grygorii Strashko <[email protected]>
Cc Keerthy <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
---
 .../bindings/pwm/pwm-omap-dmtimer.txt         |   2 +-
 .../bindings/timer/ti,timer-dm.yaml           | 142 ++++++++++++++++++
 .../devicetree/bindings/timer/ti,timer.txt    |  44 ------
 3 files changed, 143 insertions(+), 45 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/timer/ti,timer-dm.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/ti,timer.txt
Documentation/devicetree/bindings/pwm/pwm-omap-dmtimer.txt +1 -1
@@ -2,7 +2,7 @@
 
 Required properties:
 - compatible: Shall contain "ti,omap-dmtimer-pwm".
-- ti,timers: phandle to PWM capable OMAP timer. See timer/ti,timer.txt for info
+- ti,timers: phandle to PWM capable OMAP timer. See timer/ti,timer-dm.yaml for info
   about these timers.
 - #pwm-cells: Should be 3. See pwm.yaml in this directory for a description of
   the cells format.
Documentation/devicetree/bindings/timer/ti,timer-dm.yaml new file +142 -0

142 lines not on this page · raw message

Documentation/devicetree/bindings/timer/ti,timer.txt deleted +0 -44

44 lines not on this page · raw message

Signature · 1 line
2.35.1
Reviewed-by on v5 1/2
#2 lore raw

Re: [PATCH v5 1/2] dt-bindings: timer: Update TI timer to yaml

Quoted 7 lines · Tony Lindgren

Let's update the TI timer binding to use yaml. As this binding is specific to the TI dual-mode timers also known as dm-timers, let's use file name ti,timer-dm.yaml to avoid confusion with other timers.

We add checks for the deprecated ti,hwmods property as done for other TI device driver bindings earlier.

Best regards,
Krzysztof

Reviewed-by on v5 1/2
#3 lore raw

Re: [PATCH v5 1/2] dt-bindings: timer: Update TI timer to yaml

In reply to Tony Lindgren
Quoted 34 lines · Tony Lindgren

Let's update the TI timer binding to use yaml. As this binding is specific to the TI dual-mode timers also known as dm-timers, let's use file name ti,timer-dm.yaml to avoid confusion with other timers.

We add checks for the deprecated ti,hwmods property as done for other TI device driver bindings earlier.

We also correct the issue with the old binding that was out of date for several properties.

The am43 related timers are undocumented, but compatible with the am3 timers. Let's add the am43 timers too.

The dm814 and dm816 timers are missing, let's add them.

Some timers on some SoCs are dual mapped, like the ABE timers on omap4 and 5. The reg property maxItems must be updated to 2.

The timer clocks can be managed by the parent interconnect target module with no clocks assigned for the timer node. And in some cases, the SoC may need to configure additional system clock for the timer in addition to the functional clock.

The clock names are optional and not specific to the comptible property. For example, dra7 timers on l3 interconnect do not need clock-names, while the timers on dra7 l4 interconnect need them with both being compatible with ti,omap5430-timer.

Cc Daniel Lezcano <[email protected]>
Cc Grygorii Strashko <[email protected]>
Cc Keerthy <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
Quoted 8 lines
---
  .../bindings/pwm/pwm-omap-dmtimer.txt         |   2 +-
  .../bindings/timer/ti,timer-dm.yaml           | 142 ++++++++++++++++++
  .../devicetree/bindings/timer/ti,timer.txt    |  44 ------
  3 files changed, 143 insertions(+), 45 deletions(-)

create mode 100644 Documentation/devicetree/bindings/timer/ti,timer-dm.yaml delete mode 100644 Documentation/devicetree/bindings/timer/ti,timer.txt

Thanks you,

Signature · 7 lines
Best regards,
Grygorii, Ukraine

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Applied
#4 lore raw

Re: [PATCH v5 1/2] dt-bindings: timer: Update TI timer to yaml

In reply to Tony Lindgren
Quoted 34 lines · Tony Lindgren

Let's update the TI timer binding to use yaml. As this binding is specific to the TI dual-mode timers also known as dm-timers, let's use file name ti,timer-dm.yaml to avoid confusion with other timers.

We add checks for the deprecated ti,hwmods property as done for other TI device driver bindings earlier.

We also correct the issue with the old binding that was out of date for several properties.

The am43 related timers are undocumented, but compatible with the am3 timers. Let's add the am43 timers too.

The dm814 and dm816 timers are missing, let's add them.

Some timers on some SoCs are dual mapped, like the ABE timers on omap4 and 5. The reg property maxItems must be updated to 2.

The timer clocks can be managed by the parent interconnect target module with no clocks assigned for the timer node. And in some cases, the SoC may need to configure additional system clock for the timer in addition to the functional clock.

The clock names are optional and not specific to the comptible property. For example, dra7 timers on l3 interconnect do not need clock-names, while the timers on dra7 l4 interconnect need them with both being compatible with ti,omap5430-timer.

Cc Daniel Lezcano <[email protected]>
Cc Grygorii Strashko <[email protected]>
Cc Keerthy <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
Quoted 8 lines
---
 .../bindings/pwm/pwm-omap-dmtimer.txt         |   2 +-
 .../bindings/timer/ti,timer-dm.yaml           | 142 ++++++++++++++++++
 .../devicetree/bindings/timer/ti,timer.txt    |  44 ------
 3 files changed, 143 insertions(+), 45 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/timer/ti,timer-dm.yaml
 delete mode 100644 Documentation/devicetree/bindings/timer/ti,timer.txt

Applied, thanks!

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#5 lore raw

PATCH v5 2/2 dt-bindings: timer: Add compatible for am6 for TI timer-dm

In reply to Tony Lindgren

Let's add compatible for ti,am654-timer for TI am64, am65 and j72 SoCs. As the timer hardware is the same between am64, am65 and j72 we use the compatible name for the earliest SoC with this timer.

The timer interrupts are not routable for the operating system for some timers on am6. Let's make sure the interrupts are configured for the timers on all other SoCs.

Cc Daniel Lezcano <[email protected]>
Cc Grygorii Strashko <[email protected]>
Cc Keerthy <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
---
 .../devicetree/bindings/timer/ti,timer-dm.yaml       | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/timer/ti,timer-dm.yaml +11 -1
@@ -19,6 +19,7 @@ properties:
           - enum:
               - ti,am335x-timer
               - ti,am335x-timer-1ms
+              - ti,am654-timer
               - ti,dm814-timer
               - ti,dm816-timer
               - ti,omap2420-timer
@@ -88,11 +89,20 @@ properties:
 required:
   - compatible
   - reg
-  - interrupts
 
 additionalProperties: false
 
 allOf:
+  - if:
+      not:
+        properties:
+          compatible:
+            contains:
+              const: ti,am654-timer
+    then:
+      required:
+        - interrupts
+
   - if:
       not:
         properties:
Signature · 1 line
2.35.1
Reviewed-by on v5 2/2
#6 lore raw

Re: [PATCH v5 2/2] dt-bindings: timer: Add compatible for am6 for TI timer-dm

Quoted 42 lines · Tony Lindgren

Let's add compatible for ti,am654-timer for TI am64, am65 and j72 SoCs. As the timer hardware is the same between am64, am65 and j72 we use the compatible name for the earliest SoC with this timer.

The timer interrupts are not routable for the operating system for some timers on am6. Let's make sure the interrupts are configured for the timers on all other SoCs.

Cc Daniel Lezcano <[email protected]>
Cc Grygorii Strashko <[email protected]>
Cc Keerthy <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
---
  .../devicetree/bindings/timer/ti,timer-dm.yaml       | 12 +++++++++++-
  1 file changed, 11 insertions(+), 1 deletion(-)
Documentation/devicetree/bindings/timer/ti,timer-dm.yaml +4 -1
@@ -19,6 +19,7 @@ properties:
            - enum:
                - ti,am335x-timer
                - ti,am335x-timer-1ms
+              - ti,am654-timer
                - ti,dm814-timer
                - ti,dm816-timer
                - ti,omap2420-timer
@@ -88,11 +89,20 @@ properties:
  required:
    - compatible
    - reg
-  - interrupts
 
  additionalProperties: false
 
  allOf:
+  - if:
+      not:
+        properties:

Documentation/devicetree/bindings/timer/ti,timer-dm.yaml properties: · line 108

Quoted 10 lines
Documentation/devicetree/bindings/timer/ti,timer-dm.yaml +7 -0
+          compatible:
+            contains:
+              const: ti,am654-timer
+    then:
+      required:
+        - interrupts
+
    - if:
        not:
          properties:

Thanks you,

Signature · 7 lines
Best regards,
Grygorii, Ukraine

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
maintainer Applied
#7 lore raw

Re: [PATCH v5 2/2] dt-bindings: timer: Add compatible for am6 for TI timer-dm

In reply to Tony Lindgren
Quoted 15 lines · Tony Lindgren

Let's add compatible for ti,am654-timer for TI am64, am65 and j72 SoCs. As the timer hardware is the same between am64, am65 and j72 we use the compatible name for the earliest SoC with this timer.

The timer interrupts are not routable for the operating system for some timers on am6. Let's make sure the interrupts are configured for the timers on all other SoCs.

Cc Daniel Lezcano <[email protected]>
Cc Grygorii Strashko <[email protected]>
Cc Keerthy <[email protected]>
Cc Nishanth Menon <[email protected]>
Cc Vignesh Raghavendra <[email protected]>
Quoted 4 lines
---
 .../devicetree/bindings/timer/ti,timer-dm.yaml       | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

Applied, thanks!

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel