Skip to contentSkip to conversation

Rockchip Timer DT binding YAML conversion

PATCH Applied Ezequiel Garcia 5 participants 12 messages May 6, 2021 – Aug 26, 2021

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

v2 cover Rockchip Timer DT binding YAML conversion

Changes from v1:
* Fix the order of clock specifiers.

Ezequiel Garcia (3):
arm64: dts: rockchip: add timer0 clocks on rk3368
arm: dts: rockchip: Fix the timer clocks order
dt-bindings: timer: convert rockchip,rk-timer.txt to YAML

 .../bindings/timer/rockchip,rk-timer.txt      | 27 --------
 .../bindings/timer/rockchip,rk-timer.yaml     | 64 +++++++++++++++++++
 arch/arm/boot/dts/rk3188.dtsi                 |  8 +--
 arch/arm/boot/dts/rk3288.dtsi                 |  4 +-
 arch/arm64/boot/dts/rockchip/rk3368.dtsi      |  2 +
 5 files changed, 72 insertions(+), 33 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
Signature · 1 line
2.30.0
#1 lore raw

PATCH v2 1/3 arm64: dts: rockchip: add timer0 clocks on rk3368

The timer driver requires pclk and sclk clocks to be present in the device tree node, so add them.

---
 arch/arm64/boot/dts/rockchip/rk3368.dtsi | 2 ++
 1 file changed, 2 insertions(+)
