projects/linux·commit e93bcbaa

Merge tag 'pmdomain-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm

e93bcbaa · Linus Torvalds <[email protected]> · 2025-10-01 11:51:53 -07:00

Pull pmdomain updates from Ulf Hansson:

 - amlogic: Add support for S6/S7/S7D power-domains controller

 - imx: Add support for i.MX91 power-domains

 - marvell: Add support for PXA1908 power-domains

 - mediatek:
    - Add support for modem power sequence
    - Add support for RTFF Hardware in MT8196/MT6991

 - qcom: Align power-domain definitions for rpmpd

 - rockchip: Default to use power-domain support

 - thead: Create auxiliary device along with a corresponding reset
   driver

 - ti: Synchronize on/off state with HW-state for ti-sci power-domains

* tag 'pmdomain-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm: (25 commits)
  pmdomain: thead: Fix error pointer vs NULL bug in th1520_pd_reboot_init()
  pmdomain: thead: create auxiliary device for rebooting
  driver: reset: th1520-aon: add driver for poweroff/reboot via AON FW
  pmdomain: mediatek: airoha: convert from round_rate() to determine_rate()
  pmdomain: rockchip: enable ROCKCHIP_PM_DOMAINS with ARCH_ROCKCHIP
  pmdomain: marvell: Add PXA1908 power domains
  dt-bindings: clock: marvell,pxa1908: Add syscon compatible to apmu
  pmdomain: ti-sci: Set PD on/off state according to the HW state
  pmdomain: amlogic: Add support for S6 S7 S7D power domains controller
  dt-bindings: power: add Amlogic S6 S7 S7D power domains
  pmdomain: mediatek: Convert all SoCs to new style regmap retrieval
  pmdomain: mediatek: Add support for RTFF Hardware in MT8196/MT6991
  pmdomain: mediatek: Add support for modem power sequences
  pmdomain: mediatek: Move ctl sequences out of power_on/off functions
  pmdomain: mediatek: Handle SoCs with inverted SRAM power-down bits
  pmdomain: mediatek: Refactor bus protection regmaps retrieval
  dt-bindings: power: mediatek: Document access-controllers property
  pmdomain: remove unneeded 'fast_io' parameter in regmap_config
  pmdomain: imx93-blk-ctrl: mask DSI and PXP PD domain register on i.MX91
  pmdomain: imx93-blk-ctrl: use ARRAY_SIZE() instead of hardcode number
  ...
Commit
e93bcbaa71f47bcee4972ae3b2ddb5964238bb96
Parents
ea1c6c59 · bbc31108

Merge commit. Changes below are compared with the first parent: ea1c6c59.

Changes

38 files changed · +1592 −468

