Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2011, Code Aurora Forum. All rights reserved. |
| 3 | * |
| 4 | * This program is free software; you can redistribute it and/or modify |
| 5 | * it under the terms of the GNU General Public License version 2 and |
| 6 | * only version 2 as published by the Free Software Foundation. |
| 7 | * |
| 8 | * This program is distributed in the hope that it will be useful, |
| 9 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 10 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 11 | * GNU General Public License for more details. |
| 12 | */ |
| 13 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 14 | #include <linux/regulator/pm8xxx-regulator.h> |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 15 | |
Stepan Moskovchenko | 5a83dba | 2011-12-05 17:30:17 -0800 | [diff] [blame] | 16 | #include "board-8064.h" |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 17 | |
| 18 | #define VREG_CONSUMERS(_id) \ |
| 19 | static struct regulator_consumer_supply vreg_consumers_##_id[] |
| 20 | |
| 21 | /* |
| 22 | * Consumer specific regulator names: |
| 23 | * regulator name consumer dev_name |
| 24 | */ |
| 25 | VREG_CONSUMERS(L1) = { |
| 26 | REGULATOR_SUPPLY("8921_l1", NULL), |
| 27 | }; |
| 28 | VREG_CONSUMERS(L2) = { |
| 29 | REGULATOR_SUPPLY("8921_l2", NULL), |
| 30 | }; |
| 31 | VREG_CONSUMERS(L3) = { |
| 32 | REGULATOR_SUPPLY("8921_l3", NULL), |
Hemant Kumar | 6ddad59 | 2011-08-03 19:31:56 -0700 | [diff] [blame] | 33 | REGULATOR_SUPPLY("HSUSB_3p3", "msm_otg"), |
Manu Gautam | dccbca4 | 2011-11-08 15:13:38 +0530 | [diff] [blame] | 34 | REGULATOR_SUPPLY("HSUSB_3p3", "msm_ehci_host.0"), |
| 35 | REGULATOR_SUPPLY("HSUSB_3p3", "msm_ehci_host.1"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 36 | }; |
| 37 | VREG_CONSUMERS(L4) = { |
| 38 | REGULATOR_SUPPLY("8921_l4", NULL), |
Hemant Kumar | 6ddad59 | 2011-08-03 19:31:56 -0700 | [diff] [blame] | 39 | REGULATOR_SUPPLY("HSUSB_1p8", "msm_otg"), |
Manu Gautam | dccbca4 | 2011-11-08 15:13:38 +0530 | [diff] [blame] | 40 | REGULATOR_SUPPLY("HSUSB_1p8", "msm_ehci_host.0"), |
| 41 | REGULATOR_SUPPLY("HSUSB_1p8", "msm_ehci_host.1"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 42 | }; |
| 43 | VREG_CONSUMERS(L5) = { |
| 44 | REGULATOR_SUPPLY("8921_l5", NULL), |
Sahitya Tummala | b4d883f | 2011-08-23 10:44:51 +0530 | [diff] [blame] | 45 | REGULATOR_SUPPLY("sdc_vdd", "msm_sdcc.1"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 46 | }; |
| 47 | VREG_CONSUMERS(L6) = { |
| 48 | REGULATOR_SUPPLY("8921_l6", NULL), |
Sahitya Tummala | b4d883f | 2011-08-23 10:44:51 +0530 | [diff] [blame] | 49 | REGULATOR_SUPPLY("sdc_vdd", "msm_sdcc.3"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 50 | }; |
| 51 | VREG_CONSUMERS(L7) = { |
| 52 | REGULATOR_SUPPLY("8921_l7", NULL), |
Sahitya Tummala | b4d883f | 2011-08-23 10:44:51 +0530 | [diff] [blame] | 53 | REGULATOR_SUPPLY("sdc_vddp", "msm_sdcc.3"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 54 | }; |
| 55 | VREG_CONSUMERS(L8) = { |
| 56 | REGULATOR_SUPPLY("8921_l8", NULL), |
| 57 | }; |
| 58 | VREG_CONSUMERS(L9) = { |
| 59 | REGULATOR_SUPPLY("8921_l9", NULL), |
| 60 | }; |
| 61 | VREG_CONSUMERS(L10) = { |
| 62 | REGULATOR_SUPPLY("8921_l10", NULL), |
| 63 | }; |
| 64 | VREG_CONSUMERS(L11) = { |
| 65 | REGULATOR_SUPPLY("8921_l11", NULL), |
| 66 | }; |
| 67 | VREG_CONSUMERS(L12) = { |
| 68 | REGULATOR_SUPPLY("8921_l12", NULL), |
| 69 | }; |
| 70 | VREG_CONSUMERS(L14) = { |
| 71 | REGULATOR_SUPPLY("8921_l14", NULL), |
| 72 | }; |
| 73 | VREG_CONSUMERS(L15) = { |
| 74 | REGULATOR_SUPPLY("8921_l15", NULL), |
| 75 | }; |
| 76 | VREG_CONSUMERS(L16) = { |
| 77 | REGULATOR_SUPPLY("8921_l16", NULL), |
| 78 | }; |
| 79 | VREG_CONSUMERS(L17) = { |
| 80 | REGULATOR_SUPPLY("8921_l17", NULL), |
| 81 | }; |
| 82 | VREG_CONSUMERS(L18) = { |
| 83 | REGULATOR_SUPPLY("8921_l18", NULL), |
| 84 | }; |
| 85 | VREG_CONSUMERS(L22) = { |
| 86 | REGULATOR_SUPPLY("8921_l22", NULL), |
| 87 | }; |
| 88 | VREG_CONSUMERS(L23) = { |
| 89 | REGULATOR_SUPPLY("8921_l23", NULL), |
| 90 | }; |
| 91 | VREG_CONSUMERS(L24) = { |
| 92 | REGULATOR_SUPPLY("8921_l24", NULL), |
| 93 | }; |
| 94 | VREG_CONSUMERS(L25) = { |
| 95 | REGULATOR_SUPPLY("8921_l25", NULL), |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 96 | REGULATOR_SUPPLY("VDDD_CDC_D", "tabla-slim"), |
| 97 | REGULATOR_SUPPLY("CDC_VDDA_A_1P2V", "tabla-slim"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 98 | }; |
| 99 | VREG_CONSUMERS(L26) = { |
| 100 | REGULATOR_SUPPLY("8921_l26", NULL), |
| 101 | }; |
| 102 | VREG_CONSUMERS(L27) = { |
| 103 | REGULATOR_SUPPLY("8921_l27", NULL), |
| 104 | }; |
| 105 | VREG_CONSUMERS(L28) = { |
| 106 | REGULATOR_SUPPLY("8921_l28", NULL), |
| 107 | }; |
| 108 | VREG_CONSUMERS(S1) = { |
| 109 | REGULATOR_SUPPLY("8921_s1", NULL), |
| 110 | }; |
| 111 | VREG_CONSUMERS(S2) = { |
| 112 | REGULATOR_SUPPLY("8921_s2", NULL), |
| 113 | }; |
| 114 | VREG_CONSUMERS(S3) = { |
| 115 | REGULATOR_SUPPLY("8921_s3", NULL), |
Hemant Kumar | 6ddad59 | 2011-08-03 19:31:56 -0700 | [diff] [blame] | 116 | REGULATOR_SUPPLY("HSUSB_VDDCX", "msm_otg"), |
Manu Gautam | dccbca4 | 2011-11-08 15:13:38 +0530 | [diff] [blame] | 117 | REGULATOR_SUPPLY("HSUSB_VDDCX", "msm_ehci_host.0"), |
| 118 | REGULATOR_SUPPLY("HSUSB_VDDCX", "msm_ehci_host.1"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 119 | }; |
| 120 | VREG_CONSUMERS(S4) = { |
| 121 | REGULATOR_SUPPLY("8921_s4", NULL), |
Sahitya Tummala | b4d883f | 2011-08-23 10:44:51 +0530 | [diff] [blame] | 122 | REGULATOR_SUPPLY("sdc_vccq", "msm_sdcc.1"), |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 123 | REGULATOR_SUPPLY("VDDIO_CDC", "tabla-slim"), |
| 124 | REGULATOR_SUPPLY("CDC_VDD_CP", "tabla-slim"), |
| 125 | REGULATOR_SUPPLY("CDC_VDDA_TX", "tabla-slim"), |
| 126 | REGULATOR_SUPPLY("CDC_VDDA_RX", "tabla-slim"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 127 | }; |
| 128 | VREG_CONSUMERS(S5) = { |
| 129 | REGULATOR_SUPPLY("8921_s5", NULL), |
| 130 | }; |
| 131 | VREG_CONSUMERS(S6) = { |
| 132 | REGULATOR_SUPPLY("8921_s6", NULL), |
| 133 | }; |
| 134 | VREG_CONSUMERS(S7) = { |
| 135 | REGULATOR_SUPPLY("8921_s7", NULL), |
| 136 | }; |
| 137 | VREG_CONSUMERS(LVS1) = { |
| 138 | REGULATOR_SUPPLY("8921_lvs1", NULL), |
| 139 | }; |
| 140 | VREG_CONSUMERS(LVS2) = { |
| 141 | REGULATOR_SUPPLY("8921_lvs2", NULL), |
| 142 | }; |
| 143 | VREG_CONSUMERS(LVS3) = { |
| 144 | REGULATOR_SUPPLY("8921_lvs3", NULL), |
| 145 | }; |
| 146 | VREG_CONSUMERS(LVS4) = { |
| 147 | REGULATOR_SUPPLY("8921_lvs4", NULL), |
| 148 | }; |
| 149 | VREG_CONSUMERS(LVS5) = { |
| 150 | REGULATOR_SUPPLY("8921_lvs5", NULL), |
| 151 | }; |
| 152 | VREG_CONSUMERS(LVS6) = { |
| 153 | REGULATOR_SUPPLY("8921_lvs6", NULL), |
| 154 | }; |
| 155 | VREG_CONSUMERS(LVS7) = { |
| 156 | REGULATOR_SUPPLY("8921_lvs7", NULL), |
| 157 | }; |
| 158 | VREG_CONSUMERS(USB_OTG) = { |
| 159 | REGULATOR_SUPPLY("8921_usb_otg", NULL), |
| 160 | }; |
| 161 | VREG_CONSUMERS(HDMI_MVS) = { |
| 162 | REGULATOR_SUPPLY("8921_hdmi_mvs", NULL), |
| 163 | }; |
| 164 | VREG_CONSUMERS(NCP) = { |
| 165 | REGULATOR_SUPPLY("8921_ncp", NULL), |
| 166 | }; |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 167 | VREG_CONSUMERS(8821_S0) = { |
| 168 | REGULATOR_SUPPLY("8821_s0", NULL), |
| 169 | }; |
| 170 | VREG_CONSUMERS(8821_S1) = { |
| 171 | REGULATOR_SUPPLY("8821_s1", NULL), |
| 172 | }; |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 173 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 174 | #define PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, _modes, _ops, \ |
| 175 | _apply_uV, _pull_down, _always_on, _supply_regulator, \ |
| 176 | _system_uA, _enable_time, _reg_id) \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 177 | { \ |
| 178 | .init_data = { \ |
| 179 | .constraints = { \ |
| 180 | .valid_modes_mask = _modes, \ |
| 181 | .valid_ops_mask = _ops, \ |
| 182 | .min_uV = _min_uV, \ |
| 183 | .max_uV = _max_uV, \ |
| 184 | .input_uV = _max_uV, \ |
| 185 | .apply_uV = _apply_uV, \ |
| 186 | .always_on = _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 187 | .name = _name, \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 188 | }, \ |
| 189 | .num_consumer_supplies = \ |
| 190 | ARRAY_SIZE(vreg_consumers_##_id), \ |
| 191 | .consumer_supplies = vreg_consumers_##_id, \ |
| 192 | .supply_regulator = _supply_regulator, \ |
| 193 | }, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 194 | .id = _reg_id, \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 195 | .pull_down_enable = _pull_down, \ |
| 196 | .system_uA = _system_uA, \ |
| 197 | .enable_time = _enable_time, \ |
| 198 | } |
| 199 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 200 | #define PM8XXX_LDO(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \ |
| 201 | _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 202 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 203 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \ |
| 204 | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \ |
| 205 | REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 206 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 207 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 208 | #define PM8XXX_NLDO1200(_id, _name, _always_on, _pull_down, _min_uV, \ |
| 209 | _max_uV, _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 210 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 211 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \ |
| 212 | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \ |
| 213 | REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 214 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 215 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 216 | #define PM8XXX_SMPS(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \ |
| 217 | _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 218 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 219 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \ |
| 220 | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \ |
| 221 | REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 222 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 223 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 224 | #define PM8XXX_FTSMPS(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \ |
| 225 | _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 226 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL, \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 227 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS \ |
| 228 | | REGULATOR_CHANGE_MODE, 0, _pull_down, _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 229 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 230 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 231 | #define PM8XXX_VS(_id, _name, _always_on, _pull_down, _enable_time, \ |
| 232 | _supply_regulator, _reg_id) \ |
| 233 | PM8XXX_VREG_INIT(_id, _name, 0, 0, 0, REGULATOR_CHANGE_STATUS, 0, \ |
| 234 | _pull_down, _always_on, _supply_regulator, 0, _enable_time, \ |
| 235 | _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 236 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 237 | #define PM8XXX_VS300(_id, _name, _always_on, _pull_down, _enable_time, \ |
| 238 | _supply_regulator, _reg_id) \ |
| 239 | PM8XXX_VREG_INIT(_id, _name, 0, 0, 0, REGULATOR_CHANGE_STATUS, 0, \ |
| 240 | _pull_down, _always_on, _supply_regulator, 0, _enable_time, \ |
| 241 | _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 242 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 243 | #define PM8XXX_NCP(_id, _name, _always_on, _min_uV, _max_uV, _enable_time, \ |
| 244 | _supply_regulator, _reg_id) \ |
| 245 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, 0, \ |
| 246 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, 0, 0, \ |
| 247 | _always_on, _supply_regulator, 0, _enable_time, _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 248 | |
| 249 | /* Pin control initialization */ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 250 | #define PM8XXX_PC(_id, _name, _always_on, _pin_fn, _pin_ctrl, \ |
| 251 | _supply_regulator, _reg_id) \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 252 | { \ |
| 253 | .init_data = { \ |
| 254 | .constraints = { \ |
| 255 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, \ |
| 256 | .always_on = _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 257 | .name = _name, \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 258 | }, \ |
| 259 | .num_consumer_supplies = \ |
| 260 | ARRAY_SIZE(vreg_consumers_##_id##_PC), \ |
| 261 | .consumer_supplies = vreg_consumers_##_id##_PC, \ |
| 262 | .supply_regulator = _supply_regulator, \ |
| 263 | }, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 264 | .id = _reg_id, \ |
| 265 | .pin_fn = PM8XXX_VREG_PIN_FN_##_pin_fn, \ |
| 266 | .pin_ctrl = _pin_ctrl, \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 267 | } |
| 268 | |
| 269 | #define SAW_VREG_INIT(_id, _name, _min_uV, _max_uV) \ |
| 270 | { \ |
| 271 | .constraints = { \ |
| 272 | .name = _name, \ |
| 273 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, \ |
| 274 | .min_uV = _min_uV, \ |
| 275 | .max_uV = _max_uV, \ |
| 276 | }, \ |
| 277 | .num_consumer_supplies = ARRAY_SIZE(vreg_consumers_##_id), \ |
| 278 | .consumer_supplies = vreg_consumers_##_id, \ |
| 279 | } |
| 280 | |
| 281 | /* SAW regulator constraints */ |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 282 | struct regulator_init_data msm8064_saw_regulator_pdata_8921_s5 = |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 283 | /* ID vreg_name min_uV max_uV */ |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 284 | SAW_VREG_INIT(S5, "8921_s5", 950000, 1150000); |
| 285 | struct regulator_init_data msm8064_saw_regulator_pdata_8921_s6 = |
| 286 | SAW_VREG_INIT(S6, "8921_s6", 950000, 1150000); |
| 287 | |
| 288 | struct regulator_init_data msm8064_saw_regulator_pdata_8821_s0 = |
| 289 | /* ID vreg_name min_uV max_uV */ |
| 290 | SAW_VREG_INIT(8821_S0, "8821_s0", 950000, 1150000); |
| 291 | struct regulator_init_data msm8064_saw_regulator_pdata_8821_s1 = |
| 292 | SAW_VREG_INIT(8821_S1, "8821_s1", 950000, 1150000); |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 293 | |
| 294 | /* PM8921 regulator constraints */ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 295 | struct pm8xxx_regulator_platform_data |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 296 | msm8064_pm8921_regulator_pdata[] __devinitdata = { |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 297 | /* |
| 298 | * ID name always_on pd min_uV max_uV en_t supply |
| 299 | * system_uA reg_ID |
| 300 | */ |
| 301 | PM8XXX_SMPS(S1, "8921_s1", 1, 1, 1225000, 1225000, 500, NULL, 100000, |
| 302 | 1), |
| 303 | PM8XXX_SMPS(S2, "8921_s2", 0, 1, 1300000, 1300000, 500, NULL, 0, 2), |
| 304 | PM8XXX_SMPS(S3, "8921_s3", 1, 1, 1150000, 1150000, 500, NULL, 100000, |
| 305 | 3), |
| 306 | PM8XXX_SMPS(S4, "8921_s4", 1, 1, 1800000, 1800000, 500, NULL, 100000, |
| 307 | 4), |
| 308 | PM8XXX_SMPS(S7, "8921_s7", 0, 1, 1200000, 1200000, 500, NULL, 100000, |
| 309 | 5), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 310 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 311 | PM8XXX_LDO(L1, "8921_l1", 1, 1, 1100000, 1100000, 200, "8921_s4", 0, |
| 312 | 6), |
| 313 | PM8XXX_LDO(L2, "8921_l2", 0, 1, 1200000, 1200000, 200, "8921_s4", 0, |
| 314 | 7), |
| 315 | PM8XXX_LDO(L3, "8921_l3", 0, 1, 3075000, 3075000, 200, NULL, 0, 8), |
| 316 | PM8XXX_LDO(L4, "8921_l4", 1, 1, 1800000, 1800000, 200, NULL, 0, 9), |
| 317 | PM8XXX_LDO(L5, "8921_l5", 0, 1, 2950000, 2950000, 200, NULL, 0, 10), |
| 318 | PM8XXX_LDO(L6, "8921_l6", 0, 1, 2950000, 2950000, 200, NULL, 0, 11), |
| 319 | PM8XXX_LDO(L7, "8921_l7", 1, 1, 1850000, 2950000, 200, NULL, 0, 12), |
| 320 | PM8XXX_LDO(L8, "8921_l8", 0, 1, 2800000, 2800000, 200, NULL, 0, 13), |
| 321 | PM8XXX_LDO(L9, "8921_l9", 0, 1, 2850000, 2850000, 200, NULL, 0, 14), |
| 322 | PM8XXX_LDO(L10, "8921_l10", 0, 1, 2900000, 2900000, 200, NULL, 0, 15), |
| 323 | PM8XXX_LDO(L11, "8921_l11", 0, 1, 3000000, 3000000, 200, NULL, 0, 16), |
| 324 | PM8XXX_LDO(L12, "8921_l12", 0, 1, 1200000, 1200000, 200, "8921_s4", 0, |
| 325 | 17), |
| 326 | PM8XXX_LDO(L14, "8921_l14", 0, 1, 1800000, 1800000, 200, NULL, 0, 18), |
| 327 | PM8XXX_LDO(L15, "8921_l15", 0, 1, 1800000, 2950000, 200, NULL, 0, 19), |
| 328 | PM8XXX_LDO(L16, "8921_l16", 0, 1, 2800000, 2800000, 200, NULL, 0, 20), |
| 329 | PM8XXX_LDO(L17, "8921_l17", 0, 1, 2000000, 2000000, 200, NULL, 0, 21), |
| 330 | PM8XXX_LDO(L18, "8921_l18", 0, 1, 1300000, 1800000, 200, "8921_s4", 0, |
| 331 | 22), |
| 332 | PM8XXX_LDO(L22, "8921_l22", 0, 1, 2600000, 2600000, 200, NULL, 0, 23), |
| 333 | PM8XXX_LDO(L23, "8921_l23", 0, 1, 1800000, 1800000, 200, NULL, 0, 24), |
| 334 | PM8XXX_NLDO1200(L24, "8921_l24", 1, 1, 1150000, 1150000, 200, "8921_s1", |
| 335 | 10000, 25), |
| 336 | PM8XXX_NLDO1200(L25, "8921_l25", 1, 1, 1225000, 1225000, 200, "8921_s1", |
| 337 | 0, 26), |
| 338 | PM8XXX_NLDO1200(L26, "8921_l26", 0, 1, 1050000, 1050000, 200, "8921_s7", |
| 339 | 0, 27), |
| 340 | PM8XXX_NLDO1200(L27, "8921_l27", 0, 1, 1000000, 1000000, 200, "8921_s7", |
| 341 | 0, 28), |
| 342 | PM8XXX_NLDO1200(L28, "8921_l28", 0, 1, 1050000, 1050000, 200, "8921_s7", |
| 343 | 0, 29), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 344 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 345 | /* ID name always_on pd en_t supply reg_ID */ |
| 346 | PM8XXX_VS(LVS1, "8921_lvs1", 0, 1, 0, "8921_s4", 30), |
| 347 | PM8XXX_VS300(LVS2, "8921_lvs2", 0, 1, 0, "8921_s1", 31), |
| 348 | PM8XXX_VS(LVS3, "8921_lvs3", 0, 1, 0, "8921_s4", 32), |
| 349 | PM8XXX_VS(LVS4, "8921_lvs4", 0, 1, 0, "8921_s4", 33), |
| 350 | PM8XXX_VS(LVS5, "8921_lvs5", 0, 1, 0, "8921_s4", 34), |
| 351 | PM8XXX_VS(LVS6, "8921_lvs6", 0, 1, 0, "8921_s4", 35), |
| 352 | PM8XXX_VS(LVS7, "8921_lvs7", 1, 1, 0, "8921_s4", 36), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 353 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 354 | PM8XXX_VS300(USB_OTG, "8921_usb_otg", 0, 1, 0, NULL, 37), |
| 355 | PM8XXX_VS300(HDMI_MVS, "8921_hdmi_mvs", 0, 1, 0, NULL, 38), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 356 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame^] | 357 | /* ID name always_on min_uV max_uV en_t supply reg_ID */ |
| 358 | PM8XXX_NCP(NCP, "8921_ncp", 0, 1800000, 1800000, 200, "8921_l6", 39), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 359 | }; |
| 360 | |
| 361 | int msm8064_pm8921_regulator_pdata_len __devinitdata = |
| 362 | ARRAY_SIZE(msm8064_pm8921_regulator_pdata); |