* [PATCH 0/5] clocksource: rockchip/timer: Support rktimer for rk3399
@ 2016-05-25 9:49 Caesar Wang
2016-05-25 9:49 ` [PATCH 1/5] dt-bindings: document rk3399 rk-timer bindings Caesar Wang
2016-05-25 9:50 ` [PATCH 5/5] ARM64: dts: rockchip: add rktimer device node for rk3399 Caesar Wang
0 siblings, 2 replies; 4+ messages in thread
From: Caesar Wang @ 2016-05-25 9:49 UTC (permalink / raw)
To: daniel.lezcano, Heiko Stuebner
Cc: dianders, briannorris, smbarber, linux-rockchip, Thomas Gleixner,
cf, huangtao, Caesar Wang, devicetree, Jianqun Xu, linux-kernel,
Kumar Gala, Ian Campbell, Rob Herring, Pawel Moll, Will Deacon,
Mark Rutland, Catalin Marinas, linux-arm-kernel
This series patches had been tested on rockchip inside kernel.
In order to support the rk3399 SoC timer and turn off interrupts and IPIs to
save power in idle.
Okay, it still works bootup on rk3288/other SoCs, even though many socs hasn't used
the broadcast timer.
Easy to test for my borad.
localhost / # cat /proc/interrupts
CPU0 CPU1 CPU2 CPU3 CPU4 CPU5
1: 0 0 0 0 0 0 GICv3 29 Edge arch_timer
...
5: 0 0 0 0 0 0 GICv3 113 Level rk_timer
..
localhost / # cat /proc/timer_list | grep event_handler
get "event_handler: hrtimer_interrupt"
event_handler: tick_handle_oneshot_broadcast
event_handler: hrtimer_interrupt
That should work for my board.
Huang Tao (5):
dt-bindings: document rk3399 rk-timer bindings
clocksource: rockchip: remove unnecessary clear irq before request_irq
clocksource: rockchip: add dynamic irq flag to the timer
clocksource: rockchip: add support for rk3399 SoC
ARM64: dts: rockchip: add rktimer device node for rk3399
...chip,rk3288-timer.txt => rockchip,rk-timer.txt} | 6 +-
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 ++
drivers/clocksource/rockchip_timer.c | 120 ++++++++++++++++-----
3 files changed, 106 insertions(+), 28 deletions(-)
rename Documentation/devicetree/bindings/timer/{rockchip,rk3288-timer.txt => rockchip,rk-timer.txt} (75%)
--
1.9.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/5] dt-bindings: document rk3399 rk-timer bindings
2016-05-25 9:49 [PATCH 0/5] clocksource: rockchip/timer: Support rktimer for rk3399 Caesar Wang
@ 2016-05-25 9:49 ` Caesar Wang
[not found] ` <1464169802-6033-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-05-25 9:50 ` [PATCH 5/5] ARM64: dts: rockchip: add rktimer device node for rk3399 Caesar Wang
1 sibling, 1 reply; 4+ messages in thread
From: Caesar Wang @ 2016-05-25 9:49 UTC (permalink / raw)
To: daniel.lezcano, Heiko Stuebner
Cc: dianders, briannorris, smbarber, linux-rockchip, Thomas Gleixner,
cf, huangtao, Rob Herring, Caesar Wang, Pawel Moll, Mark Rutland,
Ian Campbell, Kumar Gala, devicetree, linux-arm-kernel,
linux-kernel
From: Huang Tao <huangtao@rock-chips.com>
Add compatible string for rk3399 because which timer is a little
different from older SoCs. So rename the file name from
rockchip,rk3288-timer.txt to rockchip,rk-timer.txt.
Clarify rockchip,rk3288-timer supported SoCs.
Signed-off-by: Huang Tao <huangtao@rock-chips.com>
Cc: Rob Herring <robh+dt@kernel.org>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
.../timer/{rockchip,rk3288-timer.txt => rockchip,rk-timer.txt} | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
rename Documentation/devicetree/bindings/timer/{rockchip,rk3288-timer.txt => rockchip,rk-timer.txt} (75%)
diff --git a/Documentation/devicetree/bindings/timer/rockchip,rk3288-timer.txt b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt
similarity index 75%
rename from Documentation/devicetree/bindings/timer/rockchip,rk3288-timer.txt
rename to Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt
index 87f0b00..a41b184 100644
--- a/Documentation/devicetree/bindings/timer/rockchip,rk3288-timer.txt
+++ b/Documentation/devicetree/bindings/timer/rockchip,rk-timer.txt
@@ -1,7 +1,9 @@
-Rockchip rk3288 timer
+Rockchip rk timer
Required properties:
-- compatible: shall be "rockchip,rk3288-timer"
+- compatible: shall be one of:
+ "rockchip,rk3288-timer" - for rk3066, rk3036, rk3188, rk322x, rk3288, rk3368
+ "rockchip,rk3399-timer" - for 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
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 5/5] ARM64: dts: rockchip: add rktimer device node for rk3399
2016-05-25 9:49 [PATCH 0/5] clocksource: rockchip/timer: Support rktimer for rk3399 Caesar Wang
2016-05-25 9:49 ` [PATCH 1/5] dt-bindings: document rk3399 rk-timer bindings Caesar Wang
@ 2016-05-25 9:50 ` Caesar Wang
1 sibling, 0 replies; 4+ messages in thread
From: Caesar Wang @ 2016-05-25 9:50 UTC (permalink / raw)
To: daniel.lezcano, Heiko Stuebner
Cc: dianders, briannorris, smbarber, linux-rockchip, Thomas Gleixner,
cf, huangtao, Caesar Wang, Rob Herring, Pawel Moll, Mark Rutland,
Ian Campbell, Kumar Gala, Catalin Marinas, Will Deacon,
Jianqun Xu, devicetree, linux-arm-kernel, linux-kernel
From: Huang Tao <huangtao@rock-chips.com>
Select rktimer0 as broadcast timer.
Signed-off-by: Huang Tao <huangtao@rock-chips.com>
Cc: Daniel Lezcano <daniel.lezcano@linaro.org>
Cc: Thomas Gleixner <tglx@linutronix.de>
Cc: Heiko Stuebner <heiko@sntech.de>
Tested-by: Jianqun Xu <jay.xu@rock-chips.com>
Signed-off-by: Caesar Wang <wxt@rock-chips.com>
---
arch/arm64/boot/dts/rockchip/rk3399.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
index 46f325a..f0c0d76 100644
--- a/arch/arm64/boot/dts/rockchip/rk3399.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3399.dtsi
@@ -492,6 +492,14 @@
interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>;
};
+ rktimer: rktimer@ff850000 {
+ compatible = "rockchip,rk3399-timer";
+ reg = <0x0 0xff850000 0x0 0x1000>;
+ interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_HIGH>;
+ clocks = <&cru PCLK_TIMER0>, <&cru SCLK_TIMER00>;
+ clock-names = "pclk", "timer";
+ };
+
spdif: spdif@ff870000 {
compatible = "rockchip,rk3399-spdif";
reg = <0x0 0xff870000 0x0 0x1000>;
--
1.9.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH 1/5] dt-bindings: document rk3399 rk-timer bindings
[not found] ` <1464169802-6033-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
@ 2016-05-25 19:11 ` Rob Herring
0 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2016-05-25 19:11 UTC (permalink / raw)
To: Caesar Wang
Cc: huangtao-TNX95d0MmH7DzftRWevZcw, Mark Rutland, Heiko Stuebner,
Pawel Moll, Ian Campbell, daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A,
dianders-F7+t8E8rja9g9hUCZPvPmw,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
linux-rockchip-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
devicetree-u79uwXL29TY76Z2rM5mHXA,
smbarber-hpIqsD4AKlfQT0dZR+AlfA, Kumar Gala,
cf-TNX95d0MmH7DzftRWevZcw, briannorris-hpIqsD4AKlfQT0dZR+AlfA,
Thomas Gleixner,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
On Wed, May 25, 2016 at 05:49:58PM +0800, Caesar Wang wrote:
> From: Huang Tao <huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
>
> Add compatible string for rk3399 because which timer is a little
> different from older SoCs. So rename the file name from
> rockchip,rk3288-timer.txt to rockchip,rk-timer.txt.
> Clarify rockchip,rk3288-timer supported SoCs.
>
> Signed-off-by: Huang Tao <huangtao-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> Cc: Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
> Cc: Daniel Lezcano <daniel.lezcano-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
> Cc: Thomas Gleixner <tglx-hfZtesqFncYOwBW4kG4KsQ@public.gmane.org>
> Cc: Heiko Stuebner <heiko-4mtYJXux2i+zQB+pC5nmwQ@public.gmane.org>
> Signed-off-by: Caesar Wang <wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
> ---
>
> .../timer/{rockchip,rk3288-timer.txt => rockchip,rk-timer.txt} | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
> rename Documentation/devicetree/bindings/timer/{rockchip,rk3288-timer.txt => rockchip,rk-timer.txt} (75%)
Acked-by: Rob Herring <robh-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-05-25 19:11 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-05-25 9:49 [PATCH 0/5] clocksource: rockchip/timer: Support rktimer for rk3399 Caesar Wang
2016-05-25 9:49 ` [PATCH 1/5] dt-bindings: document rk3399 rk-timer bindings Caesar Wang
[not found] ` <1464169802-6033-2-git-send-email-wxt-TNX95d0MmH7DzftRWevZcw@public.gmane.org>
2016-05-25 19:11 ` Rob Herring
2016-05-25 9:50 ` [PATCH 5/5] ARM64: dts: rockchip: add rktimer device node for rk3399 Caesar Wang
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).