arch/arm64/boot/dts/rockchip/rk3368.dtsi +2 -0
index dfc6376171d0..4c64fbefb483 100644
@@ -664,6 +664,8 @@ timer0: timer@ff810000 {
 		compatible = "rockchip,rk3368-timer", "rockchip,rk3288-timer";
 		reg = <0x0 0xff810000 0x0 0x20>;
 		interrupts = <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>;
+		clocks = <&cru PCLK_TIMER0>, <&cru SCLK_TIMER00>;
+		clock-names = "pclk", "timer";
 	};
 
 	spdif: spdif@ff880000 {
Signature · 1 line
2.30.0
#2 lore raw

PATCH v2 2/3 arm: dts: rockchip: Fix the timer clocks order

In reply to Ezequiel Garcia

Fixed order is the device-tree convention.
The timer driver currently gets clocks by name,
so no changes are needed there.

---
 arch/arm/boot/dts/rk3188.dtsi | 8 ++++----
 arch/arm/boot/dts/rk3288.dtsi | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
arch/arm/boot/dts/rk3188.dtsi +4 -4
index 2298a8d840ba..2c08ae60e4a1 100644
@@ -150,16 +150,16 @@ timer3: timer@2000e000 {
 		compatible = "rockchip,rk3188-timer", "rockchip,rk3288-timer";
 		reg = <0x2000e000 0x20>;
 		interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&cru SCLK_TIMER3>, <&cru PCLK_TIMER3>;
-		clock-names = "timer", "pclk";
+		clocks = <&cru PCLK_TIMER3>, <&cru SCLK_TIMER3>;
+		clock-names = "pclk", "timer";
 	};
 
 	timer6: timer@200380a0 {
 		compatible = "rockchip,rk3188-timer", "rockchip,rk3288-timer";
 		reg = <0x200380a0 0x20>;
 		interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&cru SCLK_TIMER6>, <&cru PCLK_TIMER0>;
-		clock-names = "timer", "pclk";
+		clocks = <&cru PCLK_TIMER0>, <&cru SCLK_TIMER6>;
+		clock-names = "pclk", "timer";
 	};
 
 	i2s0: i2s@1011a000 {
arch/arm/boot/dts/rk3288.dtsi +2 -2
index 05557ad02b33..03ae83f50a17 100644
@@ -196,8 +196,8 @@ timer: timer@ff810000 {
 		compatible = "rockchip,rk3288-timer";
 		reg = <0x0 0xff810000 0x0 0x20>;
 		interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&xin24m>, <&cru PCLK_TIMER>;
-		clock-names = "timer", "pclk";
+		clocks = <&cru PCLK_TIMER>, <&xin24m>;
+		clock-names = "pclk", "timer";
 	};
 
 	display-subsystem {
Signature · 1 line
2.30.0
#3 lore raw

PATCH v2 3/3 dt-bindings: timer: convert rockchip,rk-timer.txt to YAML

In reply to Ezequiel Garcia

Convert Rockchip Timer dt-bindings to YAML.

---
 .../bindings/timer/rockchip,rk-timer.txt      | 27 --------
 .../bindings/timer/rockchip,rk-timer.yaml     | 64 +++++++++++++++++++
 2 files changed, 64 insertions(+), 27 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt deleted +0 -27
deleted file mode 100644
index d65fdce7c7f0..000000000000
@@ -1,27 +0,0 @@
-Rockchip rk timer
-
-Required properties:
-- compatible: should be:
-  "rockchip,rv1108-timer", "rockchip,rk3288-timer": for Rockchip RV1108
-  "rockchip,rk3036-timer", "rockchip,rk3288-timer": for Rockchip RK3036
-  "rockchip,rk3066-timer", "rockchip,rk3288-timer": for Rockchip RK3066
-  "rockchip,rk3188-timer", "rockchip,rk3288-timer": for Rockchip RK3188
-  "rockchip,rk3228-timer", "rockchip,rk3288-timer": for Rockchip RK3228
-  "rockchip,rk3229-timer", "rockchip,rk3288-timer": for Rockchip RK3229
-  "rockchip,rk3288-timer": for Rockchip RK3288
-  "rockchip,rk3368-timer", "rockchip,rk3288-timer": for Rockchip RK3368
-  "rockchip,rk3399-timer": for Rockchip RK3399
-- reg: base address of the timer register starting with TIMERS CONTROL register
-- interrupts: should contain the interrupts for Timer0
-- clocks : must contain an entry for each entry in clock-names
-- clock-names : must include the following entries:
-  "timer", "pclk"
-
-Example:
-	timer: timer@ff810000 {
-		compatible = "rockchip,rk3288-timer";
-		reg = <0xff810000 0x20>;
-		interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&xin24m>, <&cru PCLK_TIMER>;
-		clock-names = "timer", "pclk";
-	};
Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml new file +64 -0

64 lines not on this page · raw message

Signature · 1 line
2.30.0
maintainer Reviewed-by on v2 3/3
#4 lore raw

Re: [PATCH v2 3/3] dt-bindings: timer: convert rockchip,rk-timer.txt to YAML

Quoted 10 lines · Ezequiel Garcia

Convert Rockchip Timer dt-bindings to YAML.

---
 .../bindings/timer/rockchip,rk-timer.txt      | 27 --------
 .../bindings/timer/rockchip,rk-timer.yaml     | 64 +++++++++++++++++++
 2 files changed, 64 insertions(+), 27 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
maintainer
#5 lore raw

Re: [PATCH v2 3/3] dt-bindings: timer: convert rockchip,rk-timer.txt to YAML

In reply to Ezequiel Garcia

Hi Daniel,

Am Donnerstag, 6. Mai 2021, 13:11:36 CEST schrieb Ezequiel Garcia:

Quoted 3 lines

Convert Rockchip Timer dt-bindings to YAML.

can you apply this patch to the timer-tree?

Thanks
Heiko

Quoted 111 lines
---
 .../bindings/timer/rockchip,rk-timer.txt      | 27 --------
 .../bindings/timer/rockchip,rk-timer.yaml     | 64 +++++++++++++++++++
 2 files changed, 64 insertions(+), 27 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt deleted +0 -27
deleted file mode 100644
index d65fdce7c7f0..000000000000
@@ -1,27 +0,0 @@
-Rockchip rk timer
-
-Required properties:
-- compatible: should be:
-  "rockchip,rv1108-timer", "rockchip,rk3288-timer": for Rockchip RV1108
-  "rockchip,rk3036-timer", "rockchip,rk3288-timer": for Rockchip RK3036
-  "rockchip,rk3066-timer", "rockchip,rk3288-timer": for Rockchip RK3066
-  "rockchip,rk3188-timer", "rockchip,rk3288-timer": for Rockchip RK3188
-  "rockchip,rk3228-timer", "rockchip,rk3288-timer": for Rockchip RK3228
-  "rockchip,rk3229-timer", "rockchip,rk3288-timer": for Rockchip RK3229
-  "rockchip,rk3288-timer": for Rockchip RK3288
-  "rockchip,rk3368-timer", "rockchip,rk3288-timer": for Rockchip RK3368
-  "rockchip,rk3399-timer": for Rockchip RK3399
-- reg: base address of the timer register starting with TIMERS CONTROL register
-- interrupts: should contain the interrupts for Timer0
-- clocks : must contain an entry for each entry in clock-names
-- clock-names : must include the following entries:
-  "timer", "pclk"
-
-Example:
-	timer: timer@ff810000 {
-		compatible = "rockchip,rk3288-timer";
-		reg = <0xff810000 0x20>;
-		interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&xin24m>, <&cru PCLK_TIMER>;
-		clock-names = "timer", "pclk";
-	};
Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml new file +64 -0
new file mode 100644
index 000000000000..e26ecb5893ae
@@ -0,0 +1,64 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/timer/rockchip,rk-timer.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip Timer Device Tree Bindings
+
+maintainers:
+  - Daniel Lezcano <[email protected]>
+
+properties:
+  compatible:
+    oneOf:
+      - const: rockchip,rk3288-timer
+      - const: rockchip,rk3399-timer
+      - items:
+          - enum:
+              - rockchip,rv1108-timer
+              - rockchip,rk3036-timer
+              - rockchip,rk3066-timer
+              - rockchip,rk3188-timer
+              - rockchip,rk3228-timer
+              - rockchip,rk3229-timer
+              - rockchip,rk3288-timer
+              - rockchip,rk3368-timer
+              - rockchip,px30-timer
+          - const: rockchip,rk3288-timer
+  reg:
+    maxItems: 1
+
+  interrupts:
+    maxItems: 1
+
+  clocks:
+    minItems: 2
+    maxItems: 2
+
+  clock-names:
+    items:
+      - const: pclk
+      - const: timer
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    #include <dt-bindings/clock/rk3288-cru.h>
+
+    timer: timer@ff810000 {
+        compatible = "rockchip,rk3288-timer";
+        reg = <0xff810000 0x20>;
+        interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
+        clocks = <&cru PCLK_TIMER>, <&xin24m>;
+        clock-names = "pclk", "timer";
+    };
#6 lore raw

Re: [PATCH v2 3/3] dt-bindings: timer: convert rockchip,rk-timer.txt to YAML

Quoted 8 lines · Heiko Stübner

Hi Daniel,

Am Donnerstag, 6. Mai 2021, 13:11:36 CEST schrieb Ezequiel Garcia:

Quoted 3 lines

Convert Rockchip Timer dt-bindings to YAML.

can you apply this patch to the timer-tree?

Yes

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#7 lore raw

Re: [PATCH v2 3/3] dt-bindings: timer: convert rockchip,rk-timer.txt to YAML

Hi Daniel,

Quoted 13 lines · Daniel Lezcano
Quoted 8 lines · Heiko Stübner

Hi Daniel,

Am Donnerstag, 6. Mai 2021, 13:11:36 CEST schrieb Ezequiel Garcia:

Quoted 3 lines

Convert Rockchip Timer dt-bindings to YAML.

can you apply this patch to the timer-tree?

Yes

Can't find this one applied in -next, maybe it fell thru somewhere :) ?

Thanks!
Ezequiel

#8 lore raw

Re: [PATCH v2 3/3] dt-bindings: timer: convert rockchip,rk-timer.txt to YAML

Quoted 11 lines · Ezequiel Garcia

Hi Daniel,

Quoted 8 lines · Daniel Lezcano
Quoted 7 lines · Heiko Stübner

Hi Daniel,

Am Donnerstag, 6. Mai 2021, 13:11:36 CEST schrieb Ezequiel Garcia:

Quoted 3 lines

Convert Rockchip Timer dt-bindings to YAML.

Quoted 7 lines
Quoted 5 lines
Quoted 1 line

can you apply this patch to the timer-tree?

Yes

Can't find this one applied in -next, maybe it fell thru somewhere :) ?

Right, I just picked it. Thanks for the heads-up

Signature · 5 lines
<http://www.linaro.org/> Linaro.org │ Open source software for ARM SoCs

Follow Linaro:  <http://www.facebook.com/pages/Linaro> Facebook |
<http://twitter.com/#!/linaroorg> Twitter |
<http://www.linaro.org/linaro-blog/> Blog
#9 lore raw

[tip: timers/core] dt-bindings: timer: convert rockchip,rk-timer.txt to YAML

In reply to Ezequiel Garcia
The following commit has been merged into the timers/core branch of tip:

The following commit has been merged into the timers/core branch of tip:

Commit-ID:     faa186adbd06f3e7113ae1dc6766e2273d5d9231
Gitweb:        https://git.kernel.org/tip/faa186adbd06f3e7113ae1dc6766e2273d5d9231
Author:        Ezequiel Garcia <[email protected]>
AuthorDate:    Thu, 06 May 2021 08:11:36 -03:00
Committer:     Daniel Lezcano <[email protected]>
CommitterDate: Fri, 13 Aug 2021 09:24:23 +02:00

dt-bindings: timer: convert rockchip,rk-timer.txt to YAML

Convert Rockchip Timer dt-bindings to YAML.

---
 Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt  | 27 +---
 Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml | 64 +++++++-
 2 files changed, 64 insertions(+), 27 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt
 create mode 100644 Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt deleted +0 -27
deleted file mode 100644
index d65fdce..0000000
@@ -1,27 +0,0 @@
-Rockchip rk timer
-
-Required properties:
-- compatible: should be:
-  "rockchip,rv1108-timer", "rockchip,rk3288-timer": for Rockchip RV1108
-  "rockchip,rk3036-timer", "rockchip,rk3288-timer": for Rockchip RK3036
-  "rockchip,rk3066-timer", "rockchip,rk3288-timer": for Rockchip RK3066
-  "rockchip,rk3188-timer", "rockchip,rk3288-timer": for Rockchip RK3188
-  "rockchip,rk3228-timer", "rockchip,rk3288-timer": for Rockchip RK3228
-  "rockchip,rk3229-timer", "rockchip,rk3288-timer": for Rockchip RK3229
-  "rockchip,rk3288-timer": for Rockchip RK3288
-  "rockchip,rk3368-timer", "rockchip,rk3288-timer": for Rockchip RK3368
-  "rockchip,rk3399-timer": for Rockchip RK3399
-- reg: base address of the timer register starting with TIMERS CONTROL register
-- interrupts: should contain the interrupts for Timer0
-- clocks : must contain an entry for each entry in clock-names
-- clock-names : must include the following entries:
-  "timer", "pclk"
-
-Example:
-	timer: timer@ff810000 {
-		compatible = "rockchip,rk3288-timer";
-		reg = <0xff810000 0x20>;
-		interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
-		clocks = <&xin24m>, <&cru PCLK_TIMER>;
-		clock-names = "timer", "pclk";
-	};
Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml new file +64 -0

64 lines not on this page · raw message

maintainer Applied
#10 lore raw

Re: (subset) [PATCH v2 0/3] Rockchip Timer DT binding YAML conversion

In reply to Ezequiel Garcia
Quoted 9 lines · Ezequiel Garcia

Changes from v1:
* Fix the order of clock specifiers.

Ezequiel Garcia (3):
arm64: dts: rockchip: add timer0 clocks on rk3368
arm: dts: rockchip: Fix the timer clocks order
dt-bindings: timer: convert rockchip,rk-timer.txt to YAML

[...]

Applied, thanks!

[1/3] arm64: dts: rockchip: add timer0 clocks on rk3368

      commit: 642593eec32571ff9288ddf3fa09792d3efb275f

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>
maintainer Applied
#11 lore raw

Re: (subset) [PATCH v2 0/3] Rockchip Timer DT binding YAML conversion

In reply to Ezequiel Garcia
Quoted 9 lines · Ezequiel Garcia

Changes from v1:
* Fix the order of clock specifiers.

Ezequiel Garcia (3):
arm64: dts: rockchip: add timer0 clocks on rk3368
arm: dts: rockchip: Fix the timer clocks order
dt-bindings: timer: convert rockchip,rk-timer.txt to YAML

[...]

Applied, thanks!

[2/3] arm: dts: rockchip: Fix the timer clocks order

      commit: 7b46d674ac000b101fdad92cf16cc11d90b72f86

Best regards,

Signature · 1 line
Heiko Stuebner <[email protected]>