diff options
Diffstat (limited to 'arch/arm/mach-ux500/board-mop500-regulators.c')
| -rw-r--r-- | arch/arm/mach-ux500/board-mop500-regulators.c | 201 |
1 files changed, 201 insertions, 0 deletions
diff --git a/arch/arm/mach-ux500/board-mop500-regulators.c b/arch/arm/mach-ux500/board-mop500-regulators.c index 875c91b2f8a4..9ed0f90cfe23 100644 --- a/arch/arm/mach-ux500/board-mop500-regulators.c +++ b/arch/arm/mach-ux500/board-mop500-regulators.c | |||
| @@ -13,6 +13,30 @@ | |||
| 13 | #include <linux/regulator/ab8500.h> | 13 | #include <linux/regulator/ab8500.h> |
| 14 | #include "board-mop500-regulators.h" | 14 | #include "board-mop500-regulators.h" |
| 15 | 15 | ||
| 16 | /* | ||
| 17 | * TPS61052 regulator | ||
| 18 | */ | ||
| 19 | static struct regulator_consumer_supply tps61052_vaudio_consumers[] = { | ||
| 20 | /* | ||
| 21 | * Boost converter supply to raise voltage on audio speaker, this | ||
| 22 | * is actually connected to three pins, VInVhfL (left amplifier) | ||
| 23 | * VInVhfR (right amplifier) and VIntDClassInt - all three must | ||
| 24 | * be connected to the same voltage. | ||
| 25 | */ | ||
| 26 | REGULATOR_SUPPLY("vintdclassint", "ab8500-codec.0"), | ||
| 27 | }; | ||
| 28 | |||
| 29 | struct regulator_init_data tps61052_regulator = { | ||
| 30 | .constraints = { | ||
| 31 | .name = "vaudio-hf", | ||
| 32 | .min_uV = 4500000, | ||
| 33 | .max_uV = 4500000, | ||
| 34 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, | ||
| 35 | }, | ||
| 36 | .num_consumer_supplies = ARRAY_SIZE(tps61052_vaudio_consumers), | ||
| 37 | .consumer_supplies = tps61052_vaudio_consumers, | ||
| 38 | }; | ||
| 39 | |||
| 16 | static struct regulator_consumer_supply ab8500_vaux1_consumers[] = { | 40 | static struct regulator_consumer_supply ab8500_vaux1_consumers[] = { |
| 17 | /* External displays, connector on board 2v5 power supply */ | 41 | /* External displays, connector on board 2v5 power supply */ |
| 18 | REGULATOR_SUPPLY("vaux12v5", "mcde.0"), | 42 | REGULATOR_SUPPLY("vaux12v5", "mcde.0"), |
| @@ -62,6 +86,182 @@ static struct regulator_consumer_supply ab8500_vana_consumers[] = { | |||
| 62 | REGULATOR_SUPPLY("vsmps2", "mcde.0"), | 86 | REGULATOR_SUPPLY("vsmps2", "mcde.0"), |
| 63 | }; | 87 | }; |
| 64 | 88 | ||
| 89 | /* ab8500 regulator register initialization */ | ||
| 90 | struct ab8500_regulator_reg_init | ||
| 91 | ab8500_regulator_reg_init[AB8500_NUM_REGULATOR_REGISTERS] = { | ||
| 92 | /* | ||
| 93 | * VanaRequestCtrl = HP/LP depending on VxRequest | ||
| 94 | * VextSupply1RequestCtrl = HP/LP depending on VxRequest | ||
| 95 | */ | ||
| 96 | INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL2, 0x00), | ||
| 97 | /* | ||
| 98 | * VextSupply2RequestCtrl = HP/LP depending on VxRequest | ||
| 99 | * VextSupply3RequestCtrl = HP/LP depending on VxRequest | ||
| 100 | * Vaux1RequestCtrl = HP/LP depending on VxRequest | ||
| 101 | * Vaux2RequestCtrl = HP/LP depending on VxRequest | ||
| 102 | */ | ||
| 103 | INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL3, 0x00), | ||
| 104 | /* | ||
| 105 | * Vaux3RequestCtrl = HP/LP depending on VxRequest | ||
| 106 | * SwHPReq = Control through SWValid disabled | ||
| 107 | */ | ||
| 108 | INIT_REGULATOR_REGISTER(AB8500_REGUREQUESTCTRL4, 0x00), | ||
| 109 | /* | ||
| 110 | * VanaSysClkReq1HPValid = disabled | ||
| 111 | * Vaux1SysClkReq1HPValid = disabled | ||
| 112 | * Vaux2SysClkReq1HPValid = disabled | ||
| 113 | * Vaux3SysClkReq1HPValid = disabled | ||
| 114 | */ | ||
| 115 | INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID1, 0x00), | ||
| 116 | /* | ||
| 117 | * VextSupply1SysClkReq1HPValid = disabled | ||
| 118 | * VextSupply2SysClkReq1HPValid = disabled | ||
| 119 | * VextSupply3SysClkReq1HPValid = SysClkReq1 controlled | ||
| 120 | */ | ||
| 121 | INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQ1HPVALID2, 0x40), | ||
| 122 | /* | ||
| 123 | * VanaHwHPReq1Valid = disabled | ||
| 124 | * Vaux1HwHPreq1Valid = disabled | ||
| 125 | * Vaux2HwHPReq1Valid = disabled | ||
| 126 | * Vaux3HwHPReqValid = disabled | ||
| 127 | */ | ||
| 128 | INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID1, 0x00), | ||
| 129 | /* | ||
| 130 | * VextSupply1HwHPReq1Valid = disabled | ||
| 131 | * VextSupply2HwHPReq1Valid = disabled | ||
| 132 | * VextSupply3HwHPReq1Valid = disabled | ||
| 133 | */ | ||
| 134 | INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ1VALID2, 0x00), | ||
| 135 | /* | ||
| 136 | * VanaHwHPReq2Valid = disabled | ||
| 137 | * Vaux1HwHPReq2Valid = disabled | ||
| 138 | * Vaux2HwHPReq2Valid = disabled | ||
| 139 | * Vaux3HwHPReq2Valid = disabled | ||
| 140 | */ | ||
| 141 | INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID1, 0x00), | ||
| 142 | /* | ||
| 143 | * VextSupply1HwHPReq2Valid = disabled | ||
| 144 | * VextSupply2HwHPReq2Valid = disabled | ||
| 145 | * VextSupply3HwHPReq2Valid = HWReq2 controlled | ||
| 146 | */ | ||
| 147 | INIT_REGULATOR_REGISTER(AB8500_REGUHWHPREQ2VALID2, 0x04), | ||
| 148 | /* | ||
| 149 | * VanaSwHPReqValid = disabled | ||
| 150 | * Vaux1SwHPReqValid = disabled | ||
| 151 | */ | ||
| 152 | INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID1, 0x00), | ||
| 153 | /* | ||
| 154 | * Vaux2SwHPReqValid = disabled | ||
| 155 | * Vaux3SwHPReqValid = disabled | ||
| 156 | * VextSupply1SwHPReqValid = disabled | ||
| 157 | * VextSupply2SwHPReqValid = disabled | ||
| 158 | * VextSupply3SwHPReqValid = disabled | ||
| 159 | */ | ||
| 160 | INIT_REGULATOR_REGISTER(AB8500_REGUSWHPREQVALID2, 0x00), | ||
| 161 | /* | ||
| 162 | * SysClkReq2Valid1 = SysClkReq2 controlled | ||
| 163 | * SysClkReq3Valid1 = disabled | ||
| 164 | * SysClkReq4Valid1 = SysClkReq4 controlled | ||
| 165 | * SysClkReq5Valid1 = disabled | ||
| 166 | * SysClkReq6Valid1 = SysClkReq6 controlled | ||
| 167 | * SysClkReq7Valid1 = disabled | ||
| 168 | * SysClkReq8Valid1 = disabled | ||
| 169 | */ | ||
| 170 | INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID1, 0x2a), | ||
| 171 | /* | ||
| 172 | * SysClkReq2Valid2 = disabled | ||
| 173 | * SysClkReq3Valid2 = disabled | ||
| 174 | * SysClkReq4Valid2 = disabled | ||
| 175 | * SysClkReq5Valid2 = disabled | ||
| 176 | * SysClkReq6Valid2 = SysClkReq6 controlled | ||
| 177 | * SysClkReq7Valid2 = disabled | ||
| 178 | * SysClkReq8Valid2 = disabled | ||
| 179 | */ | ||
| 180 | INIT_REGULATOR_REGISTER(AB8500_REGUSYSCLKREQVALID2, 0x20), | ||
| 181 | /* | ||
| 182 | * VTVoutEna = disabled | ||
| 183 | * Vintcore12Ena = disabled | ||
| 184 | * Vintcore12Sel = 1.25 V | ||
| 185 | * Vintcore12LP = inactive (HP) | ||
| 186 | * VTVoutLP = inactive (HP) | ||
| 187 | */ | ||
| 188 | INIT_REGULATOR_REGISTER(AB8500_REGUMISC1, 0x10), | ||
| 189 | /* | ||
| 190 | * VaudioEna = disabled | ||
| 191 | * VdmicEna = disabled | ||
| 192 | * Vamic1Ena = disabled | ||
| 193 | * Vamic2Ena = disabled | ||
| 194 | */ | ||
| 195 | INIT_REGULATOR_REGISTER(AB8500_VAUDIOSUPPLY, 0x00), | ||
| 196 | /* | ||
| 197 | * Vamic1_dzout = high-Z when Vamic1 is disabled | ||
| 198 | * Vamic2_dzout = high-Z when Vamic2 is disabled | ||
| 199 | */ | ||
| 200 | INIT_REGULATOR_REGISTER(AB8500_REGUCTRL1VAMIC, 0x00), | ||
| 201 | /* | ||
| 202 | * VPll = Hw controlled | ||
| 203 | * VanaRegu = force off | ||
| 204 | */ | ||
| 205 | INIT_REGULATOR_REGISTER(AB8500_VPLLVANAREGU, 0x02), | ||
| 206 | /* | ||
| 207 | * VrefDDREna = disabled | ||
| 208 | * VrefDDRSleepMode = inactive (no pulldown) | ||
| 209 | */ | ||
| 210 | INIT_REGULATOR_REGISTER(AB8500_VREFDDR, 0x00), | ||
| 211 | /* | ||
| 212 | * VextSupply1Regu = HW control | ||
| 213 | * VextSupply2Regu = HW control | ||
| 214 | * VextSupply3Regu = HW control | ||
| 215 | * ExtSupply2Bypass = ExtSupply12LPn ball is 0 when Ena is 0 | ||
| 216 | * ExtSupply3Bypass = ExtSupply3LPn ball is 0 when Ena is 0 | ||
| 217 | */ | ||
| 218 | INIT_REGULATOR_REGISTER(AB8500_EXTSUPPLYREGU, 0x2a), | ||
| 219 | /* | ||
| 220 | * Vaux1Regu = force HP | ||
| 221 | * Vaux2Regu = force off | ||
| 222 | */ | ||
| 223 | INIT_REGULATOR_REGISTER(AB8500_VAUX12REGU, 0x01), | ||
| 224 | /* | ||
| 225 | * Vaux3regu = force off | ||
| 226 | */ | ||
| 227 | INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3REGU, 0x00), | ||
| 228 | /* | ||
| 229 | * Vsmps1 = 1.15V | ||
| 230 | */ | ||
| 231 | INIT_REGULATOR_REGISTER(AB8500_VSMPS1SEL1, 0x24), | ||
| 232 | /* | ||
| 233 | * Vaux1Sel = 2.5 V | ||
| 234 | */ | ||
| 235 | INIT_REGULATOR_REGISTER(AB8500_VAUX1SEL, 0x08), | ||
| 236 | /* | ||
| 237 | * Vaux2Sel = 2.9 V | ||
| 238 | */ | ||
| 239 | INIT_REGULATOR_REGISTER(AB8500_VAUX2SEL, 0x0d), | ||
| 240 | /* | ||
| 241 | * Vaux3Sel = 2.91 V | ||
| 242 | */ | ||
| 243 | INIT_REGULATOR_REGISTER(AB8500_VRF1VAUX3SEL, 0x07), | ||
| 244 | /* | ||
| 245 | * VextSupply12LP = disabled (no LP) | ||
| 246 | */ | ||
| 247 | INIT_REGULATOR_REGISTER(AB8500_REGUCTRL2SPARE, 0x00), | ||
| 248 | /* | ||
| 249 | * Vaux1Disch = short discharge time | ||
| 250 | * Vaux2Disch = short discharge time | ||
| 251 | * Vaux3Disch = short discharge time | ||
| 252 | * Vintcore12Disch = short discharge time | ||
| 253 | * VTVoutDisch = short discharge time | ||
| 254 | * VaudioDisch = short discharge time | ||
| 255 | */ | ||
| 256 | INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH, 0x00), | ||
| 257 | /* | ||
| 258 | * VanaDisch = short discharge time | ||
| 259 | * VdmicPullDownEna = pulldown disabled when Vdmic is disabled | ||
| 260 | * VdmicDisch = short discharge time | ||
| 261 | */ | ||
| 262 | INIT_REGULATOR_REGISTER(AB8500_REGUCTRLDISCH2, 0x00), | ||
| 263 | }; | ||
| 264 | |||
| 65 | /* AB8500 regulators */ | 265 | /* AB8500 regulators */ |
| 66 | struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { | 266 | struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { |
| 67 | /* supplies to the display/camera */ | 267 | /* supplies to the display/camera */ |
| @@ -72,6 +272,7 @@ struct regulator_init_data ab8500_regulators[AB8500_NUM_REGULATORS] = { | |||
| 72 | .max_uV = 2900000, | 272 | .max_uV = 2900000, |
| 73 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | | 273 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | |
| 74 | REGULATOR_CHANGE_STATUS, | 274 | REGULATOR_CHANGE_STATUS, |
| 275 | .boot_on = 1, /* must be on for display */ | ||
| 75 | }, | 276 | }, |
| 76 | .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers), | 277 | .num_consumer_supplies = ARRAY_SIZE(ab8500_vaux1_consumers), |
| 77 | .consumer_supplies = ab8500_vaux1_consumers, | 278 | .consumer_supplies = ab8500_vaux1_consumers, |
