Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1646510 > unrolled thread

[PATCH v3 0/2] Hi3660: enable sp804 timer

Started byLeo Yan <leo.yan@linaro.org>
First post2017-05-22 07:00 +0200
Last post2017-05-22 07:00 +0200
Articles 2 — 1 participant

Back to article view | Back to linux.kernel


Contents

  [PATCH v3 0/2] Hi3660: enable sp804 timer Leo Yan <leo.yan@linaro.org> - 2017-05-22 07:00 +0200
    [PATCH v3 2/2] arm64: dts: add sp804 timer node for Hi3660 Leo Yan <leo.yan@linaro.org> - 2017-05-22 07:00 +0200

#1646510 — [PATCH v3 0/2] Hi3660: enable sp804 timer

FromLeo Yan <leo.yan@linaro.org>
Date2017-05-22 07:00 +0200
Subject[PATCH v3 0/2] Hi3660: enable sp804 timer
Message-ID<tJNBL-Rs-9@gated-at.bofh.it>
This patch set is to enable sp804 timer on Hi3660 for Hikey960 platform.

On Hi3660, the sp804 timer co-exists with CPUs' architecture timer; but
sp804 timer is located in SoC level but CPU's architecture timer is in
CPU power domain. sp804 timer is used as broadcast timer when CPU enters
idle states and the CPU (includes architecture timer) power domain is
powered off. So sp804 timer enabling is prerequisite before we enable
CPUIdle on Hi3660.

This patch set is to enable sp804 timer, the first patch is to adjust
subset of crgctrl clock regiseration to CLK_OF_DECLARE_DRIVER method
so ensure timer clock is avaiable when timer probing. The second patch
is to add description for timer in dts. Have rebased this patch set on
Guodong's dts patch set [1] and verified this patch set on Hikey960.

[1] http://archive.armlinux.org.uk/lurker/message/20170517.083733.8207a50e.en.html

Changes from v2:
* According to Stephen's suggestion, only changed necessary clocks
  of fixed_rate_clks to CLK_OF_DECLARE_DRIVER method.

Changes from v1:
* Follow Steven's suggestion on IRC, Change to only use
  CLK_OF_DECLARE_DRIVER for crgctrl clock.

Leo Yan (2):
  clk: Hi3660: register fixed_rate_clks with CLK_OF_DECLARE_DRIVER
  arm64: dts: add sp804 timer node for Hi3660

 arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 11 +++++++
 drivers/clk/hisilicon/clk-hi3660.c        | 48 ++++++++++++++++++++++++-------
 2 files changed, 49 insertions(+), 10 deletions(-)

-- 
1.9.1

[toc] | [next] | [standalone]


#1646512 — [PATCH v3 2/2] arm64: dts: add sp804 timer node for Hi3660

FromLeo Yan <leo.yan@linaro.org>
Date2017-05-22 07:00 +0200
Subject[PATCH v3 2/2] arm64: dts: add sp804 timer node for Hi3660
Message-ID<tJNBM-Rs-21@gated-at.bofh.it>
In reply to#1646510
The Hi3660 SoC comes with the sp804 timer in addition to the
architecture timers. These ones are shutdown when reaching a deep idle
states and a backup timer is needed. The sp804 belongs to another power
domain and can fulfill the purpose of replacing temporarily an
architecture timer when the CPU is idle.

Describe it in the device tree, so it can be enabled at boot time.

Suggested-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Acked-by: Daniel Lezcano <daniel.lezcano@linaro.org>
Signed-off-by: Leo Yan <leo.yan@linaro.org>
---
 arch/arm64/boot/dts/hisilicon/hi3660.dtsi | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
index 138fcba..f75c792 100644
--- a/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
+++ b/arch/arm64/boot/dts/hisilicon/hi3660.dtsi
@@ -173,6 +173,17 @@
 			#clock-cells = <1>;
 		};
 
+		dual_timer0: timer@fff14000 {
+			compatible = "arm,sp804", "arm,primecell";
+			reg = <0x0 0xfff14000 0x0 0x1000>;
+			interrupts = <GIC_SPI 48 IRQ_TYPE_LEVEL_HIGH>,
+				     <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&crg_ctrl HI3660_OSC32K>,
+				 <&crg_ctrl HI3660_OSC32K>,
+				 <&crg_ctrl HI3660_OSC32K>;
+			clock-names = "timer1", "timer2", "apb_pclk";
+		};
+
 		ufs: ufs@ff3b0000 {
 			compatible = "jedec,ufs-1.1", "hisilicon,hi3660-ufs";
 			reg = <0x0 0xff3b0000 0x0 0x1000>, /* 0: HCI standard */
-- 
1.9.1

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web