FileStatusAddDelContent
Documentation/devicetree/bindings/clock/marvell,pxa1908.yamlmodified+24−6View file
Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yamlmodified+3−0View file
Documentation/devicetree/bindings/power/mediatek,power-controller.yamlmodified+37−0View file
Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yamlmodified+47−12View file
MAINTAINERSmodified+3−0View file
drivers/pmdomain/Kconfigmodified+1−0View file
drivers/pmdomain/Makefilemodified+1−0View file
drivers/pmdomain/amlogic/meson-secure-pwrc.cmodified+95−0View file
drivers/pmdomain/imx/gpc.cmodified+0−1View file
drivers/pmdomain/imx/imx93-blk-ctrl.cmodified+21−2View file
drivers/pmdomain/marvell/Kconfigadded+18−0View file
drivers/pmdomain/marvell/Makefileadded+3−0View file
drivers/pmdomain/marvell/pxa1908-power-controller.cadded+274−0View file
drivers/pmdomain/mediatek/airoha-cpu-pmdomain.cmodified+4−4View file
drivers/pmdomain/mediatek/mt6795-pm-domains.hmodified+5−0View file
drivers/pmdomain/mediatek/mt8167-pm-domains.hmodified+5−0View file
drivers/pmdomain/mediatek/mt8173-pm-domains.hmodified+5−0View file
drivers/pmdomain/mediatek/mt8183-pm-domains.hmodified+5−0View file
drivers/pmdomain/mediatek/mt8186-pm-domains.hmodified+5−0View file
drivers/pmdomain/mediatek/mt8188-pm-domains.hmodified+6−0View file
drivers/pmdomain/mediatek/mt8192-pm-domains.hmodified+5−0View file
drivers/pmdomain/mediatek/mt8195-pm-domains.hmodified+5−0View file
drivers/pmdomain/mediatek/mt8365-pm-domains.hmodified+9−5View file
drivers/pmdomain/mediatek/mtk-pm-domains.cmodified+335−64View file
drivers/pmdomain/mediatek/mtk-pm-domains.hmodified+56−18View file
drivers/pmdomain/qcom/rpmpd.cmodified+56−56View file
drivers/pmdomain/rockchip/Kconfigmodified+1−0View file
drivers/pmdomain/thead/th1520-pm-domains.cmodified+16−0View file
drivers/pmdomain/ti/ti_sci_pm_domains.cmodified+23−1View file
drivers/power/reset/Kconfigmodified+7−0View file
drivers/power/reset/Makefilemodified+1−0View file
drivers/power/reset/th1520-aon-reboot.cadded+98−0View file
include/dt-bindings/power/amlogic,s6-pwrc.hadded+29−0View file
include/dt-bindings/power/amlogic,s7-pwrc.hadded+20−0View file
include/dt-bindings/power/amlogic,s7d-pwrc.hadded+27−0View file
include/dt-bindings/power/marvell,pxa1908-power.hadded+17−0View file
include/dt-bindings/power/qcom,rpmhpd.hmodified+233−0View file
include/dt-bindings/power/qcom-rpmpd.hmodified+92−299View file

Only the first 600 diff lines are shown. Download the complete patch.

Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml

View file
diff --git a/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
index 4e78933..6f3a857 100644
--- a/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
+++ b/Documentation/devicetree/bindings/clock/marvell,pxa1908.yaml
@@ -19,11 +19,14 @@ description: |
properties:
compatible:
- enum:
- - marvell,pxa1908-apbc
- - marvell,pxa1908-apbcp
- - marvell,pxa1908-mpmu
- - marvell,pxa1908-apmu
+ oneOf:
+ - enum:
+ - marvell,pxa1908-apbc
+ - marvell,pxa1908-apbcp
+ - marvell,pxa1908-mpmu
+ - items:
+ - const: marvell,pxa1908-apmu
+ - const: syscon
reg:
maxItems: 1
@@ -31,6 +34,9 @@ properties:
'#clock-cells':
const: 1
+ '#power-domain-cells':
+ const: 1
+
required:
- compatible
- reg
@@ -38,11 +44,23 @@ required:
additionalProperties: false
+if:
+ not:
+ properties:
+ compatible:
+ contains:
+ const: marvell,pxa1908-apmu
+
+then:
+ properties:
+ '#power-domain-cells': false
+
examples:
# APMU block:
- |
clock-controller@d4282800 {
- compatible = "marvell,pxa1908-apmu";
+ compatible = "marvell,pxa1908-apmu", "syscon";
reg = <0xd4282800 0x400>;
#clock-cells = <1>;
+ #power-domain-cells = <1>;
};

Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml

View file
diff --git a/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml b/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
index 15d7413..12b7168 100644
--- a/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
+++ b/Documentation/devicetree/bindings/power/amlogic,meson-sec-pwrc.yaml
@@ -24,6 +24,9 @@ properties:
- amlogic,a5-pwrc
- amlogic,c3-pwrc
- amlogic,t7-pwrc
+ - amlogic,s6-pwrc
+ - amlogic,s7-pwrc
+ - amlogic,s7d-pwrc
"#power-domain-cells":
const: 1

Documentation/devicetree/bindings/power/mediatek,power-controller.yaml

