Skip to contentSkip to conversation

add GPT timer support for mt8173

PATCH Applied Yingjoe Chen 3 participants 9 messages Oct 2, 2015 – Oct 14, 2015

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

v4 cover add GPT timer support for mt8173

This is based on v4.3-rc1 + clockevents-4.4[1] and James's mediatek-clk tree[2].

Changes compare to previous version[3]:
- Add more MediaTek SoC to mtk-timer binding
- Update commit message to better describe the purpose.

Changes compare to v2[4]:
- the first two mtk_timer related changes are removed because they are replaced/accepted in clockevents tree.
- Remove 'add 13mhz clock for MT8173' because it is accepted in mediatek-clk tree.
- Kconfig.platforms path change.

[1]
https://git.linaro.org/people/daniel.lezcano/linux.git clockevents/4.4
[2]
http://lists.infradead.org/pipermail/linux-mediatek/2015-August/002069.html
[3]
http://lists.infradead.org/pipermail/linux-mediatek/2015-September/002301.html
[4]
http://lists.infradead.org/pipermail/linux-mediatek/2015-July/001544.html

Daniel Kurtz (1):
arm64: dts: mt8173: add timer node

Yingjoe Chen (2):
dt-bindings: add more MediaTek SoC to mtk-timer binding
arm64: mediatek: enable MTK_TIMER

 Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | 8 +++++---
 arch/arm64/Kconfig.platforms                                   | 1 +
 arch/arm64/boot/dts/mediatek/mt8173.dtsi                       | 9 +++++++++
 3 files changed, 15 insertions(+), 3 deletions(-)
#1 lore raw

PATCH v4 1/3 dt-bindings: add more MediaTek SoC to mtk-timer binding

Add compatible string for mt8127, mt8135 and mt8173 and sort the list.

---
 Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | 8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)
Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt +5 -3
index 53a3029..64083bc 100644
@@ -3,10 +3,12 @@ Mediatek MT6577, MT6572 and MT6589 Timers
 
 Required properties:
 - compatible should contain:
-	* "mediatek,mt6589-timer" for MT6589 compatible timers
 	* "mediatek,mt6580-timer" for MT6580 compatible timers
-	* "mediatek,mt6577-timer" for all compatible timers (MT6589, MT6580,
-		MT6577)
+	* "mediatek,mt6589-timer" for MT6589 compatible timers
+	* "mediatek,mt8127-timer" for MT8127 compatible timers
+	* "mediatek,mt8135-timer" for MT8135 compatible timers
+	* "mediatek,mt8173-timer" for MT8173 compatible timers
+	* "mediatek,mt6577-timer" for MT6577 and all above compatible timers
 - reg: Should contain location and length for timers register.
 - clocks: Clocks driving the timer hardware. This list should include two
 	clocks. The order is system clock and as second clock the RTC clock.
Signature · 1 line
1.9.1
#2 lore raw

PATCH v4 2/3 arm64: mediatek: enable MTK_TIMER

In reply to Yingjoe Chen

Enable MTK_TIMER for MediaTek plaform, which will be used as tick broadcast device and schedule clock.

---
 arch/arm64/Kconfig.platforms | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/Kconfig.platforms +1 -0
index 23800a1..8176455 100644
@@ -42,6 +42,7 @@ config ARCH_MEDIATEK
 	bool "Mediatek MT65xx & MT81xx ARMv8 SoC"
 	select ARM_GIC
 	select PINCTRL
+	select MTK_TIMER
 	help
 	  Support for Mediatek MT65xx & MT81xx ARMv8 SoCs
 
Signature · 1 line
1.9.1
maintainer
#3 lore raw

Re: [PATCH v4 2/3] arm64: mediatek: enable MTK_TIMER

Quoted 5 lines · Yingjoe Chen

Enable MTK_TIMER for MediaTek plaform, which will be used as tick broadcast device and schedule clock.

---

I reapplied this on v4.4-next/soc

Quoted 16 lines
  arch/arm64/Kconfig.platforms | 1 +
  1 file changed, 1 insertion(+)
arch/arm64/Kconfig.platforms +1 -0
index 23800a1..8176455 100644
@@ -42,6 +42,7 @@ config ARCH_MEDIATEK
  	bool "Mediatek MT65xx & MT81xx ARMv8 SoC"
  	select ARM_GIC
  	select PINCTRL
+	select MTK_TIMER
  	help
  	  Support for Mediatek MT65xx & MT81xx ARMv8 SoCs
 
#4 lore raw

PATCH v4 3/3 arm64: dts: mt8173: add timer node

In reply to Yingjoe Chen

From: Daniel Kurtz <[email protected]>

Add device node to enable GPT timer.

---
 arch/arm64/boot/dts/mediatek/mt8173.dtsi | 9 +++++++++
 1 file changed, 9 insertions(+)
arch/arm64/boot/dts/mediatek/mt8173.dtsi +9 -0
index d18ee42..d763803 100644
@@ -238,6 +238,15 @@
 			reg = <0 0x10007000 0 0x100>;
 		};
 
