Skip to content

Commit 7aafbb4

Browse files
AngeloGioacchino Del Regnobroonie
authored andcommitted
regulator: mtk-dvfsrc: Add support for Dimensity 1200 MT6893
The MediaTek Dimensity 1200 (MT6893) features the same DVFSRC regulators as the other currently supported SoCs, but with a different select value: add an array describing the possible voltages for the VCORE and VSCP regulators, and assign it to a new compatible for this SoC. Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent a6c05c2 commit 7aafbb4

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

drivers/regulator/mtk-dvfsrc-regulator.c

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,6 +117,24 @@ static const struct dvfsrc_regulator_pdata mt6873_data = {
117117
.size = ARRAY_SIZE(mt6873_regulators),
118118
};
119119

120+
static const unsigned int mt6893_voltages[] = {
121+
575000,
122+
600000,
123+
650000,
124+
725000,
125+
750000,
126+
};
127+
128+
static const struct regulator_desc mt6893_regulators[] = {
129+
MTK_DVFSRC_VREG("dvfsrc-vcore", VCORE, mt6893_voltages),
130+
MTK_DVFSRC_VREG("dvfsrc-vscp", VSCP, mt6893_voltages),
131+
};
132+
133+
static const struct dvfsrc_regulator_pdata mt6893_data = {
134+
.descs = mt6893_regulators,
135+
.size = ARRAY_SIZE(mt6893_regulators),
136+
};
137+
120138
static const unsigned int mt8183_voltages[] = {
121139
725000,
122140
800000,
@@ -173,6 +191,7 @@ static int dvfsrc_vcore_regulator_probe(struct platform_device *pdev)
173191

174192
static const struct of_device_id mtk_dvfsrc_regulator_match[] = {
175193
{ .compatible = "mediatek,mt6873-dvfsrc-regulator", .data = &mt6873_data },
194+
{ .compatible = "mediatek,mt6893-dvfsrc-regulator", .data = &mt6893_data },
176195
{ .compatible = "mediatek,mt8183-dvfsrc-regulator", .data = &mt8183_data },
177196
{ .compatible = "mediatek,mt8192-dvfsrc-regulator", .data = &mt6873_data },
178197
{ .compatible = "mediatek,mt8195-dvfsrc-regulator", .data = &mt8195_data },

0 commit comments

Comments
 (0)