View file
diff --git a/Documentation/devicetree/bindings/power/mediatek,power-controller.yaml b/Documentation/devicetree/bindings/power/mediatek,power-controller.yaml
index 9c7cc63..500d989 100644
--- a/Documentation/devicetree/bindings/power/mediatek,power-controller.yaml
+++ b/Documentation/devicetree/bindings/power/mediatek,power-controller.yaml
@@ -44,6 +44,15 @@ properties:
'#size-cells':
const: 0
+ access-controllers:
+ description:
+ A number of phandles to external blocks to set and clear the required
+ bits to enable or disable bus protection, necessary to avoid any bus
+ faults while enabling or disabling a power domain.
+ For example, this may hold phandles to INFRACFG and SMI.
+ minItems: 1
+ maxItems: 3
+
patternProperties:
"^power-domain@[0-9a-f]+$":
$ref: "#/$defs/power-domain-node"
@@ -123,14 +132,17 @@ $defs:
mediatek,infracfg:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the device containing the INFRACFG register range.
+ deprecated: true
mediatek,infracfg-nao:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the device containing the INFRACFG-NAO register range.
+ deprecated: true
mediatek,smi:
$ref: /schemas/types.yaml#/definitions/phandle
description: phandle to the device containing the SMI register range.
+ deprecated: true
required:
- reg
@@ -138,6 +150,31 @@ $defs:
required:
- compatible
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - mediatek,mt8183-power-controller
+ then:
+ properties:
+ access-controllers:
+ minItems: 2
+ maxItems: 2
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - mediatek,mt8365-power-controller
+ then:
+ properties:
+ access-controllers:
+ minItems: 3
+ maxItems: 3
+
additionalProperties: false
examples:

Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml

View file
diff --git a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
index b3554e7..34aea58 100644
--- a/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
+++ b/Documentation/devicetree/bindings/soc/imx/fsl,imx93-media-blk-ctrl.yaml
@@ -18,7 +18,9 @@ description:
properties:
compatible:
items:
- - const: fsl,imx93-media-blk-ctrl
+ - enum:
+ - fsl,imx91-media-blk-ctrl
+ - fsl,imx93-media-blk-ctrl
- const: syscon
reg:
@@ -31,21 +33,54 @@ properties:
maxItems: 1
clocks:
+ minItems: 8
maxItems: 10
clock-names:
- items:
- - const: apb
- - const: axi
- - const: nic
- - const: disp
- - const: cam
- - const: pxp
- - const: lcdif
- - const: isi
- - const: csi
- - const: dsi
+ minItems: 8
+ maxItems: 10
+allOf:
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx91-media-blk-ctrl
+ then:
+ properties:
+ clocks:
+ maxItems: 8
+ clock-names:
+ items:
+ - const: apb
+ - const: axi
+ - const: nic
+ - const: disp
+ - const: cam
+ - const: lcdif
+ - const: isi
+ - const: csi
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: fsl,imx93-media-blk-ctrl
+ then:
+ properties:
+ clocks:
+ minItems: 10
+ clock-names:
+ items:
+ - const: apb
+ - const: axi
+ - const: nic
+ - const: disp
+ - const: cam
+ - const: pxp
+ - const: lcdif
+ - const: isi
+ - const: csi
+ - const: dsi
required:
- compatible
- reg

MAINTAINERS

View file
diff --git a/MAINTAINERS b/MAINTAINERS
index 2f7d96d..291187f 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -2880,7 +2880,9 @@ L: [email protected] (moderated for non-subscribers)
S: Maintained
F: arch/arm64/boot/dts/marvell/mmp/
F: drivers/clk/mmp/clk-pxa1908*.c
+F: drivers/pmdomain/marvell/
F: include/dt-bindings/clock/marvell,pxa1908.h
+F: include/dt-bindings/power/marvell,pxa1908-power.h
ARM/Mediatek RTC DRIVER
M: Eddie Huang <[email protected]>
@@ -21863,6 +21865,7 @@ F: drivers/mailbox/mailbox-th1520.c
F: drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c
F: drivers/pinctrl/pinctrl-th1520.c
F: drivers/pmdomain/thead/
+F: drivers/power/reset/th1520-aon-reboot.c
F: drivers/power/sequencing/pwrseq-thead-gpu.c
F: drivers/reset/reset-th1520.c
F: include/dt-bindings/clock/thead,th1520-clk-ap.h

