soc: apple: Add "PMGR misc" power controls driver
Subsystems (2)
v3 cover soc: apple: Add "PMGR misc" power controls driver
Certain Apple SoCs have additional power state controls that are using a separate "misc" mmio interface. Currently this includes the fabric and memory controllers on pro/max/ultra SoCs.
This series adds a driver to put those in a low power state when the machine enters sleep. The power savings are SoC-dependent and are around 1W.
---
Changes in v3:
- Remove ability to probe only one control, it is not used anyway
- Allow building as module
- Style fixes
- Link to v2: https://patch.msgid.link/[email protected]
Changes in v2:
- Error handling fixes
- Reword binding description
- Link to v1: https://patch.msgid.link/[email protected]
---
Hector Martin (1):
soc: apple: Add driver for Apple PMGR misc controls
Sasha Finkelstein (2):
dt-bindings: soc: apple: Add Apple PMGR misc controls
arm64: dts: apple: Add pmgr-misc nodes to t60xx
Documentation/devicetree/bindings/soc/apple/apple,t6000-pmgr-misc.yaml | 45 +++++++++++++++++++++++++++ MAINTAINERS | 1 + arch/arm64/boot/dts/apple/t600x-die0.dtsi | 7 +++++ arch/arm64/boot/dts/apple/t602x-die0.dtsi | 7 +++++ drivers/soc/apple/Kconfig | 10 ++++++ drivers/soc/apple/Makefile | 2 ++ drivers/soc/apple/apple-pmgr-misc.c | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 253 insertions(+)
---
base-commit: e5d9690657844a2645a518cdf838206f6daf513e
change-id: 20260702-pmgr-misc-ae1cbd5bc2c7
Best regards,
Signature · 1 line
Sasha Finkelstein <[email protected]>
PATCH v3 1/3 dt-bindings: soc: apple: Add Apple PMGR misc controls
Certain Apple SoCs include additional PMGR power states that are controlled via a different "misc" control block. On existing SoCs, this includes the fabric and memory controller state.
--- Documentation/devicetree/bindings/soc/apple/apple,t6000-pmgr-misc.yaml | 45 +++++++++++++++++++++++++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 46 insertions(+)
Documentation/devicetree/bindings/soc/apple/apple,t6000-pmgr-misc.yaml new file +45 -0
@@ -0,0 +1,45 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/soc/apple/apple,t6000-pmgr-misc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Apple SoC PMGR Misc Power States + +maintainers: + - Sasha Finkelstein <[email protected]> + +description: | + Certain Apple SoCs include additional PMGR power states that are controlled + via a different "misc" control block. This includes the fabric and memory + controller states. + +properties: + compatible: + enum: + - apple,t6000-pmgr-misc + - apple,t6020-pmgr-misc + + reg: + maxItems: 2 + + reg-names: + items: + - const: fabric-ps + - const: dcs-ps + +required: + - compatible + - reg + - reg-names + +additionalProperties: false + +examples: + - | + power-management@8e20c000 { + compatible = "apple,t6000-pmgr-misc"; + reg = <0x8e20c000 0x400>, + <0x8e20c800 0x400>; + reg-names = "fabric-ps", "dcs-ps"; + };
MAINTAINERS +1 -0
@@ -2607,6 +2607,7 @@ F: Documentation/devicetree/bindings/power/apple* F: Documentation/devicetree/bindings/power/reset/apple,smc-reboot.yaml F: Documentation/devicetree/bindings/pwm/apple,s5l-fpwm.yaml F: Documentation/devicetree/bindings/rtc/apple,smc-rtc.yaml +F: Documentation/devicetree/bindings/soc/apple/apple,t6000-pmgr-misc.yaml F: Documentation/devicetree/bindings/spi/apple,spi.yaml F: Documentation/devicetree/bindings/spmi/apple,spmi.yaml F: Documentation/devicetree/bindings/usb/apple,dwc3.yaml
Signature · 1 line
2.55.0
PATCH v3 2/3 soc: apple: Add driver for Apple PMGR misc controls
In reply to Sasha FinkelsteinFrom: Hector Martin <[email protected]>
Apple SoCs have PMGR blocks that control a bunch of power-related features. Besides the existing device power state controls (which are very uniform and handled by apple-pmgr-pwrstate), we also need to manage more random registers such as SoC-wide fabric and memory controller power states, which have a different interface.
Add a driver for these kitchen sink controls. Right now it implements fabric and memory controller power state switching on system standby/s2idle, which saves about 1W of power or so on t60xx platforms.
--- drivers/soc/apple/Kconfig | 10 ++++++++ drivers/soc/apple/Makefile | 2 ++ drivers/soc/apple/apple-pmgr-misc.c | 181 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 193 insertions(+)
drivers/soc/apple/Kconfig +10 -0
@@ -16,6 +16,16 @@ config APPLE_MAILBOX Say Y here if you have an Apple SoC. +config APPLE_PMGR_MISC + tristate "Apple SoC PMGR miscellaneous support" + depends on PM + help + The PMGR block in Apple SoCs provides high-level power state + controls for SoC devices. This driver manages miscellaneous + power controls. + + Say 'y' here if you have a Pro/Max/Ultra Apple SoC. + config APPLE_RTKIT tristate "Apple RTKit co-processor IPC protocol" depends on APPLE_MAILBOX
drivers/soc/apple/Makefile +2 -0
@@ -3,6 +3,8 @@ obj-$(CONFIG_APPLE_MAILBOX) += apple-mailbox.o apple-mailbox-y = mailbox.o +obj-$(CONFIG_APPLE_PMGR_MISC) += apple-pmgr-misc.o + obj-$(CONFIG_APPLE_RTKIT) += apple-rtkit.o apple-rtkit-y = rtkit.o rtkit-crashlog.o
drivers/soc/apple/apple-pmgr-misc.c new file +181 -0
181 lines not on this page · raw message
Signature · 1 line
2.55.0
PATCH v3 3/3 arm64: dts: apple: Add pmgr-misc nodes to t60xx
In reply to Sasha FinkelsteinAdds the PMGR misc control nodes for M1/2 Pro/Max/Ultra series devices.
--- arch/arm64/boot/dts/apple/t600x-die0.dtsi | 7 +++++++ arch/arm64/boot/dts/apple/t602x-die0.dtsi | 7 +++++++ 2 files changed, 14 insertions(+)
arch/arm64/boot/dts/apple/t600x-die0.dtsi +7 -0
@@ -24,6 +24,13 @@ aic: interrupt-controller@28e100000 { power-domains = <&ps_aic>; }; + pmgr_misc: power-management@28e20c000 { + compatible = "apple,t6000-pmgr-misc"; + reg = <0x2 0x8e20c000 0 0x400>, + <0x2 0x8e20c800 0 0x400>; + reg-names = "fabric-ps", "dcs-ps"; + }; + smc: smc@290400000 { compatible = "apple,t6000-smc", "apple,smc"; reg = <0x2 0x90400000 0x0 0x4000>,
arch/arm64/boot/dts/apple/t602x-die0.dtsi +7 -0
@@ -23,6 +23,13 @@ aic: interrupt-controller@28e100000 { power-domains = <&ps_aic>; }; + pmgr_misc: power-management@28e20c000 { + compatible = "apple,t6020-pmgr-misc"; + reg = <0x2 0x8e20c000 0 0x400>, + <0x2 0x8e20c400 0 0x400>; + reg-names = "fabric-ps", "dcs-ps"; + }; + nub_spmi0: spmi@29e114000 { compatible = "apple,t6020-spmi", "apple,t8103-spmi"; reg = <0x2 0x9e114000 0x0 0x100>;
Signature · 1 line
2.55.0
Quoted 37 lines · Sasha Finkelstein
Certain Apple SoCs have additional power state controls that are using a separate "misc" mmio interface. Currently this includes the fabric and memory controllers on pro/max/ultra SoCs.
This series adds a driver to put those in a low power state when the machine enters sleep. The power savings are SoC-dependent and are around 1W.
Signed-off-by Sasha Finkelstein <[email protected]>---
Changes in v3:
- Remove ability to probe only one control, it is not used anyway
- Allow building as module
- Style fixes
- Link to v2: https://patch.msgid.link/[email protected]Changes in v2:
- Error handling fixes
- Reword binding description
- Link to v1: https://patch.msgid.link/[email protected]---
Hector Martin (1):
soc: apple: Add driver for Apple PMGR misc controlsSasha Finkelstein (2):
dt-bindings: soc: apple: Add Apple PMGR misc controls
arm64: dts: apple: Add pmgr-misc nodes to t60xxDocumentation/devicetree/bindings/soc/apple/apple,t6000-pmgr-misc.yaml | 45 +++++++++++++++++++++++++++ MAINTAINERS | 1 + arch/arm64/boot/dts/apple/t600x-die0.dtsi | 7 +++++ arch/arm64/boot/dts/apple/t602x-die0.dtsi | 7 +++++ drivers/soc/apple/Kconfig | 10 ++++++ drivers/soc/apple/Makefile | 2 ++ drivers/soc/apple/apple-pmgr-misc.c | 181 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 7 files changed, 253 insertions(+)
Quoted 7 lines
---
base-commit:e5d9690657844a2645a518cdf838206f6daf513e
change-id: 20260702-pmgr-misc-ae1cbd5bc2c7Best regards,
Signature · 1 line
Sasha Finkelstein <[email protected]>
Seems fine.
Quoted 11 lines · Sasha Finkelstein
Certain Apple SoCs have additional power state controls that are using a separate "misc" mmio interface. Currently this includes the fabric and memory controllers on pro/max/ultra SoCs.
This series adds a driver to put those in a low power state when the machine enters sleep. The power savings are SoC-dependent and are around 1W.
Signed-off-by Sasha Finkelstein <[email protected]>---
Thanks, applied! First two patches to apple-soc/drivers-7.3 and the dts one to apple-soc/dt-7.3.
Best,
Sven