2010-07-13 14:21:28 +08:00
|
|
|
/*
|
|
|
|
* Copyright (C) ST-Ericsson SA 2010
|
|
|
|
*
|
|
|
|
* License Terms: GNU General Public License v2
|
|
|
|
*
|
regulator: initialization for ab8500 regulators
The regulators on the AB8500 have a lot of custom
hardware control settings pertaining to 8 external
signals, settings which are board-specific and need
be provided from the platform at startup.
Initialization added for regulators Vana, VextSupply1,
VextSupply2, VextSupply3, Vaux1, Vaux2, Vaux3, VTVout,
Vintcore12, Vaudio, Vdmic, Vamic1, Vamic2, VrefDDR.
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-11 18:54:46 +08:00
|
|
|
* Authors: Sundar Iyer <sundar.iyer@stericsson.com> for ST-Ericsson
|
|
|
|
* Bengt Jonsson <bengt.g.jonsson@stericsson.com> for ST-Ericsson
|
2013-03-29 00:11:14 +08:00
|
|
|
* Daniel Willerud <daniel.willerud@stericsson.com> for ST-Ericsson
|
2010-07-13 14:21:28 +08:00
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef __LINUX_MFD_AB8500_REGULATOR_H
|
|
|
|
#define __LINUX_MFD_AB8500_REGULATOR_H
|
|
|
|
|
2013-03-29 00:11:01 +08:00
|
|
|
#include <linux/platform_device.h>
|
|
|
|
|
2010-07-13 14:21:28 +08:00
|
|
|
/* AB8500 regulators */
|
2010-12-10 18:08:40 +08:00
|
|
|
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,
|
|
|
|
};
|
regulator: initialization for ab8500 regulators
The regulators on the AB8500 have a lot of custom
hardware control settings pertaining to 8 external
signals, settings which are board-specific and need
be provided from the platform at startup.
Initialization added for regulators Vana, VextSupply1,
VextSupply2, VextSupply3, Vaux1, Vaux2, Vaux3, VTVout,
Vintcore12, Vaudio, Vdmic, Vamic1, Vamic2, VrefDDR.
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-11 18:54:46 +08:00
|
|
|
|
2013-03-29 00:11:14 +08:00
|
|
|
/* 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_USB,
|
|
|
|
AB8505_LDO_AUDIO,
|
|
|
|
AB8505_LDO_ANAMIC1,
|
|
|
|
AB8505_LDO_ANAMIC2,
|
|
|
|
AB8505_LDO_AUX8,
|
|
|
|
AB8505_LDO_ANA,
|
|
|
|
AB8505_SYSCLKREQ_2,
|
|
|
|
AB8505_SYSCLKREQ_4,
|
|
|
|
AB8505_NUM_REGULATORS,
|
|
|
|
};
|
|
|
|
|
2018-03-22 18:17:40 +08:00
|
|
|
/* AB8500 and AB8505 register initialization */
|
regulator: initialization for ab8500 regulators
The regulators on the AB8500 have a lot of custom
hardware control settings pertaining to 8 external
signals, settings which are board-specific and need
be provided from the platform at startup.
Initialization added for regulators Vana, VextSupply1,
VextSupply2, VextSupply3, Vaux1, Vaux2, Vaux3, VTVout,
Vintcore12, Vaudio, Vdmic, Vamic1, Vamic2, VrefDDR.
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-11 18:54:46 +08:00
|
|
|
struct ab8500_regulator_reg_init {
|
|
|
|
int id;
|
2013-03-21 23:59:01 +08:00
|
|
|
u8 mask;
|
regulator: initialization for ab8500 regulators
The regulators on the AB8500 have a lot of custom
hardware control settings pertaining to 8 external
signals, settings which are board-specific and need
be provided from the platform at startup.
Initialization added for regulators Vana, VextSupply1,
VextSupply2, VextSupply3, Vaux1, Vaux2, Vaux3, VTVout,
Vintcore12, Vaudio, Vdmic, Vamic1, Vamic2, VrefDDR.
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-11 18:54:46 +08:00
|
|
|
u8 value;
|
|
|
|
};
|
|
|
|
|
2013-03-21 23:59:01 +08:00
|
|
|
#define INIT_REGULATOR_REGISTER(_id, _mask, _value) \
|
|
|
|
{ \
|
|
|
|
.id = _id, \
|
|
|
|
.mask = _mask, \
|
|
|
|
.value = _value, \
|
regulator: initialization for ab8500 regulators
The regulators on the AB8500 have a lot of custom
hardware control settings pertaining to 8 external
signals, settings which are board-specific and need
be provided from the platform at startup.
Initialization added for regulators Vana, VextSupply1,
VextSupply2, VextSupply3, Vaux1, Vaux2, Vaux3, VTVout,
Vintcore12, Vaudio, Vdmic, Vamic1, Vamic2, VrefDDR.
Signed-off-by: Bengt Jonsson <bengt.g.jonsson@stericsson.com>
Reviewed-by: Rickard Andersson <rickard.andersson@stericsson.com>
Reviewed-by: Jonas Aberg <jonas.aberg@stericsson.com>
Signed-off-by: Linus Walleij <linus.walleij@linaro.org>
Acked-by: Mark Brown <broonie@opensource.wolfsonmicro.com>
Signed-off-by: Liam Girdwood <lrg@slimlogic.co.uk>
2011-03-11 18:54:46 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
/* 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,
|
|
|
|
};
|
|
|
|
|
2013-03-29 00:11:14 +08:00
|
|
|
/* 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,
|
|
|
|
};
|
2012-02-21 04:42:24 +08:00
|
|
|
|
2013-03-29 00:11:01 +08:00
|
|
|
/* AB8500 external regulators */
|
2013-03-29 00:11:06 +08:00
|
|
|
struct ab8500_ext_regulator_cfg {
|
|
|
|
bool hwreq; /* requires hw mode or high power mode */
|
|
|
|
};
|
|
|
|
|
2013-03-29 00:11:01 +08:00
|
|
|
enum ab8500_ext_regulator_id {
|
|
|
|
AB8500_EXT_SUPPLY1,
|
|
|
|
AB8500_EXT_SUPPLY2,
|
|
|
|
AB8500_EXT_SUPPLY3,
|
|
|
|
AB8500_NUM_EXT_REGULATORS,
|
|
|
|
};
|
|
|
|
|
|
|
|
/* AB8500 regulator platform data */
|
2013-03-21 23:59:03 +08:00
|
|
|
struct ab8500_regulator_platform_data {
|
|
|
|
int num_reg_init;
|
|
|
|
struct ab8500_regulator_reg_init *reg_init;
|
|
|
|
int num_regulator;
|
|
|
|
struct regulator_init_data *regulator;
|
2013-03-29 00:11:01 +08:00
|
|
|
int num_ext_regulator;
|
|
|
|
struct regulator_init_data *ext_regulator;
|
2013-03-21 23:59:03 +08:00
|
|
|
};
|
|
|
|
|
2010-07-13 14:21:28 +08:00
|
|
|
#endif
|