drivers/pmdomain/Kconfig

View file
diff --git a/drivers/pmdomain/Kconfig b/drivers/pmdomain/Kconfig
index 91f04ac..23076ae 100644
--- a/drivers/pmdomain/Kconfig
+++ b/drivers/pmdomain/Kconfig
@@ -7,6 +7,7 @@ source "drivers/pmdomain/apple/Kconfig"
source "drivers/pmdomain/arm/Kconfig"
source "drivers/pmdomain/bcm/Kconfig"
source "drivers/pmdomain/imx/Kconfig"
+source "drivers/pmdomain/marvell/Kconfig"
source "drivers/pmdomain/mediatek/Kconfig"
source "drivers/pmdomain/qcom/Kconfig"
source "drivers/pmdomain/renesas/Kconfig"

drivers/pmdomain/Makefile

View file
diff --git a/drivers/pmdomain/Makefile b/drivers/pmdomain/Makefile
index 7030f44..ebc802f 100644
--- a/drivers/pmdomain/Makefile
+++ b/drivers/pmdomain/Makefile
@@ -5,6 +5,7 @@ obj-y += apple/
obj-y += arm/
obj-y += bcm/
obj-y += imx/
+obj-y += marvell/
obj-y += mediatek/
obj-y += qcom/
obj-y += renesas/

drivers/pmdomain/amlogic/meson-secure-pwrc.c

