Skip to content

Commit 024f39f

Browse files
AngeloGioacchino Del Regnobroonie
authored andcommitted
regulator: mtk-dvfsrc: Add support for MediaTek MT8196 DVFSRC
The MediaTek MT8196 Chromebook SoC features one DVFSRC regulator with 6 voltage steps. Signed-off-by: AngeloGioacchino Del Regno <[email protected]> Link: https://patch.msgid.link/[email protected] Signed-off-by: Mark Brown <[email protected]>
1 parent ae77b8e commit 024f39f

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
@@ -166,6 +166,24 @@ static const struct dvfsrc_regulator_pdata mt8195_data = {
166166
.size = ARRAY_SIZE(mt8195_regulators),
167167
};
168168

169+
static const unsigned int mt8196_voltages[] = {
170+
575000,
171+
600000,
172+
650000,
173+
725000,
174+
825000,
175+
875000,
176+
};
177+
178+
static const struct regulator_desc mt8196_regulators[] = {
179+
MTK_DVFSRC_VREG("dvfsrc-vcore", VCORE, mt8196_voltages),
180+
};
181+
182+
static const struct dvfsrc_regulator_pdata mt8196_data = {
183+
.descs = mt8196_regulators,
184+
.size = ARRAY_SIZE(mt8196_regulators),
185+
};
186+
169187
static int dvfsrc_vcore_regulator_probe(struct platform_device *pdev)
170188
{
171189
struct regulator_config config = { .dev = &pdev->dev };
@@ -195,6 +213,7 @@ static const struct of_device_id mtk_dvfsrc_regulator_match[] = {
195213
{ .compatible = "mediatek,mt8183-dvfsrc-regulator", .data = &mt8183_data },
196214
{ .compatible = "mediatek,mt8192-dvfsrc-regulator", .data = &mt6873_data },
197215
{ .compatible = "mediatek,mt8195-dvfsrc-regulator", .data = &mt8195_data },
216+
{ .compatible = "mediatek,mt8196-dvfsrc-regulator", .data = &mt8196_data },
198217
{ /* sentinel */ }
199218
};
200219
MODULE_DEVICE_TABLE(of, mtk_dvfsrc_regulator_match);

0 commit comments

Comments
 (0)