* [PATCH v2 0/4] arm64: Hi6220: enable CPU idle states
@ 2015-10-13 0:58 Leo Yan
[not found] ` <1444697896-4323-1-git-send-email-leo.yan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
` (3 more replies)
0 siblings, 4 replies; 6+ messages in thread
From: Leo Yan @ 2015-10-13 0:58 UTC (permalink / raw)
To: Catalin Marinas, Will Deacon, Rob Herring, Pawel Moll,
Mark Rutland, Ian Campbell, Kumar Gala, Leo Yan, Haojian Zhuang,
Wei Xu, Bintian Wang, Yiping Xu, Sudeep Holla,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
linux-kernel-u79uwXL29TY76Z2rM5mHXA,
devicetree-u79uwXL29TY76Z2rM5mHXA
This patch series is to enable CPU idle states for Hi6220.
Hi6220 uses PSCIv0.2 compliance interface, so directly use ARM's generic
CPUIdle driver. Patch 1 is to reserve memory regions so make sure MCU can
work well to handle power controlling; Patch 2/3 enable sp804 timer as
broadcast timer during idle states; Patch 4 registers CPU power down state
and cluster power down state.
Changes from v1:
* According to Sudeep's review, fix binding for idle-states
* According to Rob's review, due timers share same clock source with apb
clock, so just only pass one clock phandle
Leo Yan (4):
arm64: dts: Reserve memory regions for hi6220
arm64: Kconfig: select sp804 timer for ARCH_HISI
arm64: dts: add sp804 timer node for Hi6220
arm64: dts: enable idle states for Hi6220
arch/arm64/Kconfig.platforms | 1 +
arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 16 ++++++++---
arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 40 ++++++++++++++++++++++++++
3 files changed, 53 insertions(+), 4 deletions(-)
--
1.9.1
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <1444697896-4323-1-git-send-email-leo.yan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>]
* [PATCH v2 1/4] arm64: dts: Reserve memory regions for hi6220 [not found] ` <1444697896-4323-1-git-send-email-leo.yan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2015-10-13 0:58 ` Leo Yan 2015-10-16 7:30 ` Leo Yan 0 siblings, 1 reply; 6+ messages in thread From: Leo Yan @ 2015-10-13 0:58 UTC (permalink / raw) To: Catalin Marinas, Will Deacon, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Leo Yan, Haojian Zhuang, Wei Xu, Bintian Wang, Yiping Xu, Sudeep Holla, linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r, linux-kernel-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA On Hi6220, below memory regions in DDR have specific purpose: 0x05e0,0000 - 0x05ef,ffff: For MCU firmware using at runtime; 0x06df,f000 - 0x06df,ffff: For mailbox message data; 0x0740,f000 - 0x0740,ffff: For MCU firmware's section; 0x3e00,0000 - 0x3fff,ffff: For OP-TEE. This patch reserves these memory regions in DT. Signed-off-by: Leo Yan <leo.yan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> --- arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts index e36a539..e3f4cb3 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts @@ -7,9 +7,6 @@ /dts-v1/; -/*Reserved 1MB memory for MCU*/ -/memreserve/ 0x05e00000 0x00100000; - #include "hi6220.dtsi" / { @@ -24,8 +21,19 @@ stdout-path = "serial0:115200n8"; }; + /* + * Reserve below regions from memory node: + * + * - 0x05e0,0000 - 0x05ef,ffff: MCU firmware runtime using + * - 0x06df,f000 - 0x06df,ffff: Mailbox message data + * - 0x0740,f000 - 0x0740,ffff: MCU firmware section + * - 0x3e00,0000 - 0x3fff,ffff: OP-TEE + */ memory@0 { device_type = "memory"; - reg = <0x0 0x0 0x0 0x40000000>; + reg = <0x00000000 0x00000000 0x00000000 0x05e00000>, + <0x00000000 0x05f00000 0x00000000 0x00eff000>, + <0x00000000 0x06e00000 0x00000000 0x0060f000>, + <0x00000000 0x07410000 0x00000000 0x36bf0000>; }; }; -- 1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [PATCH v2 1/4] arm64: dts: Reserve memory regions for hi6220 2015-10-13 0:58 ` [PATCH v2 1/4] arm64: dts: Reserve memory regions for hi6220 Leo Yan @ 2015-10-16 7:30 ` Leo Yan 0 siblings, 0 replies; 6+ messages in thread From: Leo Yan @ 2015-10-16 7:30 UTC (permalink / raw) To: Catalin Marinas, Will Deacon, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Haojian Zhuang, Wei Xu, Bintian Wang, Yiping Xu, Sudeep Holla, linux-arm-kernel, linux-kernel, devicetree Hi Rob, On Tue, Oct 13, 2015 at 08:58:13AM +0800, Leo Yan wrote: > On Hi6220, below memory regions in DDR have specific purpose: > > 0x05e0,0000 - 0x05ef,ffff: For MCU firmware using at runtime; > 0x06df,f000 - 0x06df,ffff: For mailbox message data; > 0x0740,f000 - 0x0740,ffff: For MCU firmware's section; > 0x3e00,0000 - 0x3fff,ffff: For OP-TEE. > > This patch reserves these memory regions in DT. > > Signed-off-by: Leo Yan <leo.yan@linaro.org> > --- > arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts | 16 ++++++++++++---- > 1 file changed, 12 insertions(+), 4 deletions(-) > > diff --git a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts > index e36a539..e3f4cb3 100644 > --- a/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts > +++ b/arch/arm64/boot/dts/hisilicon/hi6220-hikey.dts > @@ -7,9 +7,6 @@ > > /dts-v1/; > > -/*Reserved 1MB memory for MCU*/ > -/memreserve/ 0x05e00000 0x00100000; > - > #include "hi6220.dtsi" > > / { > @@ -24,8 +21,19 @@ > stdout-path = "serial0:115200n8"; > }; > > + /* > + * Reserve below regions from memory node: > + * > + * - 0x05e0,0000 - 0x05ef,ffff: MCU firmware runtime using > + * - 0x06df,f000 - 0x06df,ffff: Mailbox message data > + * - 0x0740,f000 - 0x0740,ffff: MCU firmware section > + * - 0x3e00,0000 - 0x3fff,ffff: OP-TEE > + */ > memory@0 { > device_type = "memory"; > - reg = <0x0 0x0 0x0 0x40000000>; > + reg = <0x00000000 0x00000000 0x00000000 0x05e00000>, > + <0x00000000 0x05f00000 0x00000000 0x00eff000>, > + <0x00000000 0x06e00000 0x00000000 0x0060f000>, > + <0x00000000 0x07410000 0x00000000 0x36bf0000>; > }; > }; Are you convinced by the before's patch arguments from Mark and I? i'd like get green light from you. Thanks, Leo Yan > -- > 1.9.1 > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v2 2/4] arm64: Kconfig: select sp804 timer for ARCH_HISI 2015-10-13 0:58 [PATCH v2 0/4] arm64: Hi6220: enable CPU idle states Leo Yan [not found] ` <1444697896-4323-1-git-send-email-leo.yan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> @ 2015-10-13 0:58 ` Leo Yan 2015-10-13 0:58 ` [PATCH v2 3/4] arm64: dts: add sp804 timer node for Hi6220 Leo Yan 2015-10-13 0:58 ` [PATCH v2 4/4] arm64: dts: enable idle states " Leo Yan 3 siblings, 0 replies; 6+ messages in thread From: Leo Yan @ 2015-10-13 0:58 UTC (permalink / raw) To: Catalin Marinas, Will Deacon, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Leo Yan, Haojian Zhuang, Wei Xu, Bintian Wang, Yiping Xu, Sudeep Holla, linux-arm-kernel, linux-kernel, devicetree Select sp804 timer for ARCH_HISI, which is used as broadcast timer. Signed-off-by: Leo Yan <leo.yan@linaro.org> --- arch/arm64/Kconfig.platforms | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm64/Kconfig.platforms b/arch/arm64/Kconfig.platforms index 23800a1..6d730fb 100644 --- a/arch/arm64/Kconfig.platforms +++ b/arch/arm64/Kconfig.platforms @@ -35,6 +35,7 @@ config ARCH_FSL_LS2085A config ARCH_HISI bool "Hisilicon SoC Family" + select ARM_TIMER_SP804 help This enables support for Hisilicon ARMv8 SoC family -- 1.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 3/4] arm64: dts: add sp804 timer node for Hi6220 2015-10-13 0:58 [PATCH v2 0/4] arm64: Hi6220: enable CPU idle states Leo Yan [not found] ` <1444697896-4323-1-git-send-email-leo.yan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org> 2015-10-13 0:58 ` [PATCH v2 2/4] arm64: Kconfig: select sp804 timer for ARCH_HISI Leo Yan @ 2015-10-13 0:58 ` Leo Yan 2015-10-13 0:58 ` [PATCH v2 4/4] arm64: dts: enable idle states " Leo Yan 3 siblings, 0 replies; 6+ messages in thread From: Leo Yan @ 2015-10-13 0:58 UTC (permalink / raw) To: Catalin Marinas, Will Deacon, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Leo Yan, Haojian Zhuang, Wei Xu, Bintian Wang, Yiping Xu, Sudeep Holla, linux-arm-kernel, linux-kernel, devicetree Add sp804 timer for hi6220, so it can be used as broadcast timer. Signed-off-by: Leo Yan <leo.yan@linaro.org> --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index 3f03380..cdd4125 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -167,5 +167,14 @@ clocks = <&ao_ctrl 36>, <&ao_ctrl 36>; clock-names = "uartclk", "apb_pclk"; }; + + dual_timer0: dual_timer@f8008000 { + compatible = "arm,sp804", "arm,primecell"; + reg = <0x0 0xf8008000 0x0 0x1000>; + interrupts = <GIC_SPI 14 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&ao_ctrl 27>; + clock-names = "apb_pclk"; + }; }; }; -- 1.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* [PATCH v2 4/4] arm64: dts: enable idle states for Hi6220 2015-10-13 0:58 [PATCH v2 0/4] arm64: Hi6220: enable CPU idle states Leo Yan ` (2 preceding siblings ...) 2015-10-13 0:58 ` [PATCH v2 3/4] arm64: dts: add sp804 timer node for Hi6220 Leo Yan @ 2015-10-13 0:58 ` Leo Yan 3 siblings, 0 replies; 6+ messages in thread From: Leo Yan @ 2015-10-13 0:58 UTC (permalink / raw) To: Catalin Marinas, Will Deacon, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala, Leo Yan, Haojian Zhuang, Wei Xu, Bintian Wang, Yiping Xu, Sudeep Holla, linux-arm-kernel, linux-kernel, devicetree Add cpu and cluster level's low power state for Hi6220. Acked-by: Sudeep Holla <sudeep.holla@arm.com> Signed-off-by: Leo Yan <leo.yan@linaro.org> --- arch/arm64/boot/dts/hisilicon/hi6220.dtsi | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi index cdd4125..2830571 100644 --- a/arch/arm64/boot/dts/hisilicon/hi6220.dtsi +++ b/arch/arm64/boot/dts/hisilicon/hi6220.dtsi @@ -52,11 +52,35 @@ }; }; + idle-states { + entry-method = "psci"; + + CPU_SLEEP: cpu-sleep { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x0010000>; + entry-latency-us = <700>; + exit-latency-us = <250>; + min-residency-us = <1000>; + }; + + CLUSTER_SLEEP: cluster-sleep { + compatible = "arm,idle-state"; + local-timer-stop; + arm,psci-suspend-param = <0x1010000>; + entry-latency-us = <1000>; + exit-latency-us = <700>; + min-residency-us = <2700>; + wakeup-latency-us = <1500>; + }; + }; + cpu0: cpu@0 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x0>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; }; cpu1: cpu@1 { @@ -64,6 +88,7 @@ device_type = "cpu"; reg = <0x0 0x1>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; }; cpu2: cpu@2 { @@ -71,6 +96,7 @@ device_type = "cpu"; reg = <0x0 0x2>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; }; cpu3: cpu@3 { @@ -78,6 +104,7 @@ device_type = "cpu"; reg = <0x0 0x3>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; }; cpu4: cpu@100 { @@ -85,6 +112,7 @@ device_type = "cpu"; reg = <0x0 0x100>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; }; cpu5: cpu@101 { @@ -92,6 +120,7 @@ device_type = "cpu"; reg = <0x0 0x101>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; }; cpu6: cpu@102 { @@ -99,6 +128,7 @@ device_type = "cpu"; reg = <0x0 0x102>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; }; cpu7: cpu@103 { @@ -106,6 +136,7 @@ device_type = "cpu"; reg = <0x0 0x103>; enable-method = "psci"; + cpu-idle-states = <&CPU_SLEEP &CLUSTER_SLEEP>; }; }; -- 1.9.1 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-10-16 7:30 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-13 0:58 [PATCH v2 0/4] arm64: Hi6220: enable CPU idle states Leo Yan
[not found] ` <1444697896-4323-1-git-send-email-leo.yan-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>
2015-10-13 0:58 ` [PATCH v2 1/4] arm64: dts: Reserve memory regions for hi6220 Leo Yan
2015-10-16 7:30 ` Leo Yan
2015-10-13 0:58 ` [PATCH v2 2/4] arm64: Kconfig: select sp804 timer for ARCH_HISI Leo Yan
2015-10-13 0:58 ` [PATCH v2 3/4] arm64: dts: add sp804 timer node for Hi6220 Leo Yan
2015-10-13 0:58 ` [PATCH v2 4/4] arm64: dts: enable idle states " Leo Yan
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox