Message ID | 20250314073307.25092-1-Lu.Tang@mediatek.com (mailing list archive) |
---|---|
Headers | show |
Series | Add PMIC and SPMI driver for mt8196 | expand |
On Fri, Mar 14, 2025 at 3:58 PM Lu.Tang <Lu.Tang@mediatek.com> wrote: > > From: "Lu.Tang" <lu.tang@mediatek.com> > > Add pmic mt6316/mt6373/mt6363 regulator driver Please split this into one patch per PMIC. That will make the patch size much more manageable. And the patch subject should just say what PMIC is added. > Signed-off-by: Lu Tang <lu.tang@mediatek.com> > --- > drivers/regulator/Kconfig | 34 + > drivers/regulator/Makefile | 3 + > drivers/regulator/mt6316-regulator.c | 381 +++++++ How much of the MT6316 driver is the same or similar to MT6315? AFAICT they are both 4 buck regulators where some of the outputs can be combined into a polyphase output. > drivers/regulator/mt6363-regulator.c | 1106 ++++++++++++++++++++ > drivers/regulator/mt6373-regulator.c | 826 +++++++++++++++ > include/linux/regulator/mt6316-regulator.h | 48 + > include/linux/regulator/mt6363-regulator.h | 424 ++++++++ > include/linux/regulator/mt6373-regulator.h | 318 ++++++ > 8 files changed, 3140 insertions(+) > create mode 100644 drivers/regulator/mt6316-regulator.c > create mode 100644 drivers/regulator/mt6363-regulator.c > create mode 100644 drivers/regulator/mt6373-regulator.c > create mode 100644 include/linux/regulator/mt6316-regulator.h > create mode 100644 include/linux/regulator/mt6363-regulator.h > create mode 100644 include/linux/regulator/mt6373-regulator.h > > diff --git a/drivers/regulator/Kconfig b/drivers/regulator/Kconfig > index 39297f7d8177..7b2d47fee535 100644 > --- a/drivers/regulator/Kconfig > +++ b/drivers/regulator/Kconfig > @@ -853,6 +853,16 @@ config REGULATOR_MT6315 > This driver supports the control of different power rails of device > through regulator interface. > > +config REGULATOR_MT6316 > + tristate "MediaTek MT6316 PMIC" > + depends on SPMI > + select REGMAP_SPMI > + help > + Say y here to select this option to enable the power regulator of > + MediaTek MT6316 PMIC. > + This driver supports the control of different power rails of device > + through regulator interface. > + > config REGULATOR_MT6323 > tristate "MediaTek MT6323 PMIC" > depends on MFD_MT6397 > @@ -916,6 +926,18 @@ config REGULATOR_MT6360 > 2-channel buck with Thermal Shutdown and Overload Protection > 6-channel High PSRR and Low Dropout LDO. > > +config REGULATOR_MT6363 > + tristate "MT6363 SPMI Regulator driver" > + depends on MFD_MTK_SPMI_PMIC > + help > + Say y here to select this option to enable the power regulator of > + MediaTek MT6363 PMIC. > + This driver supports the control of different power rails of device > + through regulator interface. > + > + The driver can also be build as a module. > + If so, the module will be called mt6363_regulator > + > config REGULATOR_MT6370 > tristate "MT6370 SubPMIC Regulator" > depends on MFD_MT6370 > @@ -924,6 +946,18 @@ config REGULATOR_MT6370 > This driver supports the control for DisplayBias voltages and one > general purpose LDO which is commonly used to drive the vibrator. > > +config REGULATOR_MT6373 > + tristate "MT6373 SPMI Regulator driver" > + depends on MFD_MTK_SPMI_PMIC > + help > + Say y here to select this option to enable the power regulator of > + MediaTek MT6373 PMIC. > + This driver supports the control of different power rails of device > + through regulator interface. > + > + The driver can also be build as a module. > + If so, the module will be called mt6373_regulator > + > config REGULATOR_MT6380 > tristate "MediaTek MT6380 PMIC" > depends on MTK_PMIC_WRAP > diff --git a/drivers/regulator/Makefile b/drivers/regulator/Makefile > index 3d5a803dce8a..b54a64522499 100644 > --- a/drivers/regulator/Makefile > +++ b/drivers/regulator/Makefile > @@ -102,6 +102,7 @@ obj-$(CONFIG_REGULATOR_MP886X) += mp886x.o > obj-$(CONFIG_REGULATOR_MPQ7920) += mpq7920.o > obj-$(CONFIG_REGULATOR_MT6311) += mt6311-regulator.o > obj-$(CONFIG_REGULATOR_MT6315) += mt6315-regulator.o > +obj-$(CONFIG_REGULATOR_MT6316) += mt6316-regulator.o > obj-$(CONFIG_REGULATOR_MT6323) += mt6323-regulator.o > obj-$(CONFIG_REGULATOR_MT6331) += mt6331-regulator.o > obj-$(CONFIG_REGULATOR_MT6332) += mt6332-regulator.o > @@ -109,7 +110,9 @@ obj-$(CONFIG_REGULATOR_MT6357) += mt6357-regulator.o > obj-$(CONFIG_REGULATOR_MT6358) += mt6358-regulator.o > obj-$(CONFIG_REGULATOR_MT6359) += mt6359-regulator.o > obj-$(CONFIG_REGULATOR_MT6360) += mt6360-regulator.o > +obj-$(CONFIG_REGULATOR_MT6363) += mt6363-regulator.o > obj-$(CONFIG_REGULATOR_MT6370) += mt6370-regulator.o > +obj-$(CONFIG_REGULATOR_MT6373) += mt6373-regulator.o > obj-$(CONFIG_REGULATOR_MT6380) += mt6380-regulator.o > obj-$(CONFIG_REGULATOR_MT6397) += mt6397-regulator.o > obj-$(CONFIG_REGULATOR_MTK_DVFSRC) += mtk-dvfsrc-regulator.o > diff --git a/drivers/regulator/mt6316-regulator.c b/drivers/regulator/mt6316-regulator.c > new file mode 100644 > index 000000000000..1c069a0d4cff > --- /dev/null > +++ b/drivers/regulator/mt6316-regulator.c > @@ -0,0 +1,381 @@ > +// SPDX-License-Identifier: GPL-2.0 > +// > +// Copyright (c) 2024 MediaTek Inc. > + > +#include <linux/interrupt.h> > +#include <linux/module.h> > +#include <linux/of_device.h> > +#include <linux/of_irq.h> > +#include <linux/platform_device.h> > +#include <linux/regmap.h> > +#include <linux/regulator/driver.h> > +#include <linux/regulator/machine.h> > +#include <linux/regulator/mt6316-regulator.h> > +#include <linux/regulator/of_regulator.h> > + > +#define SET_OFFSET 0x1 > +#define CLR_OFFSET 0x2 > + > +#define MT6316_REG_WIDTH 8 > + > +#define MT6316_BUCK_MODE_AUTO 0 > +#define MT6316_BUCK_MODE_FORCE_PWM 1 > +#define MT6316_BUCK_MODE_NORMAL 0 > +#define MT6316_BUCK_MODE_LP 2 > + > +#define BUCK_PHASE_3 3 > +#define BUCK_PHASE_4 4 > + > +struct mt6316_regulator_info { > + struct regulator_desc desc; > + u32 da_reg; > + u32 qi; > + u32 modeset_reg; > + u32 modeset_mask; > + u32 lp_mode_reg; > + u32 lp_mode_mask; > + u32 lp_mode_shift; > +}; > + > +struct mt6316_init_data { > + u32 id; > + u32 size; > +}; > + > +struct mt6316_chip { > + struct device *dev; > + struct regmap *regmap; > + u32 slave_id; > +}; > + > +#define MT_BUCK(match, _name, volt_ranges, _bid, _vsel) \ > +[MT6316_ID_##_name] = { \ > + .desc = { \ > + .name = #_name, \ > + .of_match = of_match_ptr(match), \ > + .ops = &mt6316_volt_range_ops, \ > + .type = REGULATOR_VOLTAGE, \ > + .id = MT6316_ID_##_name, \ > + .owner = THIS_MODULE, \ > + .n_voltages = 0x1ff, \ > + .linear_ranges = volt_ranges, \ > + .n_linear_ranges = ARRAY_SIZE(volt_ranges),\ > + .vsel_reg = _vsel, \ > + .vsel_mask = 0xff, \ > + .enable_reg = MT6316_BUCK_TOP_CON0, \ > + .enable_mask = BIT(_bid - 1), \ > + .of_map_mode = mt6316_map_mode, \ > + }, \ > + .da_reg = MT6316_VBUCK##_bid##_DBG8, \ > + .qi = BIT(0), \ > + .lp_mode_reg = MT6316_BUCK_TOP_CON1, \ > + .lp_mode_mask = BIT(_bid - 1), \ > + .lp_mode_shift = _bid - 1, \ > + .modeset_reg = MT6316_BUCK_TOP_4PHASE_TOP_ANA_CON0,\ > + .modeset_mask = BIT(_bid - 1), \ > +} > + > +static const struct linear_range mt_volt_range1[] = { > + REGULATOR_LINEAR_RANGE(0, 0, 0x1fe, 2500), > +}; > + > +static int mt6316_regulator_enable(struct regulator_dev *rdev) > +{ > + return regmap_write(rdev->regmap, rdev->desc->enable_reg + SET_OFFSET, > + rdev->desc->enable_mask); > +} > + > +static int mt6316_regulator_disable(struct regulator_dev *rdev) > +{ > + return regmap_write(rdev->regmap, rdev->desc->enable_reg + CLR_OFFSET, > + rdev->desc->enable_mask); > +} > + > +static unsigned int mt6316_map_mode(u32 mode) > +{ > + switch (mode) { > + case MT6316_BUCK_MODE_AUTO: > + return REGULATOR_MODE_NORMAL; > + case MT6316_BUCK_MODE_FORCE_PWM: > + return REGULATOR_MODE_FAST; > + case MT6316_BUCK_MODE_LP: > + return REGULATOR_MODE_IDLE; > + default: > + return REGULATOR_MODE_INVALID; > + } > +} > + > +static int mt6316_regulator_set_voltage_sel(struct regulator_dev *rdev, unsigned int selector) > +{ > + unsigned short reg_val = 0; > + int ret = 0; > + > + reg_val = ((selector & 0x1) << 8) | (selector >> 1); > + ret = regmap_bulk_write(rdev->regmap, rdev->desc->vsel_reg, (u8 *) ®_val, 2); > + > + return ret; > +} > + > +static int mt6316_regulator_get_voltage_sel(struct regulator_dev *rdev) > +{ > + int ret = 0; > + unsigned int reg_val = 0; > + > + ret = regmap_bulk_read(rdev->regmap, rdev->desc->vsel_reg, (u8 *) ®_val, 2); > + if (ret != 0) { > + dev_err(&rdev->dev, "Failed to get mt6316 regulator voltage: %d\n", ret); > + return ret; > + } > + ret = ((reg_val >> 8) & 0x1) + ((reg_val & rdev->desc->vsel_mask) << 1); > + > + return ret; > +} > + > +static unsigned int mt6316_regulator_get_mode(struct regulator_dev *rdev) > +{ > + struct mt6316_regulator_info *info; > + int ret = 0, regval = 0; > + u32 modeset_mask; > + > + info = container_of(rdev->desc, struct mt6316_regulator_info, desc); > + ret = regmap_read(rdev->regmap, info->modeset_reg, ®val); > + if (ret != 0) { > + dev_err(&rdev->dev, "Failed to get mt6316 buck mode: %d\n", ret); > + return ret; > + } > + > + modeset_mask = info->modeset_mask; > + > + if ((regval & modeset_mask) == modeset_mask) > + return REGULATOR_MODE_FAST; > + > + ret = regmap_read(rdev->regmap, info->lp_mode_reg, ®val); > + if (ret != 0) { > + dev_err(&rdev->dev, "Failed to get mt6316 buck lp mode: %d\n", ret); > + return ret; > + } > + > + if (regval & info->lp_mode_mask) > + return REGULATOR_MODE_IDLE; > + else > + return REGULATOR_MODE_NORMAL; > +} > + > +static int mt6316_regulator_set_mode(struct regulator_dev *rdev, u32 mode) > +{ > + struct mt6316_regulator_info *info; > + int ret = 0, val, curr_mode; > + u32 modeset_mask; > + > + info = container_of(rdev->desc, struct mt6316_regulator_info, desc); > + modeset_mask = info->modeset_mask; > + > + curr_mode = mt6316_regulator_get_mode(rdev); > + switch (mode) { > + case REGULATOR_MODE_FAST: > + ret = regmap_update_bits(rdev->regmap, info->modeset_reg, > + modeset_mask, modeset_mask); > + break; > + case REGULATOR_MODE_NORMAL: > + if (curr_mode == REGULATOR_MODE_FAST) { > + ret = regmap_update_bits(rdev->regmap, info->modeset_reg, > + modeset_mask, 0); > + } else if (curr_mode == REGULATOR_MODE_IDLE) { > + ret = regmap_update_bits(rdev->regmap, info->lp_mode_reg, > + info->lp_mode_mask, 0); > + usleep_range(100, 110); > + } > + break; > + case REGULATOR_MODE_IDLE: > + val = MT6316_BUCK_MODE_LP >> 1; > + val <<= info->lp_mode_shift; > + ret = regmap_update_bits(rdev->regmap, info->lp_mode_reg, info->lp_mode_mask, val); > + break; > + default: > + ret = -EINVAL; > + goto err_mode; > + } > + > +err_mode: > + if (ret != 0) { > + dev_err(&rdev->dev, "Failed to set mt6316 buck mode: %d\n", ret); > + return ret; > + } > + > + return 0; > +} > + > +static int mt6316_get_status(struct regulator_dev *rdev) > +{ > + int ret = 0; > + u32 regval = 0; > + struct mt6316_regulator_info *info; > + > + info = container_of(rdev->desc, struct mt6316_regulator_info, desc); > + ret = regmap_read(rdev->regmap, info->da_reg, ®val); > + if (ret != 0) { > + dev_notice(&rdev->dev, "Failed to get enable reg: %d\n", ret); > + return ret; > + } > + > + return (regval & info->qi) ? REGULATOR_STATUS_ON : REGULATOR_STATUS_OFF; > +} > + > +static void mt6316_buck_phase_init(struct mt6316_chip *chip, unsigned int *s6_buck_phase) > +{ > + int ret = 0; > + u32 val = 0; > + > + ret = regmap_read(chip->regmap, MT6316_BUCK_TOP_4PHASE_TOP_ELR_0, &val); > + if (ret) { > + dev_err(chip->dev, "Failed to get mt6316 buck phase: %d\n", ret); > + return; > + } > + > + dev_info(chip->dev, "S%d RG_4PH_CONFIG:%d\n", chip->slave_id, val); > + if (chip->slave_id == MT6316_SLAVE_ID_6) > + *s6_buck_phase = val; > +} > + > +static const struct regulator_ops mt6316_volt_range_ops = { > + .list_voltage = regulator_list_voltage_linear_range, > + .map_voltage = regulator_map_voltage_linear_range, > + .set_voltage_sel = mt6316_regulator_set_voltage_sel, > + .get_voltage_sel = mt6316_regulator_get_voltage_sel, > + .set_voltage_time_sel = regulator_set_voltage_time_sel, > + .enable = mt6316_regulator_enable, > + .disable = mt6316_regulator_disable, > + .is_enabled = regulator_is_enabled_regmap, > + .get_status = mt6316_get_status, > + .set_mode = mt6316_regulator_set_mode, > + .get_mode = mt6316_regulator_get_mode, > +}; > + > +static struct mt6316_regulator_info mt6316_regulators[] = { > + MT_BUCK("vbuck1", VBUCK1, mt_volt_range1, 1, MT6316_BUCK_TOP_ELR0), > + MT_BUCK("vbuck2", VBUCK2, mt_volt_range1, 2, MT6316_BUCK_TOP_ELR2), > + MT_BUCK("vbuck3", VBUCK3, mt_volt_range1, 3, MT6316_BUCK_TOP_ELR4), > + MT_BUCK("vbuck4", VBUCK4, mt_volt_range1, 4, MT6316_BUCK_TOP_ELR6), > +}; > + > +static struct mt6316_init_data mt6316_3_init_data = { > + .id = MT6316_SLAVE_ID_3, > + .size = MT6316_ID_3_MAX, > +}; > + > +static struct mt6316_init_data mt6316_6_init_data = { > + .id = MT6316_SLAVE_ID_6, > + .size = MT6316_ID_6_MAX, > +}; > + > +static struct mt6316_init_data mt6316_7_init_data = { > + .id = MT6316_SLAVE_ID_7, > + .size = MT6316_ID_7_MAX, > +}; > + > +static struct mt6316_init_data mt6316_8_init_data = { > + .id = MT6316_SLAVE_ID_8, > + .size = MT6316_ID_8_MAX, > +}; > + > +static struct mt6316_init_data mt6316_15_init_data = { > + .id = MT6316_SLAVE_ID_15, > + .size = MT6316_ID_15_MAX, > +}; > + > +static const struct of_device_id mt6316_of_match[] = { > + { > + .compatible = "mediatek,mt6316-3-regulator", > + .data = &mt6316_3_init_data, > + }, { > + .compatible = "mediatek,mt6316-6-regulator", > + .data = &mt6316_6_init_data, > + }, { > + .compatible = "mediatek,mt6316-7-regulator", > + .data = &mt6316_7_init_data, > + }, { > + .compatible = "mediatek,mt6316-8-regulator", > + .data = &mt6316_8_init_data, > + }, { > + .compatible = "mediatek,mt6316-15-regulator", > + .data = &mt6316_15_init_data, > + }, { > + /* sentinel */ > + }, > +}; > +MODULE_DEVICE_TABLE(of, mt6316_of_match); > + > +static int mt6316_regulator_probe(struct platform_device *pdev) > +{ > + const struct of_device_id *of_id; > + struct device *dev = &pdev->dev; > + struct regmap *regmap; > + struct mt6316_init_data *pdata; > + struct mt6316_chip *chip; > + struct regulator_config config = {}; > + struct regulator_dev *rdev; > + struct device_node *node = pdev->dev.of_node; > + u32 val = 0; > + int i; > + unsigned int s6_buck_phase; > + > + regmap = dev_get_regmap(dev->parent, NULL); > + if (!regmap) > + return -ENODEV; > + > + chip = devm_kzalloc(dev, sizeof(struct mt6316_chip), GFP_KERNEL); > + if (!chip) > + return -ENOMEM; Replace the following block: > + of_id = of_match_device(mt6316_of_match, dev); > + if (!of_id || !of_id->data) > + return -ENODEV; > + > + pdata = (struct mt6316_init_data *)of_id->data; with pdata = of_device_get_match_data(dev); pdata should never be NULL since the driver is probed only when an OF match happens, and all the entries in mt6316_of_match[] have .data set. > + chip->slave_id = pdata->id; If the ID is supposed to be the SPMI ID, then there should be no reason to tie it to the compatible string. Simply get the ID from the device tree. > + if (!of_property_read_u32(node, "buck-size", &val)) > + pdata->size = val; As mentioned in downstream review, the chip has 4 buck regulators, regardless of whether they are being used or not. This is not the right way to describe unused regulators. > + chip->dev = dev; > + chip->regmap = regmap; > + dev_set_drvdata(dev, chip); > + > + dev->fwnode = &(dev->of_node->fwnode); > + if (dev->fwnode && !dev->fwnode->dev) > + dev->fwnode->dev = dev; > + > + config.dev = dev; > + config.driver_data = pdata; > + config.regmap = regmap; > + > + mt6316_buck_phase_init(chip, &s6_buck_phase); > + for (i = 0; i < pdata->size; i++) { > + if (pdata->id == MT6316_SLAVE_ID_6 && > + s6_buck_phase == BUCK_PHASE_4 && > + (mt6316_regulators + i)->desc.id == MT6316_ID_VBUCK3) { > + dev_info(dev, "skip registering %s.\n", (mt6316_regulators + i)->desc.name); > + continue; > + } > + > + rdev = devm_regulator_register(dev, &(mt6316_regulators + i)->desc, &config); > + if (IS_ERR(rdev)) { > + dev_err(dev, "failed to register %s\n", (mt6316_regulators + i)->desc.name); > + continue; > + } > + } > + > + return 0; > +} > + > +static struct platform_driver mt6316_regulator_driver = { The MT6316 only has regulators. Why does it need to go through another layer, instead of this driver being the SPMI driver? > + .driver = { > + .name = "mt6316-regulator", > + .of_match_table = mt6316_of_match, > + }, > + .probe = mt6316_regulator_probe, > +}; > + > +module_platform_driver(mt6316_regulator_driver); > + > +MODULE_AUTHOR("Lu Tang <lu.tang@mediatek.com>"); > +MODULE_DESCRIPTION("Regulator Driver for MediaTek MT6316 PMIC"); > +MODULE_LICENSE("GPL"); [...] Skipping the other two PMICs for now. > diff --git a/include/linux/regulator/mt6316-regulator.h b/include/linux/regulator/mt6316-regulator.h > new file mode 100644 > index 000000000000..dd11b3d856fd > --- /dev/null > +++ b/include/linux/regulator/mt6316-regulator.h > @@ -0,0 +1,48 @@ > +/* SPDX-License-Identifier: GPL-2.0 */ > +/* > + * Copyright (c) 2024 MediaTek Inc. > + */ > + > +#ifndef __LINUX_REGULATOR_MT6316_H > +#define __LINUX_REGULATOR_MT6316_H > + > +#define MT6316_SLAVE_ID_3 3 > +#define MT6316_SLAVE_ID_6 6 > +#define MT6316_SLAVE_ID_7 7 > +#define MT6316_SLAVE_ID_8 8 > +#define MT6316_SLAVE_ID_15 15 > + > +#define MT6316_ID_3_MAX 3 > +#define MT6316_ID_6_MAX 3 > +#define MT6316_ID_7_MAX 3 > +#define MT6316_ID_8_MAX 3 > +#define MT6316_ID_15_MAX 2 > + > +enum { > + MT6316_ID_VBUCK1 = 0, > + MT6316_ID_VBUCK2, > + MT6316_ID_VBUCK3, > + MT6316_ID_VBUCK4, > + MT6316_ID_MAX, > +}; > + > +/* Register */ > +#define MT6316_TOP_CFG_ELR4 0x143 > +#define MT6316_BUCK_TOP_CON0 0x1440 > +#define MT6316_BUCK_TOP_CON1 0x1443 > +#define MT6316_BUCK_TOP_ELR0 0x1448 > +#define MT6316_BUCK_TOP_ELR2 0x144A > +#define MT6316_BUCK_TOP_ELR4 0x144C > +#define MT6316_BUCK_TOP_ELR6 0x144E > +#define MT6316_VBUCK1_DBG4 0x14A4 > +#define MT6316_VBUCK1_DBG8 0x14A8 > +#define MT6316_VBUCK2_DBG4 0x1524 > +#define MT6316_VBUCK2_DBG8 0x1528 > +#define MT6316_VBUCK3_DBG4 0x15A4 > +#define MT6316_VBUCK3_DBG8 0x15A8 > +#define MT6316_VBUCK4_DBG4 0x1624 > +#define MT6316_VBUCK4_DBG8 0x1628 > +#define MT6316_BUCK_TOP_4PHASE_TOP_ANA_CON0 0x1688 > +#define MT6316_BUCK_TOP_4PHASE_TOP_ELR_0 0x1690 > + > +#endif /* __LINUX_REGULATOR_MT6316_H */ AFAICT, no part of this file is used by other parts of the kernel. It can be moved under drivers/regulator/, or even recombined with the .c file. Thanks ChenYu
On Fri, Mar 14, 2025 at 3:56 PM Lu.Tang <Lu.Tang@mediatek.com> wrote: > > This series is based on linux-next. > > Changes in v0: > - Modify SPMI driver for mt8196 > - Add SPMI PMIC mfd driver > - Add PMIC regulator driver for mt8196 > > *** BLURB HERE *** > > Lu.Tang (5): > pmic: mediatek: Add pmic auxadc driver > pmic: mediatek: Add pmic regulator driver > pmic: mediatek: Add spmi pmic mfd driver > spmi: mediatek: modify spmi dirver for mt8196 > dt-bindings: pmic: mediatek: Add pmic documents You are adding three PMICs at the same time. Please separate each patch in this series so that it is one patch per type per PMIC. ChenYu > .../iio/adc/mediatek,spmi-pmic-auxadc.yaml | 31 + > .../bindings/input/mediatek,pmic-keys.yaml | 1 + > .../bindings/mfd/mediatek,mt6685.yaml | 50 + > .../bindings/mfd/mediatek,spmi-pmic.yaml | 173 +++ > .../pinctrl/mediatek,mt65xx-pinctrl.yaml | 1 + > drivers/iio/adc/Kconfig | 10 + > drivers/iio/adc/Makefile | 1 + > drivers/iio/adc/mtk-spmi-pmic-adc.c | 576 +++++++++ > drivers/mfd/Kconfig | 26 + > drivers/mfd/Makefile | 2 + > drivers/mfd/mt6685-core.c | 83 ++ > drivers/mfd/mtk-spmi-pmic.c | 518 ++++++++ > drivers/regulator/Kconfig | 34 + > drivers/regulator/Makefile | 3 + > drivers/regulator/mt6316-regulator.c | 381 ++++++ > drivers/regulator/mt6363-regulator.c | 1106 +++++++++++++++++ > drivers/regulator/mt6373-regulator.c | 826 ++++++++++++ > drivers/spmi/spmi-mtk-pmif.c | 1040 +++++++++++++++- > include/linux/mfd/mt6363/core.h | 134 ++ > include/linux/mfd/mt6363/registers.h | 168 +++ > include/linux/mfd/mt6373/core.h | 94 ++ > include/linux/mfd/mt6373/registers.h | 53 + > include/linux/regulator/mt6316-regulator.h | 48 + > include/linux/regulator/mt6363-regulator.h | 424 +++++++ > include/linux/regulator/mt6373-regulator.h | 318 +++++ > 25 files changed, 6037 insertions(+), 64 deletions(-) > create mode 100644 Documentation/devicetree/bindings/iio/adc/mediatek,spmi-pmic-auxadc.yaml > create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt6685.yaml > create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,spmi-pmic.yaml > create mode 100644 drivers/iio/adc/mtk-spmi-pmic-adc.c > create mode 100644 drivers/mfd/mt6685-core.c > create mode 100644 drivers/mfd/mtk-spmi-pmic.c > create mode 100644 drivers/regulator/mt6316-regulator.c > create mode 100644 drivers/regulator/mt6363-regulator.c > create mode 100644 drivers/regulator/mt6373-regulator.c > create mode 100644 include/linux/mfd/mt6363/core.h > create mode 100644 include/linux/mfd/mt6363/registers.h > create mode 100644 include/linux/mfd/mt6373/core.h > create mode 100644 include/linux/mfd/mt6373/registers.h > create mode 100644 include/linux/regulator/mt6316-regulator.h > create mode 100644 include/linux/regulator/mt6363-regulator.h > create mode 100644 include/linux/regulator/mt6373-regulator.h > > -- > 2.46.0 > >
Update email address -----邮件原件----- 发件人: Lu.Tang <Lu.Tang@mediatek.com> 发送时间: 2025年3月14日 15:32 收件人: Jonathan Cameron <jic23@kernel.org>; Lars-Peter Clausen <lars@metafoo.de>; Rob Herring <robh@kernel.org>; Krzysztof Kozlowski <krzk+dt@kernel.org>; Conor Dooley <conor+dt@kernel.org>; Dmitry Torokhov <dmitry.torokhov@gmail.com>; Lee Jones <lee@kernel.org>; Matthias Brugger <matthias.bgg@gmail.com>; AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>; Sean Wang <sean.wang@kernel.org>; Linus Walleij <linus.walleij@linaro.org>; Liam Girdwood <lgirdwood@gmail.com>; Mark Brown <broonie@kernel.org>; Stephen Boyd <sboyd@kernel.org>; Chen Zhong (钟辰) <Chen.Zhong@mediatek.com>; Sen Chu <shen.chu@mediatek.com> 抄送: linux-iio@vger.kernel.org; devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; linux-input@vger.kernel.org; linux-arm-kernel@lists.infradead.org; linux-mediatek@lists.infradead.org; linux-gpio@vger.kernel.org; Project_Global_Chrome_Upstream_Group <Project_Global_Chrome_Upstream_Group@mediatek.com>; Lu Tang (汤璐) <Lu.Tang@mediatek.com> 主题: [PATCH 0/5] Add PMIC and SPMI driver for mt8196 This series is based on linux-next. Changes in v0: - Modify SPMI driver for mt8196 - Add SPMI PMIC mfd driver - Add PMIC regulator driver for mt8196 *** BLURB HERE *** Lu.Tang (5): pmic: mediatek: Add pmic auxadc driver pmic: mediatek: Add pmic regulator driver pmic: mediatek: Add spmi pmic mfd driver spmi: mediatek: modify spmi dirver for mt8196 dt-bindings: pmic: mediatek: Add pmic documents .../iio/adc/mediatek,spmi-pmic-auxadc.yaml | 31 + .../bindings/input/mediatek,pmic-keys.yaml | 1 + .../bindings/mfd/mediatek,mt6685.yaml | 50 + .../bindings/mfd/mediatek,spmi-pmic.yaml | 173 +++ .../pinctrl/mediatek,mt65xx-pinctrl.yaml | 1 + drivers/iio/adc/Kconfig | 10 + drivers/iio/adc/Makefile | 1 + drivers/iio/adc/mtk-spmi-pmic-adc.c | 576 +++++++++ drivers/mfd/Kconfig | 26 + drivers/mfd/Makefile | 2 + drivers/mfd/mt6685-core.c | 83 ++ drivers/mfd/mtk-spmi-pmic.c | 518 ++++++++ drivers/regulator/Kconfig | 34 + drivers/regulator/Makefile | 3 + drivers/regulator/mt6316-regulator.c | 381 ++++++ drivers/regulator/mt6363-regulator.c | 1106 +++++++++++++++++ drivers/regulator/mt6373-regulator.c | 826 ++++++++++++ drivers/spmi/spmi-mtk-pmif.c | 1040 +++++++++++++++- include/linux/mfd/mt6363/core.h | 134 ++ include/linux/mfd/mt6363/registers.h | 168 +++ include/linux/mfd/mt6373/core.h | 94 ++ include/linux/mfd/mt6373/registers.h | 53 + include/linux/regulator/mt6316-regulator.h | 48 + include/linux/regulator/mt6363-regulator.h | 424 +++++++ include/linux/regulator/mt6373-regulator.h | 318 +++++ 25 files changed, 6037 insertions(+), 64 deletions(-) create mode 100644 Documentation/devicetree/bindings/iio/adc/mediatek,spmi-pmic-auxadc.yaml create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,mt6685.yaml create mode 100644 Documentation/devicetree/bindings/mfd/mediatek,spmi-pmic.yaml create mode 100644 drivers/iio/adc/mtk-spmi-pmic-adc.c create mode 100644 drivers/mfd/mt6685-core.c create mode 100644 drivers/mfd/mtk-spmi-pmic.c create mode 100644 drivers/regulator/mt6316-regulator.c create mode 100644 drivers/regulator/mt6363-regulator.c create mode 100644 drivers/regulator/mt6373-regulator.c create mode 100644 include/linux/mfd/mt6363/core.h create mode 100644 include/linux/mfd/mt6363/registers.h create mode 100644 include/linux/mfd/mt6373/core.h create mode 100644 include/linux/mfd/mt6373/registers.h create mode 100644 include/linux/regulator/mt6316-regulator.h create mode 100644 include/linux/regulator/mt6363-regulator.h create mode 100644 include/linux/regulator/mt6373-regulator.h -- 2.46.0