summaryrefslogtreecommitdiff
path: root/drivers/pmdomain
AgeCommit message (Collapse)Author
3 daysMerge branch 'driver-core-next' of ↵Mark Brown
https://git.kernel.org/pub/scm/linux/kernel/git/driver-core/driver-core.git # Conflicts: # include/linux/platform_device.h
12 dayspmdomain: imx: Make IMX8M/IMX9 BLK_CTRL tristateZhipeng Wang
Convert IMX8M_BLK_CTRL and IMX9_BLK_CTRL from bool to tristate to allow building as loadable modules. This change is required to support Android devices using Generic Kernel Image (GKI) kernels, where SoC-specific drivers must be built as loadable modules rather than built into the core kernel image. For i.MX8M and i.MX9 devices running Android with GKI kernels, the BLK_CTRL drivers therefore need to be loadable. Without tristate support, power domains cannot be initialized correctly, making these systems non-functional under GKI. Add prompt strings to make these options visible and configurable in menuconfig, keeping them enabled by default on appropriate platforms. Also remove the IMX_GPCV2_PM_DOMAINS dependency from IMX9_BLK_CTRL. This dependency was incorrect from the beginning because i.MX93 uses a different power domain architecture compared to i.MX8M series: - i.MX8M uses GPCv2 (General Power Controller v2) for power domain management, hence IMX8M_BLK_CTRL correctly depends on it. - i.MX93 uses BLK_CTRL directly without GPCv2. The hardware doesn't have GPCv2 at all. Signed-off-by: Zhipeng Wang <zhipeng.wang_1@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
13 dayspmdomain: tegra: Add support for multi-socket platformsJon Hunter
On multi-socket platforms each socket has its own BPMP that is registered with the kernel. For such platforms prefix the NUMA ID for each socket to the BPMP powergate name to ensure there is a unique name for each power-domain. Note that we only add the NUMA ID for powergates that return a valid name because an invalid name indicates that the powergate ID is not supported. Note the check for the NULL string is moved into the function tegra_bpmp_powergate_get_name(), because in the multi-socket case we must only add the prefix if we receive a valid name. A NULL string indicates that there is no valid powergate associated with the ID that is being queried. Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
13 dayspmdomain: bcm: bcm2835-power: Raise ASB poll timeout to 100usMaíra Canal
Commit 18605b1b936b ("pmdomain: bcm: bcm2835-power: Increase ASB control timeout") raised the ASB handshake polling budget from 1us to 5us. Surveying the pmdomain subsystem, 5us is still one of the smallest polling budgets by a wide margin. Comparable handshakes in other drivers use: - 100us : starfive jh71xx-pmu, apple pmgr-pwrstate - 1ms : renesas rcar-sysc, rmobile-sysc (power-on) - 10ms : renesas rcar-gen4-sysc, sunxi sun55i-pck600 - 1s : mediatek mtk-pm-domains, mtk-scpsys Raise the BCM2835 timeout to 100us, matching analogous drivers. 100us is still negligible relative to a power-domain transition and gives the V3D master ASB substantially more headroom to drain under heavy workloads, assuring us that the timeout is enough for any scenario. Signed-off-by: Maíra Canal <mcanal@igalia.com> Acked-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
13 dayspmdomain: mediatek: Add support for MT8196 HFRP DirectCTL domainsAngeloGioacchino Del Regno
Add support for the power domains provided by the HFRPSYS Power Controller of the MT8196 SoC. Those control power to the eDP and DP Transmitter IPs. Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
13 dayspmdomain: mediatek: Add support for Direct CTL simple power sequenceAngeloGioacchino Del Regno
Some new SoCs like MT8196, MT6991, and others, have got one additional power controller (usually in the HFRP Multimedia block) which needs a simplified power on/off sequence while using Direct Control strategy. Domains using the "simple power sequence" are not backed by the RTFF hardware, have no Bus Protection mechanism, lacks the ISO, PWR_ON, PWR_ON_2ND bits, and therefore get enabled automatically after getting out of reset. This simple power sequence is then a subset of the full one as only needs the enablement of the specific power domain's clock input and reset (where, again, after getting out of reset, the ISO and PWR_ON bits are automatically internally getting flipped) to enable or disable (power on or off). Moreover, the simple power sequence power domains guarantee that they always get enabled/disabled after executing the relevant power sequence (on/off) so, differently from the others, there is also no need to poll for a PWR_ACK. Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
13 dayspmdomain: mediatek: Respect PD relationships during error cleanupAngeloGioacchino Del Regno
In case any probe error occurs (usually, a probe deferral) the power domains shall be cleaned up while respecting their child to parent relationship, or the system may freeze. In order to do that without any memory footprint impacts after the fact, allocate a temporary array in the probe function and use it to store the indices of the added power domains in the correct order. This will be used in the error cleanup path and will be freed at the end regardless of the probe status as, when the probing succeeds, the genpd API takes care of unregistering all PDs in the correct order anyway. Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
13 dayspmdomain: Merge branch fixes into nextUlf Hansson
Merge the pmdomain fixes for v7.2-rc[n] into the next branch, to allow them to get tested together with the pmdomain changes that are targeted for the next release. Signed-off-by: Ulf Hansson <ulfh@kernel.org>
13 dayspmdomain: mediatek: Fix possible nullptr KP in HWV cleanup/on-checkAngeloGioacchino Del Regno
Should probe fail for HW_VOTER type power domains, this driver was unconditionally trying to perform cleanup for DIRECT_CTL domains, but only after checking if the target domain is powered on... with the DIRECT_CTL scpsys_domain_is_on() code again. And there's more: the scpsys_domain_is_on() function is also being unconditionally used in the probe path, for any power domain that has flag MTK_SCPD_KEEP_DEFAULT_OFF! This bug was never experienced by anyone because the HWV domains never failed probe, and because none of those is declared with the aforementioned flag - but it's still something critical. In order to fix this, add a check for MTCMOS Type and, based on that, call the correct functions for an "is on" check, and also do the same for the cleanup path, calling the correct functions for the "power off" action. For the latter, since there's a call to pm_genpd_remove() right before calling power_off, be cautious and add a variation of the power off functions (with a _internal suffix) for those to get a pointer to scpsys_domain instead of one to generic_pm_domain as, even if that's still working, this is way too much fragile and would break at some point. Fixes: 88914db077b6 ("pmdomain: mediatek: Add support for Hardware Voter power domains") Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Cc: stable@vger.kernel.org Signed-off-by: Ulf Hansson <ulfh@kernel.org>
13 dayspmdomain: qcom: rpmhpd: Skip retention by defaultMike Tipton
Retention is very rarely an operational corner. In the majority of cases, HW cannot operate properly at Retention levels and so the minimum operational level when enabling a rail is the first corner above Retention. A small subset of always-on use cases can operate at Retention, but those aren't controlled from HLOS. Currently, we allow Retention by default and only disallow it special cases. But this leaves us open to various failures when the PD is enabled without first being voted to an OPP above Retention. Such as when a child GDSC PD requests to enable its parent RPMh PD. In this case, the GDSC would get stuck powering on. Newer chips have started supporting Retention on rails that didn't previously (such as for MMCX). Instead of adding more special cases to skip Retention on MMCX, start skipping Retention by default since it's almost never desired from an HLOS perspective. Signed-off-by: Mike Tipton <mike.tipton@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
14 dayspmdomain: bcm: bcm2835: handle genpd provider registration errorsPengpeng Hou
bcm2835_power_probe() initializes all power domains and then registers the onecell genpd provider, but ignores of_genpd_add_provider_onecell() failures. Probe can therefore return success even though no provider was published. Check the provider registration return value and jump to the existing cleanup path on failure. Fixes: 670c672608a1 ("soc: bcm: bcm2835-pm: Add support for power domains under a new binding.") Signed-off-by: Pengpeng Hou <pengpeng@iscas.ac.cn> Reviewed-by: Stefan Wahren <wahrenst@gmx.net> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
14 dayspmdomain: arm: Grammar s/may needed/may be needed/Geert Uytterhoeven
Fix grammar in the help text for the ARM_SCMI_POWER_DOMAIN symbol. Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be> Acked-by: Sudeep Holla <sudeep.holla@kernel.org> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-07-10pmdomain: imx: use platform_device_set_of_node()Bartosz Golaszewski
Ahead of reworking the reference counting logic for platform devices, encapsulate the assignment of the OF node for dynamically allocated platform devices with the provided helper. Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Link: https://patch.msgid.link/20260706-pdev-fwnode-ref-v3-11-1ff028e33779@oss.qualcomm.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2026-07-08pmdomain: Merge branch fixes into nextUlf Hansson
Merge the pmdomain fixes for v7.2-rc[n] into the next branch, to allow them to get tested together with the pmdomain changes that are targeted for the next release. Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-07-08pmdomain: qcom: rpmhpd: Sort table entries by index nameKrzysztof Kozlowski
List of power domains in arrays of 'struct rpmhpd' are sorted according to index name (the define, e.g. RPMHPD_MX), not by actual numerical value. Fix few sorting mistakes, so comparing the tables between different devices will be easier. No functional impact - same binary. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-07-08pmdomain: imx: Fix i.MX8MP VC8000E power up sequencePeng Fan
Per errata[1]: ERR050531: VPU_NOC power down handshake may hang during VC8000E/VPUMIX power up/down cycling. Description: VC8000E reset de-assertion edge and AXI clock may have a timing issue. Workaround: Set bit2 (vc8000e_clk_en) of BLK_CLK_EN_CSR to 0 to gate off both AXI clock and VC8000E clock sent to VC8000E and AXI clock sent to VPU_NOC m_v_2 interface during VC8000E power up(VC8000E reset is de-asserted by HW) Add a bool variable is_errata_err050531 in 'struct imx8m_blk_ctrl_domain_data' to represent whether the workaround is needed. If is_errata_err050531 is true, first clear the clk before powering up gpc, then enable the clk after powering up gpc. [1] https://www.nxp.com/webapp/Download?colCode=IMX8MP_1P33A Fixes: a1a5f15f7f6cb ("soc: imx: imx8m-blk-ctrl: add i.MX8MP VPU blk ctrl") Cc: stable@vger.kernel.org Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-07-08pmdomain: imx: Fix i.MX8MP power notifierPeng Fan
Using imx8mm_vpu_power_notifier() for i.MX8MP is wrong, as it ungates the VPU clocks to provide the ADB clock, which is necessary on i.MX8MM, but on i.MX8MP there is a separate gate (bit 3) for the NoC. So add imx8mp_vpu_power_notifier() for i.MX8MP. Fixes: a1a5f15f7f6cb ("soc: imx: imx8m-blk-ctrl: add i.MX8MP VPU blk ctrl") Cc: stable@vger.kernel.org Reviewed-by: Frank Li <Frank.Li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-07-08pmdomain: imx93-blk-ctrl: Extract PHY as shared domain for DSI/CSIGuoniu Zhou
The MIPI DSI and CSI domains share control bits for clock and reset, which can lead to incorrect behavior if one domain disables the shared resource while the other is still active. To fix the issue, introduce a shared MIPI PHY power domain to own the common resources and make DSI and CSI its subdomains. This ensures the shared bits are properly managed and not disabled while still in use. Fixes: e9aa77d413c9 ("soc: imx: add i.MX93 media blk ctrl driver") Cc: stable@vger.kernel.org Signed-off-by: Guoniu Zhou <guoniu.zhou@oss.nxp.com> Reviewed-by: Frank Li <Frank.Li@nxp.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-07-03Replace <linux/mod_devicetable.h> by more specific <linux/device-id/*.h> (c ↵Uwe Kleine-König (The Capable Hub)
files) Replace the #include of <linux/mod_devicetable.h> by the more specific <linux/device-id/*.h> where applicable. For most cases the include can be dropped completely, only a few drivers need one or two headers added. Acked-by: Danilo Krummrich <dakr@kernel.org> Acked-by: Takashi Sakamoto <o-takashi@sakamocchi.jp> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Link: https://patch.msgid.link/1a3f2007c5c5dcf555c09a4035ce3ae8ef1b6c49.1782808461.git.u.kleine-koenig@baylibre.com Signed-off-by: Uwe Kleine-König (The Capable Hub) <u.kleine-koenig@baylibre.com>
2026-06-15pmdomain: core: fix unused variable warning with !PM_GENERIC_DOMAINS_OFJohan Hovold
The genpd provider bus is really only used when CONFIG_PM_GENERIC_DOMAINS_OF is enabled, and since the recent deferred initialisation of domain parent devices, the root device pointer is otherwise unused. Fix the unused variable warning by moving the definition of the root device pointer inside the corresponding ifdef. Fixes: 92b69eff8012 ("pmdomain: core: fix early domain registration") Reported-by: kernel test robot <lkp@intel.com> Closes: https://lore.kernel.org/oe-kbuild-all/202606111746.kAxaAbwg-lkp@intel.com/ Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-06-11pmdomain: core: fix early domain registrationJohan Hovold
A recent change switching to a dynamically allocated root device broke platforms like rcar-sysc that registers PM domains before the PM domain bus itself has been registered (cf. commit c5ae5a0c6112 ("pmdomain: renesas: rcar-sysc: Add genpd OF provider at postcore_initcall")). Defer the assignment of the parent root device until the domain is registered with driver core to avoid it being left unset. Fixes: a96e40f4afdc ("pmdomain: core: switch to dynamic root device") Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Link: https://lore.kernel.org/r/CAMuHMdUHabMGJyJ7e7yp7DLC+JJc9k6NK9p4anj2wRKNuwZUng@mail.gmail.com Signed-off-by: Johan Hovold <johan@kernel.org> Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-06-03pmdomain: Merge branch fixes into nextUlf Hansson
Merge the pmdomain fixes for v7.1-rc[n] into the next branch, to allow them to get tested together with the pmdomain changes that are targeted for the next release. Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-06-03pmdomain: mediatek: mfg: move __packed after struct name to fix kernel-docRosen Penev
The kernel-doc parser cannot parse 'struct __packed mtk_mfg_opp_entry {'. Move __packed to the closing brace, which is the more common kernel style. Assisted-by: Opencode:Big-pickle Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-06-03pmdomain: qcom: rpmpd: Add Shikra RPM Power DomainsRakesh Kota
Add RPM power domain support for Shikra, reusing SM6125 power domains with RPM_SMD_LEVEL_TURBO_NO_CPR as the max state. Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Rakesh Kota <rakesh.kota@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-06-03pmdomain: qcom: rpmhpd: Add power domains for Nord SoCKamal Wadhwa
Add RPMh power domains required for Nord SoC. This includes new definitions for power domains supplying GFX1 and NSP3 subsystem. Co-developed-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Kamal Wadhwa <kamal.wadhwa@oss.qualcomm.com> Signed-off-by: Shawn Guo <shengchao.guo@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-06-03pmdomain: imx: fix OF node refcountBartosz Golaszewski
for_each_child_of_node_scoped() decrements the reference count of the nod after each iteration. Assigning it without incrementing the refcount to a dynamically allocated platform device will result in a double put in platform_device_release(). Add the missing call to of_node_get(). Cc: stable@vger.kernel.org Fixes: 3e4d109ee8fc ("pmdomain: imx: gpc: Simplify with scoped for each OF child loop") Signed-off-by: Bartosz Golaszewski <bartosz.golaszewski@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-06-03pmdomain: ti_sci: add wakeup constraint to parent devices of wakeup sourceKendall Willis
Set wakeup constraint for any device in a wakeup path. All parent devices of a wakeup device should not be turned off during suspend. This ensures the wakeup device is kept on while the system is suspended. Cc: stable@vger.kernel.org Fixes: 9d8aa0dd3be4 ("pmdomain: ti_sci: add wakeup constraint management") Reported-by: Vitor Soares <vitor.soares@toradex.com> Closes: https://lore.kernel.org/linux-pm/c0fe43a2339c802e9ce5900092cd530a2ba17a6b.camel@gmail.com/ Signed-off-by: Kendall Willis <k-willis@ti.com> Reviewed-by: Sebin Francis <sebin.francis@ti.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-06-03pmdomain: sunxi: support power domain flags for pck600Yuanshen Cao
While bringing up the PowerVR GPU on the A733 (Radxa Cubie A7Z), we found that one of the GPU power domains must be configured as "always on." While the Radxa BSP device tree leaves the GPU power domain nodes commented out, the GPU driver code contains traces indicating an "always on" requirement [1]. Currently, sunxi_pck600_desc only supports specifying pd_names. This patch introduces sunxi_pck600_pd_desc, which stores both the name and its associated flags. This also (more or less) aligns the implementation with the existing sun50i PPU handling of always-on domains. With this change, individual power domains can now be configured more granularly. In particular, the GPU_CORE domain in sun60i_a733_pck600_pds can now be explicitly marked with GENPD_FLAG_ALWAYS_ON. The patch was tested on the Radxa Cubie A7Z, where the GPU now functions as expected. Thanks to Icenowy for her support and expertise on sunxi and PowerVR, and thanks to Mikhail for identifying this exact cause of the GPU bring-up issue. [1] https://github.com/radxa/allwinner-bsp/blob/cubie-aiot-v1.4.6/modules/gpu/img-bxm/linux/rogue_km/services/system/rogue/rgx_sunxi/sunxi_platform.c#L62 Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-06-03pmdomain: core: switch to dynamic root deviceJohan Hovold
Driver core expects devices to be dynamically allocated and will, for example, complain loudly if a device that lacks a release function is ever freed. Use root_device_register() to allocate and register the root device instead of open coding using a static device. Signed-off-by: Johan Hovold <johan@kernel.org> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-06-03pmdomain: qcom: Unify user-visible "Qualcomm" nameKrzysztof Kozlowski
Various names for Qualcomm as a company are used in user-visible config options: QCOM, Qualcomm and Qualcomm Technologies. Switch to unified "Qualcomm" so it will be easier for users to identify the options when for example running menuconfig. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulfh@kernel.org>
2026-05-11pmdomain: arm_scmi: add support for domain hierarchiesKevin Hilman (TI)
After primary SCMI pmdomain is created, use new of_genpd helper which checks for child domain mappings defined in power-domains-child-ids. Also remove any child domain mappings when SCMI domain is removed. Signed-off-by: Kevin Hilman (TI) <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-05-11pmdomain: core: add support for power-domains-child-idsKevin Hilman (TI)
Currently, PM domains can only support hierarchy for simple providers (e.g. ones with #power-domain-cells = 0). Add support for oncell providers as well by adding a new property `power-domains-child-ids` to describe the parent/child relationship. For example, an SCMI PM domain provider has multiple domains, each of which might be a child of diffeent parent domains. In this example, the parent domains are MAIN_PD and WKUP_PD: scmi_pds: protocol@11 { reg = <0x11>; #power-domain-cells = <1>; power-domains = <&MAIN_PD>, <&WKUP_PD>; power-domains-child-ids = <15>, <19>; }; With this example using the new property, SCMI PM domain 15 becomes a child domain of MAIN_PD, and SCMI domain 19 becomes a child domain of WKUP_PD. To support this feature, add two new core functions - of_genpd_add_child_ids() - of_genpd_remove_child_ids() which can be called by pmdomain providers to add/remove child domains if they support the new property power-domains-child-ids. The add function is "all or nothing". If it cannot add all of the child domains in the list, it will unwind any additions already made and report a failure. Signed-off-by: Kevin Hilman (TI) <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-27pmdomain: mediatek: fix use-after-free in scpsys_get_bus_protection_legacy()Wentao Liang
In scpsys_get_bus_protection_legacy(), of_find_node_with_property() returns a device node with its reference count incremented. The function then calls of_node_put(node) before checking whether syscon_regmap_lookup_by_phandle() returns an error. If an error occurs, dev_err_probe() dereferences the node pointer to print diagnostic information, but the node memory may have already been freed due to the earlier of_node_put(), leading to a use-after-free vulnerability. Fix this by moving the of_node_put() call after the error check, ensuring the node is still valid when accessed in the error path. Fixes: c29345fa5f66 ("pmdomain: mediatek: Refactor bus protection regmaps retrieval") Cc: stable@vger.kernel.org Signed-off-by: Wentao Liang <vulab@iscas.ac.cn> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-27pmdomain: core: Fix detach procedure for virtual devices in genpdUlf Hansson
If a device is attached to a PM domain through genpd_dev_pm_attach_by_id(), genpd calls pm_runtime_enable() for the corresponding virtual device that it registers. While this avoids boilerplate code in drivers, there is no corresponding call to pm_runtime_disable() in genpd_dev_pm_detach(). This means these virtual devices are typically detached from its genpd, while runtime PM remains enabled for them, which is not how things are designed to work. In worst cases it may lead to critical errors, like a NULL pointer dereference bug in genpd_runtime_suspend(), which was recently reported. For another case, we may end up keeping an unnecessary vote for a performance state for the device. To fix these problems, let's add this missing call to pm_runtime_disable() in genpd_dev_pm_detach(). Reported-by: Geert Uytterhoeven <geert@linux-m68k.org> Closes: https://lore.kernel.org/all/CAMuHMdWapT40hV3c+CSBqFOW05aWcV1a6v_NiJYgoYi0i9_PDQ@mail.gmail.com/ Fixes: 3c095f32a92b ("PM / Domains: Add support for multi PM domains per device to genpd") Cc: stable@vger.kernel.org Tested-by: Geert Uytterhoeven <geert+renesas@glider.be> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-08pmdomain: qcom: rpmhpd: Add power domains for Hawi SoCFenglin Wu
Add the RPMh power domains required for the Hawi SoC. This includes new definitions for domains supplying specific hardware components: - DCX: supplies VDD_DISP - GBX: supplies VDD_GFX_BX Reviewed-by: Taniya Das <taniya.das@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Fenglin Wu <fenglin.wu@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-08pmdomain: qcom: cpr: add COMPILE_TEST supportRosen Penev
Allows the buildbots to build the driver on other platforms. There's nothing special arch specific thing going on here. Signed-off-by: Rosen Penev <rosenp@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: Merge branch fixes into nextUlf Hansson
Merge the pmdomain fixes for v7.0-rc[n] into the next branch, to allow them to get tested together with the pmdomain changes that are targeted for the next release. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: qcom: cpr: simplify main allocationRosen Penev
Remove kcalloc by using a flexible array member to combine allocations. Signed-off-by: Rosen Penev <rosenp@gmail.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: bcm: bcm2835-power: Replace open-coded polling with ↵Maíra Canal
readl_poll_timeout_atomic() Replace hand-rolled ktime_get_ns()/cpu_relax() polling loops with readl_poll_timeout_atomic() for the power-on (POWOK), and memory repair (MRDONE) waits. No functional change intended. Signed-off-by: Maíra Canal <mcanal@igalia.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: sunxi: Add support for A733 to Allwinner PCK600 driverYuanshen Cao
The Allwinner A733 PCK600, similar to A523 PCK600, is likely a customized version of ARM PCK-600 power controller. It shares the same BSP driver with A523. According to the BSP provided by Radxa, unlike A523, it doesn't require reset, as well as a different pair of delay values. Make reset optional in the sunxi pck600 driver and add support for A733. Signed-off-by: Yuanshen Cao <alex.caoys@gmail.com> Reviewed-by: Chen-Yu Tsai <wens@kernel.org> # matched against BSP driver Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: qcom: rpmhpd: Add Eliza RPMh Power DomainsAbel Vesa
Add RPMh Power Domains support for the Eliza platform. The list of power domains is taken from downstream. Even though the cmd-db does list MMCX and MXC, they are not used, so they should not be describe. Reviewed-by: Taniya Das <taniya.das@oss.qualcomm.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> Signed-off-by: Abel Vesa <abel.vesa@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: arm: Add print after a successful probe for SCMI power domainsUlf Hansson
It can be discussed how useful a print is after a successful probe. In the SCMI power domain case it's seems valuable, as it let us inform about the number of initialized power domains too, which is fetched from firmware. Therefore, let's add a print about this, which also aligns with the behaviour of the SCMI perf domain driver. Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org> Reviewed-by: Cristian Marussi <cristian.marussi@arm.com> Acked-by: Sudeep Holla <sudeep.holla@kernel.org>
2026-04-01pmdomain: rockchip: quiet regulator error on -EPROBE_DEFERChris Morgan
Change the dev_err() to dev_err_probe() under rockchip_pd_power_on() to prevent errors early in the boot process when the requested regulator is not yet available. This converts errors like the following to debug messages: rockchip-pm-domain fd8d8000.power-management:power-controller: Failed to enable supply: -517 Signed-off-by: Chris Morgan <macromorgan@hotmail.com> Tested-by: Diederik de Haas <diederik@cknow-tech.com> Reviewed-by: Anand Moon <linux.amoon@gmail.com> Reviewed-by: Shawn Lin <shawn.lin@rock-chips.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: mediatek: Add power domain driver for MT8189 SoCIrving-CH Lin
Introduce a new power domain (pmd) driver for the MediaTek mt8189 SoC. This driver ports and refines the power domain framework, dividing hardware blocks (CPU, GPU, peripherals, etc.) into independent power domains for precise and energy-efficient power management. Signed-off-by: Irving-CH Lin <irving-ch.lin@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: mediatek: Add bus protect control flow for MT8189Irving-CH Lin
In MT8189 mminfra power domain, the bus protect policy separates into two parts, one is set before subsys clocks enabled, and another need to enable after subsys clocks enable. Signed-off-by: Irving-CH Lin <irving-ch.lin@mediatek.com> Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: core: Extend statistics for domain idle states with s2idle dataUlf Hansson
To allow user space to monitor the selection of the domain idle state during s2idle for a CPU PM domain, let's extend the debugfs support in genpd with this information. Suggested-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: core: Show latency/residency for domain idle states in debugfsUlf Hansson
Similar to how cpuidle provides the values for latency and residency for CPU's idle states through sysfs, let's make the corresponding data for PM domain's idle states available for user space, via genpd's debugfs support. Suggested-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Dhruva Gole <d-gole@ti.com> Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: core: Restructure domain idle states data for genpd in debugfsUlf Hansson
To prepare for additional information to be added for the domain idle states in genpd's debugfs, let's make the existing information denser. To allow that, let's move the static information of the domain idle states into a separate debugfs file. Reviewed-by: Kevin Hilman <khilman@baylibre.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: qcom: rpmpd: drop stray semicolonGabor Juhos
Drop the unnecessary semicolon after the rpmpd_send_corner() function's declaration. Signed-off-by: Gabor Juhos <j4g8y7@gmail.com> Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
2026-04-01pmdomain: imx: scu-pd: Fix device_node reference leak during ->probe()Felix Gu
When calling of_parse_phandle_with_args(), the caller is responsible to call of_node_put() to release the reference of device node. In imx_sc_pd_get_console_rsrc(), it does not release the reference. Fixes: 893cfb99734f ("firmware: imx: scu-pd: do not power off console domain") Signed-off-by: Felix Gu <ustc.gu@gmail.com> Reviewed-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>