]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
regulator: mtk-dvfsrc: Add support for Dimensity 1200 MT6893
authorAngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Mon, 23 Jun 2025 12:01:42 +0000 (14:01 +0200)
committerMark Brown <broonie@kernel.org>
Mon, 23 Jun 2025 12:12:29 +0000 (13:12 +0100)
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 <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20250623120144.109359-3-angelogioacchino.delregno@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>
drivers/regulator/mtk-dvfsrc-regulator.c

index f5662c569464275d7f6c43ba07f31b6068f099ee..5bc4d85517f0d64bfe730792849d126ed5a33de2 100644 (file)
@@ -117,6 +117,24 @@ static const struct dvfsrc_regulator_pdata mt6873_data = {
        .size = ARRAY_SIZE(mt6873_regulators),
 };
 
+static const unsigned int mt6893_voltages[] = {
+       575000,
+       600000,
+       650000,
+       725000,
+       750000,
+};
+
+static const struct regulator_desc mt6893_regulators[] = {
+       MTK_DVFSRC_VREG("dvfsrc-vcore", VCORE, mt6893_voltages),
+       MTK_DVFSRC_VREG("dvfsrc-vscp", VSCP, mt6893_voltages),
+};
+
+static const struct dvfsrc_regulator_pdata mt6893_data = {
+       .descs = mt6893_regulators,
+       .size = ARRAY_SIZE(mt6893_regulators),
+};
+
 static const unsigned int mt8183_voltages[] = {
        725000,
        800000,
@@ -173,6 +191,7 @@ static int dvfsrc_vcore_regulator_probe(struct platform_device *pdev)
 
 static const struct of_device_id mtk_dvfsrc_regulator_match[] = {
        { .compatible = "mediatek,mt6873-dvfsrc-regulator", .data = &mt6873_data },
+       { .compatible = "mediatek,mt6893-dvfsrc-regulator", .data = &mt6893_data },
        { .compatible = "mediatek,mt8183-dvfsrc-regulator", .data = &mt8183_data },
        { .compatible = "mediatek,mt8192-dvfsrc-regulator", .data = &mt6873_data },
        { .compatible = "mediatek,mt8195-dvfsrc-regulator", .data = &mt8195_data },