Skip to content

Commit e93bcba

Browse files
committed
Merge tag 'pmdomain-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/ulfh/linux-pm
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 ...
2 parents ea1c6c5 + bbc3110 commit e93bcba

38 files changed

+1592
-468
lines changed

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

Lines changed: 24 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -19,30 +19,48 @@ description: |
1919
2020
properties:
2121
compatible:
22-
enum:
23-
- marvell,pxa1908-apbc
24-
- marvell,pxa1908-apbcp
25-
- marvell,pxa1908-mpmu
26-
- marvell,pxa1908-apmu
22+
oneOf:
23+
- enum:
24+
- marvell,pxa1908-apbc
25+
- marvell,pxa1908-apbcp
26+
- marvell,pxa1908-mpmu
27+
- items:
28+
- const: marvell,pxa1908-apmu
29+
- const: syscon
2730

2831
reg:
2932
maxItems: 1
3033

3134
'#clock-cells':
3235
const: 1
3336

37+
'#power-domain-cells':
38+
const: 1
39+
3440
required:
3541
- compatible
3642
- reg
3743
- '#clock-cells'
3844

3945
additionalProperties: false
4046

47+
if:
48+
not:
49+
properties:
50+
compatible:
51+
contains:
52+
const: marvell,pxa1908-apmu
53+
54+
then:
55+
properties:
56+
'#power-domain-cells': false
57+
4158
examples:
4259
# APMU block:
4360
- |
4461
clock-controller@d4282800 {
45-
compatible = "marvell,pxa1908-apmu";
62+
compatible = "marvell,pxa1908-apmu", "syscon";
4663
reg = <0xd4282800 0x400>;
4764
#clock-cells = <1>;
65+
#power-domain-cells = <1>;
4866
};

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

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ properties:
2424
- amlogic,a5-pwrc
2525
- amlogic,c3-pwrc
2626
- amlogic,t7-pwrc
27+
- amlogic,s6-pwrc
28+
- amlogic,s7-pwrc
29+
- amlogic,s7d-pwrc
2730

2831
"#power-domain-cells":
2932
const: 1

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

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,15 @@ properties:
4444
'#size-cells':
4545
const: 0
4646

47+
access-controllers:
48+
description:
49+
A number of phandles to external blocks to set and clear the required
50+
bits to enable or disable bus protection, necessary to avoid any bus
51+
faults while enabling or disabling a power domain.
52+
For example, this may hold phandles to INFRACFG and SMI.
53+
minItems: 1
54+
maxItems: 3
55+
4756
patternProperties:
4857
"^power-domain@[0-9a-f]+$":
4958
$ref: "#/$defs/power-domain-node"
@@ -123,21 +132,49 @@ $defs:
123132
mediatek,infracfg:
124133
$ref: /schemas/types.yaml#/definitions/phandle
125134
description: phandle to the device containing the INFRACFG register range.
135+
deprecated: true
126136

127137
mediatek,infracfg-nao:
128138
$ref: /schemas/types.yaml#/definitions/phandle
129139
description: phandle to the device containing the INFRACFG-NAO register range.
140+
deprecated: true
130141

131142
mediatek,smi:
132143
$ref: /schemas/types.yaml#/definitions/phandle
133144
description: phandle to the device containing the SMI register range.
145+
deprecated: true
134146

135147
required:
136148
- reg
137149

138150
required:
139151
- compatible
140152

153+
allOf:
154+
- if:
155+
properties:
156+
compatible:
157+
contains:
158+
enum:
159+
- mediatek,mt8183-power-controller
160+
then:
161+
properties:
162+
access-controllers:
163+
minItems: 2
164+
maxItems: 2
165+
166+
- if:
167+
properties:
168+
compatible:
169+
contains:
170+
enum:
171+
- mediatek,mt8365-power-controller
172+
then:
173+
properties:
174+
access-controllers:
175+
minItems: 3
176+
maxItems: 3
177+
141178
additionalProperties: false
142179

143180
examples:

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

Lines changed: 47 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,9 @@ description:
1818
properties:
1919
compatible:
2020
items:
21-
- const: fsl,imx93-media-blk-ctrl
21+
- enum:
22+
- fsl,imx91-media-blk-ctrl
23+
- fsl,imx93-media-blk-ctrl
2224
- const: syscon
2325

2426
reg:
@@ -31,21 +33,54 @@ properties:
3133
maxItems: 1
3234

3335
clocks:
36+
minItems: 8
3437
maxItems: 10
3538

3639
clock-names:
37-
items:
38-
- const: apb
39-
- const: axi
40-
- const: nic
41-
- const: disp
42-
- const: cam
43-
- const: pxp
44-
- const: lcdif
45-
- const: isi
46-
- const: csi
47-
- const: dsi
40+
minItems: 8
41+
maxItems: 10
4842