+		timer: timer at 10008000 {
+			compatible = "mediatek,mt8173-timer",
+				     "mediatek,mt6577-timer";
+			reg = <0 0x10008000 0 0x1000>;
+			interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_LOW>;
+			clocks = <&infracfg CLK_INFRA_CLK_13M>,
+				 <&topckgen CLK_TOP_RTC_SEL>;
+		};
+
 		pwrap: pwrap at 1000d000 {
 			compatible = "mediatek,mt8173-pwrap";
 			reg = <0 0x1000d000 0 0x1000>;
Signature · 1 line
1.9.1
#5 lore raw

Re: [PATCH v4 3/3] arm64: dts: mt8173: add timer node

config: arm64-allyesconfig (attached as .config) reproduce: wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross #…

Hi Daniel,

[auto build test results on v4.3-rc3 -- if it's inappropriate base, please ignore]

config: arm64-allyesconfig (attached as .config)
reproduce:
wget https://git.kernel.org/cgit/linux/kernel/git/wfg/lkp-tests.git/plain/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross
# save the attached .config to linux build tree
make.cross ARCH=arm64

All error/warnings (new ones prefixed by >>):

>> Error: arch/arm64/boot/dts/mediatek/mt8173.dtsi:246.24-25 syntax error

FATAL ERROR: Unable to parse input tree

---
0-DAY kernel test infrastructure Open Source Technology Center
https://lists.01.org/pipermail/kbuild-all Intel Corporation
-------------- next part --------------
A non-text attachment was scrubbed...
Name: .config.gz
Type: application/octet-stream
Size: 45833 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20151003/5a50e32c/attachment-0001.obj>

maintainer
#6 lore raw

Re: [PATCH v4 3/3] arm64: dts: mt8173: add timer node

In reply to Yingjoe Chen
Quoted 8 lines · Yingjoe Chen

From: Daniel Kurtz <[email protected]>

Add device node to enable GPT timer.

---

I reapplied this on v4.4-next/arm64

Quoted 24 lines
  arch/arm64/boot/dts/mediatek/mt8173.dtsi | 9 +++++++++
  1 file changed, 9 insertions(+)
arch/arm64/boot/dts/mediatek/mt8173.dtsi +9 -0
index d18ee42..d763803 100644
@@ -238,6 +238,15 @@
  			reg = <0 0x10007000 0 0x100>;
  		};
 
+		timer: timer at 10008000 {
+			compatible = "mediatek,mt8173-timer",
+				     "mediatek,mt6577-timer";
+			reg = <0 0x10008000 0 0x1000>;
+			interrupts = <GIC_SPI 144 IRQ_TYPE_LEVEL_LOW>;
+			clocks = <&infracfg CLK_INFRA_CLK_13M>,
+				 <&topckgen CLK_TOP_RTC_SEL>;
+		};
+
  		pwrap: pwrap at 1000d000 {
  			compatible = "mediatek,mt8173-pwrap";
  			reg = <0 0x1000d000 0 0x1000>;
#7 lore raw
In reply to Yingjoe Chen
Quoted 7 lines · Yingjoe Chen

This is based on v4.3-rc1 + clockevents-4.4[1] and James's mediatek-clk tree[2].

Changes compare to previous version[3]:
- Add more MediaTek SoC to mtk-timer binding
- Update commit message to better describe the purpose.

Quoted 6 lines

Changes compare to v2[4]:
- the first two mtk_timer related changes are removed because they are replaced/accepted in clockevents tree.
- Remove 'add 13mhz clock for MT8173' because it is accepted in mediatek-clk tree.
- Kconfig.platforms path change.

Hi Sudeep, Mark,

I just post a new version of this patch. Sorry I forgot to CC you.

Joe.C

maintainer Applied
#8 lore raw
In reply to Yingjoe Chen
Quoted 27 lines · Yingjoe Chen

This is based on v4.3-rc1 + clockevents-4.4[1] and James's mediatek-clk tree[2].

Changes compare to previous version[3]:
- Add more MediaTek SoC to mtk-timer binding
- Update commit message to better describe the purpose.

Changes compare to v2[4]:
- the first two mtk_timer related changes are removed because they are replaced/accepted in clockevents tree.
- Remove 'add 13mhz clock for MT8173' because it is accepted in mediatek-clk tree.
- Kconfig.platforms path change.

[1]
https://git.linaro.org/people/daniel.lezcano/linux.git clockevents/4.4
[2]
http://lists.infradead.org/pipermail/linux-mediatek/2015-August/002069.html
[3]
http://lists.infradead.org/pipermail/linux-mediatek/2015-September/002301.html
[4]
http://lists.infradead.org/pipermail/linux-mediatek/2015-July/001544.html

Daniel Kurtz (1):

   arm64: dts: mt8173: add timer node
Quoted 9 lines

Yingjoe Chen (2):
dt-bindings: add more MediaTek SoC to mtk-timer binding
arm64: mediatek: enable MTK_TIMER

  Documentation/devicetree/bindings/timer/mediatek,mtk-timer.txt | 8 +++++---
  arch/arm64/Kconfig.platforms                                   | 1 +
  arch/arm64/boot/dts/mediatek/mt8173.dtsi                       | 9 +++++++++
  3 files changed, 15 insertions(+), 3 deletions(-)

Applied, thanks.