devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2] Mediatek SCPSYS power domain support
@ 2015-05-11 19:23 Sascha Hauer
       [not found] ` <1431372206-1237-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
                   ` (3 more replies)
  0 siblings, 4 replies; 26+ messages in thread
From: Sascha Hauer @ 2015-05-11 19:23 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ, 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


The following changes since commit 5ebe6afaf0057ac3eaeb98defd5456894b446d22:

  Linux 4.1-rc2 (2015-05-03 19:22:23 -0700)

are available in the git repository at:

  git://git.pengutronix.de/git/sha/linux-2.6.git tags/v4.1-soc-mediatek-scpsys-v2

for you to fetch changes up to 455a45faa25fad4d89b8296d760048f243b72c7d:

  ARM64: MediaTek MT8173: Add SCPSYS device node (2015-05-11 14:32:59 +0200)

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

 .../devicetree/bindings/soc/mediatek/scpsys.txt    |  34 ++
 arch/arm64/Kconfig                                 |   1 +
 arch/arm64/boot/dts/mediatek/mt8173.dtsi           |  12 +
 drivers/soc/mediatek/Kconfig                       |  17 +
 drivers/soc/mediatek/Makefile                      |   2 +
 drivers/soc/mediatek/mtk-infracfg.c                |  80 ++++
 drivers/soc/mediatek/mtk-scpsys.c                  | 416 +++++++++++++++++++++
 include/dt-bindings/power/mt8173-power.h           |  15 +
 8 files changed, 577 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
 create mode 100644 drivers/soc/mediatek/mtk-infracfg.c
 create mode 100644 drivers/soc/mediatek/mtk-scpsys.c
 create mode 100644 include/dt-bindings/power/mt8173-power.h
--
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] 26+ messages in thread
* [PATCH v3] Mediatek SCPSYS power domain support
@ 2015-05-20 14:18 Sascha Hauer
       [not found] ` <1432131540-2523-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Sascha Hauer @ 2015-05-20 14:18 UTC (permalink / raw)
  To: linux-arm-kernel-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r
  Cc: devicetree-u79uwXL29TY76Z2rM5mHXA, Kevin Hilman,
	linux-kernel-u79uwXL29TY76Z2rM5mHXA,
	linux-mediatek-IAPFreCvJWM7uuMidbF8XUB+6BGkLq7r,
	kernel-bIcnvbaLZ9MEGnE8C9+IrQ, 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 v2:
- Add missing include/linux/soc/mediatek/infracfg.h file
- rename VDE -> VDEC, VEN -> VENC, DIS -> DISP and VEN2 -> VENC_LT
  to make the abbreviatons more clear
- make of_device_id const
- remove double loop
- fix hunk in wrong patch
- Fix order of domains. Some domains depend on other domains. Reorder
  the domains so that all domains can be turned on in order when
  CONFIG_PM is disabled. Also fixes earlier mixups in the domain array
- Do not allow compilation as modules. pm_domains cannot be removed, so
  compilation as module is not that useful
- reorder Kconfig items alphabetically
- reorder #includes alphabetically
- select MTK_INFRACFG instead of depending on it
- Use only two clocks as dependencies for the domains. The previously
  used 5 clocks are not necessary as confirmed by the hardware designers
- use 'genpd' as variable name for struct generic_pm_domain like done in
  other pm code

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

--
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] 26+ messages in thread
* [PATCH v4] Mediatek SCPSYS power domain support
@ 2015-06-09  8:46 Sascha Hauer
       [not found] ` <1433839623-10804-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
  0 siblings, 1 reply; 26+ messages in thread
From: Sascha Hauer @ 2015-06-09  8:46 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.

Patch 5/5 currently has a dependency on the patch adding the clocks
to the MT8173 dtsi file, the rest should be mergable as is.

Please review, any input welcome.

Sascha

Changes since v3:
- Drop unnecessary MODULE_* macros for builtin code
- introduce scpsys_domain_is_on() function instead of open coding this
  twice
- Drop unnecessary initialisation of power_o[ff|n]_latencies. The kernel
  updates them with the measured values anyway.

changes since v2:
- Add missing include/linux/soc/mediatek/infracfg.h file
- rename VDE -> VDEC, VEN -> VENC, DIS -> DISP and VEN2 -> VENC_LT
  to make the abbreviatons more clear
- make of_device_id const
- remove double loop
- fix hunk in wrong patch
- Fix order of domains. Some domains depend on other domains. Reorder
  the domains so that all domains can be turned on in order when
  CONFIG_PM is disabled. Also fixes earlier mixups in the domain array
- Do not allow compilation as modules. pm_domains cannot be removed, so
  compilation as module is not that useful