View file
diff --git a/drivers/pmdomain/amlogic/meson-secure-pwrc.c b/drivers/pmdomain/amlogic/meson-secure-pwrc.c
index e8bda60..1d2f371 100644
--- a/drivers/pmdomain/amlogic/meson-secure-pwrc.c
+++ b/drivers/pmdomain/amlogic/meson-secure-pwrc.c
@@ -16,6 +16,9 @@
#include <dt-bindings/power/amlogic,t7-pwrc.h>
#include <dt-bindings/power/amlogic,a4-pwrc.h>
#include <dt-bindings/power/amlogic,a5-pwrc.h>
+#include <dt-bindings/power/amlogic,s6-pwrc.h>
+#include <dt-bindings/power/amlogic,s7-pwrc.h>
+#include <dt-bindings/power/amlogic,s7d-pwrc.h>
#include <linux/arm-smccc.h>
#include <linux/firmware/meson/meson_sm.h>
#include <linux/module.h>
@@ -201,6 +204,71 @@ static const struct meson_secure_pwrc_domain_desc s4_pwrc_domains[] = {
SEC_PD(S4_AUDIO, 0),
};
+static const struct meson_secure_pwrc_domain_desc s6_pwrc_domains[] = {
+ SEC_PD(S6_DSPA, 0),
+ SEC_PD(S6_DOS_HEVC, 0),
+ SEC_PD(S6_DOS_VDEC, 0),
+ SEC_PD(S6_VPU_HDMI, 0),
+ SEC_PD(S6_U2DRD, 0),
+ SEC_PD(S6_U3DRD, 0),
+ SEC_PD(S6_SD_EMMC_C, 0),
+ SEC_PD(S6_GE2D, 0),
+ SEC_PD(S6_AMFC, 0),
+ SEC_PD(S6_VC9000E, 0),
+ SEC_PD(S6_DEWARP, 0),
+ SEC_PD(S6_VICP, 0),
+ SEC_PD(S6_SD_EMMC_A, 0),
+ SEC_PD(S6_SD_EMMC_B, 0),
+ /* ETH is for ethernet online wakeup, and should be always on */
+ SEC_PD(S6_ETH, GENPD_FLAG_ALWAYS_ON),
+ SEC_PD(S6_PCIE, 0),
+ SEC_PD(S6_NNA_4T, 0),
+ SEC_PD(S6_AUDIO, 0),
+ SEC_PD(S6_AUCPU, 0),
+ SEC_PD(S6_ADAPT, 0),
+};
+
+static const struct meson_secure_pwrc_domain_desc s7_pwrc_domains[] = {
+ SEC_PD(S7_DOS_HEVC, 0),
+ SEC_PD(S7_DOS_VDEC, 0),
+ SEC_PD(S7_VPU_HDMI, 0),
+ SEC_PD(S7_USB_COMB, 0),
+ SEC_PD(S7_SD_EMMC_C, 0),
+ SEC_PD(S7_GE2D, 0),
+ SEC_PD(S7_SD_EMMC_A, 0),
+ SEC_PD(S7_SD_EMMC_B, 0),
+ /* ETH is for ethernet online wakeup, and should be always on */
+ SEC_PD(S7_ETH, GENPD_FLAG_ALWAYS_ON),
+ SEC_PD(S7_AUCPU, 0),
+ SEC_PD(S7_AUDIO, 0),
+};
+
+static const struct meson_secure_pwrc_domain_desc s7d_pwrc_domains[] = {
+ SEC_PD(S7D_DOS_HCODEC, 0),
+ SEC_PD(S7D_DOS_HEVC, 0),
+ SEC_PD(S7D_DOS_VDEC, 0),
+ SEC_PD(S7D_VPU_HDMI, 0),
+ SEC_PD(S7D_USB_U2DRD, 0),
+ SEC_PD(S7D_USB_U2H, 0),
+ SEC_PD(S7D_SSD_EMMC_C, 0),
+ SEC_PD(S7D_GE2D, 0),
+ SEC_PD(S7D_AMFC, 0),
+ SEC_PD(S7D_EMMC_A, 0),
+ SEC_PD(S7D_EMMC_B, 0),
+ /* ETH is for ethernet online wakeup, and should be always on */
+ SEC_PD(S7D_ETH, GENPD_FLAG_ALWAYS_ON),
+ SEC_PD(S7D_AUCPU, 0),
+ SEC_PD(S7D_AUDIO, 0),
+ /* SRAMA is used as ATF runtime memory, and should be always on */
+ SEC_PD(S7D_SRAMA, GENPD_FLAG_ALWAYS_ON),
+ /* DMC0 is for DDR PHY ana/dig and DMC, and should be always on */
+ SEC_PD(S7D_DMC0, GENPD_FLAG_ALWAYS_ON),
+ /* DMC1 is for DDR PHY ana/dig and DMC, and should be always on */
+ SEC_PD(S7D_DMC1, GENPD_FLAG_ALWAYS_ON),
+ /* DDR should be always on */
+ SEC_PD(S7D_DDR, GENPD_FLAG_ALWAYS_ON),
+};
+
static const struct meson_secure_pwrc_domain_desc t7_pwrc_domains[] = {
SEC_PD(T7_DSPA, 0),
SEC_PD(T7_DSPB, 0),
@@ -367,6 +435,21 @@ static const struct meson_secure_pwrc_domain_data meson_secure_s4_pwrc_data = {
.count = ARRAY_SIZE(s4_pwrc_domains),
};
+static const struct meson_secure_pwrc_domain_data amlogic_secure_s6_pwrc_data = {
+ .domains = s6_pwrc_domains,
+ .count = ARRAY_SIZE(s6_pwrc_domains),
+};
+
+static const struct meson_secure_pwrc_domain_data amlogic_secure_s7_pwrc_data = {
+ .domains = s7_pwrc_domains,
+ .count = ARRAY_SIZE(s7_pwrc_domains),
+};
+
+static const struct meson_secure_pwrc_domain_data amlogic_secure_s7d_pwrc_data = {
+ .domains = s7d_pwrc_domains,
+ .count = ARRAY_SIZE(s7d_pwrc_domains),
+};
+
static const struct meson_secure_pwrc_domain_data amlogic_secure_t7_pwrc_data = {
.domains = t7_pwrc_domains,
.count = ARRAY_SIZE(t7_pwrc_domains),
@@ -394,6 +477,18 @@ static const struct of_device_id meson_secure_pwrc_match_table[] = {
.data = &meson_secure_s4_pwrc_data,
},
{
+ .compatible = "amlogic,s6-pwrc",
+ .data = &amlogic_secure_s6_pwrc_data,
+ },
+ {
+ .compatible = "amlogic,s7-pwrc",
+ .data = &amlogic_secure_s7_pwrc_data,
+ },
+ {
+ .compatible = "amlogic,s7d-pwrc",
+ .data = &amlogic_secure_s7d_pwrc_data,
+ },
+ {
.compatible = "amlogic,t7-pwrc",
.data = &amlogic_secure_t7_pwrc_data,
},

drivers/pmdomain/imx/gpc.c

View file
diff --git a/drivers/pmdomain/imx/gpc.c b/drivers/pmdomain/imx/gpc.c
index f18c7e6..33991f3 100644
--- a/drivers/pmdomain/imx/gpc.c
+++ b/drivers/pmdomain/imx/gpc.c
@@ -343,7 +343,6 @@ static const struct regmap_config imx_gpc_regmap_config = {
.rd_table = &access_table,
.wr_table = &access_table,
.max_register = 0x2ac,
- .fast_io = true,
};
static struct generic_pm_domain *imx_gpc_onecell_domains[] = {

drivers/pmdomain/imx/imx93-blk-ctrl.c

View file
diff --git a/drivers/pmdomain/imx/imx93-blk-ctrl.c b/drivers/pmdomain/imx/imx93-blk-ctrl.c
index 0e2ba8e..e094fe5 100644
--- a/drivers/pmdomain/imx/imx93-blk-ctrl.c
+++ b/drivers/pmdomain/imx/imx93-blk-ctrl.c
@@ -86,6 +86,7 @@ struct imx93_blk_ctrl_domain {
struct imx93_blk_ctrl_data {
const struct imx93_blk_ctrl_domain_data *domains;
+ u32 skip_mask;
int num_domains;
const char * const *clk_names;
int num_clks;
@@ -250,6 +251,8 @@ static int imx93_blk_ctrl_probe(struct platform_device *pdev)
int j;
domain->data = data;
+ if (bc_data->skip_mask & BIT(i))
+ continue;
for (j = 0; j < data->num_clks; j++)
domain->clks[j].id = data->clk_names[j];
@@ -418,16 +421,32 @@ static const struct regmap_access_table imx93_media_blk_ctl_access_table = {
.n_yes_ranges = ARRAY_SIZE(imx93_media_blk_ctl_yes_ranges),
};
+static const char * const media_blk_clk_names[] = {
+ "axi", "apb", "nic"
+};
+
+static const struct imx93_blk_ctrl_data imx91_media_blk_ctl_dev_data = {
+ .domains = imx93_media_blk_ctl_domain_data,
+ .skip_mask = BIT(IMX93_MEDIABLK_PD_MIPI_DSI) | BIT(IMX93_MEDIABLK_PD_PXP),
+ .num_domains = ARRAY_SIZE(imx93_media_blk_ctl_domain_data),
+ .clk_names = media_blk_clk_names,
+ .num_clks = ARRAY_SIZE(media_blk_clk_names),
+ .reg_access_table = &imx93_media_blk_ctl_access_table,
+};
+
static const struct imx93_blk_ctrl_data imx93_media_blk_ctl_dev_data = {
.domains = imx93_media_blk_ctl_domain_data,
.num_domains = ARRAY_SIZE(imx93_media_blk_ctl_domain_data),
- .clk_names = (const char *[]){ "axi", "apb", "nic", },
- .num_clks = 3,
+ .clk_names = media_blk_clk_names,
+ .num_clks = ARRAY_SIZE(media_blk_clk_names),
.reg_access_table = &imx93_media_blk_ctl_access_table,
};
static const struct of_device_id imx93_blk_ctrl_of_match[] = {
{
+ .compatible = "fsl,imx91-media-blk-ctrl",
+ .data = &imx91_media_blk_ctl_dev_data
+ }, {
.compatible = "fsl,imx93-media-blk-ctrl",
.data = &imx93_media_blk_ctl_dev_data
}, {

drivers/pmdomain/marvell/Kconfig

View file
diff --git a/drivers/pmdomain/marvell/Kconfig b/drivers/pmdomain/marvell/Kconfig
new file mode 100644
index 0000000..6c4084c
--- /dev/null
+++ b/drivers/pmdomain/marvell/Kconfig
@@ -0,0 +1,18 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+menu "Marvell PM Domains"
+ depends on ARCH_MMP || COMPILE_TEST
+
+config PXA1908_PM_DOMAINS
+ tristate "Marvell PXA1908 power domains"
+ depends on OF
+ depends on PM
+ default y if ARCH_MMP && ARM64
+ select AUXILIARY_BUS
+ select MFD_SYSCON
+ select PM_GENERIC_DOMAINS
+ select PM_GENERIC_DOMAINS_OF
+ help
+ Say Y here to enable support for Marvell PXA1908's power domanis.
+
+endmenu

drivers/pmdomain/marvell/Makefile

View file
diff --git a/drivers/pmdomain/marvell/Makefile b/drivers/pmdomain/marvell/Makefile
new file mode 100644
index 0000000..22c2501
--- /dev/null
+++ b/drivers/pmdomain/marvell/Makefile
@@ -0,0 +1,3 @@
+# SPDX-License-Identifier: GPL-2.0-only
+
+obj-$(CONFIG_PXA1908_PM_DOMAINS) += pxa1908-power-controller.o

drivers/pmdomain/marvell/pxa1908-power-controller.c

View file
diff --git a/drivers/pmdomain/marvell/pxa1908-power-controller.c b/drivers/pmdomain/marvell/pxa1908-power-controller.c
new file mode 100644
index 0000000..ff5e6e8
--- /dev/null
+++ b/drivers/pmdomain/marvell/pxa1908-power-controller.c
@@ -0,0 +1,274 @@
+// SPDX-License-Identifier: GPL-2.0-only
+/*
+ * Copyright 2025 Duje Mihanović <[email protected]>
+ */
+
+#include <linux/auxiliary_bus.h>
+#include <linux/container_of.h>
+#include <linux/dev_printk.h>
+#include <linux/device.h>
+#include <linux/mfd/syscon.h>
+#include <linux/mod_devicetable.h>
+#include <linux/module.h>
+#include <linux/pm_domain.h>
+#include <linux/regmap.h>
+
+#include <dt-bindings/power/marvell,pxa1908-power.h>
+
+/* VPU, GPU, ISP */
+#define APMU_PWR_CTRL_REG 0xd8
+#define APMU_PWR_BLK_TMR_REG 0xdc
+#define APMU_PWR_STATUS_REG 0xf0
+
+/* DSI */
+#define APMU_DEBUG 0x88
+#define DSI_PHY_DVM_MASK BIT(31)
+
+#define POWER_ON_LATENCY_US 300
+#define POWER_OFF_LATENCY_US 20
+#define POWER_POLL_TIMEOUT_US (25 * USEC_PER_MSEC)
+#define POWER_POLL_SLEEP_US 6
+
+#define NR_DOMAINS 5
+
+#define to_pxa1908_pd(_genpd) container_of(_genpd, struct pxa1908_pd, genpd)
+
+struct pxa1908_pd_ctrl {
+ struct generic_pm_domain *domains[NR_DOMAINS];
+ struct genpd_onecell_data onecell_data;
+ struct regmap *base;
+ struct device *dev;
+};
+
+struct pxa1908_pd_data {
+ u32 reg_clk_res_ctrl;
+ u32 pwr_state;
+ u32 hw_mode;
+ bool keep_on;
+ int id;
+};
+
+struct pxa1908_pd {
+ const struct pxa1908_pd_data data;
+ struct pxa1908_pd_ctrl *ctrl;
+ struct generic_pm_domain genpd;
+ bool initialized;
+};
+
+static inline bool pxa1908_pd_is_on(struct pxa1908_pd *pd)
+{
+ struct pxa1908_pd_ctrl *ctrl = pd->ctrl;
+
+ return pd->data.id != PXA1908_POWER_DOMAIN_DSI
+ ? regmap_test_bits(ctrl->base, APMU_PWR_STATUS_REG, pd->data.pwr_state)
+ : regmap_test_bits(ctrl->base, APMU_DEBUG, DSI_PHY_DVM_MASK);
+}
+
+static int pxa1908_pd_power_on(struct generic_pm_domain *genpd)
+{
+ struct pxa1908_pd *pd = to_pxa1908_pd(genpd);
+ const struct pxa1908_pd_data *data = &pd->data;
+ struct pxa1908_pd_ctrl *ctrl = pd->ctrl;
+ unsigned int status;
+ int ret = 0;
+
+ regmap_set_bits(ctrl->base, data->reg_clk_res_ctrl, data->hw_mode);
+ if (data->id != PXA1908_POWER_DOMAIN_ISP)
+ regmap_write(ctrl->base, APMU_PWR_BLK_TMR_REG, 0x20001fff);
+ regmap_set_bits(ctrl->base, APMU_PWR_CTRL_REG, data->pwr_state);
+
+ ret = regmap_read_poll_timeout(ctrl->base, APMU_PWR_STATUS_REG, status,
+ status & data->pwr_state, POWER_POLL_SLEEP_US,
+ POWER_ON_LATENCY_US + POWER_POLL_TIMEOUT_US);
+ if (ret == -ETIMEDOUT)
+ dev_err(ctrl->dev, "timed out powering on domain '%s'\n", pd->genpd.name);
+
+ return ret;
+}
+
+static int pxa1908_pd_power_off(struct generic_pm_domain *genpd)
+{
+ struct pxa1908_pd *pd = to_pxa1908_pd(genpd);
+ const struct pxa1908_pd_data *data = &pd->data;
+ struct pxa1908_pd_ctrl *ctrl = pd->ctrl;
+ unsigned int status;
+ int ret;
+

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/airoha-cpu-pmdomain.c

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/mt6795-pm-domains.h

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/mt8167-pm-domains.h

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/mt8173-pm-domains.h

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/mt8183-pm-domains.h

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/mt8186-pm-domains.h

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/mt8188-pm-domains.h

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/mt8192-pm-domains.h

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/mt8195-pm-domains.h

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/mt8365-pm-domains.h

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/mtk-pm-domains.c

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/mediatek/mtk-pm-domains.h

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/qcom/rpmpd.c

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/rockchip/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/thead/th1520-pm-domains.c

View file

This diff is incomplete. Download the complete patch.

drivers/pmdomain/ti/ti_sci_pm_domains.c

View file

This diff is incomplete. Download the complete patch.

drivers/power/reset/Kconfig

View file

This diff is incomplete. Download the complete patch.

drivers/power/reset/Makefile

View file

This diff is incomplete. Download the complete patch.

drivers/power/reset/th1520-aon-reboot.c

View file

This diff is incomplete. Download the complete patch.

include/dt-bindings/power/amlogic,s6-pwrc.h

View file

This diff is incomplete. Download the complete patch.

include/dt-bindings/power/amlogic,s7-pwrc.h

View file

This diff is incomplete. Download the complete patch.

include/dt-bindings/power/amlogic,s7d-pwrc.h

View file

This diff is incomplete. Download the complete patch.

include/dt-bindings/power/marvell,pxa1908-power.h

View file

This diff is incomplete. Download the complete patch.

include/dt-bindings/power/qcom,rpmhpd.h

View file

This diff is incomplete. Download the complete patch.

include/dt-bindings/power/qcom-rpmpd.h

View file

This diff is incomplete. Download the complete patch.