LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH v1] Mediatek SCPSYS power domain support
@ 2015-03-10 15:40 Sascha Hauer
  2015-03-10 15:41 ` [PATCH 1/4] dt-bindings: soc: Add documentation for the MediaTek SCPSYS unit Sascha Hauer
                   ` (3 more replies)
  0 siblings, 4 replies; 17+ messages in thread
From: Sascha Hauer @ 2015-03-10 15:40 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: Matthias Brugger, devicetree, linux-mediatek, linux-kernel,
	kernel, Kevin Hilman

This series adds support for the MediaTek SCPSYS unit.

The SCPSYS unit handles several power management related tasks such
as thermal measurement, DVFS, interrupt filter and low level sleep
control.

The initial support only contains the generic power domain handling.
This is needed to turn on power to the different power domains.

The driver is quite straight forward now. Due to the lack of a better
place I have put it to drivers/soc/mediatek. As the SCPSYS unit has
several other tasks that also do not fit into some specific subsystem
this probably is a good place for this driver.

Please review, any input welcome.

Sascha

changes since RFC:

- add a commit log to driver patch
- drop manipulating infracfg registers for now, can be added (properly)
  later
- Add warning messages when errors occur
- add NULL pointer check for kmalloc
- Enable all power domains when PM is disabled to allow consumers to work


^ permalink raw reply	[flat|nested] 17+ messages in thread
* [PATCH v2] Mediatek SCPSYS power domain support
@ 2015-05-11 13:11 Sascha Hauer
  2015-05-11 13:11 ` [PATCH 1/4] dt-bindings: soc: Add documentation for the MediaTek SCPSYS unit Sascha Hauer
  0 siblings, 1 reply; 17+ messages in thread
From: Sascha Hauer @ 2015-05-11 13:11 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: devicetree, Kevin Hilman, linux-kernel, linux-mediatek, kernel,
	Matthias Brugger

This series adds support for the MediaTek SCPSYS unit.

The SCPSYS unit handles several power management related tasks such
as thermal measurement, DVFS, interrupt filter and low level sleep
control.

The initial support only contains the generic power domain handling.
This is needed to turn on power to the different power domains.

The driver is quite straight forward now. Due to the lack of a better
place I have put it to drivers/soc/mediatek. As the SCPSYS unit has
several other tasks that also do not fit into some specific subsystem
this probably is a good place for this driver.

Please review, any input welcome.

Sascha

changes since v1:
- make MFG_ASYNC a subdomain of MFG_2D and MFG_2D a subdomain of MFG
- Add (now hopefully properly) infracfg register handling again
- Add clock handling
- Fix on/off mixup in error message
- Make readonly data const
- Fix MODULE_LICENSE to GPL v2

changes since RFC:

- add a commit log to driver patch
- drop manipulating infracfg registers for now, can be added (properly)
  later
- Add warning messages when errors occur
- add NULL pointer check for kmalloc
- Enable all power domains when PM is disabled to allow consumers to work


^ permalink raw reply	[flat|nested] 17+ messages in thread
* [RFC] Mediatek SCPSYS power domain support
@ 2015-03-09  8:09 Sascha Hauer
  2015-03-09  8:10 ` [PATCH 1/4] dt-bindings: soc: Add documentation for the MediaTek SCPSYS unit Sascha Hauer
  0 siblings, 1 reply; 17+ messages in thread
From: Sascha Hauer @ 2015-03-09  8:09 UTC (permalink / raw)
  To: linux-arm-kernel
  Cc: devicetree, linux-kernel, Matthias Brugger, linux-mediatek, kernel

s series adds support for the MediaTek SCPSYS unit.

The SCPSYS unit handles several power management related tasks such
as thermal measurement, DVFS, interrupt filter and low level sleep
control.

The initial support only contains the generic power domain handling.
This is needed to turn on power to the different power domains.

The driver is quite straight forward now. Due to the lack of a better
place I have put it to drivers/soc/mediatek. As the SCPSYS unit has
several other tasks that also do not fit into some specific subsystem
this probably is a good place for this driver.

What is not clear to me is how the Kconfig dependencies should be
handled. Some domains are disabled by bootloader default, so without
this driver for example sound won't work. So should PM, PM_GENERIC_DOMAINS
and this driver be made mandatory for MT8173? Or should this driver
when PM is disabled be compiled as a stub which only enables all
domains? I don't have a good idea how things should work out here.

Please review, any input welcome.

Sascha

----------------------------------------------------------------
Sascha Hauer (4):
      soc: Mediatek: Add SCPSYS power domain driver
      dt-bindings: soc: Add documentation for the MediaTek SCPSYS unit
      ARM64: MediaTek: Add generic pm domain support
      ARM64: MediaTek MT8173: Add SCPSYS device node

 .../devicetree/bindings/soc/mediatek/scpsys.txt    |  32 ++
 arch/arm64/Kconfig                                 |   1 +
 arch/arm64/boot/dts/mediatek/mt8173.dtsi           |   6 +
 drivers/soc/mediatek/Kconfig                       |   6 +
 drivers/soc/mediatek/Makefile                      |   1 +
 drivers/soc/mediatek/mtk-scpsys.c                  | 398 +++++++++++++++++++++
 include/dt-bindings/power/mt8173-power.h           |  15 +
 7 files changed, 459 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
 create mode 100644 drivers/soc/mediatek/mtk-scpsys.c
 create mode 100644 include/dt-bindings/power/mt8173-power.h


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

end of thread, other threads:[~2015-05-11 13:11 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-03-10 15:40 [PATCH v1] Mediatek SCPSYS power domain support Sascha Hauer
2015-03-10 15:41 ` [PATCH 1/4] dt-bindings: soc: Add documentation for the MediaTek SCPSYS unit Sascha Hauer
2015-03-10 15:41 ` [PATCH 2/4] soc: Mediatek: Add SCPSYS power domain driver Sascha Hauer
2015-03-11 11:10   ` Paul Bolle
2015-03-31 16:27   ` Kevin Hilman
2015-04-13 10:55     ` Sascha Hauer
2015-05-08 12:16   ` Matthias Brugger
2015-05-08 12:19     ` Sascha Hauer
2015-05-08 12:28       ` Matthias Brugger
2015-05-08 12:51         ` Sascha Hauer
2015-05-08 15:51           ` Matthias Brugger
2015-03-10 15:41 ` [PATCH 3/4] ARM64: MediaTek: Add generic pm domain support Sascha Hauer
2015-03-10 15:41 ` [PATCH 4/4] ARM64: MediaTek MT8173: Add SCPSYS device node Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2015-05-11 13:11 [PATCH v2] Mediatek SCPSYS power domain support Sascha Hauer
2015-05-11 13:11 ` [PATCH 1/4] dt-bindings: soc: Add documentation for the MediaTek SCPSYS unit Sascha Hauer
2015-03-09  8:09 [RFC] Mediatek SCPSYS power domain support Sascha Hauer
2015-03-09  8:10 ` [PATCH 1/4] dt-bindings: soc: Add documentation for the MediaTek SCPSYS unit Sascha Hauer
2015-03-09 20:46   ` Kevin Hilman
2015-03-10  8:02     ` Sascha Hauer

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