diff --git a/drivers/pmdomain/apple/pmgr-pwrstate.c b/drivers/pmdomain/apple/pmgr-pwrstate.c index d6ac0c2cebd9f..13976f269835d 100644 --- a/drivers/pmdomain/apple/pmgr-pwrstate.c +++ b/drivers/pmdomain/apple/pmgr-pwrstate.c @@ -854,12 +854,14 @@ static int apple_pmgr_ps_probe(struct platform_device *pdev) t8132 = of_device_is_compatible(node, "apple,t8132-pmgr-pwrstate"); /* - * On the M4 firmware path some domains are the firmware's, which Linux - * cannot access. The early compatibility adapter supplies the explicit - * status and ownership before population; fail closed if it was not - * enabled. Other firmware keeps the tree's own domain descriptions. + * Some T8132 power states are the firmware's, which Linux cannot + * access. The platform handoff supplies the explicit status and + * ownership of every one before population, on any firmware: fail + * closed on a state it did not mark. A kernel built without the + * handoff keeps the tree's own domain descriptions. */ - if (t8132 && apple_t8132_firmware_path() && !of_property_present(node, "status")) + if (t8132 && IS_ENABLED(CONFIG_APPLE_T8132_PLATFORM_HANDOFF) && + !of_property_present(node, "status")) return dev_err_probe(dev, -ENODEV, "missing M4 power-domain policy\n"); tvm = of_parse_phandle(node, "power-domains", 0); diff --git a/drivers/soc/apple/Kconfig b/drivers/soc/apple/Kconfig index a0c18035d2168..bbde5957ccc08 100644 --- a/drivers/soc/apple/Kconfig +++ b/drivers/soc/apple/Kconfig @@ -285,11 +285,13 @@ config APPLE_T8132_PLATFORM_HANDOFF depends on OF_DYNAMIC && OF_FLATTREE default y if APPLE_PMP help - Supply missing cache and PMC descriptions, and the J713 board's PMGR - availability/ownership policy, for the original loader tree before devices - are populated. Native memory-controller descriptions take precedence. - Required for that legacy tree to keep inaccessible PMGR domains from - probing; kernels using the complete J713 DT do not require this adapter. + Supply missing cache and PMC descriptions for the original J713 + loader tree, and the T8132 PMGR availability/ownership policy for + every T8132 tree, before devices are populated. Native + memory-controller descriptions take precedence. Required to keep + PMGR domains the firmware owns from being switched. With it, a T8132 + power state it could not mark is not registered; without it every + T8132 power state is registered as the tree describes it. config APPLE_T8132_PLATFORM_KUNIT_TEST tristate "KUnit tests for T8132 platform descriptions" if !KUNIT_ALL_TESTS diff --git a/drivers/soc/apple/t8132-platform-handoff.c b/drivers/soc/apple/t8132-platform-handoff.c index 1be411aafd7a1..099996aa68011 100644 --- a/drivers/soc/apple/t8132-platform-handoff.c +++ b/drivers/soc/apple/t8132-platform-handoff.c @@ -1,7 +1,7 @@ // SPDX-License-Identifier: GPL-2.0-only OR MIT /* Supply missing platform descriptions for the original J713 loader ABI, - * which the J715 shares, and the M4 PMGR ownership policy on the qualified - * firmware for every M4 Mac. + * which the J715 shares, and the M4 PMGR ownership policy for every T8132 + * tree: the policy describes the SoC's power manager, whatever the firmware. * Keep the shared m1n1 payload usable by the stable kernel. Hardware control * remains in the ordinary MCC, PMC and CLPC drivers, with one DTS data source. * J713 PMGR ownership/status also comes from its board DTS, before any domain @@ -319,7 +319,7 @@ static int __init t8132_platform_handoff(void) unsigned int added = 0, changed = 0; int root, node, ret; - if (!apple_t8132_firmware_path() || !of_machine_is_compatible("apple,t8132")) + if (!of_machine_is_compatible("apple,t8132")) return 0; if (fdt_check_header(data)) return -EINVAL; diff --git a/include/linux/soc/apple/t8132.h b/include/linux/soc/apple/t8132.h index ec91e8faaa9b5..2a25496d1c6cf 100644 --- a/include/linux/soc/apple/t8132.h +++ b/include/linux/soc/apple/t8132.h @@ -32,9 +32,10 @@ static inline bool apple_t8132_pro_mini_imac(void) } /* - * The OS firmware the M4 PMP, PMGR ownership, display and GPU paths are - * qualified on, as the boot loader reports it: macOS 26.6.2 (iBoot - * mBoot-18000.161.10). These paths depend on the firmware, not the board. + * The OS firmware the M4 PMP, display and GPU paths are qualified on, as + * the boot loader reports it: macOS 26.6.2 (iBoot mBoot-18000.161.10). + * These paths depend on the firmware, not the board. The PMGR ownership + * policy does not: the platform handoff applies it on any firmware. */ static inline bool apple_t8132_qualified_firmware(void) {