43+
allOf:
44+
- if:
45+
properties:
46+
compatible:
47+
contains:
48+
const: fsl,imx91-media-blk-ctrl
49+
then:
50+
properties:
51+
clocks:
52+
maxItems: 8
53+
clock-names:
54+
items:
55+
- const: apb
56+
- const: axi
57+
- const: nic
58+
- const: disp
59+
- const: cam
60+
- const: lcdif
61+
- const: isi
62+
- const: csi
63+
- if:
64+
properties:
65+
compatible:
66+
contains:
67+
const: fsl,imx93-media-blk-ctrl
68+
then:
69+
properties:
70+
clocks:
71+
minItems: 10
72+
clock-names:
73+
items:
74+
- const: apb
75+
- const: axi
76+
- const: nic
77+
- const: disp
78+
- const: cam
79+
- const: pxp
80+
- const: lcdif
81+
- const: isi
82+
- const: csi
83+
- const: dsi
4984
required:
5085
- compatible
5186
- reg

MAINTAINERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2880,7 +2880,9 @@ L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers)
28802880
S: Maintained
28812881
F: arch/arm64/boot/dts/marvell/mmp/
28822882
F: drivers/clk/mmp/clk-pxa1908*.c
2883+
F: drivers/pmdomain/marvell/
28832884
F: include/dt-bindings/clock/marvell,pxa1908.h
2885+
F: include/dt-bindings/power/marvell,pxa1908-power.h
28842886

28852887
ARM/Mediatek RTC DRIVER
28862888
M: Eddie Huang <eddie.huang@mediatek.com>
@@ -21863,6 +21865,7 @@ F: drivers/mailbox/mailbox-th1520.c
2186321865
F: drivers/net/ethernet/stmicro/stmmac/dwmac-thead.c
2186421866
F: drivers/pinctrl/pinctrl-th1520.c
2186521867
F: drivers/pmdomain/thead/
21868+
F: drivers/power/reset/th1520-aon-reboot.c
2186621869
F: drivers/power/sequencing/pwrseq-thead-gpu.c
2186721870
F: drivers/reset/reset-th1520.c
2186821871
F: include/dt-bindings/clock/thead,th1520-clk-ap.h

drivers/pmdomain/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ source "drivers/pmdomain/apple/Kconfig"
77
source "drivers/pmdomain/arm/Kconfig"
88
source "drivers/pmdomain/bcm/Kconfig"
99
source "drivers/pmdomain/imx/Kconfig"
10+
source "drivers/pmdomain/marvell/Kconfig"
1011
source "drivers/pmdomain/mediatek/Kconfig"
1112
source "drivers/pmdomain/qcom/Kconfig"
1213
source "drivers/pmdomain/renesas/Kconfig"

drivers/pmdomain/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ obj-y += apple/
55
obj-y += arm/
66
obj-y += bcm/
77
obj-y += imx/
8+
obj-y += marvell/
89
obj-y += mediatek/
910
obj-y += qcom/
1011
obj-y += renesas/

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

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,9 @@
1616
#include <dt-bindings/power/amlogic,t7-pwrc.h>
1717
#include <dt-bindings/power/amlogic,a4-pwrc.h>
1818
#include <dt-bindings/power/amlogic,a5-pwrc.h>
19+
#include <dt-bindings/power/amlogic,s6-pwrc.h>
20+
#include <dt-bindings/power/amlogic,s7-pwrc.h>
21+
#include <dt-bindings/power/amlogic,s7d-pwrc.h>
1922
#include <linux/arm-smccc.h>
2023
#include <linux/firmware/meson/meson_sm.h>
2124
#include <linux/module.h>
@@ -201,6 +204,71 @@ static const struct meson_secure_pwrc_domain_desc s4_pwrc_domains[] = {
201204
SEC_PD(S4_AUDIO, 0),
202205
};
203206

