2023-04-19 18:16:12

by Cristian Ciocaltea

[permalink] [raw]
Subject: [PATCH v3 0/3] Enable rk3588 timer support

This patchset enables Rockchip RK3588/RK3588S SoC timer support.
While here, it also handles a minor DT binding issue related to RK3288.

Changes in v3:
- Updated commit description in patch 1, per Krzysztof's review
- Added Acked-by tag from Krzysztof in patch 2
- v2: https://lore.kernel.org/lkml/[email protected]/

Changes in v2:
- Added Reviewed-by tag from Heiko in patches 1 & 2
- Update patch 3 according to Johan's review
- v1: https://lore.kernel.org/lkml/[email protected]/

Cristian Ciocaltea (3):
dt-bindings: timer: rockchip: Drop superfluous rk3288 compatible
dt-bindings: timer: rockchip: Add rk3588 compatible
arm64: dts: rockchip: Add rk3588 timer

.../devicetree/bindings/timer/rockchip,rk-timer.yaml | 2 +-
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 8 ++++++++
2 files changed, 9 insertions(+), 1 deletion(-)

--
2.40.0


2023-04-19 18:16:13

by Cristian Ciocaltea

[permalink] [raw]
Subject: [PATCH v3 1/3] dt-bindings: timer: rockchip: Drop superfluous rk3288 compatible

The compatible string for Rockchip RK3288 is wrongly provided in the
'enum' item, in addition to the subsequent 'const', which allows the
usage of an incorrect specification:

compatible = "rockchip,rk3288-timer", "rockchip,rk3288-timer";

As the rk3288 string is also specified in the top-most 'const' item, the
binding already allows the usage of the correct variant:

compatible = "rockchip,rk3288-timer";

Drop the unwanted rk3288 entry from the enum.

Fixes: faa186adbd06 ("dt-bindings: timer: convert rockchip,rk-timer.txt to YAML")
Signed-off-by: Cristian Ciocaltea <[email protected]>
Reviewed-by: Heiko Stuebner <[email protected]>
---
Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml | 1 -
1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
index 65e59836a660..2bdb6e6bdb21 100644
--- a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
+++ b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
@@ -23,7 +23,6 @@ properties:
- rockchip,rk3188-timer
- rockchip,rk3228-timer
- rockchip,rk3229-timer
- - rockchip,rk3288-timer
- rockchip,rk3368-timer
- rockchip,px30-timer
- const: rockchip,rk3288-timer
--
2.40.0

2023-04-19 18:16:28

by Cristian Ciocaltea

[permalink] [raw]
Subject: [PATCH v3 3/3] arm64: dts: rockchip: Add rk3588 timer

Add DT node for Rockchip RK3588/RK3588S SoC timer.

Signed-off-by: Cristian Ciocaltea <[email protected]>
---
arch/arm64/boot/dts/rockchip/rk3588s.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
index 657c019d27fa..767084a1ec43 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588s.dtsi
@@ -1400,6 +1400,14 @@ i2c5: i2c@fead0000 {
status = "disabled";
};

