feat(stpmic1): add USB OTG regulators
Add regulators boost, pwr_sw1 and pwr_sw2 regulators related to USB OTG supply BOOST, SW_OTG and SWIN/SWOUT. These regulators are needed since manipulated during the suspend/resume power sequence as per FDT description for stm32mp15x-xxx boards from STMicroelectronics. Change-Id: I6217de707e49882bd5a9100db43e0d354908800d Signed-off-by: Etienne Carriere <etienne.carriere@st.com>
This commit is contained in:
parent
c77c7d9e30
commit
13fbfe046e
|
@ -421,6 +421,10 @@ static const uint16_t vref_ddr_voltage_table[] = {
|
|||
3300,
|
||||
};
|
||||
|
||||
static const uint16_t fixed_5v_voltage_table[] = {
|
||||
5000,
|
||||
};
|
||||
|
||||
/* Table of Regulators in PMIC SoC */
|
||||
static const struct regul_struct regulators_table[] = {
|
||||
{
|
||||
|
@ -541,6 +545,27 @@ static const struct regul_struct regulators_table[] = {
|
|||
.mask_reset_reg = MASK_RESET_LDO_REG,
|
||||
.mask_reset = VREF_DDR_MASK_RESET,
|
||||
},
|
||||
{
|
||||
.dt_node_name = "boost",
|
||||
.voltage_table = fixed_5v_voltage_table,
|
||||
.voltage_table_size = ARRAY_SIZE(fixed_5v_voltage_table),
|
||||
.control_reg = USB_CONTROL_REG,
|
||||
.enable_mask = BOOST_ENABLED,
|
||||
},
|
||||
{
|
||||
.dt_node_name = "pwr_sw1",
|
||||
.voltage_table = fixed_5v_voltage_table,
|
||||
.voltage_table_size = ARRAY_SIZE(fixed_5v_voltage_table),
|
||||
.control_reg = USB_CONTROL_REG,
|
||||
.enable_mask = USBSW_OTG_SWITCH_ENABLED,
|
||||
},
|
||||
{
|
||||
.dt_node_name = "pwr_sw2",
|
||||
.voltage_table = fixed_5v_voltage_table,
|
||||
.voltage_table_size = ARRAY_SIZE(fixed_5v_voltage_table),
|
||||
.control_reg = USB_CONTROL_REG,
|
||||
.enable_mask = SWIN_SWOUT_ENABLED,
|
||||
},
|
||||
};
|
||||
|
||||
#define MAX_REGUL ARRAY_SIZE(regulators_table)
|
||||
|
|
|
@ -148,6 +148,7 @@
|
|||
#define OCP_LIMIT_HIGH BIT(3)
|
||||
#define SWIN_SWOUT_ENABLED BIT(2)
|
||||
#define USBSW_OTG_SWITCH_ENABLED BIT(1)
|
||||
#define BOOST_ENABLED BIT(0)
|
||||
|
||||
int stpmic1_powerctrl_on(void);
|
||||
int stpmic1_switch_off(void);
|
||||
|
|
Loading…
Reference in New Issue