David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 1 | /* |
Mohan Pallaka | b90c7a2 | 2013-04-10 10:53:16 +0530 | [diff] [blame] | 2 | * Copyright (c) 2011-2013, The Linux Foundation. All rights reserved. |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 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 | 4614cb9 | 2012-08-20 12:17:09 -0700 | [diff] [blame] | 14 | /* |
| 15 | * This file contains regulator configuration and mappings for targets |
| 16 | * consisting of MSM8930 and PM8038. |
| 17 | */ |
| 18 | |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 19 | #include <linux/regulator/pm8xxx-regulator.h> |
| 20 | |
| 21 | #include "board-8930.h" |
| 22 | |
| 23 | #define VREG_CONSUMERS(_id) \ |
| 24 | static struct regulator_consumer_supply vreg_consumers_##_id[] |
| 25 | |
| 26 | /* |
| 27 | * Consumer specific regulator names: |
| 28 | * regulator name consumer dev_name |
| 29 | */ |
| 30 | VREG_CONSUMERS(L1) = { |
| 31 | REGULATOR_SUPPLY("8038_l1", NULL), |
Subramanian Srinivasan | c698a44 | 2012-01-11 13:41:57 -0800 | [diff] [blame] | 32 | REGULATOR_SUPPLY("iris_vddrfa", "wcnss_wlan.0"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 33 | }; |
| 34 | VREG_CONSUMERS(L2) = { |
| 35 | REGULATOR_SUPPLY("8038_l2", NULL), |
Subramanian Srinivasan | c698a44 | 2012-01-11 13:41:57 -0800 | [diff] [blame] | 36 | REGULATOR_SUPPLY("iris_vdddig", "wcnss_wlan.0"), |
Chandan Uddaraju | 59894ca | 2011-12-05 17:07:02 -0800 | [diff] [blame] | 37 | REGULATOR_SUPPLY("dsi_vdda", "mipi_dsi.1"), |
Ravishangar Kalyanam | ad32002 | 2012-07-23 18:26:09 -0700 | [diff] [blame] | 38 | REGULATOR_SUPPLY("dsi_pll_vdda", "mdp.0"), |
Kevin Chan | 330e4d5 | 2012-02-18 23:11:24 -0800 | [diff] [blame] | 39 | REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.0"), |
| 40 | REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.1"), |
| 41 | REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.2"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 42 | }; |
| 43 | VREG_CONSUMERS(L3) = { |
| 44 | REGULATOR_SUPPLY("8038_l3", NULL), |
Mayank Rana | bf5084a | 2011-12-12 17:06:54 +0530 | [diff] [blame] | 45 | REGULATOR_SUPPLY("HSUSB_3p3", "msm_otg"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 46 | }; |
| 47 | VREG_CONSUMERS(L4) = { |
| 48 | REGULATOR_SUPPLY("8038_l4", NULL), |
Mayank Rana | bf5084a | 2011-12-12 17:06:54 +0530 | [diff] [blame] | 49 | REGULATOR_SUPPLY("HSUSB_1p8", "msm_otg"), |
Subramanian Srinivasan | c698a44 | 2012-01-11 13:41:57 -0800 | [diff] [blame] | 50 | REGULATOR_SUPPLY("iris_vddxo", "wcnss_wlan.0"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 51 | }; |
| 52 | VREG_CONSUMERS(L5) = { |
| 53 | REGULATOR_SUPPLY("8038_l5", NULL), |
Krishna Konda | 40ec7e9 | 2011-12-20 19:28:25 -0800 | [diff] [blame] | 54 | REGULATOR_SUPPLY("sdc_vdd", "msm_sdcc.1"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 55 | }; |
| 56 | VREG_CONSUMERS(L6) = { |
| 57 | REGULATOR_SUPPLY("8038_l6", NULL), |
Krishna Konda | 40ec7e9 | 2011-12-20 19:28:25 -0800 | [diff] [blame] | 58 | REGULATOR_SUPPLY("sdc_vdd", "msm_sdcc.3"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 59 | }; |
| 60 | VREG_CONSUMERS(L7) = { |
| 61 | REGULATOR_SUPPLY("8038_l7", NULL), |
| 62 | }; |
| 63 | VREG_CONSUMERS(L8) = { |
| 64 | REGULATOR_SUPPLY("8038_l8", NULL), |
Chandan Uddaraju | 59894ca | 2011-12-05 17:07:02 -0800 | [diff] [blame] | 65 | REGULATOR_SUPPLY("dsi_vdc", "mipi_dsi.1"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 66 | }; |
| 67 | VREG_CONSUMERS(L9) = { |
| 68 | REGULATOR_SUPPLY("8038_l9", NULL), |
Anirudh Ghayal | d7ad84c | 2012-01-09 09:17:53 +0530 | [diff] [blame] | 69 | REGULATOR_SUPPLY("vdd_ana", "3-004a"), |
Amy Maloche | 32a36c3 | 2012-01-11 10:39:11 -0800 | [diff] [blame] | 70 | REGULATOR_SUPPLY("vdd", "3-0024"), |
Kevin Chan | 6776a37 | 2012-01-12 14:18:53 -0800 | [diff] [blame] | 71 | REGULATOR_SUPPLY("cam_vana", "4-001a"), |
| 72 | REGULATOR_SUPPLY("cam_vana", "4-006c"), |
| 73 | REGULATOR_SUPPLY("cam_vana", "4-0048"), |
| 74 | REGULATOR_SUPPLY("cam_vaf", "4-001a"), |
| 75 | REGULATOR_SUPPLY("cam_vaf", "4-006c"), |
| 76 | REGULATOR_SUPPLY("cam_vaf", "4-0048"), |
Sreesudhan Ramakrish Ramkumar | 8f11b8b | 2012-01-04 17:09:05 -0800 | [diff] [blame] | 77 | REGULATOR_SUPPLY("cam_vana", "4-0020"), |
| 78 | REGULATOR_SUPPLY("cam_vaf", "4-0020"), |
Wentao Xu | f59ce4e | 2012-05-22 17:30:13 -0400 | [diff] [blame] | 79 | REGULATOR_SUPPLY("vdd", "12-0018"), |
| 80 | REGULATOR_SUPPLY("vdd", "12-0068"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 81 | }; |
| 82 | VREG_CONSUMERS(L10) = { |
| 83 | REGULATOR_SUPPLY("8038_l10", NULL), |
Subramanian Srinivasan | c698a44 | 2012-01-11 13:41:57 -0800 | [diff] [blame] | 84 | REGULATOR_SUPPLY("iris_vddpa", "wcnss_wlan.0"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 85 | }; |
| 86 | VREG_CONSUMERS(L11) = { |
| 87 | REGULATOR_SUPPLY("8038_l11", NULL), |
Anirudh Ghayal | d7ad84c | 2012-01-09 09:17:53 +0530 | [diff] [blame] | 88 | REGULATOR_SUPPLY("vdd_dig", "3-004a"), |
Subramanian Srinivasan | c698a44 | 2012-01-11 13:41:57 -0800 | [diff] [blame] | 89 | REGULATOR_SUPPLY("iris_vddio", "wcnss_wlan.0"), |
| 90 | REGULATOR_SUPPLY("riva_vddpx", "wcnss_wlan.0"), |
Subhash Jadavani | 937c750 | 2012-06-01 15:34:46 +0530 | [diff] [blame] | 91 | REGULATOR_SUPPLY("sdc_vdd_io", "msm_sdcc.1"), |
Asish Bhattacharya | cdaa99d | 2012-01-10 06:05:00 +0530 | [diff] [blame] | 92 | REGULATOR_SUPPLY("VDDIO_CDC", "sitar-slim"), |
| 93 | REGULATOR_SUPPLY("CDC_VDDA_TX", "sitar-slim"), |
| 94 | REGULATOR_SUPPLY("CDC_VDDA_RX", "sitar-slim"), |
Bhalchandra Gajare | 83c81f6 | 2012-05-18 16:09:05 -0700 | [diff] [blame] | 95 | REGULATOR_SUPPLY("VDDIO_CDC", "sitar1p1-slim"), |
| 96 | REGULATOR_SUPPLY("CDC_VDDA_TX", "sitar1p1-slim"), |
| 97 | REGULATOR_SUPPLY("CDC_VDDA_RX", "sitar1p1-slim"), |
Mohan Pallaka | b90c7a2 | 2013-04-10 10:53:16 +0530 | [diff] [blame] | 98 | REGULATOR_SUPPLY("vcc_i2c", "0-0048"), |
Manoj Rao | c6d904c | 2012-06-22 00:32:14 -0700 | [diff] [blame] | 99 | REGULATOR_SUPPLY("mhl_iovcc18", "0-0039"), |
Stepan Moskovchenko | 22083ab | 2012-09-11 12:41:48 -0700 | [diff] [blame] | 100 | REGULATOR_SUPPLY("vdd-io", "spi0.0"), |
| 101 | REGULATOR_SUPPLY("vdd-phy", "spi0.0"), |
Krishna Konda | e88a7ae | 2012-06-25 20:36:36 -0700 | [diff] [blame] | 102 | REGULATOR_SUPPLY("sdc_vdd", "msm_sdcc.2"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 103 | }; |
| 104 | VREG_CONSUMERS(L12) = { |
| 105 | REGULATOR_SUPPLY("8038_l12", NULL), |
Kevin Chan | 6776a37 | 2012-01-12 14:18:53 -0800 | [diff] [blame] | 106 | REGULATOR_SUPPLY("cam_vdig", "4-001a"), |
| 107 | REGULATOR_SUPPLY("cam_vdig", "4-006c"), |
| 108 | REGULATOR_SUPPLY("cam_vdig", "4-0048"), |
Sreesudhan Ramakrish Ramkumar | 8f11b8b | 2012-01-04 17:09:05 -0800 | [diff] [blame] | 109 | REGULATOR_SUPPLY("cam_vdig", "4-0020"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 110 | }; |
David Collins | 652b344 | 2012-08-09 14:47:51 -0700 | [diff] [blame] | 111 | VREG_CONSUMERS(L13) = { |
| 112 | REGULATOR_SUPPLY("8038_l13", NULL), |
| 113 | }; |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 114 | VREG_CONSUMERS(L14) = { |
| 115 | REGULATOR_SUPPLY("8038_l14", NULL), |
Siddartha Mohanadoss | 6a392d3 | 2012-01-12 11:30:58 -0800 | [diff] [blame] | 116 | REGULATOR_SUPPLY("pa_therm", "pm8xxx-adc"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 117 | }; |
| 118 | VREG_CONSUMERS(L15) = { |
| 119 | REGULATOR_SUPPLY("8038_l15", NULL), |
| 120 | }; |
| 121 | VREG_CONSUMERS(L16) = { |
| 122 | REGULATOR_SUPPLY("8038_l16", NULL), |
Stephen Boyd | bdb53f3 | 2012-06-05 18:39:47 -0700 | [diff] [blame] | 123 | REGULATOR_SUPPLY("sw_core_vdd", "pil-q6v4-modem"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 124 | }; |
| 125 | VREG_CONSUMERS(L17) = { |
| 126 | REGULATOR_SUPPLY("8038_l17", NULL), |
| 127 | }; |
| 128 | VREG_CONSUMERS(L18) = { |
| 129 | REGULATOR_SUPPLY("8038_l18", NULL), |
| 130 | }; |
| 131 | VREG_CONSUMERS(L19) = { |
| 132 | REGULATOR_SUPPLY("8038_l19", NULL), |
Stephen Boyd | bdb53f3 | 2012-06-05 18:39:47 -0700 | [diff] [blame] | 133 | REGULATOR_SUPPLY("fw_core_vdd", "pil-q6v4-modem"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 134 | }; |
| 135 | VREG_CONSUMERS(L20) = { |
| 136 | REGULATOR_SUPPLY("8038_l20", NULL), |
Asish Bhattacharya | cdaa99d | 2012-01-10 06:05:00 +0530 | [diff] [blame] | 137 | REGULATOR_SUPPLY("VDDD_CDC_D", "sitar-slim"), |
| 138 | REGULATOR_SUPPLY("CDC_VDDA_A_1P2V", "sitar-slim"), |
Bhalchandra Gajare | 83c81f6 | 2012-05-18 16:09:05 -0700 | [diff] [blame] | 139 | REGULATOR_SUPPLY("VDDD_CDC_D", "sitar1p1-slim"), |
| 140 | REGULATOR_SUPPLY("CDC_VDDA_A_1P2V", "sitar1p1-slim"), |
Manoj Rao | c6d904c | 2012-06-22 00:32:14 -0700 | [diff] [blame] | 141 | REGULATOR_SUPPLY("mhl_avcc12", "0-0039"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 142 | }; |
| 143 | VREG_CONSUMERS(L21) = { |
| 144 | REGULATOR_SUPPLY("8038_l21", NULL), |
| 145 | }; |
| 146 | VREG_CONSUMERS(L22) = { |
| 147 | REGULATOR_SUPPLY("8038_l22", NULL), |
Subhash Jadavani | 937c750 | 2012-06-01 15:34:46 +0530 | [diff] [blame] | 148 | REGULATOR_SUPPLY("sdc_vdd_io", "msm_sdcc.3"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 149 | }; |
| 150 | VREG_CONSUMERS(L23) = { |
| 151 | REGULATOR_SUPPLY("8038_l23", NULL), |
Chandan Uddaraju | 59894ca | 2011-12-05 17:07:02 -0800 | [diff] [blame] | 152 | REGULATOR_SUPPLY("dsi_vddio", "mipi_dsi.1"), |
Ravishangar Kalyanam | ad32002 | 2012-07-23 18:26:09 -0700 | [diff] [blame] | 153 | REGULATOR_SUPPLY("dsi_pll_vddio", "mdp.0"), |
Chandan Uddaraju | 59894ca | 2011-12-05 17:07:02 -0800 | [diff] [blame] | 154 | REGULATOR_SUPPLY("hdmi_avdd", "hdmi_msm.0"), |
| 155 | REGULATOR_SUPPLY("hdmi_vcc", "hdmi_msm.0"), |
Stephen Boyd | 3bbdf6c | 2011-12-21 16:02:26 -0800 | [diff] [blame] | 156 | REGULATOR_SUPPLY("pll_vdd", "pil_riva"), |
Stephen Boyd | bdb53f3 | 2012-06-05 18:39:47 -0700 | [diff] [blame] | 157 | REGULATOR_SUPPLY("pll_vdd", "pil-q6v4-modem"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 158 | }; |
| 159 | VREG_CONSUMERS(L24) = { |
| 160 | REGULATOR_SUPPLY("8038_l24", NULL), |
Subramanian Srinivasan | c698a44 | 2012-01-11 13:41:57 -0800 | [diff] [blame] | 161 | REGULATOR_SUPPLY("riva_vddmx", "wcnss_wlan.0"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 162 | }; |
David Collins | 652b344 | 2012-08-09 14:47:51 -0700 | [diff] [blame] | 163 | VREG_CONSUMERS(L25) = { |
| 164 | REGULATOR_SUPPLY("8038_l25", NULL), |
| 165 | }; |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 166 | VREG_CONSUMERS(L26) = { |
| 167 | REGULATOR_SUPPLY("8038_l26", NULL), |
| 168 | }; |
| 169 | VREG_CONSUMERS(L27) = { |
| 170 | REGULATOR_SUPPLY("8038_l27", NULL), |
Stephen Boyd | bdb53f3 | 2012-06-05 18:39:47 -0700 | [diff] [blame] | 171 | REGULATOR_SUPPLY("core_vdd", "pil-q6v4-lpass"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 172 | }; |
| 173 | VREG_CONSUMERS(S1) = { |
| 174 | REGULATOR_SUPPLY("8038_s1", NULL), |
Subramanian Srinivasan | c698a44 | 2012-01-11 13:41:57 -0800 | [diff] [blame] | 175 | REGULATOR_SUPPLY("riva_vddcx", "wcnss_wlan.0"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 176 | }; |
| 177 | VREG_CONSUMERS(S2) = { |
| 178 | REGULATOR_SUPPLY("8038_s2", NULL), |
| 179 | }; |
| 180 | VREG_CONSUMERS(S3) = { |
| 181 | REGULATOR_SUPPLY("8038_s3", NULL), |
| 182 | }; |
| 183 | VREG_CONSUMERS(S4) = { |
| 184 | REGULATOR_SUPPLY("8038_s4", NULL), |
Asish Bhattacharya | cdaa99d | 2012-01-10 06:05:00 +0530 | [diff] [blame] | 185 | REGULATOR_SUPPLY("CDC_VDD_CP", "sitar-slim"), |
Bhalchandra Gajare | 83c81f6 | 2012-05-18 16:09:05 -0700 | [diff] [blame] | 186 | REGULATOR_SUPPLY("CDC_VDD_CP", "sitar1p1-slim"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 187 | }; |
| 188 | VREG_CONSUMERS(S5) = { |
| 189 | REGULATOR_SUPPLY("8038_s5", NULL), |
Matt Wagantall | ab730bd | 2012-06-07 20:13:51 -0700 | [diff] [blame] | 190 | REGULATOR_SUPPLY("krait0", "acpuclk-8627"), |
Matt Wagantall | 6dcfa92 | 2012-06-07 20:13:51 -0700 | [diff] [blame] | 191 | REGULATOR_SUPPLY("krait0", "acpuclk-8930"), |
Tianyi Gou | 12370f1 | 2012-07-23 19:13:57 -0700 | [diff] [blame] | 192 | REGULATOR_SUPPLY("krait0", "acpuclk-8930aa"), |
Tianyi Gou | 2520b6e | 2012-10-29 19:13:53 -0700 | [diff] [blame] | 193 | REGULATOR_SUPPLY("krait0", "acpuclk-8930ab"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 194 | }; |
| 195 | VREG_CONSUMERS(S6) = { |
| 196 | REGULATOR_SUPPLY("8038_s6", NULL), |
Matt Wagantall | ab730bd | 2012-06-07 20:13:51 -0700 | [diff] [blame] | 197 | REGULATOR_SUPPLY("krait1", "acpuclk-8627"), |
Matt Wagantall | 6dcfa92 | 2012-06-07 20:13:51 -0700 | [diff] [blame] | 198 | REGULATOR_SUPPLY("krait1", "acpuclk-8930"), |
Tianyi Gou | 12370f1 | 2012-07-23 19:13:57 -0700 | [diff] [blame] | 199 | REGULATOR_SUPPLY("krait1", "acpuclk-8930aa"), |
Tianyi Gou | 2520b6e | 2012-10-29 19:13:53 -0700 | [diff] [blame] | 200 | REGULATOR_SUPPLY("krait1", "acpuclk-8930ab"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 201 | }; |
| 202 | VREG_CONSUMERS(LVS1) = { |
| 203 | REGULATOR_SUPPLY("8038_lvs1", NULL), |
David Collins | f4c3d64 | 2012-03-02 09:04:57 -0800 | [diff] [blame] | 204 | REGULATOR_SUPPLY("cam_vio", "4-001a"), |
| 205 | REGULATOR_SUPPLY("cam_vio", "4-006c"), |
| 206 | REGULATOR_SUPPLY("cam_vio", "4-0048"), |
| 207 | REGULATOR_SUPPLY("cam_vio", "4-0020"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 208 | }; |
| 209 | VREG_CONSUMERS(LVS2) = { |
| 210 | REGULATOR_SUPPLY("8038_lvs2", NULL), |
Anirudh Ghayal | d7ad84c | 2012-01-09 09:17:53 +0530 | [diff] [blame] | 211 | REGULATOR_SUPPLY("vcc_i2c", "3-004a"), |
Amy Maloche | 32a36c3 | 2012-01-11 10:39:11 -0800 | [diff] [blame] | 212 | REGULATOR_SUPPLY("vcc_i2c", "3-0024"), |
Wentao Xu | f59ce4e | 2012-05-22 17:30:13 -0400 | [diff] [blame] | 213 | REGULATOR_SUPPLY("vddio", "12-0018"), |
| 214 | REGULATOR_SUPPLY("vlogic", "12-0068"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 215 | }; |
| 216 | VREG_CONSUMERS(EXT_5V) = { |
| 217 | REGULATOR_SUPPLY("ext_5v", NULL), |
Chandan Uddaraju | 59894ca | 2011-12-05 17:07:02 -0800 | [diff] [blame] | 218 | REGULATOR_SUPPLY("hdmi_mvs", "hdmi_msm.0"), |
Manoj Rao | c6d904c | 2012-06-22 00:32:14 -0700 | [diff] [blame] | 219 | REGULATOR_SUPPLY("mhl_usb_hs_switch", "msm_otg"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 220 | }; |
| 221 | VREG_CONSUMERS(EXT_OTG_SW) = { |
| 222 | REGULATOR_SUPPLY("ext_otg_sw", NULL), |
Anirudh Ghayal | 8c15f7f | 2012-01-09 14:04:02 +0530 | [diff] [blame] | 223 | REGULATOR_SUPPLY("vbus_otg", "msm_otg"), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 224 | }; |
David Collins | 0490731 | 2012-02-08 14:17:57 -0800 | [diff] [blame] | 225 | VREG_CONSUMERS(VDD_DIG_CORNER) = { |
| 226 | REGULATOR_SUPPLY("vdd_dig_corner", NULL), |
Mayank Rana | 248698c | 2012-04-19 00:03:16 +0530 | [diff] [blame] | 227 | REGULATOR_SUPPLY("hsusb_vdd_dig", "msm_otg"), |
David Collins | 0490731 | 2012-02-08 14:17:57 -0800 | [diff] [blame] | 228 | }; |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 229 | |
| 230 | #define PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, _modes, _ops, \ |
| 231 | _apply_uV, _pull_down, _always_on, _supply_regulator, \ |
| 232 | _system_uA, _enable_time, _reg_id) \ |
| 233 | { \ |
| 234 | .init_data = { \ |
| 235 | .constraints = { \ |
| 236 | .valid_modes_mask = _modes, \ |
| 237 | .valid_ops_mask = _ops, \ |
| 238 | .min_uV = _min_uV, \ |
| 239 | .max_uV = _max_uV, \ |
| 240 | .input_uV = _max_uV, \ |
| 241 | .apply_uV = _apply_uV, \ |
| 242 | .always_on = _always_on, \ |
| 243 | .name = _name, \ |
| 244 | }, \ |
| 245 | .num_consumer_supplies = \ |
| 246 | ARRAY_SIZE(vreg_consumers_##_id), \ |
| 247 | .consumer_supplies = vreg_consumers_##_id, \ |
| 248 | .supply_regulator = _supply_regulator, \ |
| 249 | }, \ |
| 250 | .id = _reg_id, \ |
| 251 | .pull_down_enable = _pull_down, \ |
| 252 | .system_uA = _system_uA, \ |
| 253 | .enable_time = _enable_time, \ |
| 254 | } |
| 255 | |
| 256 | #define PM8XXX_LDO(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \ |
| 257 | _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 258 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
| 259 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \ |
| 260 | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \ |
| 261 | REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \ |
| 262 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
| 263 | |
| 264 | #define PM8XXX_NLDO1200(_id, _name, _always_on, _pull_down, _min_uV, \ |
| 265 | _max_uV, _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 266 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
| 267 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \ |
| 268 | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \ |
| 269 | REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \ |
| 270 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
| 271 | |
| 272 | #define PM8XXX_SMPS(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \ |
| 273 | _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 274 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
| 275 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \ |
| 276 | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \ |
| 277 | REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \ |
| 278 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
| 279 | |
| 280 | #define PM8XXX_FTSMPS(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \ |
| 281 | _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 282 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL, \ |
| 283 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS \ |
| 284 | | REGULATOR_CHANGE_MODE, 0, _pull_down, _always_on, \ |
| 285 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
| 286 | |
| 287 | #define PM8XXX_VS(_id, _name, _always_on, _pull_down, _enable_time, \ |
| 288 | _supply_regulator, _reg_id) \ |
| 289 | PM8XXX_VREG_INIT(_id, _name, 0, 0, 0, REGULATOR_CHANGE_STATUS, 0, \ |
| 290 | _pull_down, _always_on, _supply_regulator, 0, _enable_time, \ |
| 291 | _reg_id) |
| 292 | |
| 293 | #define PM8XXX_VS300(_id, _name, _always_on, _pull_down, _enable_time, \ |
| 294 | _supply_regulator, _reg_id) \ |
| 295 | PM8XXX_VREG_INIT(_id, _name, 0, 0, 0, REGULATOR_CHANGE_STATUS, 0, \ |
| 296 | _pull_down, _always_on, _supply_regulator, 0, _enable_time, \ |
| 297 | _reg_id) |
| 298 | |
| 299 | #define PM8XXX_NCP(_id, _name, _always_on, _min_uV, _max_uV, _enable_time, \ |
| 300 | _supply_regulator, _reg_id) \ |
| 301 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, 0, \ |
| 302 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, 0, 0, \ |
| 303 | _always_on, _supply_regulator, 0, _enable_time, _reg_id) |
| 304 | |
| 305 | /* Pin control initialization */ |
| 306 | #define PM8XXX_PC(_id, _name, _always_on, _pin_fn, _pin_ctrl, \ |
| 307 | _supply_regulator, _reg_id) \ |
| 308 | { \ |
| 309 | .init_data = { \ |
| 310 | .constraints = { \ |
| 311 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, \ |
| 312 | .always_on = _always_on, \ |
| 313 | .name = _name, \ |
| 314 | }, \ |
| 315 | .num_consumer_supplies = \ |
| 316 | ARRAY_SIZE(vreg_consumers_##_id##_PC), \ |
| 317 | .consumer_supplies = vreg_consumers_##_id##_PC, \ |
| 318 | .supply_regulator = _supply_regulator, \ |
| 319 | }, \ |
| 320 | .id = _reg_id, \ |
| 321 | .pin_fn = PM8XXX_VREG_PIN_FN_##_pin_fn, \ |
| 322 | .pin_ctrl = _pin_ctrl, \ |
| 323 | } |
| 324 | |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 325 | #define RPM_INIT(_id, _min_uV, _max_uV, _modes, _ops, _apply_uV, _default_uV, \ |
| 326 | _peak_uA, _avg_uA, _pull_down, _pin_ctrl, _freq, _pin_fn, \ |
David Collins | 1578904 | 2012-03-19 10:44:36 -0700 | [diff] [blame] | 327 | _force_mode, _sleep_set_force_mode, _power_mode, _state, \ |
| 328 | _sleep_selectable, _always_on, _supply_regulator, _system_uA) \ |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 329 | { \ |
| 330 | .init_data = { \ |
| 331 | .constraints = { \ |
| 332 | .valid_modes_mask = _modes, \ |
| 333 | .valid_ops_mask = _ops, \ |
| 334 | .min_uV = _min_uV, \ |
| 335 | .max_uV = _max_uV, \ |
| 336 | .input_uV = _min_uV, \ |
| 337 | .apply_uV = _apply_uV, \ |
| 338 | .always_on = _always_on, \ |
| 339 | }, \ |
| 340 | .num_consumer_supplies = \ |
| 341 | ARRAY_SIZE(vreg_consumers_##_id), \ |
| 342 | .consumer_supplies = vreg_consumers_##_id, \ |
| 343 | .supply_regulator = _supply_regulator, \ |
| 344 | }, \ |
| 345 | .id = RPM_VREG_ID_PM8038_##_id, \ |
| 346 | .default_uV = _default_uV, \ |
| 347 | .peak_uA = _peak_uA, \ |
| 348 | .avg_uA = _avg_uA, \ |
| 349 | .pull_down_enable = _pull_down, \ |
| 350 | .pin_ctrl = _pin_ctrl, \ |
| 351 | .freq = RPM_VREG_FREQ_##_freq, \ |
| 352 | .pin_fn = _pin_fn, \ |
| 353 | .force_mode = _force_mode, \ |
David Collins | 1578904 | 2012-03-19 10:44:36 -0700 | [diff] [blame] | 354 | .sleep_set_force_mode = _sleep_set_force_mode, \ |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 355 | .power_mode = _power_mode, \ |
| 356 | .state = _state, \ |
| 357 | .sleep_selectable = _sleep_selectable, \ |
| 358 | .system_uA = _system_uA, \ |
| 359 | } |
| 360 | |
| 361 | #define RPM_LDO(_id, _always_on, _pd, _sleep_selectable, _min_uV, _max_uV, \ |
| 362 | _supply_regulator, _system_uA, _init_peak_uA) \ |
| 363 | RPM_INIT(_id, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
| 364 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE \ |
| 365 | | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE \ |
| 366 | | REGULATOR_CHANGE_DRMS, 0, _max_uV, _init_peak_uA, 0, _pd, \ |
| 367 | RPM_VREG_PIN_CTRL_NONE, NONE, RPM_VREG_PIN_FN_8930_NONE, \ |
David Collins | 1578904 | 2012-03-19 10:44:36 -0700 | [diff] [blame] | 368 | RPM_VREG_FORCE_MODE_8930_NONE, \ |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 369 | RPM_VREG_FORCE_MODE_8930_NONE, RPM_VREG_POWER_MODE_8930_PWM, \ |
| 370 | RPM_VREG_STATE_OFF, _sleep_selectable, _always_on, \ |
| 371 | _supply_regulator, _system_uA) |
| 372 | |
| 373 | #define RPM_SMPS(_id, _always_on, _pd, _sleep_selectable, _min_uV, _max_uV, \ |
David Collins | 3d2b945 | 2012-03-19 11:00:30 -0700 | [diff] [blame] | 374 | _supply_regulator, _system_uA, _freq, _force_mode, \ |
| 375 | _sleep_set_force_mode) \ |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 376 | RPM_INIT(_id, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
| 377 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE \ |
| 378 | | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE \ |
David Collins | 226f251 | 2012-03-19 13:18:39 -0700 | [diff] [blame] | 379 | | REGULATOR_CHANGE_DRMS, 0, _min_uV, _system_uA, 0, _pd, \ |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 380 | RPM_VREG_PIN_CTRL_NONE, _freq, RPM_VREG_PIN_FN_8930_NONE, \ |
David Collins | 3d2b945 | 2012-03-19 11:00:30 -0700 | [diff] [blame] | 381 | RPM_VREG_FORCE_MODE_8930_##_force_mode, \ |
| 382 | RPM_VREG_FORCE_MODE_8930_##_sleep_set_force_mode, \ |
| 383 | RPM_VREG_POWER_MODE_8930_PWM, RPM_VREG_STATE_OFF, \ |
| 384 | _sleep_selectable, _always_on, _supply_regulator, _system_uA) |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 385 | |
| 386 | #define RPM_VS(_id, _always_on, _pd, _sleep_selectable, _supply_regulator) \ |
| 387 | RPM_INIT(_id, 0, 0, 0, REGULATOR_CHANGE_STATUS, 0, 0, 1000, 1000, _pd, \ |
| 388 | RPM_VREG_PIN_CTRL_NONE, NONE, RPM_VREG_PIN_FN_8930_NONE, \ |
David Collins | 1578904 | 2012-03-19 10:44:36 -0700 | [diff] [blame] | 389 | RPM_VREG_FORCE_MODE_8930_NONE, \ |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 390 | RPM_VREG_FORCE_MODE_8930_NONE, RPM_VREG_POWER_MODE_8930_PWM, \ |
| 391 | RPM_VREG_STATE_OFF, _sleep_selectable, _always_on, \ |
| 392 | _supply_regulator, 0) |
| 393 | |
| 394 | #define RPM_NCP(_id, _always_on, _sleep_selectable, _min_uV, _max_uV, \ |
| 395 | _supply_regulator, _freq) \ |
| 396 | RPM_INIT(_id, _min_uV, _max_uV, 0, REGULATOR_CHANGE_VOLTAGE \ |
| 397 | | REGULATOR_CHANGE_STATUS, 0, _max_uV, 1000, 1000, 0, \ |
| 398 | RPM_VREG_PIN_CTRL_NONE, _freq, RPM_VREG_PIN_FN_8930_NONE, \ |
David Collins | 1578904 | 2012-03-19 10:44:36 -0700 | [diff] [blame] | 399 | RPM_VREG_FORCE_MODE_8930_NONE, \ |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 400 | RPM_VREG_FORCE_MODE_8930_NONE, RPM_VREG_POWER_MODE_8930_PWM, \ |
| 401 | RPM_VREG_STATE_OFF, _sleep_selectable, _always_on, \ |
| 402 | _supply_regulator, 0) |
| 403 | |
David Collins | 0490731 | 2012-02-08 14:17:57 -0800 | [diff] [blame] | 404 | #define RPM_CORNER(_id, _always_on, _sleep_selectable, _min_uV, _max_uV, \ |
| 405 | _supply_regulator) \ |
| 406 | RPM_INIT(_id, _min_uV, _max_uV, 0, REGULATOR_CHANGE_VOLTAGE \ |
| 407 | | REGULATOR_CHANGE_STATUS, 0, _max_uV, 0, 0, 0, \ |
| 408 | RPM_VREG_PIN_CTRL_NONE, NONE, RPM_VREG_PIN_FN_8930_NONE, \ |
David Collins | 1578904 | 2012-03-19 10:44:36 -0700 | [diff] [blame] | 409 | RPM_VREG_FORCE_MODE_8930_NONE, \ |
David Collins | 0490731 | 2012-02-08 14:17:57 -0800 | [diff] [blame] | 410 | RPM_VREG_FORCE_MODE_8930_NONE, RPM_VREG_POWER_MODE_8930_PWM, \ |
| 411 | RPM_VREG_STATE_OFF, _sleep_selectable, _always_on, \ |
| 412 | _supply_regulator, 0) |
| 413 | |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 414 | /* Pin control initialization */ |
| 415 | #define RPM_PC_INIT(_id, _always_on, _pin_fn, _pin_ctrl, _supply_regulator) \ |
| 416 | { \ |
| 417 | .init_data = { \ |
| 418 | .constraints = { \ |
| 419 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, \ |
| 420 | .always_on = _always_on, \ |
| 421 | }, \ |
| 422 | .num_consumer_supplies = \ |
| 423 | ARRAY_SIZE(vreg_consumers_##_id##_PC), \ |
| 424 | .consumer_supplies = vreg_consumers_##_id##_PC, \ |
| 425 | .supply_regulator = _supply_regulator, \ |
| 426 | }, \ |
| 427 | .id = RPM_VREG_ID_PM8038_##_id##_PC, \ |
| 428 | .pin_fn = RPM_VREG_PIN_FN_8930_##_pin_fn, \ |
| 429 | .pin_ctrl = _pin_ctrl, \ |
| 430 | } |
| 431 | |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 432 | #define GPIO_VREG(_id, _reg_name, _gpio_label, _gpio, _supply_regulator) \ |
| 433 | [MSM8930_GPIO_VREG_ID_##_id] = { \ |
| 434 | .init_data = { \ |
| 435 | .constraints = { \ |
| 436 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, \ |
| 437 | }, \ |
| 438 | .num_consumer_supplies = \ |
| 439 | ARRAY_SIZE(vreg_consumers_##_id), \ |
| 440 | .consumer_supplies = vreg_consumers_##_id, \ |
| 441 | .supply_regulator = _supply_regulator, \ |
| 442 | }, \ |
| 443 | .regulator_name = _reg_name, \ |
| 444 | .gpio_label = _gpio_label, \ |
| 445 | .gpio = _gpio, \ |
| 446 | } |
| 447 | |
David Collins | b455842 | 2012-01-05 10:50:49 -0800 | [diff] [blame] | 448 | #define SAW_VREG_INIT(_id, _name, _min_uV, _max_uV) \ |
| 449 | { \ |
| 450 | .constraints = { \ |
| 451 | .name = _name, \ |
Michael Bohan | ee3ce19c | 2012-11-13 14:57:40 -0800 | [diff] [blame] | 452 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE | \ |
| 453 | REGULATOR_CHANGE_STATUS, \ |
David Collins | b455842 | 2012-01-05 10:50:49 -0800 | [diff] [blame] | 454 | .min_uV = _min_uV, \ |
| 455 | .max_uV = _max_uV, \ |
| 456 | }, \ |
| 457 | .num_consumer_supplies = ARRAY_SIZE(vreg_consumers_##_id), \ |
| 458 | .consumer_supplies = vreg_consumers_##_id, \ |
| 459 | } |
| 460 | |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 461 | /* GPIO regulator constraints */ |
| 462 | struct gpio_regulator_platform_data |
David Collins | 4614cb9 | 2012-08-20 12:17:09 -0700 | [diff] [blame] | 463 | msm8930_pm8038_gpio_regulator_pdata[] __devinitdata = { |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 464 | /* ID vreg_name gpio_label gpio supply */ |
| 465 | GPIO_VREG(EXT_5V, "ext_5v", "ext_5v_en", 63, NULL), |
| 466 | GPIO_VREG(EXT_OTG_SW, "ext_otg_sw", "ext_otg_sw_en", 97, "ext_5v"), |
| 467 | }; |
| 468 | |
David Collins | b455842 | 2012-01-05 10:50:49 -0800 | [diff] [blame] | 469 | /* SAW regulator constraints */ |
David Collins | 4614cb9 | 2012-08-20 12:17:09 -0700 | [diff] [blame] | 470 | struct regulator_init_data msm8930_pm8038_saw_regulator_core0_pdata = |
David Collins | b455842 | 2012-01-05 10:50:49 -0800 | [diff] [blame] | 471 | /* ID vreg_name min_uV max_uV */ |
| 472 | SAW_VREG_INIT(S5, "8038_s5", 850000, 1300000); |
David Collins | 4614cb9 | 2012-08-20 12:17:09 -0700 | [diff] [blame] | 473 | struct regulator_init_data msm8930_pm8038_saw_regulator_core1_pdata = |
David Collins | b455842 | 2012-01-05 10:50:49 -0800 | [diff] [blame] | 474 | SAW_VREG_INIT(S6, "8038_s6", 850000, 1300000); |
| 475 | |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 476 | /* PM8038 regulator constraints */ |
| 477 | struct pm8xxx_regulator_platform_data |
| 478 | msm8930_pm8038_regulator_pdata[] __devinitdata = { |
| 479 | /* |
| 480 | * ID name always_on pd min_uV max_uV en_t supply |
| 481 | * system_uA reg_ID |
| 482 | */ |
Matt Wagantall | ed36d82 | 2012-05-25 18:13:40 -0700 | [diff] [blame] | 483 | PM8XXX_NLDO1200(L16, "8038_l16", 0, 1, 375000, 1050000, 200, "8038_s3", |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 484 | 0, 0), |
Matt Wagantall | ed36d82 | 2012-05-25 18:13:40 -0700 | [diff] [blame] | 485 | PM8XXX_NLDO1200(L19, "8038_l19", 0, 1, 375000, 1050000, 200, "8038_s3", |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 486 | 0, 1), |
Matt Wagantall | ed36d82 | 2012-05-25 18:13:40 -0700 | [diff] [blame] | 487 | PM8XXX_NLDO1200(L27, "8038_l27", 0, 1, 375000, 1050000, 200, "8038_s3", |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 488 | 0, 2), |
| 489 | }; |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 490 | |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 491 | static struct rpm_regulator_init_data |
| 492 | msm8930_rpm_regulator_init_data[] __devinitdata = { |
David Collins | 3d2b945 | 2012-03-19 11:00:30 -0700 | [diff] [blame] | 493 | /* ID a_on pd ss min_uV max_uV supply sys_uA freq fm ss_fm */ |
David Collins | c4208cc | 2012-03-19 12:53:10 -0700 | [diff] [blame] | 494 | RPM_SMPS(S1, 0, 1, 1, 500000, 1150000, NULL, 100000, 4p80, AUTO, LPM), |
| 495 | RPM_SMPS(S2, 1, 1, 1, 1400000, 1400000, NULL, 100000, 1p60, AUTO, LPM), |
David Collins | 3dac431 | 2012-11-15 15:24:29 -0800 | [diff] [blame] | 496 | RPM_SMPS(S3, 0, 1, 1, 1150000, 1150000, NULL, 100000, 3p20, AUTO, AUTO), |
David Collins | 226f251 | 2012-03-19 13:18:39 -0700 | [diff] [blame] | 497 | RPM_SMPS(S4, 1, 1, 1, 1950000, 2200000, NULL, 100000, 1p60, AUTO, LPM), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 498 | |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 499 | /* ID a_on pd ss min_uV max_uV supply sys_uA init_ip */ |
| 500 | RPM_LDO(L1, 0, 1, 0, 1300000, 1300000, "8038_s2", 0, 0), |
| 501 | RPM_LDO(L2, 0, 1, 0, 1200000, 1200000, "8038_s2", 0, 0), |
| 502 | RPM_LDO(L3, 0, 1, 0, 3075000, 3075000, NULL, 0, 0), |
| 503 | RPM_LDO(L4, 1, 1, 0, 1800000, 1800000, NULL, 10000, 10000), |
| 504 | RPM_LDO(L5, 0, 1, 0, 2950000, 2950000, NULL, 0, 0), |
| 505 | RPM_LDO(L6, 0, 1, 0, 2950000, 2950000, NULL, 0, 0), |
| 506 | RPM_LDO(L7, 0, 1, 0, 2050000, 2050000, "8038_s4", 0, 0), |
| 507 | RPM_LDO(L8, 0, 1, 0, 2800000, 2800000, NULL, 0, 0), |
| 508 | RPM_LDO(L9, 0, 1, 0, 2850000, 2850000, NULL, 0, 0), |
| 509 | RPM_LDO(L10, 0, 1, 0, 2900000, 2900000, NULL, 0, 0), |
| 510 | RPM_LDO(L11, 1, 1, 0, 1800000, 1800000, "8038_s4", 10000, 10000), |
| 511 | RPM_LDO(L12, 0, 1, 0, 1200000, 1200000, "8038_s2", 0, 0), |
David Collins | 652b344 | 2012-08-09 14:47:51 -0700 | [diff] [blame] | 512 | RPM_LDO(L13, 0, 0, 0, 2220000, 2220000, NULL, 0, 0), |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 513 | RPM_LDO(L14, 0, 1, 0, 1800000, 1800000, NULL, 0, 0), |
| 514 | RPM_LDO(L15, 0, 1, 0, 1800000, 2950000, NULL, 0, 0), |
| 515 | RPM_LDO(L17, 0, 1, 0, 1800000, 2950000, NULL, 0, 0), |
| 516 | RPM_LDO(L18, 0, 1, 0, 1800000, 1800000, NULL, 0, 0), |
David Collins | 19e7881 | 2012-06-04 15:50:09 -0700 | [diff] [blame] | 517 | RPM_LDO(L20, 1, 1, 0, 1250000, 1250000, "8038_s2", 10000, 10000), |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 518 | RPM_LDO(L21, 0, 1, 0, 1900000, 1900000, "8038_s4", 0, 0), |
| 519 | RPM_LDO(L22, 1, 1, 0, 1850000, 2950000, NULL, 10000, 10000), |
| 520 | RPM_LDO(L23, 1, 1, 1, 1800000, 1800000, "8038_s4", 0, 0), |
David Collins | ad96fa3 | 2012-03-02 08:41:38 -0800 | [diff] [blame] | 521 | RPM_LDO(L24, 0, 1, 1, 500000, 1150000, "8038_s2", 10000, 10000), |
David Collins | 652b344 | 2012-08-09 14:47:51 -0700 | [diff] [blame] | 522 | RPM_LDO(L25, 0, 0, 0, 1740000, 1740000, "8038_l13", 0, 0), |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 523 | RPM_LDO(L26, 1, 1, 0, 1050000, 1050000, "8038_s2", 10000, 10000), |
| 524 | |
| 525 | /* ID a_on pd ss supply */ |
| 526 | RPM_VS(LVS1, 0, 1, 0, "8038_l11"), |
| 527 | RPM_VS(LVS2, 0, 1, 0, "8038_l11"), |
David Collins | 0490731 | 2012-02-08 14:17:57 -0800 | [diff] [blame] | 528 | |
| 529 | /* ID a_on ss min_corner max_corner supply */ |
| 530 | RPM_CORNER(VDD_DIG_CORNER, 0, 1, RPM_VREG_CORNER_NONE, |
| 531 | RPM_VREG_CORNER_HIGH, NULL), |
David Collins | 1d4061b | 2011-12-06 15:36:40 -0800 | [diff] [blame] | 532 | }; |
| 533 | |
| 534 | int msm8930_pm8038_regulator_pdata_len __devinitdata = |
| 535 | ARRAY_SIZE(msm8930_pm8038_regulator_pdata); |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 536 | |
Matt Wagantall | 6dcfa92 | 2012-06-07 20:13:51 -0700 | [diff] [blame] | 537 | #define RPM_REG_MAP(_id, _sleep_also, _voter, _supply, _dev_name) \ |
| 538 | { \ |
| 539 | .vreg_id = RPM_VREG_ID_PM8038_##_id, \ |
| 540 | .sleep_also = _sleep_also, \ |
| 541 | .voter = _voter, \ |
| 542 | .supply = _supply, \ |
| 543 | .dev_name = _dev_name, \ |
| 544 | } |
| 545 | static struct rpm_regulator_consumer_mapping |
| 546 | msm_rpm_regulator_consumer_mapping[] __devinitdata = { |
| 547 | RPM_REG_MAP(L23, 0, 1, "krait0_hfpll", "acpuclk-8930"), |
| 548 | RPM_REG_MAP(L23, 0, 2, "krait1_hfpll", "acpuclk-8930"), |
| 549 | RPM_REG_MAP(L23, 0, 6, "l2_hfpll", "acpuclk-8930"), |
| 550 | RPM_REG_MAP(L24, 0, 1, "krait0_mem", "acpuclk-8930"), |
| 551 | RPM_REG_MAP(L24, 0, 2, "krait1_mem", "acpuclk-8930"), |
| 552 | RPM_REG_MAP(VDD_DIG_CORNER, 0, 1, "krait0_dig", "acpuclk-8930"), |
| 553 | RPM_REG_MAP(VDD_DIG_CORNER, 0, 2, "krait1_dig", "acpuclk-8930"), |
Matt Wagantall | ab730bd | 2012-06-07 20:13:51 -0700 | [diff] [blame] | 554 | |
| 555 | RPM_REG_MAP(L23, 0, 1, "krait0_hfpll", "acpuclk-8627"), |
| 556 | RPM_REG_MAP(L23, 0, 2, "krait1_hfpll", "acpuclk-8627"), |
| 557 | RPM_REG_MAP(L23, 0, 6, "l2_hfpll", "acpuclk-8627"), |
| 558 | RPM_REG_MAP(L24, 0, 1, "krait0_mem", "acpuclk-8627"), |
| 559 | RPM_REG_MAP(L24, 0, 2, "krait1_mem", "acpuclk-8627"), |
| 560 | RPM_REG_MAP(VDD_DIG_CORNER, 0, 1, "krait0_dig", "acpuclk-8627"), |
| 561 | RPM_REG_MAP(VDD_DIG_CORNER, 0, 2, "krait1_dig", "acpuclk-8627"), |
Tianyi Gou | 12370f1 | 2012-07-23 19:13:57 -0700 | [diff] [blame] | 562 | |
| 563 | RPM_REG_MAP(L23, 0, 1, "krait0_hfpll", "acpuclk-8930aa"), |
| 564 | RPM_REG_MAP(L23, 0, 2, "krait1_hfpll", "acpuclk-8930aa"), |
| 565 | RPM_REG_MAP(L23, 0, 6, "l2_hfpll", "acpuclk-8930aa"), |
| 566 | RPM_REG_MAP(L24, 0, 1, "krait0_mem", "acpuclk-8930aa"), |
| 567 | RPM_REG_MAP(L24, 0, 2, "krait1_mem", "acpuclk-8930aa"), |
| 568 | RPM_REG_MAP(VDD_DIG_CORNER, 0, 1, "krait0_dig", "acpuclk-8930aa"), |
| 569 | RPM_REG_MAP(VDD_DIG_CORNER, 0, 2, "krait1_dig", "acpuclk-8930aa"), |
Tianyi Gou | 2520b6e | 2012-10-29 19:13:53 -0700 | [diff] [blame] | 570 | |
| 571 | RPM_REG_MAP(L23, 0, 1, "krait0_hfpll", "acpuclk-8930ab"), |
| 572 | RPM_REG_MAP(L23, 0, 2, "krait1_hfpll", "acpuclk-8930ab"), |
| 573 | RPM_REG_MAP(L23, 0, 6, "l2_hfpll", "acpuclk-8930ab"), |
| 574 | RPM_REG_MAP(L24, 0, 1, "krait0_mem", "acpuclk-8930ab"), |
| 575 | RPM_REG_MAP(L24, 0, 2, "krait1_mem", "acpuclk-8930ab"), |
| 576 | RPM_REG_MAP(VDD_DIG_CORNER, 0, 1, "krait0_dig", "acpuclk-8930ab"), |
| 577 | RPM_REG_MAP(VDD_DIG_CORNER, 0, 2, "krait1_dig", "acpuclk-8930ab"), |
Matt Wagantall | 6dcfa92 | 2012-06-07 20:13:51 -0700 | [diff] [blame] | 578 | }; |
| 579 | |
David Collins | 4614cb9 | 2012-08-20 12:17:09 -0700 | [diff] [blame] | 580 | struct rpm_regulator_platform_data |
| 581 | msm8930_pm8038_rpm_regulator_pdata __devinitdata = { |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 582 | .init_data = msm8930_rpm_regulator_init_data, |
| 583 | .num_regulators = ARRAY_SIZE(msm8930_rpm_regulator_init_data), |
| 584 | .version = RPM_VREG_VERSION_8930, |
| 585 | .vreg_id_vdd_mem = RPM_VREG_ID_PM8038_L24, |
David Collins | 0490731 | 2012-02-08 14:17:57 -0800 | [diff] [blame] | 586 | .vreg_id_vdd_dig = RPM_VREG_ID_PM8038_VDD_DIG_CORNER, |
Matt Wagantall | 6dcfa92 | 2012-06-07 20:13:51 -0700 | [diff] [blame] | 587 | .consumer_map = msm_rpm_regulator_consumer_mapping, |
| 588 | .consumer_map_len = ARRAY_SIZE(msm_rpm_regulator_consumer_mapping), |
David Collins | 8af872e | 2012-01-06 11:31:56 -0800 | [diff] [blame] | 589 | }; |