+ timer0: timer@feae0000 {
+ compatible = "rockchip,rk3588-timer", "rockchip,rk3288-timer";
+ reg = <0x0 0xfeae0000 0x0 0x20>;
+ interrupts = <GIC_SPI 289 IRQ_TYPE_LEVEL_HIGH 0>;
+ clocks = <&cru PCLK_BUSTIMER0>, <&cru CLK_BUSTIMER0>;
+ clock-names = "pclk", "timer";
+ };
+
wdt: watchdog@feaf0000 {
compatible = "rockchip,rk3588-wdt", "snps,dw-wdt";
reg = <0x0 0xfeaf0000 0x0 0x100>;
--
2.40.0

2023-04-19 18:16:36

by Cristian Ciocaltea

[permalink] [raw]
Subject: [PATCH v3 2/3] dt-bindings: timer: rockchip: Add rk3588 compatible

Add compatible string for Rockchip RK3588 timer.

Signed-off-by: Cristian Ciocaltea <[email protected]>
Reviewed-by: Heiko Stuebner <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
---
Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
index 2bdb6e6bdb21..19e56b7577a0 100644
--- a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
+++ b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
@@ -24,6 +24,7 @@ properties:
- rockchip,rk3228-timer
- rockchip,rk3229-timer
- rockchip,rk3368-timer
+ - rockchip,rk3588-timer
- rockchip,px30-timer
- const: rockchip,rk3288-timer
reg:
--
2.40.0

2023-04-21 07:31:09

by Krzysztof Kozlowski

[permalink] [raw]
Subject: Re: [PATCH v3 1/3] dt-bindings: timer: rockchip: Drop superfluous rk3288 compatible

On 19/04/2023 20:13, Cristian Ciocaltea wrote:
> The compatible string for Rockchip RK3288 is wrongly provided in the
> 'enum' item, in addition to the subsequent 'const', which allows the
> usage of an incorrect specification:
>
> compatible = "rockchip,rk3288-timer", "rockchip,rk3288-timer";
>
> As the rk3288 string is also specified in the top-most 'const' item, the
> binding already allows the usage of the correct variant:
>
> compatible = "rockchip,rk3288-timer";
>
> Drop the unwanted rk3288 entry from the enum.
>
> Fixes: faa186adbd06 ("dt-bindings: timer: convert rockchip,rk-timer.txt to YAML")
> Signed-off-by: Cristian Ciocaltea <[email protected]>
> Reviewed-by: Heiko Stuebner <[email protected]>
> ---

Reviewed-by: Krzysztof Kozlowski <[email protected]>

Best regards,
Krzysztof

2023-04-22 13:59:03

by Vincent Legoll

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Enable rk3588 timer support

Hello,

On Wed, Apr 19, 2023 at 6:13 PM Cristian Ciocaltea
<[email protected]> wrote:
> This patchset enables Rockchip RK3588/RK3588S SoC timer support.
> While here, it also handles a minor DT binding issue related to RK3288.

I tested this on a QuartzPro64 dev board, I applied your series top of my tree:
Collabora's rk3588 + some DT patches to add support for the qp64 board.

Here is the output from the commands you told me to try:

bash-5.1# grep rk_timer /sys/bus/clockevents/devices/*/current_device
/sys/bus/clockevents/devices/broadcast/current_device:rk_timer

bash-5.1# grep -B3 -A14 'Device: rk_timer' /proc/timer_list

Tick Device: mode: 1
Broadcast device
Clock Event Device: rk_timer
max_delta_ns: 178956969070
min_delta_ns: 1000
mult: 51539608
shift: 31
mode: 3
next_event: 150944000000 nsecs
set_next_event: rk_timer_set_next_event
shutdown: rk_timer_shutdown
periodic: rk_timer_set_periodic
event_handler: tick_handle_oneshot_broadcast

retries: 0

tick_broadcast_mask: ff

bash-5.1# head -1 /proc/interrupts ; grep rk_timer /proc/interrupts;
sleep 10; grep rk_timer /proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5
CPU6 CPU7
25: 742 210 52 49 2197 1640
1089 2341 GICv3 321 Level rk_timer
25: 754 222 52 49 2252 1727
1146 2404 GICv3 321 Level rk_timer

So it looks like this is working.

Thanks for your work.

You can add my:

Tested-by: Vincent Legoll <[email protected]>

Regards

--
Vincent Legoll

2023-04-22 15:17:22

by Cristian Ciocaltea

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Enable rk3588 timer support

On 4/22/23 16:17, Vincent Legoll wrote:
> Hello,
>
> On Wed, Apr 19, 2023 at 6:13 PM Cristian Ciocaltea
> <[email protected]> wrote:
>> This patchset enables Rockchip RK3588/RK3588S SoC timer support.
>> While here, it also handles a minor DT binding issue related to RK3288.
>
> I tested this on a QuartzPro64 dev board, I applied your series top of my tree:
> Collabora's rk3588 + some DT patches to add support for the qp64 board.
>
> Here is the output from the commands you told me to try:
>
> bash-5.1# grep rk_timer /sys/bus/clockevents/devices/*/current_device
> /sys/bus/clockevents/devices/broadcast/current_device:rk_timer
>
> bash-5.1# grep -B3 -A14 'Device: rk_timer' /proc/timer_list
>
> Tick Device: mode: 1
> Broadcast device
> Clock Event Device: rk_timer
> max_delta_ns: 178956969070
> min_delta_ns: 1000
> mult: 51539608
> shift: 31
> mode: 3
> next_event: 150944000000 nsecs
> set_next_event: rk_timer_set_next_event
> shutdown: rk_timer_shutdown
> periodic: rk_timer_set_periodic
> event_handler: tick_handle_oneshot_broadcast
>
> retries: 0
>
> tick_broadcast_mask: ff
>
> bash-5.1# head -1 /proc/interrupts ; grep rk_timer /proc/interrupts;
> sleep 10; grep rk_timer /proc/interrupts
> CPU0 CPU1 CPU2 CPU3 CPU4 CPU5
> CPU6 CPU7
> 25: 742 210 52 49 2197 1640
> 1089 2341 GICv3 321 Level rk_timer
> 25: 754 222 52 49 2252 1727
> 1146 2404 GICv3 321 Level rk_timer
>
> So it looks like this is working.
>
> Thanks for your work.
>
> You can add my:
>
> Tested-by: Vincent Legoll <[email protected]>

Thanks for taking the time to test this!

Regards,
Cristian

2023-04-22 15:56:50

by Vincent Legoll

[permalink] [raw]
Subject: Re: [PATCH v3 0/3] Enable rk3588 timer support

Hi,

On Sat, Apr 22, 2023 at 3:15 PM Cristian Ciocaltea
<[email protected]> wrote:
> Thanks for taking the time to test this!

You did the work, I try to help...

BTW, I'll test the PWM fan patch (ported to QP64 board) iff I can find
a fan with the same connector...

Regards

--
Vincent Legoll

2023-04-26 09:13:27

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [tip: timers/core] dt-bindings: timer: rockchip: Add rk3588 compatible

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

Commit-ID: e2a1406c84c43bd104e2f85c4d8ab0b0b1609ab0
Gitweb: https://git.kernel.org/tip/e2a1406c84c43bd104e2f85c4d8ab0b0b1609ab0
Author: Cristian Ciocaltea <[email protected]>
AuthorDate: Wed, 19 Apr 2023 21:13:08 +03:00
Committer: Daniel Lezcano <[email protected]>
CommitterDate: Mon, 24 Apr 2023 16:56:14 +02:00

dt-bindings: timer: rockchip: Add rk3588 compatible

Add compatible string for Rockchip RK3588 timer.

Signed-off-by: Cristian Ciocaltea <[email protected]>
Reviewed-by: Heiko Stuebner <[email protected]>
Acked-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml | 1 +
1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
index 2bdb6e6..19e56b7 100644
--- a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
+++ b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
@@ -24,6 +24,7 @@ properties:
- rockchip,rk3228-timer
- rockchip,rk3229-timer
- rockchip,rk3368-timer
+ - rockchip,rk3588-timer
- rockchip,px30-timer
- const: rockchip,rk3288-timer
reg:

2023-04-26 09:23:29

by tip-bot2 for Jacob Pan

[permalink] [raw]
Subject: [tip: timers/core] dt-bindings: timer: rockchip: Drop superfluous rk3288 compatible

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

Commit-ID: 51010c1dc487e7764b7e1ec1c4954068e5880757
Gitweb: https://git.kernel.org/tip/51010c1dc487e7764b7e1ec1c4954068e5880757
Author: Cristian Ciocaltea <[email protected]>
AuthorDate: Wed, 19 Apr 2023 21:13:07 +03:00
Committer: Daniel Lezcano <[email protected]>
CommitterDate: Mon, 24 Apr 2023 16:56:14 +02:00

dt-bindings: timer: rockchip: Drop superfluous rk3288 compatible

The compatible string for Rockchip RK3288 is wrongly provided in the
'enum' item, in addition to the subsequent 'const', which allows the
usage of an incorrect specification:

compatible = "rockchip,rk3288-timer", "rockchip,rk3288-timer";

As the rk3288 string is also specified in the top-most 'const' item, the
binding already allows the usage of the correct variant:

compatible = "rockchip,rk3288-timer";

Drop the unwanted rk3288 entry from the enum.

Fixes: faa186adbd06 ("dt-bindings: timer: convert rockchip,rk-timer.txt to YAML")
Signed-off-by: Cristian Ciocaltea <[email protected]>
Reviewed-by: Heiko Stuebner <[email protected]>
Reviewed-by: Krzysztof Kozlowski <[email protected]>
Signed-off-by: Daniel Lezcano <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
---
Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml | 1 -
1 file changed, 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
index 65e5983..2bdb6e6 100644
--- a/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
+++ b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.yaml
@@ -23,7 +23,6 @@ properties:
- rockchip,rk3188-timer
- rockchip,rk3228-timer
- rockchip,rk3229-timer
- - rockchip,rk3288-timer
- rockchip,rk3368-timer
- rockchip,px30-timer
- const: rockchip,rk3288-timer

2023-04-26 11:07:19

by Heiko Stübner

[permalink] [raw]
Subject: Re: (subset) [PATCH v3 0/3] Enable rk3588 timer support

On Wed, 19 Apr 2023 21:13:06 +0300, Cristian Ciocaltea wrote:
> This patchset enables Rockchip RK3588/RK3588S SoC timer support.
> While here, it also handles a minor DT binding issue related to RK3288.
>
> Changes in v3:
> - Updated commit description in patch 1, per Krzysztof's review
> - Added Acked-by tag from Krzysztof in patch 2
> - v2: https://lore.kernel.org/lkml/[email protected]/
>
> [...]

Applied, thanks!

[3/3] arm64: dts: rockchip: Add rk3588 timer
commit: 9558529472d72a79ee6cd02da6c4439ec12a63e9
[will be rebased on top of 6.4-rc1]

Best regards,
--
Heiko Stuebner <[email protected]>