- reorder Kconfig items alphabetically
- reorder #includes alphabetically
- select MTK_INFRACFG instead of depending on it
- Use only two clocks as dependencies for the domains. The previously
  used 5 clocks are not necessary as confirmed by the hardware designers
- use 'genpd' as variable name for struct generic_pm_domain like done in
  other pm code

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

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

 .../devicetree/bindings/soc/mediatek/scpsys.txt    |  34 ++
 arch/arm64/Kconfig                                 |   1 +
 arch/arm64/boot/dts/mediatek/mt8173.dtsi           |  10 +
 drivers/soc/mediatek/Kconfig                       |  18 +
 drivers/soc/mediatek/Makefile                      |   2 +
 drivers/soc/mediatek/mtk-infracfg.c                |  91 ++++
 drivers/soc/mediatek/mtk-scpsys.c                  | 490 +++++++++++++++++++++
 include/dt-bindings/power/mt8173-power.h           |  15 +
 include/linux/soc/mediatek/infracfg.h              |  26 ++
 9 files changed, 687 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/soc/mediatek/scpsys.txt
 create mode 100644 drivers/soc/mediatek/mtk-infracfg.c
 create mode 100644 drivers/soc/mediatek/mtk-scpsys.c
 create mode 100644 include/dt-bindings/power/mt8173-power.h
 create mode 100644 include/linux/soc/mediatek/infracfg.h

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

end of thread, other threads:[~2015-06-09  8:46 UTC | newest]

Thread overview: 26+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-05-11 19:23 [PATCH v2] Mediatek SCPSYS power domain support Sascha Hauer
     [not found] ` <1431372206-1237-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-11 19:23   ` [PATCH 1/5] soc: mediatek: Add infracfg misc driver support Sascha Hauer
2015-05-12  7:12     ` Sascha Hauer
     [not found]     ` <1431372206-1237-2-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-12  9:24       ` Paul Bolle
2015-05-12 13:26         ` Sascha Hauer
2015-05-15 14:17     ` Daniel Kurtz
     [not found]       ` <CAGS+omADXpnBnLvuH+xNmatL+89kLBELz6KqMFid7SOx=veiAg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-18  8:16         ` Sascha Hauer
2015-05-19  6:54           ` Daniel Kurtz
2015-05-19  7:45             ` Sascha Hauer
     [not found]               ` <20150519074535.GY6325-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-19 10:39                 ` Daniel Kurtz
2015-05-26 23:12     ` Kevin Hilman
     [not found]       ` <7hfv6jorw9.fsf-1D3HCaltpLuhEniVeURVKkEOCMrvLtNR@public.gmane.org>
2015-05-27  7:33         ` Sascha Hauer
2015-05-11 19:23   ` [PATCH 2/5] dt-bindings: soc: Add documentation for the MediaTek SCPSYS unit Sascha Hauer
2015-05-11 19:23 ` [PATCH 3/5] soc: Mediatek: Add SCPSYS power domain driver Sascha Hauer
2015-05-12 11:52   ` Matthias Brugger
2015-05-12 13:47     ` Sascha Hauer
2015-05-15 14:17   ` Daniel Kurtz
     [not found]     ` <CAGS+omDJ-7+L_46vwMyewHMkMNj69odhp=JY5i6Xj3-Loe6UNA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-05-19 10:30       ` Sascha Hauer
2015-05-19 11:06         ` Matthias Brugger
2015-05-20 14:03           ` Sascha Hauer
2015-05-20 16:06             ` Matthias Brugger
2015-05-11 19:23 ` [PATCH 4/5] ARM64: MediaTek: Add generic pm domain support Sascha Hauer
2015-05-11 19:23 ` [PATCH 5/5] ARM64: MediaTek MT8173: Add SCPSYS device node Sascha Hauer
  -- strict thread matches above, loose matches on Subject: below --
2015-05-20 14:18 [PATCH v3] Mediatek SCPSYS power domain support Sascha Hauer
     [not found] ` <1432131540-2523-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-20 14:18   ` [PATCH 1/5] soc: mediatek: Add infracfg misc driver support Sascha Hauer
     [not found]     ` <1432131540-2523-2-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-05-21  8:09       ` Paul Bolle
2015-06-09  8:46 [PATCH v4] Mediatek SCPSYS power domain support Sascha Hauer
     [not found] ` <1433839623-10804-1-git-send-email-s.hauer-bIcnvbaLZ9MEGnE8C9+IrQ@public.gmane.org>
2015-06-09  8:46   ` [PATCH 1/5] soc: mediatek: Add infracfg misc driver support 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).