207+
static const struct meson_secure_pwrc_domain_desc s6_pwrc_domains[] = {
208+
SEC_PD(S6_DSPA, 0),
209+
SEC_PD(S6_DOS_HEVC, 0),
210+
SEC_PD(S6_DOS_VDEC, 0),
211+
SEC_PD(S6_VPU_HDMI, 0),
212+
SEC_PD(S6_U2DRD, 0),
213+
SEC_PD(S6_U3DRD, 0),
214+
SEC_PD(S6_SD_EMMC_C, 0),
215+
SEC_PD(S6_GE2D, 0),
216+
SEC_PD(S6_AMFC, 0),
217+
SEC_PD(S6_VC9000E, 0),
218+
SEC_PD(S6_DEWARP, 0),
219+
SEC_PD(S6_VICP, 0),
220+
SEC_PD(S6_SD_EMMC_A, 0),
221+
SEC_PD(S6_SD_EMMC_B, 0),
222+
/* ETH is for ethernet online wakeup, and should be always on */
223+
SEC_PD(S6_ETH, GENPD_FLAG_ALWAYS_ON),
224+
SEC_PD(S6_PCIE, 0),
225+
SEC_PD(S6_NNA_4T, 0),
226+
SEC_PD(S6_AUDIO, 0),
227+
SEC_PD(S6_AUCPU, 0),
228+
SEC_PD(S6_ADAPT, 0),
229+
};
230+
231+
static const struct meson_secure_pwrc_domain_desc s7_pwrc_domains[] = {
232+
SEC_PD(S7_DOS_HEVC, 0),
233+
SEC_PD(S7_DOS_VDEC, 0),
234+
SEC_PD(S7_VPU_HDMI, 0),
235+
SEC_PD(S7_USB_COMB, 0),
236+
SEC_PD(S7_SD_EMMC_C, 0),
237+
SEC_PD(S7_GE2D, 0),
238+
SEC_PD(S7_SD_EMMC_A, 0),
239+
SEC_PD(S7_SD_EMMC_B, 0),
240+
/* ETH is for ethernet online wakeup, and should be always on */
241+
SEC_PD(S7_ETH, GENPD_FLAG_ALWAYS_ON),
242+
SEC_PD(S7_AUCPU, 0),
243+
SEC_PD(S7_AUDIO, 0),
244+
};
245+
246+
static const struct meson_secure_pwrc_domain_desc s7d_pwrc_domains[] = {
247+
SEC_PD(S7D_DOS_HCODEC, 0),
248+
SEC_PD(S7D_DOS_HEVC, 0),
249+
SEC_PD(S7D_DOS_VDEC, 0),
250+
SEC_PD(S7D_VPU_HDMI, 0),
251+
SEC_PD(S7D_USB_U2DRD, 0),
252+
SEC_PD(S7D_USB_U2H, 0),
253+
SEC_PD(S7D_SSD_EMMC_C, 0),
254+
SEC_PD(S7D_GE2D, 0),
255+
SEC_PD(S7D_AMFC, 0),
256+
SEC_PD(S7D_EMMC_A, 0),
257+
SEC_PD(S7D_EMMC_B, 0),
258+
/* ETH is for ethernet online wakeup, and should be always on */
259+
SEC_PD(S7D_ETH, GENPD_FLAG_ALWAYS_ON),
260+
SEC_PD(S7D_AUCPU, 0),
261+
SEC_PD(S7D_AUDIO, 0),
262+
/* SRAMA is used as ATF runtime memory, and should be always on */
263+
SEC_PD(S7D_SRAMA, GENPD_FLAG_ALWAYS_ON),
264+
/* DMC0 is for DDR PHY ana/dig and DMC, and should be always on */
265+
SEC_PD(S7D_DMC0, GENPD_FLAG_ALWAYS_ON),
266+
/* DMC1 is for DDR PHY ana/dig and DMC, and should be always on */
267+
SEC_PD(S7D_DMC1, GENPD_FLAG_ALWAYS_ON),
268+
/* DDR should be always on */
269+
SEC_PD(S7D_DDR, GENPD_FLAG_ALWAYS_ON),
270+
};
271+
204272
static const struct meson_secure_pwrc_domain_desc t7_pwrc_domains[] = {
205273
SEC_PD(T7_DSPA, 0),
206274
SEC_PD(T7_DSPB, 0),
@@ -367,6 +435,21 @@ static const struct meson_secure_pwrc_domain_data meson_secure_s4_pwrc_data = {
367435
.count = ARRAY_SIZE(s4_pwrc_domains),
368436
};
369437

438+
static const struct meson_secure_pwrc_domain_data amlogic_secure_s6_pwrc_data = {
439+
.domains = s6_pwrc_domains,
440+
.count = ARRAY_SIZE(s6_pwrc_domains),
441+
};
442+
443+
static const struct meson_secure_pwrc_domain_data amlogic_secure_s7_pwrc_data = {
444+
.domains = s7_pwrc_domains,
445+
.count = ARRAY_SIZE(s7_pwrc_domains),
446+
};
447+
448+
static const struct meson_secure_pwrc_domain_data amlogic_secure_s7d_pwrc_data = {
449+
.domains = s7d_pwrc_domains,
450+
.count = ARRAY_SIZE(s7d_pwrc_domains),
451+
};
452+
370453
static const struct meson_secure_pwrc_domain_data amlogic_secure_t7_pwrc_data = {
371454
.domains = t7_pwrc_domains,
372455
.count = ARRAY_SIZE(t7_pwrc_domains),
@@ -393,6 +476,18 @@ static const struct of_device_id meson_secure_pwrc_match_table[] = {
393476
.compatible = "amlogic,meson-s4-pwrc",
394477
.data = &meson_secure_s4_pwrc_data,
395478
},
479+
{
480+
.compatible = "amlogic,s6-pwrc",
481+
.data = &amlogic_secure_s6_pwrc_data,
482+
},
483+
{
484+
.compatible = "amlogic,s7-pwrc",
485+
.data = &amlogic_secure_s7_pwrc_data,
486+
},
487+
{
488+
.compatible = "amlogic,s7d-pwrc",
489+
.data = &amlogic_secure_s7d_pwrc_data,
490+
},
396491
{
397492
.compatible = "amlogic,t7-pwrc",
398493
.data = &amlogic_secure_t7_pwrc_data,

drivers/pmdomain/imx/gpc.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,6 @@ static const struct regmap_config imx_gpc_regmap_config = {
343343
.rd_table = &access_table,
344344
.wr_table = &access_table,
345345
.max_register = 0x2ac,
346-
.fast_io = true,
347346
};
348347

349348
static struct generic_pm_domain *imx_gpc_onecell_domains[] = {

0 commit comments

Comments
 (0)