Skip to content

Commit 1044821

Browse files
committed
Add support MT6316/6363/MT6373 PMICs regulators
Merge series from AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>: This series adds support for three new MediaTek PMICs: MT6316, MT6363 and MT6373 and their variants - used in board designs featuring the MediaTek MT8196 Chromebook SoC, or the MT6991 Dimensity 9400 Smartphone SoC. In particular, MT6316 is a regulator, but the MT6363 and MT6373 PMICs are multi-function devices, as they have and expose multiple sub-devices; moreover, some of those also contain an interrupt controller, managing internal IPs interrupts: for those, a chained interrupt handler is registered, which parent is the SPMI controller itself. This series adds support for all of the MT6316 regulator variants and for MT6363, MT6373 SPMI PMICs and their interrupt controller.
2 parents 9de2057 + 3c36965 commit 1044821

9 files changed

Lines changed: 2008 additions & 0 deletions

File tree

Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/mediatek,mt6316b-regulator.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek MT6316 BP/VP SPMI PMIC Regulators
8+
9+
maintainers:
10+
- AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
11+
12+
description:
13+
The MediaTek MT6316BP/VP PMICs are fully controlled by SPMI interface, both
14+
feature four step-down DC/DC (buck) converters, and provides 2+2 Phases,
15+
joining Buck 1+2 for the first phase, and Buck 3+4 for the second phase.
16+
17+
properties:
18+
compatible:
19+
const: mediatek,mt6316b-regulator
20+
21+
reg:
22+
maxItems: 1
23+
24+
patternProperties:
25+
"^vbuck(12|34)$":
26+
type: object
27+
$ref: regulator.yaml#
28+
unevaluatedProperties: false
29+
properties:
30+
regulator-allowed-modes:
31+
description: |
32+
Allowed Buck regulator operating modes allowed. Valid values below.
33+
0 - Normal mode with automatic power saving, reducing the switching
34+
frequency when light load conditions are detected
35+
1 - Forced Continuous Conduction mode (FCCM) for improved voltage
36+
regulation accuracy with constant switching frequency but lower
37+
regulator efficiency
38+
2 - Forced Low Power mode for improved regulator efficiency, used
39+
when no heavy load is expected, will shut down unnecessary IP
40+
blocks and secondary phases to reduce quiescent current.
41+
This mode does not limit the maximum output current but unless
42+
only a light load is applied, there will be regulation accuracy
43+
and efficiency losses.
44+
minItems: 1
45+
maxItems: 3
46+
items:
47+
enum: [ 0, 1, 2 ]
48+
49+
required:
50+
- compatible
51+
- reg
52+
53+
additionalProperties: false
54+
55+
examples:
56+
- |
57+
#include <dt-bindings/spmi/spmi.h>
58+
59+
spmi {
60+
#address-cells = <2>;
61+
#size-cells = <0>;
62+
63+
pmic@8 {
64+
compatible = "mediatek,mt6316b-regulator";
65+
reg = <0x8 SPMI_USID>;
66+
67+
vbuck12 {
68+
regulator-name = "dvdd_core";
69+
regulator-min-microvolt = <450000>;
70+
regulator-max-microvolt = <965000>;
71+
regulator-allowed-modes = <0 1 2>;
72+
regulator-enable-ramp-delay = <256>;
73+
};
74+
};
75+
};
76+
...
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/mediatek,mt6316c-regulator.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek MT6316 CP/HP/KP SPMI PMIC Regulators
8+
9+
maintainers:
10+
- AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
11+
12+
description:
13+
The MediaTek MT6316CP/HP/KP PMICs are fully controlled by SPMI interface,
14+
features four step-down DC/DC (buck) converters, and provides 3+1 Phases,
15+
joining Buck 1+2+4 for the first phase, and uses Buck 3 for the second.
16+
17+
properties:
18+
compatible:
19+
const: mediatek,mt6316c-regulator
20+
21+
reg:
22+
maxItems: 1
23+
24+
patternProperties:
25+
"^vbuck(124|3)$":
26+
type: object
27+
$ref: regulator.yaml#
28+
unevaluatedProperties: false
29+
properties:
30+
regulator-allowed-modes:
31+
description: |
32+
Allowed Buck regulator operating modes allowed. Valid values below.
33+
0 - Normal mode with automatic power saving, reducing the switching
34+
frequency when light load conditions are detected
35+
1 - Forced Continuous Conduction mode (FCCM) for improved voltage
36+
regulation accuracy with constant switching frequency but lower
37+
regulator efficiency
38+
2 - Forced Low Power mode for improved regulator efficiency, used
39+
when no heavy load is expected, will shut down unnecessary IP
40+
blocks and secondary phases to reduce quiescent current.
41+
This mode does not limit the maximum output current but unless
42+
only a light load is applied, there will be regulation accuracy
43+
and efficiency losses.
44+
minItems: 1
45+
maxItems: 3
46+
items:
47+
enum: [ 0, 1, 2 ]
48+
49+
required:
50+
- compatible
51+
- reg
52+
53+
additionalProperties: false
54+
55+
examples:
56+
- |
57+
#include <dt-bindings/spmi/spmi.h>
58+
59+
spmi {
60+
#address-cells = <2>;
61+
#size-cells = <0>;
62+
63+
pmic@6 {
64+
compatible = "mediatek,mt6316c-regulator";
65+
reg = <0x6 SPMI_USID>;
66+
67+
vbuck124 {
68+
regulator-name = "dvdd_proc_m";
69+
regulator-min-microvolt = <450000>;
70+
regulator-max-microvolt = <1277500>;
71+
regulator-allowed-modes = <0 1 2>;
72+
regulator-enable-ramp-delay = <256>;
73+
};
74+
};
75+
};
76+
...
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/mediatek,mt6316d-regulator.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek MT6316 DP/TP SPMI PMIC Regulators
8+
9+
maintainers:
10+
- AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
11+
12+
description:
13+
The MediaTek MT6316DP/TP PMICs are fully controlled by SPMI interface, both
14+
feature four step-down DC/DC (buck) converters, and provides a single Phase,
15+
joining Buck 1+2+3+4.
16+
17+
properties:
18+
compatible:
19+
const: mediatek,mt6316d-regulator
20+
21+
reg:
22+
maxItems: 1
23+
24+
vbuck1234:
25+
type: object
26+
$ref: regulator.yaml#
27+
unevaluatedProperties: false
28+
properties:
29+
regulator-allowed-modes:
30+
description: |
31+
Allowed Buck regulator operating modes allowed. Valid values below.
32+
0 - Normal mode with automatic power saving, reducing the switching
33+
frequency when light load conditions are detected
34+
1 - Forced Continuous Conduction mode (FCCM) for improved voltage
35+
regulation accuracy with constant switching frequency but lower
36+
regulator efficiency
37+
2 - Forced Low Power mode for improved regulator efficiency, used
38+
when no heavy load is expected, will shut down unnecessary IP
39+
blocks and secondary phases to reduce quiescent current.
40+
This mode does not limit the maximum output current but unless
41+
only a light load is applied, there will be regulation accuracy
42+
and efficiency losses.
43+
minItems: 1
44+
maxItems: 3
45+
items:
46+
enum: [ 0, 1, 2 ]
47+
48+
required:
49+
- compatible
50+
- reg
51+
52+
additionalProperties: false
53+
54+
examples:
55+
- |
56+
#include <dt-bindings/spmi/spmi.h>
57+
58+
spmi {
59+
#address-cells = <2>;
60+
#size-cells = <0>;
61+
62+
pmic@7 {
63+
compatible = "mediatek,mt6316d-regulator";
64+
reg = <0x7 SPMI_USID>;
65+
66+
vbuck1234 {
67+
regulator-name = "dvdd_gpustack";
68+
regulator-min-microvolt = <400000>;
69+
regulator-max-microvolt = <1277500>;
70+
regulator-allowed-modes = <0 1 2>;
71+
regulator-enable-ramp-delay = <256>;
72+
};
73+
};
74+
};
75+
...
Lines changed: 146 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,146 @@
1+
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/regulator/mediatek,mt6363-regulator.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek MT6363 PMIC Regulators
8+
9+
maintainers:
10+
- AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
11+
12+
description:
13+
The MT6363 SPMI PMIC provides 10 BUCK and 25 LDO (Low DropOut) regulators
14+
and can optionally provide overcurrent warnings with one ocp interrupt
15+
for each voltage regulator.
16+
17+
properties:
18+
compatible:
19+
const: mediatek,mt6363-regulator
20+
21+
reg:
22+
maxItems: 1
23+
24+
vsys-vbuck1-supply:
25+
description: Input supply for vbuck1
26+
27+
vsys-vbuck2-supply:
28+
description: Input supply for vbuck2
29+
30+
vsys-vbuck3-supply:
31+
description: Input supply for vbuck3
32+
33+
vsys-vbuck4-supply:
34+
description: Input supply for vbuck4
35+
36+
vsys-vbuck5-supply:
37+
description: Input supply for vbuck5
38+
39+
vsys-vbuck6-supply:
40+
description: Input supply for vbuck6
41+
42+
vsys-vbuck7-supply:
43+
description: Input supply for vbuck7
44+
45+
vsys-vs1-supply:
46+
description: Input supply for vs1
47+
48+
vsys-vs2-supply:
49+
description: Input supply for vs2
50+
51+
vsys-vs3-supply:
52+
description: Input supply for vs3
53+
54+
vs1-ldo1-supply:
55+
description: Input supply for va15, vio0p75, vm18, vrf18, vrf-io18
56+
57+
vs1-ldo2-supply:
58+
description: Input supply for vcn15, vio18, vufs18
59+
60+
vs2-ldo1-supply:
61+
description: Input supply for vsram-cpub, vsram-cpum, vrf12, vrf13, vufs12
62+
63+
vs2-ldo2-supply:
64+
description: Input supply for va12-1, va12-2, vcn13, vsram-cpul
65+
66+
vs3-ldo1-supply:
67+
description: Input supply for vsram-apu, vsram-digrf, vsram-mdfe
68+
69+
vs3-ldo2-supply:
70+
description: Input supply for vsram-modem, vrf0p9
71+
72+
vsys-ldo1-supply:
73+
description: Input supply for vaux18, vemc, vtref18
74+
75+
patternProperties:
76+
"^v(buck[1-7]|s[1-3])$":
77+
description: Buck regulators
78+
type: object
79+
$ref: regulator.yaml#
80+
unevaluatedProperties: false
81+
properties:
82+
regulator-allowed-modes:
83+
description: |
84+
Allowed Buck regulator operating modes allowed. Valid values below.
85+
0 - Normal mode with automatic power saving, reducing the switching
86+
frequency when light load conditions are detected
87+
1 - Forced Continuous Conduction mode (FCCM) for improved voltage
88+
regulation accuracy with constant switching frequency but lower
89+
regulator efficiency
90+
2 - Forced Low Power mode for improved regulator efficiency, used
91+
when no heavy load is expected, does not limit the maximum out
92+
current but unless only a light load is applied, there will be
93+
regulation accuracy and efficiency losses.
94+
3 - Forced Ultra Low Power mode for ultra low load, this greatly
95+
reduces the maximum output power, makes the regulator to be
96+
efficient only for ultra light load, and greatly reduces the
97+
quiescent current (Iq) of the buck.
98+
maxItems: 3
99+
items:
100+
enum: [ 0, 1, 2, 3 ]
101+
102+
"^va(12-1|12-2|15)$":
103+
$ref: "#/$defs/ldo-common"
104+
105+
"^v(aux|m|rf-io|tref)18$":
106+
$ref: "#/$defs/ldo-common"
107+
108+
"^v(cn13|cn15|emc)$":
109+
$ref: "#/$defs/ldo-common"
110+
111+
"^vio(0p75|18)$":
112+
$ref: "#/$defs/ldo-common"
113+
114+
"^vrf(0p9|12|13|18)$":
115+
$ref: "#/$defs/ldo-common"
116+
117+
"^vsram-(apu|cpub|cpum|cpul|digrf|mdfe|modem)$":
118+
$ref: "#/$defs/ldo-common"
119+
120+
"^vufs(12|18)$":
121+
$ref: "#/$defs/ldo-common"
122+
123+
$defs:
124+
ldo-common:
125+
type: object
126+
$ref: regulator.yaml#
127+
unevaluatedProperties: false
128+
properties:
129+
regulator-allowed-modes:
130+
description: |
131+
Allowed LDO regulator operating modes allowed. Valid values below.
132+
0 - Normal mode with automatic power saving, reducing the switching
133+
frequency when light load conditions are detected
134+
2 - Forced Low Power mode for improved regulator efficiency, used
135+
when no heavy load is expected, does not limit the maximum out
136+
current but unless only a light load is applied, there will be
137+
regulation accuracy and efficiency losses.
138+
maxItems: 2
139+
items:
140+
enum: [ 0, 2 ]
141+
142+
required:
143+
- compatible
144+
- reg
145+
146+
additionalProperties: false

0 commit comments

Comments
 (0)