* [FOR DISCUSSION 0/8] Dove PMU support
@ 2015-02-14 15:26 Russell King - ARM Linux
[not found] ` <20150214152659.GI8656-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-02-14 16:49 ` [FOR DISCUSSION 0/8] Dove PMU support Andrew Lunn
0 siblings, 2 replies; 6+ messages in thread
From: Russell King - ARM Linux @ 2015-02-14 15:26 UTC (permalink / raw)
To: Andrew Lunn, Jason Cooper, Rafael J. Wysocki,
Sebastian Hesselbarth
Cc: devicetree, Greg Kroah-Hartman, Ian Campbell, Kumar Gala,
Len Brown, linux-arm-kernel, linux-pm, Mark Rutland, Pawel Moll,
Rob Herring
This is a re-posting of the patch set which I posted almost 10 months
ago to support the Dove PMU, with a few additional changes. This set
is based upon 3.19.
In this set are:
* two patches which Rafael originally acked, but there was indecision
last time around how to handle them due to potential conflicts with
work that Ulf was doing. These patches have been updated to apply
cleanly to 3.19. I don't know if people want to take these as
fixes to the PM domain code or not (hence why I'm posting this
series during the merge window - if it weren't for this, I'd hold
it off.)
* what I regard as a fix to the PM domain code; as a result of a
previous commit, the PM domain code mismatches the runtime PM state,
which leads to the PM domain being unexpectedly left on. This patch
works around that. (It's been sent recently as well but in an old
thread.)
* the addition of the core Dove PMU driver, which consists of a reset,
IRQ controller, and power domains. The reset and power domain code
has to be closely related due to the power up/down requirements of
the GPU/VPU subsystems needing to be performed atomically. (This
requirement prevents it using the MFD infrastructure, because we
would need to hold spinlocks while calling several different
sub-drivers.)
* addition of the RTC interrupt, so we can now receive and act on
alarms generated by the Dove RTC.
* addition of the DT descriptions for the GPU and VPU power domains.
These patches do not themselves add the DT descriptions for these
units, so these patches serve as illustrations how these should be
described.
There are a few things which are missing from this driver, such sa the
DT binding documentation. This will follow once people are happy with
the first four patches, in particular where to locate the PMU driver
in the kernel tree. Currently, I have it in arch/arm/mach-dove, which
is where the legacy Dove code lives, so it's not ideal.
There are some gotchas with it - PM domains need to be created prior
to any device which uses them being probed, so it is best if the driver
is initialised really early in the kernel boot. We may be able to get
away with a core_initcall() or a postcore_initcall().
I'd ideally like to get these queued for merging in the _next_ merge
window if at all possible, if only to reduce the number of patches I've
been carrying for the last few years.
arch/arm/Kconfig | 1 +
arch/arm/boot/dts/dove.dtsi | 25 +++
arch/arm/mach-dove/Makefile | 1 +
arch/arm/mach-dove/common.c | 2 +
arch/arm/mach-dove/common.h | 1 +
arch/arm/mach-dove/include/mach/pm.h | 17 --
arch/arm/mach-dove/irq.c | 87 --------
arch/arm/mach-dove/pmu.c | 410 +++++++++++++++++++++++++++++++++++
drivers/base/power/domain.c | 26 ++-
drivers/base/power/runtime.c | 5 +
include/linux/pm.h | 1 +
11 files changed, 466 insertions(+), 110 deletions(-)
--
FTTC broadband for 0.8mile line: currently at 10.5Mbps down 400kbps up
according to speedtest.net.
^ permalink raw reply [flat|nested] 6+ messages in thread[parent not found: <20150214152659.GI8656-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>]
* [PATCH 5/8] ARM: dt: dove: add Dove PMU DT entry to dove.dtsi
[not found] ` <20150214152659.GI8656-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
@ 2015-02-14 15:27 ` Russell King
2015-02-14 15:27 ` [PATCH 6/8] ARM: dt: dove: wire up RTC interrupt Russell King
` (2 subsequent siblings)
3 siblings, 0 replies; 6+ messages in thread
From: Russell King @ 2015-02-14 15:27 UTC (permalink / raw)
To: Andrew Lunn, Jason Cooper, Rafael J. Wysocki,
Sebastian Hesselbarth
Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Add the PMU description to the Dove DT file. The PMU provides multiple
features, including an interrupt, reset, power and isolation controller.
Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
---
arch/arm/boot/dts/dove.dtsi | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index a5441d5482a6..1e664eb8bdcb 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -380,6 +380,15 @@
status = "disabled";
};
+ pmu: power-management@d0000 {
+ compatible = "marvell,pmu";
+ reg = <0xd0000 0x8000>, <0xd8000 0x8000>;
+ interrupts = <33>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ #reset-cells = <1>;
+ };
+
thermal: thermal-diode@d001c {
compatible = "marvell,dove-thermal";
reg = <0xd001c 0x0c>, <0xd005c 0x08>;
--
1.8.3.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* [PATCH 6/8] ARM: dt: dove: wire up RTC interrupt
[not found] ` <20150214152659.GI8656-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-02-14 15:27 ` [PATCH 5/8] ARM: dt: dove: add Dove PMU DT entry to dove.dtsi Russell King
@ 2015-02-14 15:27 ` Russell King
2015-02-14 15:28 ` [PATCH 7/8] ARM: dt: dove: add video decoder power domain description Russell King
2015-02-14 15:28 ` [PATCH 8/8] ARM: dt: dove: add GPU " Russell King
3 siblings, 0 replies; 6+ messages in thread
From: Russell King @ 2015-02-14 15:27 UTC (permalink / raw)
To: Andrew Lunn, Jason Cooper, Rafael J. Wysocki,
Sebastian Hesselbarth
Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Now that we have a PMU driver, we can wire up the RTC interrupt in the
DT description for Dove.
Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
---
arch/arm/boot/dts/dove.dtsi | 2 ++
1 file changed, 2 insertions(+)
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index 1e664eb8bdcb..00b61d2be66b 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -624,6 +624,8 @@
rtc: real-time-clock@d8500 {
compatible = "marvell,orion-rtc";
reg = <0xd8500 0x20>;
+ interrupt-parent = <&pmu>;
+ interrupts = <5>;
};
gconf: global-config@e802c {
--
1.8.3.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* [PATCH 7/8] ARM: dt: dove: add video decoder power domain description
[not found] ` <20150214152659.GI8656-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-02-14 15:27 ` [PATCH 5/8] ARM: dt: dove: add Dove PMU DT entry to dove.dtsi Russell King
2015-02-14 15:27 ` [PATCH 6/8] ARM: dt: dove: wire up RTC interrupt Russell King
@ 2015-02-14 15:28 ` Russell King
2015-02-14 15:28 ` [PATCH 8/8] ARM: dt: dove: add GPU " Russell King
3 siblings, 0 replies; 6+ messages in thread
From: Russell King @ 2015-02-14 15:28 UTC (permalink / raw)
To: Andrew Lunn, Jason Cooper, Rafael J. Wysocki,
Sebastian Hesselbarth
Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Add the description of the video decoder power domain to the PMU DT
entry.
Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
---
arch/arm/boot/dts/dove.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index 00b61d2be66b..a47c7cef380f 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -387,6 +387,13 @@
interrupt-controller;
#interrupt-cells = <1>;
#reset-cells = <1>;
+
+ vpu_domain: vpu-domain {
+ #power-domain-cells = <0>;
+ marvell,pmu_pwr_mask = <0x00000008>;
+ marvell,pmu_iso_mask = <0x00000001>;
+ resets = <&pmu 16>;
+ };
};
thermal: thermal-diode@d001c {
--
1.8.3.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* [PATCH 8/8] ARM: dt: dove: add GPU power domain description
[not found] ` <20150214152659.GI8656-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
` (2 preceding siblings ...)
2015-02-14 15:28 ` [PATCH 7/8] ARM: dt: dove: add video decoder power domain description Russell King
@ 2015-02-14 15:28 ` Russell King
3 siblings, 0 replies; 6+ messages in thread
From: Russell King @ 2015-02-14 15:28 UTC (permalink / raw)
To: Andrew Lunn, Jason Cooper, Rafael J. Wysocki,
Sebastian Hesselbarth
Cc: Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell, Kumar Gala,
devicetree-u79uwXL29TY76Z2rM5mHXA,
linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
Add the description of the GPU power domain to the PMU DT entry.
Signed-off-by: Russell King <rmk+kernel-lFZ/pmaqli7XmaaqVzeoHQ@public.gmane.org>
---
arch/arm/boot/dts/dove.dtsi | 7 +++++++
1 file changed, 7 insertions(+)
diff --git a/arch/arm/boot/dts/dove.dtsi b/arch/arm/boot/dts/dove.dtsi
index a47c7cef380f..081f968c521a 100644
--- a/arch/arm/boot/dts/dove.dtsi
+++ b/arch/arm/boot/dts/dove.dtsi
@@ -394,6 +394,13 @@
marvell,pmu_iso_mask = <0x00000001>;
resets = <&pmu 16>;
};
+
+ gpu_domain: gpu-domain {
+ #power-domain-cells = <0>;
+ marvell,pmu_pwr_mask = <0x00000004>;
+ marvell,pmu_iso_mask = <0x00000002>;
+ resets = <&pmu 18>;
+ };
};
thermal: thermal-diode@d001c {
--
1.8.3.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: [FOR DISCUSSION 0/8] Dove PMU support
2015-02-14 15:26 [FOR DISCUSSION 0/8] Dove PMU support Russell King - ARM Linux
[not found] ` <20150214152659.GI8656-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
@ 2015-02-14 16:49 ` Andrew Lunn
1 sibling, 0 replies; 6+ messages in thread
From: Andrew Lunn @ 2015-02-14 16:49 UTC (permalink / raw)
To: Russell King - ARM Linux
Cc: Jason Cooper, Rafael J. Wysocki, Sebastian Hesselbarth,
devicetree, Greg Kroah-Hartman, Ian Campbell, Kumar Gala,
Len Brown, linux-arm-kernel, linux-pm, Mark Rutland, Pawel Moll,
Rob Herring
Hi Russell
Thanks for posting these. Lets try to get them merged.
> There are a few things which are missing from this driver, such sa the
> DT binding documentation. This will follow once people are happy with
> the first four patches, in particular where to locate the PMU driver
> in the kernel tree. Currently, I have it in arch/arm/mach-dove, which
> is where the legacy Dove code lives, so it's not ideal.
Maybe time for a drivers/pmu? arch/arm/mach-dove is not good, we want
to be able to use this code from arch/arm/mach-mvebu.
Andrew
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2015-02-14 16:49 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-14 15:26 [FOR DISCUSSION 0/8] Dove PMU support Russell King - ARM Linux
[not found] ` <20150214152659.GI8656-l+eeeJia6m9vn6HldHNs0ANdhmdF6hFW@public.gmane.org>
2015-02-14 15:27 ` [PATCH 5/8] ARM: dt: dove: add Dove PMU DT entry to dove.dtsi Russell King
2015-02-14 15:27 ` [PATCH 6/8] ARM: dt: dove: wire up RTC interrupt Russell King
2015-02-14 15:28 ` [PATCH 7/8] ARM: dt: dove: add video decoder power domain description Russell King
2015-02-14 15:28 ` [PATCH 8/8] ARM: dt: dove: add GPU " Russell King
2015-02-14 16:49 ` [FOR DISCUSSION 0/8] Dove PMU support Andrew Lunn
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).