[V11,PATCH 15/19] regulator: mediatek: add support for mt8195
Dawei Chien
dawei.chien at mediatek.com
Thu Aug 12 01:58:42 PDT 2021
add platform data on mt8195
Signed-off-by: Dawei Chien <dawei.chien at mediatek.com>
---
drivers/regulator/mtk-dvfsrc-regulator.c | 23 +++++++++++++++++++++++
1 file changed, 23 insertions(+)
diff --git a/drivers/regulator/mtk-dvfsrc-regulator.c b/drivers/regulator/mtk-dvfsrc-regulator.c
index d3d876198d6e..1bd6e67b1de5 100644
--- a/drivers/regulator/mtk-dvfsrc-regulator.c
+++ b/drivers/regulator/mtk-dvfsrc-regulator.c
@@ -140,6 +140,25 @@ static const struct dvfsrc_regulator_init_data regulator_mt6873_data = {
.regulator_info = &mt6873_regulators[0],
};
+static const unsigned int mt8195_voltages[] = {
+ 550000,
+ 600000,
+ 650000,
+ 750000,
+};
+
+static struct dvfsrc_regulator mt8195_regulators[] = {
+ MT_DVFSRC_REGULAR("dvfsrc-vcore", VCORE,
+ mt8195_voltages),
+ MT_DVFSRC_REGULAR("dvfsrc-vscp", VSCP,
+ mt8195_voltages),
+};
+
+static const struct dvfsrc_regulator_init_data regulator_mt8195_data = {
+ .size = ARRAY_SIZE(mt8195_regulators),
+ .regulator_info = &mt8195_regulators[0],
+};
+
static const struct of_device_id mtk_dvfsrc_regulator_match[] = {
{
.compatible = "mediatek,mt8183-dvfsrc",
@@ -150,6 +169,10 @@ static const struct of_device_id mtk_dvfsrc_regulator_match[] = {
}, {
.compatible = "mediatek,mt6873-dvfsrc",
.data = ®ulator_mt6873_data,
+ }, {
+ .compatible = "mediatek,mt8195-dvfsrc",
+ .data = ®ulator_mt8195_data,
+ }, {
}, {
/* sentinel */
},
--
2.14.1
More information about the Linux-mediatek
mailing list