devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC 0/5] ARM: shmobile: R-Mobile: Prototype DT PM domain support
@ 2014-09-08 13:35 Geert Uytterhoeven
  2014-09-08 13:35 ` [PATCH/RFC 1/5] PM / Domains: Add DT bindings for power-on/off latencies Geert Uytterhoeven
                   ` (4 more replies)
  0 siblings, 5 replies; 13+ messages in thread
From: Geert Uytterhoeven @ 2014-09-08 13:35 UTC (permalink / raw)
  To: Rafael J. Wysocki, Len Brown, Pavel Machek, Simon Horman,
	Magnus Damm, Rob Herring, Pawel Moll, Mark Rutland, Ian Campbell,
	Kumar Gala
  Cc: Ulf Hansson, Tomasz Figa, Philipp Zabel, linux-pm, devicetree,
	linux-sh, linux-arm-kernel, linux-kernel, Geert Uytterhoeven

	Hi all,

This patch series contains prototype code to enable DT support for PM domains
on Renesas R-Mobile SoCs.

Currently it's limited to R-Mobile A1 (r8a7740), but given the similarity of
the SYSC System-Controller on the various SH-Mobile/R-Mobile SoCs, and the
abstraction of PM domains in DT, it should be sufficiently generic to handle
other SoCs in the future (e.g. SH-Mobile AP4 (sh7372), SH-Mobile AG5 (sh73a0),
R-Mobile APE6 (r8a73a4)).

Despite my request to add support for non-contiguous arrays for onecell PM
domain providers, I went for representing the SoC's power area hierarchy as a
hierarchy in DT, with multiple PM domain nodes, and using "#power-domain-cells
= <0>" (see also the P.S. below).  The code to support a proper hiearchy turned
out to be surprisingly clean and simple(r).

Dependencies:
  - "[PATCH 00/11] ARM: shmobile: r8a7740/armadillo legacy prototype pm domain
    support", sent by me (www.spinics.net/lists/arm-kernel/msg358037.html),
  - "[PATCH v3 0/9] PM / Domains: Generic OF-based support", sent by Ulf
    Hansson (www.spinics.net/lists/arm-kernel/msg357003.html),
  - "[PATCH 00/15] PM / Domains: Cleanups and remove superfluous APIs", sent by
    Ulf Hansson (www.spinics.net/lists/linux-samsung-soc/msg36407.html).

Note that this still won't work as-is, this is just an RFC.
More fixes are needed in sh-mobile platform glue, and to resolve the bad
interaction with drivers/sh/pm_runtime.c and clk_disable_unused().
But none of these matter for e.g. discussing DT bindings.
With those fixed/worked around, functionality is almost equivalent to the
non-DT case.  Missing are Run-Time management of the module clocks
(pm_clk_*()), and device latencies.

Thanks for your comments!

Geert Uytterhoeven (5):
  PM / Domains: Add DT bindings for power-on/off latencies
  PM / Domains: Add DT bindings for the R-Mobile System Controller
  ARM: shmobile: R-Mobile: Store SYSC base address in rmobile_pm_domain
  ARM: shmobile: R-Mobile: Add DT support for PM domains
  ARM: shmobile: r8a7740 dtsi: Add PM domain support

 .../devicetree/bindings/power/power_domain.txt     |   6 +
 .../bindings/power/renesas,sysc-rmobile.txt        | 106 +++++++++++++
 arch/arm/boot/dts/r8a7740.dtsi                     | 121 +++++++++++++++
 arch/arm/mach-shmobile/Kconfig                     |   3 +-
 arch/arm/mach-shmobile/pm-r8a7740.c                |  14 ++
 arch/arm/mach-shmobile/pm-rmobile.c                | 169 +++++++++++++++++++--
 arch/arm/mach-shmobile/pm-rmobile.h                |   1 +
 arch/arm/mach-shmobile/pm-sh7372.c                 |  11 ++
 8 files changed, 417 insertions(+), 14 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/power/renesas,sysc-rmobile.txt

P.S. I did try "#power-domain-cells = <1>", but the hassle with sparse
     definitions and error-prone multiple arrays (not unlikely, but even worse
     than with the SMTP clock specifiers) was just too much. Not to mention
     representing the C5 "always-on" power area...

	renesas,pm-domain-indices = <
		R8A7740_PD_A4LC R8A7740_PD_A4MP R8A7740_PD_D4
		R8A7740_PD_A4R R8A7740_PD_A3RV R8A7740_PD_A4S
		R8A7740_PD_A3SP R8A7740_PD_A3SM R8A7740_PD_A3SG
		R8A7740_PD_A4SU
	>;
	renesas,pm-domain-names =
		"A4LC", "A4MP", "D4", "A4R", "A3RV", "A4S", "A3SP",
		"A3SM", "A3SG", "A4SU";
	renesas,pm-domain-parents =
		"", "", "", "", "A4R", "", "A4S", "A4S", "A4S", "";

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2014-09-10 12:40 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-09-08 13:35 [PATCH/RFC 0/5] ARM: shmobile: R-Mobile: Prototype DT PM domain support Geert Uytterhoeven
2014-09-08 13:35 ` [PATCH/RFC 1/5] PM / Domains: Add DT bindings for power-on/off latencies Geert Uytterhoeven
2014-09-09 15:57   ` Kevin Hilman
2014-09-08 13:35 ` [PATCH/RFC 2/5] PM / Domains: Add DT bindings for the R-Mobile System Controller Geert Uytterhoeven
2014-09-08 22:44   ` Khiem Nguyen
2014-09-09  7:16     ` Geert Uytterhoeven
     [not found] ` <1410183344-14756-1-git-send-email-geert+renesas-gXvu3+zWzMSzQB+pC5nmwQ@public.gmane.org>
2014-09-08 13:35   ` [PATCH/RFC 3/5] ARM: shmobile: R-Mobile: Store SYSC base address in rmobile_pm_domain Geert Uytterhoeven
2014-09-08 13:35 ` [PATCH/RFC 4/5] ARM: shmobile: R-Mobile: Add DT support for PM domains Geert Uytterhoeven
2014-09-09 15:40   ` Kevin Hilman
     [not found]     ` <7hfvg0kdk2.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2014-09-10 12:37       ` Geert Uytterhoeven
2014-09-09 16:11   ` Kevin Hilman
2014-09-10 12:40     ` Geert Uytterhoeven
2014-09-08 13:35 ` [PATCH/RFC 5/5] ARM: shmobile: r8a7740 dtsi: Add PM domain support Geert Uytterhoeven

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).