diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/mfd/abx500/ab8500.h | 3 | ||||
-rw-r--r-- | include/linux/mfd/rohm-generic.h | 14 | ||||
-rw-r--r-- | include/linux/regulator/ab8500.h | 166 | ||||
-rw-r--r-- | include/linux/regulator/mt6315-regulator.h | 44 | ||||
-rw-r--r-- | include/linux/regulator/pca9450.h | 7 |
5 files changed, 57 insertions, 177 deletions
diff --git a/include/linux/mfd/abx500/ab8500.h b/include/linux/mfd/abx500/ab8500.h index 524a7e4702c2..302a330c5c84 100644 --- a/include/linux/mfd/abx500/ab8500.h +++ b/include/linux/mfd/abx500/ab8500.h @@ -368,7 +368,6 @@ struct ab8500 { int it_latchhier_num; }; -struct ab8500_regulator_platform_data; struct ab8500_codec_platform_data; struct ab8500_sysctrl_platform_data; @@ -376,11 +375,9 @@ struct ab8500_sysctrl_platform_data; * struct ab8500_platform_data - AB8500 platform data * @irq_base: start of AB8500 IRQs, AB8500_NR_IRQS will be used * @init: board-specific initialization after detection of ab8500 - * @regulator: machine-specific constraints for regulators */ struct ab8500_platform_data { void (*init) (struct ab8500 *); - struct ab8500_regulator_platform_data *regulator; struct ab8500_codec_platform_data *codec; struct ab8500_sysctrl_platform_data *sysctrl; }; diff --git a/include/linux/mfd/rohm-generic.h b/include/linux/mfd/rohm-generic.h index 4283b5b33e04..2b85b9deb03a 100644 --- a/include/linux/mfd/rohm-generic.h +++ b/include/linux/mfd/rohm-generic.h @@ -20,14 +20,12 @@ struct rohm_regmap_dev { struct regmap *regmap; }; -enum { - ROHM_DVS_LEVEL_UNKNOWN, - ROHM_DVS_LEVEL_RUN, - ROHM_DVS_LEVEL_IDLE, - ROHM_DVS_LEVEL_SUSPEND, - ROHM_DVS_LEVEL_LPSR, - ROHM_DVS_LEVEL_MAX = ROHM_DVS_LEVEL_LPSR, -}; +#define ROHM_DVS_LEVEL_RUN BIT(0) +#define ROHM_DVS_LEVEL_IDLE BIT(1) +#define ROHM_DVS_LEVEL_SUSPEND BIT(2) +#define ROHM_DVS_LEVEL_LPSR BIT(3) +#define ROHM_DVS_LEVEL_VALID_AMOUNT 4 +#define ROHM_DVS_LEVEL_UNKNOWN 0 /** * struct rohm_dvs_config - dynamic voltage scaling register descriptions diff --git a/include/linux/regulator/ab8500.h b/include/linux/regulator/ab8500.h deleted file mode 100644 index 3ab1ddf151a2..000000000000 --- a/include/linux/regulator/ab8500.h +++ /dev/null @@ -1,166 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0-only */ -/* - * Copyright (C) ST-Ericsson SA 2010 - * - * Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson - * Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson - * Daniel Willerud <daniel.willerud@stericsson.com> for ST-Ericsson - */ - -#ifndef __LINUX_MFD_AB8500_REGULATOR_H -#define __LINUX_MFD_AB8500_REGULATOR_H - -#include <linux/platform_device.h> - -/* AB8500 regulators */ -enum ab8500_regulator_id { - AB8500_LDO_AUX1, - AB8500_LDO_AUX2, - AB8500_LDO_AUX3, - AB8500_LDO_INTCORE, - AB8500_LDO_TVOUT, - AB8500_LDO_AUDIO, - AB8500_LDO_ANAMIC1, - AB8500_LDO_ANAMIC2, - AB8500_LDO_DMIC, - AB8500_LDO_ANA, - AB8500_NUM_REGULATORS, -}; - -/* AB8505 regulators */ -enum ab8505_regulator_id { - AB8505_LDO_AUX1, - AB8505_LDO_AUX2, - AB8505_LDO_AUX3, - AB8505_LDO_AUX4, - AB8505_LDO_AUX5, - AB8505_LDO_AUX6, - AB8505_LDO_INTCORE, - AB8505_LDO_ADC, - AB8505_LDO_AUDIO, - AB8505_LDO_ANAMIC1, - AB8505_LDO_ANAMIC2, - AB8505_LDO_AUX8, - AB8505_LDO_ANA, - AB8505_NUM_REGULATORS, -}; - -/* AB8500 and AB8505 register initialization */ -struct ab8500_regulator_reg_init { - int id; - u8 mask; - u8 value; -}; - -#define INIT_REGULATOR_REGISTER(_id, _mask, _value) \ - { \ - .id = _id, \ - .mask = _mask, \ - .value = _value, \ - } - -/* AB8500 registers */ -enum ab8500_regulator_reg { - AB8500_REGUREQUESTCTRL2, - AB8500_REGUREQUESTCTRL3, - AB8500_REGUREQUESTCTRL4, - AB8500_REGUSYSCLKREQ1HPVALID1, - AB8500_REGUSYSCLKREQ1HPVALID2, - AB8500_REGUHWHPREQ1VALID1, - AB8500_REGUHWHPREQ1VALID2, - AB8500_REGUHWHPREQ2VALID1, - AB8500_REGUHWHPREQ2VALID2, - AB8500_REGUSWHPREQVALID1, - AB8500_REGUSWHPREQVALID2, - AB8500_REGUSYSCLKREQVALID1, - AB8500_REGUSYSCLKREQVALID2, - AB8500_REGUMISC1, - AB8500_VAUDIOSUPPLY, - AB8500_REGUCTRL1VAMIC, - AB8500_VPLLVANAREGU, - AB8500_VREFDDR, - AB8500_EXTSUPPLYREGU, - AB8500_VAUX12REGU, - AB8500_VRF1VAUX3REGU, - AB8500_VAUX1SEL, - AB8500_VAUX2SEL, - AB8500_VRF1VAUX3SEL, - AB8500_REGUCTRL2SPARE, - AB8500_REGUCTRLDISCH, - AB8500_REGUCTRLDISCH2, - AB8500_NUM_REGULATOR_REGISTERS, -}; - -/* AB8505 registers */ -enum ab8505_regulator_reg { - AB8505_REGUREQUESTCTRL1, - AB8505_REGUREQUESTCTRL2, - AB8505_REGUREQUESTCTRL3, - AB8505_REGUREQUESTCTRL4, - AB8505_REGUSYSCLKREQ1HPVALID1, - AB8505_REGUSYSCLKREQ1HPVALID2, - AB8505_REGUHWHPREQ1VALID1, - AB8505_REGUHWHPREQ1VALID2, - AB8505_REGUHWHPREQ2VALID1, - AB8505_REGUHWHPREQ2VALID2, - AB8505_REGUSWHPREQVALID1, - AB8505_REGUSWHPREQVALID2, - AB8505_REGUSYSCLKREQVALID1, - AB8505_REGUSYSCLKREQVALID2, - AB8505_REGUVAUX4REQVALID, - AB8505_REGUMISC1, - AB8505_VAUDIOSUPPLY, - AB8505_REGUCTRL1VAMIC, - AB8505_VSMPSAREGU, - AB8505_VSMPSBREGU, - AB8505_VSAFEREGU, /* NOTE! PRCMU register */ - AB8505_VPLLVANAREGU, - AB8505_EXTSUPPLYREGU, - AB8505_VAUX12REGU, - AB8505_VRF1VAUX3REGU, - AB8505_VSMPSASEL1, - AB8505_VSMPSASEL2, - AB8505_VSMPSASEL3, - AB8505_VSMPSBSEL1, - AB8505_VSMPSBSEL2, - AB8505_VSMPSBSEL3, - AB8505_VSAFESEL1, /* NOTE! PRCMU register */ - AB8505_VSAFESEL2, /* NOTE! PRCMU register */ - AB8505_VSAFESEL3, /* NOTE! PRCMU register */ - AB8505_VAUX1SEL, - AB8505_VAUX2SEL, - AB8505_VRF1VAUX3SEL, - AB8505_VAUX4REQCTRL, - AB8505_VAUX4REGU, - AB8505_VAUX4SEL, - AB8505_REGUCTRLDISCH, - AB8505_REGUCTRLDISCH2, - AB8505_REGUCTRLDISCH3, - AB8505_CTRLVAUX5, - AB8505_CTRLVAUX6, - AB8505_NUM_REGULATOR_REGISTERS, -}; - -/* AB8500 external regulators */ -struct ab8500_ext_regulator_cfg { - bool hwreq; /* requires hw mode or high power mode */ -}; - -enum ab8500_ext_regulator_id { - AB8500_EXT_SUPPLY1, - AB8500_EXT_SUPPLY2, - AB8500_EXT_SUPPLY3, - AB8500_NUM_EXT_REGULATORS, -}; - -/* AB8500 regulator platform data */ -struct ab8500_regulator_platform_data { - int num_reg_init; - struct ab8500_regulator_reg_init *reg_init; - int num_regulator; - struct regulator_init_data *regulator; - int num_ext_regulator; - struct regulator_init_data *ext_regulator; -}; - -#endif diff --git a/include/linux/regulator/mt6315-regulator.h b/include/linux/regulator/mt6315-regulator.h new file mode 100644 index 000000000000..3b80d3f3910c --- /dev/null +++ b/include/linux/regulator/mt6315-regulator.h @@ -0,0 +1,44 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* + * Copyright (c) 2021 MediaTek Inc. + */ + +#ifndef __LINUX_REGULATOR_MT6315_H +#define __LINUX_REGULATOR_MT6315_H + +#define MT6315_RP 3 +#define MT6315_PP 6 +#define MT6315_SP 7 + +enum { + MT6315_VBUCK1 = 0, + MT6315_VBUCK2, + MT6315_VBUCK3, + MT6315_VBUCK4, + MT6315_VBUCK_MAX, +}; + +/* Register */ +#define MT6315_TOP2_ELR7 0x139 +#define MT6315_TOP_TMA_KEY 0x39F +#define MT6315_TOP_TMA_KEY_H 0x3A0 +#define MT6315_BUCK_TOP_CON0 0x1440 +#define MT6315_BUCK_TOP_CON1 0x1443 +#define MT6315_BUCK_TOP_ELR0 0x1449 +#define MT6315_BUCK_TOP_ELR2 0x144B +#define MT6315_BUCK_TOP_ELR4 0x144D +#define MT6315_BUCK_TOP_ELR6 0x144F +#define MT6315_VBUCK1_DBG0 0x1499 +#define MT6315_VBUCK1_DBG4 0x149D +#define MT6315_VBUCK2_DBG0 0x1519 +#define MT6315_VBUCK2_DBG4 0x151D +#define MT6315_VBUCK3_DBG0 0x1599 +#define MT6315_VBUCK3_DBG4 0x159D +#define MT6315_VBUCK4_DBG0 0x1619 +#define MT6315_VBUCK4_DBG4 0x161D +#define MT6315_BUCK_TOP_4PHASE_ANA_CON42 0x16B1 + +#define PROTECTION_KEY_H 0x9C +#define PROTECTION_KEY 0xEA + +#endif /* __LINUX_REGULATOR_MT6315_H */ diff --git a/include/linux/regulator/pca9450.h b/include/linux/regulator/pca9450.h index 1bbd3014f906..ccdb5320a240 100644 --- a/include/linux/regulator/pca9450.h +++ b/include/linux/regulator/pca9450.h @@ -216,4 +216,11 @@ enum { #define IRQ_THERM_105 0x02 #define IRQ_THERM_125 0x01 +/* PCA9450_REG_RESET_CTRL bits */ +#define WDOG_B_CFG_MASK 0xC0 +#define WDOG_B_CFG_NONE 0x00 +#define WDOG_B_CFG_WARM 0x40 +#define WDOG_B_CFG_COLD_LDO12 0x80 +#define WDOG_B_CFG_COLD 0xC0 + #endif /* __LINUX_REG_PCA9450_H__ */ |