Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 1 | /* |
Vikram Mulukutla | bc2e957 | 2011-11-04 03:41:38 -0700 | [diff] [blame] | 2 | * Copyright (c) 2011-2012, Code Aurora Forum. All rights reserved. |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [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 | 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), |
Kevin Chan | 330e4d5 | 2012-02-18 23:11:24 -0800 | [diff] [blame] | 30 | REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.0"), |
| 31 | REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.1"), |
| 32 | REGULATOR_SUPPLY("mipi_csi_vdd", "msm_csid.2"), |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 33 | REGULATOR_SUPPLY("lvds_pll_vdda", "lvds.0"), |
| 34 | REGULATOR_SUPPLY("dsi1_pll_vdda", "mipi_dsi.1"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 35 | }; |
| 36 | VREG_CONSUMERS(L3) = { |
| 37 | REGULATOR_SUPPLY("8921_l3", NULL), |
Hemant Kumar | 6ddad59 | 2011-08-03 19:31:56 -0700 | [diff] [blame] | 38 | REGULATOR_SUPPLY("HSUSB_3p3", "msm_otg"), |
Manu Gautam | dccbca4 | 2011-11-08 15:13:38 +0530 | [diff] [blame] | 39 | REGULATOR_SUPPLY("HSUSB_3p3", "msm_ehci_host.0"), |
| 40 | REGULATOR_SUPPLY("HSUSB_3p3", "msm_ehci_host.1"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 41 | }; |
| 42 | VREG_CONSUMERS(L4) = { |
| 43 | REGULATOR_SUPPLY("8921_l4", NULL), |
Hemant Kumar | 6ddad59 | 2011-08-03 19:31:56 -0700 | [diff] [blame] | 44 | REGULATOR_SUPPLY("HSUSB_1p8", "msm_otg"), |
Subramanian Srinivasan | 04d2c83 | 2012-01-17 11:26:36 -0800 | [diff] [blame] | 45 | REGULATOR_SUPPLY("iris_vddxo", "wcnss_wlan.0"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 46 | }; |
| 47 | VREG_CONSUMERS(L5) = { |
| 48 | REGULATOR_SUPPLY("8921_l5", NULL), |
Sahitya Tummala | b4d883f | 2011-08-23 10:44:51 +0530 | [diff] [blame] | 49 | REGULATOR_SUPPLY("sdc_vdd", "msm_sdcc.1"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 50 | }; |
| 51 | VREG_CONSUMERS(L6) = { |
| 52 | REGULATOR_SUPPLY("8921_l6", NULL), |
Sahitya Tummala | b4d883f | 2011-08-23 10:44:51 +0530 | [diff] [blame] | 53 | REGULATOR_SUPPLY("sdc_vdd", "msm_sdcc.3"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 54 | }; |
| 55 | VREG_CONSUMERS(L7) = { |
| 56 | REGULATOR_SUPPLY("8921_l7", NULL), |
Sahitya Tummala | b4d883f | 2011-08-23 10:44:51 +0530 | [diff] [blame] | 57 | REGULATOR_SUPPLY("sdc_vddp", "msm_sdcc.3"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 58 | }; |
| 59 | VREG_CONSUMERS(L8) = { |
| 60 | REGULATOR_SUPPLY("8921_l8", NULL), |
Jeyaprakash Soundrapandian | f0d4d01 | 2012-01-16 15:12:20 -0800 | [diff] [blame] | 61 | REGULATOR_SUPPLY("cam_vana", "4-001a"), |
Sreesudhan Ramakrish Ramkumar | 6c6f57c | 2012-02-21 15:12:44 -0800 | [diff] [blame] | 62 | REGULATOR_SUPPLY("cam_vana", "4-0048"), |
Jeyaprakash Soundrapandian | f0d4d01 | 2012-01-16 15:12:20 -0800 | [diff] [blame] | 63 | REGULATOR_SUPPLY("cam_vana", "4-006c"), |
Sreesudhan Ramakrish Ramkumar | 3381da7 | 2012-01-27 08:08:32 -0800 | [diff] [blame] | 64 | REGULATOR_SUPPLY("cam_vana", "4-0034"), |
Sreesudhan Ramakrish Ramkumar | 8002a79 | 2012-04-09 17:42:58 -0700 | [diff] [blame] | 65 | REGULATOR_SUPPLY("cam_vana", "4-0020"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 66 | }; |
| 67 | VREG_CONSUMERS(L9) = { |
| 68 | REGULATOR_SUPPLY("8921_l9", NULL), |
Anirudh Ghayal | 2917a5a | 2012-02-05 19:51:07 -0800 | [diff] [blame] | 69 | REGULATOR_SUPPLY("vdd", "3-0024"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 70 | }; |
| 71 | VREG_CONSUMERS(L10) = { |
| 72 | REGULATOR_SUPPLY("8921_l10", NULL), |
Subramanian Srinivasan | 04d2c83 | 2012-01-17 11:26:36 -0800 | [diff] [blame] | 73 | REGULATOR_SUPPLY("iris_vddpa", "wcnss_wlan.0"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 74 | }; |
| 75 | VREG_CONSUMERS(L11) = { |
| 76 | REGULATOR_SUPPLY("8921_l11", NULL), |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 77 | REGULATOR_SUPPLY("dsi1_avdd", "mipi_dsi.1"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 78 | }; |
| 79 | VREG_CONSUMERS(L12) = { |
Jeyaprakash Soundrapandian | f0d4d01 | 2012-01-16 15:12:20 -0800 | [diff] [blame] | 80 | REGULATOR_SUPPLY("cam_vdig", "4-001a"), |
Sreesudhan Ramakrish Ramkumar | 6c6f57c | 2012-02-21 15:12:44 -0800 | [diff] [blame] | 81 | REGULATOR_SUPPLY("cam_vdig", "4-0048"), |
Jeyaprakash Soundrapandian | f0d4d01 | 2012-01-16 15:12:20 -0800 | [diff] [blame] | 82 | REGULATOR_SUPPLY("cam_vdig", "4-006c"), |
Sreesudhan Ramakrish Ramkumar | 3381da7 | 2012-01-27 08:08:32 -0800 | [diff] [blame] | 83 | REGULATOR_SUPPLY("cam_vdig", "4-0034"), |
Sreesudhan Ramakrish Ramkumar | 8002a79 | 2012-04-09 17:42:58 -0700 | [diff] [blame] | 84 | REGULATOR_SUPPLY("cam_vdig", "4-0020"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 85 | REGULATOR_SUPPLY("8921_l12", NULL), |
| 86 | }; |
| 87 | VREG_CONSUMERS(L14) = { |
| 88 | REGULATOR_SUPPLY("8921_l14", NULL), |
| 89 | }; |
| 90 | VREG_CONSUMERS(L15) = { |
| 91 | REGULATOR_SUPPLY("8921_l15", NULL), |
| 92 | }; |
| 93 | VREG_CONSUMERS(L16) = { |
| 94 | REGULATOR_SUPPLY("8921_l16", NULL), |
Jeyaprakash Soundrapandian | f0d4d01 | 2012-01-16 15:12:20 -0800 | [diff] [blame] | 95 | REGULATOR_SUPPLY("cam_vaf", "4-001a"), |
Sreesudhan Ramakrish Ramkumar | 6c6f57c | 2012-02-21 15:12:44 -0800 | [diff] [blame] | 96 | REGULATOR_SUPPLY("cam_vaf", "4-0048"), |
Jeyaprakash Soundrapandian | f0d4d01 | 2012-01-16 15:12:20 -0800 | [diff] [blame] | 97 | REGULATOR_SUPPLY("cam_vaf", "4-006c"), |
Sreesudhan Ramakrish Ramkumar | 3381da7 | 2012-01-27 08:08:32 -0800 | [diff] [blame] | 98 | REGULATOR_SUPPLY("cam_vaf", "4-0034"), |
Sreesudhan Ramakrish Ramkumar | 8002a79 | 2012-04-09 17:42:58 -0700 | [diff] [blame] | 99 | REGULATOR_SUPPLY("cam_vaf", "4-0020"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 100 | }; |
| 101 | VREG_CONSUMERS(L17) = { |
| 102 | REGULATOR_SUPPLY("8921_l17", NULL), |
| 103 | }; |
| 104 | VREG_CONSUMERS(L18) = { |
| 105 | REGULATOR_SUPPLY("8921_l18", NULL), |
| 106 | }; |
David Collins | 1bf88da | 2012-05-03 14:58:34 -0700 | [diff] [blame] | 107 | VREG_CONSUMERS(L21) = { |
| 108 | REGULATOR_SUPPLY("8921_l21", NULL), |
| 109 | }; |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 110 | VREG_CONSUMERS(L22) = { |
| 111 | REGULATOR_SUPPLY("8921_l22", NULL), |
| 112 | }; |
| 113 | VREG_CONSUMERS(L23) = { |
| 114 | REGULATOR_SUPPLY("8921_l23", NULL), |
Swaminathan Sathappan | 2316e08 | 2012-02-03 14:07:17 -0800 | [diff] [blame] | 115 | REGULATOR_SUPPLY("pll_vdd", "pil_qdsp6v4.1"), |
| 116 | REGULATOR_SUPPLY("pll_vdd", "pil_qdsp6v4.2"), |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 117 | REGULATOR_SUPPLY("HSUSB_1p8", "msm_ehci_host.0"), |
| 118 | REGULATOR_SUPPLY("HSUSB_1p8", "msm_ehci_host.1"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 119 | }; |
| 120 | VREG_CONSUMERS(L24) = { |
| 121 | REGULATOR_SUPPLY("8921_l24", NULL), |
Subramanian Srinivasan | 04d2c83 | 2012-01-17 11:26:36 -0800 | [diff] [blame] | 122 | REGULATOR_SUPPLY("riva_vddmx", "wcnss_wlan.0"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 123 | }; |
| 124 | VREG_CONSUMERS(L25) = { |
| 125 | REGULATOR_SUPPLY("8921_l25", NULL), |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 126 | REGULATOR_SUPPLY("VDDD_CDC_D", "tabla-slim"), |
| 127 | REGULATOR_SUPPLY("CDC_VDDA_A_1P2V", "tabla-slim"), |
Swaminathan Sathappan | 2316e08 | 2012-02-03 14:07:17 -0800 | [diff] [blame] | 128 | REGULATOR_SUPPLY("VDDD_CDC_D", "tabla2x-slim"), |
| 129 | REGULATOR_SUPPLY("CDC_VDDA_A_1P2V", "tabla2x-slim"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 130 | }; |
| 131 | VREG_CONSUMERS(L26) = { |
| 132 | REGULATOR_SUPPLY("8921_l26", NULL), |
Matt Wagantall | b94b9a5 | 2012-02-02 21:59:54 -0800 | [diff] [blame] | 133 | REGULATOR_SUPPLY("core_vdd", "pil_qdsp6v4.0"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 134 | }; |
| 135 | VREG_CONSUMERS(L27) = { |
| 136 | REGULATOR_SUPPLY("8921_l27", NULL), |
Swaminathan Sathappan | 2316e08 | 2012-02-03 14:07:17 -0800 | [diff] [blame] | 137 | REGULATOR_SUPPLY("core_vdd", "pil_qdsp6v4.2"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 138 | }; |
| 139 | VREG_CONSUMERS(L28) = { |
| 140 | REGULATOR_SUPPLY("8921_l28", NULL), |
Swaminathan Sathappan | 2316e08 | 2012-02-03 14:07:17 -0800 | [diff] [blame] | 141 | REGULATOR_SUPPLY("core_vdd", "pil_qdsp6v4.1"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 142 | }; |
David Collins | 1bf88da | 2012-05-03 14:58:34 -0700 | [diff] [blame] | 143 | VREG_CONSUMERS(L29) = { |
| 144 | REGULATOR_SUPPLY("8921_l29", NULL), |
| 145 | }; |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 146 | VREG_CONSUMERS(S1) = { |
| 147 | REGULATOR_SUPPLY("8921_s1", NULL), |
| 148 | }; |
| 149 | VREG_CONSUMERS(S2) = { |
| 150 | REGULATOR_SUPPLY("8921_s2", NULL), |
Subramanian Srinivasan | 04d2c83 | 2012-01-17 11:26:36 -0800 | [diff] [blame] | 151 | REGULATOR_SUPPLY("iris_vddrfa", "wcnss_wlan.0"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 152 | }; |
| 153 | VREG_CONSUMERS(S3) = { |
| 154 | REGULATOR_SUPPLY("8921_s3", NULL), |
Hemant Kumar | 6ddad59 | 2011-08-03 19:31:56 -0700 | [diff] [blame] | 155 | REGULATOR_SUPPLY("HSUSB_VDDCX", "msm_otg"), |
Manu Gautam | dccbca4 | 2011-11-08 15:13:38 +0530 | [diff] [blame] | 156 | REGULATOR_SUPPLY("HSUSB_VDDCX", "msm_ehci_host.0"), |
| 157 | REGULATOR_SUPPLY("HSUSB_VDDCX", "msm_ehci_host.1"), |
Hemant Kumar | a945b47 | 2012-01-25 15:08:06 -0800 | [diff] [blame] | 158 | REGULATOR_SUPPLY("HSIC_VDDCX", "msm_hsic_host"), |
Subramanian Srinivasan | 04d2c83 | 2012-01-17 11:26:36 -0800 | [diff] [blame] | 159 | REGULATOR_SUPPLY("riva_vddcx", "wcnss_wlan.0"), |
Niranjana Vishwanathapura | 06f8933 | 2012-05-03 17:11:13 -0600 | [diff] [blame] | 160 | REGULATOR_SUPPLY("vp_pcie", "msm_pcie"), |
| 161 | REGULATOR_SUPPLY("vptx_pcie", "msm_pcie"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 162 | }; |
| 163 | VREG_CONSUMERS(S4) = { |
| 164 | REGULATOR_SUPPLY("8921_s4", NULL), |
Sahitya Tummala | b4d883f | 2011-08-23 10:44:51 +0530 | [diff] [blame] | 165 | REGULATOR_SUPPLY("sdc_vccq", "msm_sdcc.1"), |
Swaminathan Sathappan | 2f51a75 | 2011-12-05 12:51:19 -0800 | [diff] [blame] | 166 | REGULATOR_SUPPLY("VDDIO_CDC", "tabla-slim"), |
| 167 | REGULATOR_SUPPLY("CDC_VDD_CP", "tabla-slim"), |
| 168 | REGULATOR_SUPPLY("CDC_VDDA_TX", "tabla-slim"), |
| 169 | REGULATOR_SUPPLY("CDC_VDDA_RX", "tabla-slim"), |
Swaminathan Sathappan | 2316e08 | 2012-02-03 14:07:17 -0800 | [diff] [blame] | 170 | REGULATOR_SUPPLY("VDDIO_CDC", "tabla2x-slim"), |
| 171 | REGULATOR_SUPPLY("CDC_VDD_CP", "tabla2x-slim"), |
| 172 | REGULATOR_SUPPLY("CDC_VDDA_TX", "tabla2x-slim"), |
| 173 | REGULATOR_SUPPLY("CDC_VDDA_RX", "tabla2x-slim"), |
Subramanian Srinivasan | 04d2c83 | 2012-01-17 11:26:36 -0800 | [diff] [blame] | 174 | REGULATOR_SUPPLY("riva_vddpx", "wcnss_wlan.0"), |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 175 | REGULATOR_SUPPLY("vcc_i2c", "3-005b"), |
Anirudh Ghayal | 2917a5a | 2012-02-05 19:51:07 -0800 | [diff] [blame] | 176 | REGULATOR_SUPPLY("vcc_i2c", "3-0024"), |
Amy Maloche | 70090f99 | 2012-02-16 16:35:26 -0800 | [diff] [blame] | 177 | REGULATOR_SUPPLY("vddp", "0-0048"), |
Aravind Venkateswaran | 0507c8c | 2012-02-16 17:16:05 -0800 | [diff] [blame] | 178 | REGULATOR_SUPPLY("hdmi_lvl_tsl", "hdmi_msm.0"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 179 | }; |
| 180 | VREG_CONSUMERS(S5) = { |
| 181 | REGULATOR_SUPPLY("8921_s5", NULL), |
Vikram Mulukutla | bc2e957 | 2011-11-04 03:41:38 -0700 | [diff] [blame] | 182 | REGULATOR_SUPPLY("krait0", NULL), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 183 | }; |
| 184 | VREG_CONSUMERS(S6) = { |
| 185 | REGULATOR_SUPPLY("8921_s6", NULL), |
Vikram Mulukutla | bc2e957 | 2011-11-04 03:41:38 -0700 | [diff] [blame] | 186 | REGULATOR_SUPPLY("krait1", NULL), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 187 | }; |
| 188 | VREG_CONSUMERS(S7) = { |
| 189 | REGULATOR_SUPPLY("8921_s7", NULL), |
| 190 | }; |
David Collins | 1bf88da | 2012-05-03 14:58:34 -0700 | [diff] [blame] | 191 | VREG_CONSUMERS(S8) = { |
| 192 | REGULATOR_SUPPLY("8921_s8", NULL), |
| 193 | }; |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 194 | VREG_CONSUMERS(LVS1) = { |
| 195 | REGULATOR_SUPPLY("8921_lvs1", NULL), |
Subramanian Srinivasan | 04d2c83 | 2012-01-17 11:26:36 -0800 | [diff] [blame] | 196 | REGULATOR_SUPPLY("iris_vddio", "wcnss_wlan.0"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 197 | }; |
| 198 | VREG_CONSUMERS(LVS2) = { |
| 199 | REGULATOR_SUPPLY("8921_lvs2", NULL), |
Subramanian Srinivasan | 04d2c83 | 2012-01-17 11:26:36 -0800 | [diff] [blame] | 200 | REGULATOR_SUPPLY("iris_vdddig", "wcnss_wlan.0"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 201 | }; |
| 202 | VREG_CONSUMERS(LVS3) = { |
| 203 | REGULATOR_SUPPLY("8921_lvs3", NULL), |
| 204 | }; |
| 205 | VREG_CONSUMERS(LVS4) = { |
| 206 | REGULATOR_SUPPLY("8921_lvs4", NULL), |
| 207 | }; |
| 208 | VREG_CONSUMERS(LVS5) = { |
| 209 | REGULATOR_SUPPLY("8921_lvs5", NULL), |
Jeyaprakash Soundrapandian | f0d4d01 | 2012-01-16 15:12:20 -0800 | [diff] [blame] | 210 | REGULATOR_SUPPLY("cam_vio", "4-001a"), |
Sreesudhan Ramakrish Ramkumar | 6c6f57c | 2012-02-21 15:12:44 -0800 | [diff] [blame] | 211 | REGULATOR_SUPPLY("cam_vio", "4-0048"), |
Jeyaprakash Soundrapandian | f0d4d01 | 2012-01-16 15:12:20 -0800 | [diff] [blame] | 212 | REGULATOR_SUPPLY("cam_vio", "4-006c"), |
Sreesudhan Ramakrish Ramkumar | 3381da7 | 2012-01-27 08:08:32 -0800 | [diff] [blame] | 213 | REGULATOR_SUPPLY("cam_vio", "4-0034"), |
Sreesudhan Ramakrish Ramkumar | 8002a79 | 2012-04-09 17:42:58 -0700 | [diff] [blame] | 214 | REGULATOR_SUPPLY("cam_vio", "4-0020"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 215 | }; |
| 216 | VREG_CONSUMERS(LVS6) = { |
| 217 | REGULATOR_SUPPLY("8921_lvs6", NULL), |
Niranjana Vishwanathapura | 06f8933 | 2012-05-03 17:11:13 -0600 | [diff] [blame] | 218 | REGULATOR_SUPPLY("vdd_pcie_vph", "msm_pcie"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 219 | }; |
| 220 | VREG_CONSUMERS(LVS7) = { |
| 221 | REGULATOR_SUPPLY("8921_lvs7", NULL), |
Matt Wagantall | 52dd062 | 2012-02-02 18:26:16 -0800 | [diff] [blame] | 222 | REGULATOR_SUPPLY("pll_vdd", "pil_riva"), |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 223 | REGULATOR_SUPPLY("lvds_vdda", "lvds.0"), |
| 224 | REGULATOR_SUPPLY("dsi1_vddio", "mipi_dsi.1"), |
Aravind Venkateswaran | 0507c8c | 2012-02-16 17:16:05 -0800 | [diff] [blame] | 225 | REGULATOR_SUPPLY("hdmi_vdda", "hdmi_msm.0"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 226 | }; |
| 227 | VREG_CONSUMERS(USB_OTG) = { |
| 228 | REGULATOR_SUPPLY("8921_usb_otg", NULL), |
Hemant Kumar | d86c488 | 2012-01-24 19:39:37 -0800 | [diff] [blame] | 229 | REGULATOR_SUPPLY("vbus_otg", "msm_otg"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 230 | }; |
| 231 | VREG_CONSUMERS(HDMI_MVS) = { |
| 232 | REGULATOR_SUPPLY("8921_hdmi_mvs", NULL), |
Aravind Venkateswaran | 0507c8c | 2012-02-16 17:16:05 -0800 | [diff] [blame] | 233 | REGULATOR_SUPPLY("hdmi_mvs", "hdmi_msm.0"), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 234 | }; |
| 235 | VREG_CONSUMERS(NCP) = { |
| 236 | REGULATOR_SUPPLY("8921_ncp", NULL), |
| 237 | }; |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 238 | VREG_CONSUMERS(8821_S0) = { |
| 239 | REGULATOR_SUPPLY("8821_s0", NULL), |
Vikram Mulukutla | bc2e957 | 2011-11-04 03:41:38 -0700 | [diff] [blame] | 240 | REGULATOR_SUPPLY("krait2", NULL), |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 241 | }; |
| 242 | VREG_CONSUMERS(8821_S1) = { |
| 243 | REGULATOR_SUPPLY("8821_s1", NULL), |
Vikram Mulukutla | bc2e957 | 2011-11-04 03:41:38 -0700 | [diff] [blame] | 244 | REGULATOR_SUPPLY("krait3", NULL), |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 245 | }; |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 246 | VREG_CONSUMERS(EXT_5V) = { |
| 247 | REGULATOR_SUPPLY("ext_5v", NULL), |
Jay Chokshi | 994ff12 | 2012-03-27 15:43:48 -0700 | [diff] [blame] | 248 | REGULATOR_SUPPLY("ext_ddr3", NULL), |
Manu Gautam | 91223e0 | 2011-11-08 15:27:22 +0530 | [diff] [blame] | 249 | REGULATOR_SUPPLY("vbus", "msm_ehci_host.0"), |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 250 | }; |
Jay Chokshi | 1de4f9d | 2012-02-07 16:11:31 -0800 | [diff] [blame] | 251 | VREG_CONSUMERS(EXT_MPP8) = { |
| 252 | REGULATOR_SUPPLY("ext_mpp8", NULL), |
Hemant Kumar | 1d66e1c | 2012-02-13 15:24:59 -0800 | [diff] [blame] | 253 | REGULATOR_SUPPLY("vbus", "msm_ehci_host.1"), |
Jay Chokshi | 1de4f9d | 2012-02-07 16:11:31 -0800 | [diff] [blame] | 254 | }; |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 255 | VREG_CONSUMERS(EXT_3P3V) = { |
| 256 | REGULATOR_SUPPLY("ext_3p3v", NULL), |
Stepan Moskovchenko | c71c979 | 2012-01-31 18:12:44 -0800 | [diff] [blame] | 257 | REGULATOR_SUPPLY("vdd_io", "spi0.2"), |
Hemant Kumar | 94e7da2 | 2012-02-03 16:52:29 -0800 | [diff] [blame] | 258 | REGULATOR_SUPPLY("mhl_ext_3p3v", "msm_otg"), |
Ravishangar Kalyanam | c2fee31 | 2012-02-09 19:11:22 -0800 | [diff] [blame] | 259 | REGULATOR_SUPPLY("lvds_vccs_3p3v", "lvds.0"), |
| 260 | REGULATOR_SUPPLY("dsi1_vccs_3p3v", "mipi_dsi.1"), |
Aravind Venkateswaran | 0507c8c | 2012-02-16 17:16:05 -0800 | [diff] [blame] | 261 | REGULATOR_SUPPLY("hdmi_mux_vdd", "hdmi_msm.0"), |
Niranjana Vishwanathapura | 06f8933 | 2012-05-03 17:11:13 -0600 | [diff] [blame] | 262 | REGULATOR_SUPPLY("pcie_ext_3p3v", "msm_pcie"), |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 263 | }; |
David Collins | 390fc33 | 2012-02-07 14:38:16 -0800 | [diff] [blame] | 264 | VREG_CONSUMERS(EXT_TS_SW) = { |
| 265 | REGULATOR_SUPPLY("ext_ts_sw", NULL), |
Jing Lin | 21ed4de | 2012-02-05 15:53:28 -0800 | [diff] [blame] | 266 | REGULATOR_SUPPLY("vdd_ana", "3-005b"), |
David Collins | 390fc33 | 2012-02-07 14:38:16 -0800 | [diff] [blame] | 267 | }; |
Jay Chokshi | 1b7eaa9 | 2012-04-04 14:53:14 -0700 | [diff] [blame] | 268 | VREG_CONSUMERS(FRC_5V) = { |
| 269 | REGULATOR_SUPPLY("frc_5v", NULL), |
| 270 | }; |
| 271 | VREG_CONSUMERS(AVC_1P2V) = { |
| 272 | REGULATOR_SUPPLY("avc_1p2v", NULL), |
| 273 | }; |
| 274 | VREG_CONSUMERS(AVC_1P8V) = { |
| 275 | REGULATOR_SUPPLY("avc_1p8v", NULL), |
| 276 | }; |
| 277 | VREG_CONSUMERS(AVC_2P2V) = { |
| 278 | REGULATOR_SUPPLY("avc_2p2v", NULL), |
| 279 | }; |
| 280 | VREG_CONSUMERS(AVC_5V) = { |
| 281 | REGULATOR_SUPPLY("avc_5v", NULL), |
| 282 | }; |
| 283 | VREG_CONSUMERS(AVC_3P3V) = { |
| 284 | REGULATOR_SUPPLY("avc_3p3v", NULL), |
| 285 | }; |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 286 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 287 | #define PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, _modes, _ops, \ |
| 288 | _apply_uV, _pull_down, _always_on, _supply_regulator, \ |
| 289 | _system_uA, _enable_time, _reg_id) \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 290 | { \ |
| 291 | .init_data = { \ |
| 292 | .constraints = { \ |
| 293 | .valid_modes_mask = _modes, \ |
| 294 | .valid_ops_mask = _ops, \ |
| 295 | .min_uV = _min_uV, \ |
| 296 | .max_uV = _max_uV, \ |
| 297 | .input_uV = _max_uV, \ |
| 298 | .apply_uV = _apply_uV, \ |
| 299 | .always_on = _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 300 | .name = _name, \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 301 | }, \ |
| 302 | .num_consumer_supplies = \ |
| 303 | ARRAY_SIZE(vreg_consumers_##_id), \ |
| 304 | .consumer_supplies = vreg_consumers_##_id, \ |
| 305 | .supply_regulator = _supply_regulator, \ |
| 306 | }, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 307 | .id = _reg_id, \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 308 | .pull_down_enable = _pull_down, \ |
| 309 | .system_uA = _system_uA, \ |
| 310 | .enable_time = _enable_time, \ |
| 311 | } |
| 312 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 313 | #define PM8XXX_LDO(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \ |
| 314 | _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 315 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 316 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \ |
| 317 | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \ |
| 318 | REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 319 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 320 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 321 | #define PM8XXX_NLDO1200(_id, _name, _always_on, _pull_down, _min_uV, \ |
| 322 | _max_uV, _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 323 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 324 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \ |
| 325 | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \ |
| 326 | REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 327 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 328 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 329 | #define PM8XXX_SMPS(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \ |
| 330 | _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 331 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 332 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE | \ |
| 333 | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE | \ |
| 334 | REGULATOR_CHANGE_DRMS, 0, _pull_down, _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 335 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 336 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 337 | #define PM8XXX_FTSMPS(_id, _name, _always_on, _pull_down, _min_uV, _max_uV, \ |
| 338 | _enable_time, _supply_regulator, _system_uA, _reg_id) \ |
| 339 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, REGULATOR_MODE_NORMAL, \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 340 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS \ |
| 341 | | REGULATOR_CHANGE_MODE, 0, _pull_down, _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 342 | _supply_regulator, _system_uA, _enable_time, _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 343 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 344 | #define PM8XXX_VS(_id, _name, _always_on, _pull_down, _enable_time, \ |
| 345 | _supply_regulator, _reg_id) \ |
| 346 | PM8XXX_VREG_INIT(_id, _name, 0, 0, 0, REGULATOR_CHANGE_STATUS, 0, \ |
| 347 | _pull_down, _always_on, _supply_regulator, 0, _enable_time, \ |
| 348 | _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 349 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 350 | #define PM8XXX_VS300(_id, _name, _always_on, _pull_down, _enable_time, \ |
| 351 | _supply_regulator, _reg_id) \ |
| 352 | PM8XXX_VREG_INIT(_id, _name, 0, 0, 0, REGULATOR_CHANGE_STATUS, 0, \ |
| 353 | _pull_down, _always_on, _supply_regulator, 0, _enable_time, \ |
| 354 | _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 355 | |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 356 | #define PM8XXX_NCP(_id, _name, _always_on, _min_uV, _max_uV, _enable_time, \ |
| 357 | _supply_regulator, _reg_id) \ |
| 358 | PM8XXX_VREG_INIT(_id, _name, _min_uV, _max_uV, 0, \ |
| 359 | REGULATOR_CHANGE_VOLTAGE | REGULATOR_CHANGE_STATUS, 0, 0, \ |
| 360 | _always_on, _supply_regulator, 0, _enable_time, _reg_id) |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 361 | |
| 362 | /* Pin control initialization */ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 363 | #define PM8XXX_PC(_id, _name, _always_on, _pin_fn, _pin_ctrl, \ |
| 364 | _supply_regulator, _reg_id) \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 365 | { \ |
| 366 | .init_data = { \ |
| 367 | .constraints = { \ |
| 368 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, \ |
| 369 | .always_on = _always_on, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 370 | .name = _name, \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 371 | }, \ |
| 372 | .num_consumer_supplies = \ |
| 373 | ARRAY_SIZE(vreg_consumers_##_id##_PC), \ |
| 374 | .consumer_supplies = vreg_consumers_##_id##_PC, \ |
| 375 | .supply_regulator = _supply_regulator, \ |
| 376 | }, \ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 377 | .id = _reg_id, \ |
| 378 | .pin_fn = PM8XXX_VREG_PIN_FN_##_pin_fn, \ |
| 379 | .pin_ctrl = _pin_ctrl, \ |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 380 | } |
| 381 | |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 382 | #define GPIO_VREG(_id, _reg_name, _gpio_label, _gpio, _supply_regulator) \ |
| 383 | [GPIO_VREG_ID_##_id] = { \ |
| 384 | .init_data = { \ |
| 385 | .constraints = { \ |
| 386 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, \ |
| 387 | }, \ |
| 388 | .num_consumer_supplies = \ |
| 389 | ARRAY_SIZE(vreg_consumers_##_id), \ |
| 390 | .consumer_supplies = vreg_consumers_##_id, \ |
| 391 | .supply_regulator = _supply_regulator, \ |
| 392 | }, \ |
| 393 | .regulator_name = _reg_name, \ |
| 394 | .gpio_label = _gpio_label, \ |
| 395 | .gpio = _gpio, \ |
| 396 | } |
| 397 | |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 398 | #define SAW_VREG_INIT(_id, _name, _min_uV, _max_uV) \ |
| 399 | { \ |
| 400 | .constraints = { \ |
| 401 | .name = _name, \ |
| 402 | .valid_ops_mask = REGULATOR_CHANGE_VOLTAGE, \ |
| 403 | .min_uV = _min_uV, \ |
| 404 | .max_uV = _max_uV, \ |
| 405 | }, \ |
| 406 | .num_consumer_supplies = ARRAY_SIZE(vreg_consumers_##_id), \ |
| 407 | .consumer_supplies = vreg_consumers_##_id, \ |
| 408 | } |
| 409 | |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 410 | #define RPM_INIT(_id, _min_uV, _max_uV, _modes, _ops, _apply_uV, _default_uV, \ |
| 411 | _peak_uA, _avg_uA, _pull_down, _pin_ctrl, _freq, _pin_fn, \ |
David Collins | 1578904 | 2012-03-19 10:44:36 -0700 | [diff] [blame] | 412 | _force_mode, _sleep_set_force_mode, _power_mode, _state, \ |
| 413 | _sleep_selectable, _always_on, _supply_regulator, _system_uA) \ |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 414 | { \ |
| 415 | .init_data = { \ |
| 416 | .constraints = { \ |
| 417 | .valid_modes_mask = _modes, \ |
| 418 | .valid_ops_mask = _ops, \ |
| 419 | .min_uV = _min_uV, \ |
| 420 | .max_uV = _max_uV, \ |
| 421 | .input_uV = _min_uV, \ |
| 422 | .apply_uV = _apply_uV, \ |
| 423 | .always_on = _always_on, \ |
| 424 | }, \ |
| 425 | .num_consumer_supplies = \ |
| 426 | ARRAY_SIZE(vreg_consumers_##_id), \ |
| 427 | .consumer_supplies = vreg_consumers_##_id, \ |
| 428 | .supply_regulator = _supply_regulator, \ |
| 429 | }, \ |
| 430 | .id = RPM_VREG_ID_PM8921_##_id, \ |
| 431 | .default_uV = _default_uV, \ |
| 432 | .peak_uA = _peak_uA, \ |
| 433 | .avg_uA = _avg_uA, \ |
| 434 | .pull_down_enable = _pull_down, \ |
| 435 | .pin_ctrl = _pin_ctrl, \ |
| 436 | .freq = RPM_VREG_FREQ_##_freq, \ |
| 437 | .pin_fn = _pin_fn, \ |
| 438 | .force_mode = _force_mode, \ |
David Collins | 1578904 | 2012-03-19 10:44:36 -0700 | [diff] [blame] | 439 | .sleep_set_force_mode = _sleep_set_force_mode, \ |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 440 | .power_mode = _power_mode, \ |
| 441 | .state = _state, \ |
| 442 | .sleep_selectable = _sleep_selectable, \ |
| 443 | .system_uA = _system_uA, \ |
| 444 | } |
| 445 | |
| 446 | #define RPM_LDO(_id, _always_on, _pd, _sleep_selectable, _min_uV, _max_uV, \ |
| 447 | _supply_regulator, _system_uA, _init_peak_uA) \ |
| 448 | RPM_INIT(_id, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
| 449 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE \ |
| 450 | | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE \ |
| 451 | | REGULATOR_CHANGE_DRMS, 0, _max_uV, _init_peak_uA, 0, _pd, \ |
| 452 | RPM_VREG_PIN_CTRL_NONE, NONE, RPM_VREG_PIN_FN_8960_NONE, \ |
David Collins | 1578904 | 2012-03-19 10:44:36 -0700 | [diff] [blame] | 453 | RPM_VREG_FORCE_MODE_8960_NONE, \ |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 454 | RPM_VREG_FORCE_MODE_8960_NONE, RPM_VREG_POWER_MODE_8960_PWM, \ |
| 455 | RPM_VREG_STATE_OFF, _sleep_selectable, _always_on, \ |
| 456 | _supply_regulator, _system_uA) |
| 457 | |
| 458 | #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] | 459 | _supply_regulator, _system_uA, _freq, _force_mode, \ |
| 460 | _sleep_set_force_mode) \ |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 461 | RPM_INIT(_id, _min_uV, _max_uV, REGULATOR_MODE_NORMAL \ |
| 462 | | REGULATOR_MODE_IDLE, REGULATOR_CHANGE_VOLTAGE \ |
| 463 | | REGULATOR_CHANGE_STATUS | REGULATOR_CHANGE_MODE \ |
| 464 | | REGULATOR_CHANGE_DRMS, 0, _max_uV, _system_uA, 0, _pd, \ |
| 465 | RPM_VREG_PIN_CTRL_NONE, _freq, RPM_VREG_PIN_FN_8960_NONE, \ |
David Collins | 3d2b945 | 2012-03-19 11:00:30 -0700 | [diff] [blame] | 466 | RPM_VREG_FORCE_MODE_8960_##_force_mode, \ |
| 467 | RPM_VREG_FORCE_MODE_8960_##_sleep_set_force_mode, \ |
| 468 | RPM_VREG_POWER_MODE_8960_PWM, RPM_VREG_STATE_OFF, \ |
| 469 | _sleep_selectable, _always_on, _supply_regulator, _system_uA) |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 470 | |
| 471 | #define RPM_VS(_id, _always_on, _pd, _sleep_selectable, _supply_regulator) \ |
| 472 | RPM_INIT(_id, 0, 0, 0, REGULATOR_CHANGE_STATUS, 0, 0, 1000, 1000, _pd, \ |
| 473 | RPM_VREG_PIN_CTRL_NONE, NONE, RPM_VREG_PIN_FN_8960_NONE, \ |
David Collins | 1578904 | 2012-03-19 10:44:36 -0700 | [diff] [blame] | 474 | RPM_VREG_FORCE_MODE_8960_NONE, \ |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 475 | RPM_VREG_FORCE_MODE_8960_NONE, RPM_VREG_POWER_MODE_8960_PWM, \ |
| 476 | RPM_VREG_STATE_OFF, _sleep_selectable, _always_on, \ |
| 477 | _supply_regulator, 0) |
| 478 | |
| 479 | #define RPM_NCP(_id, _always_on, _sleep_selectable, _min_uV, _max_uV, \ |
| 480 | _supply_regulator, _freq) \ |
| 481 | RPM_INIT(_id, _min_uV, _max_uV, 0, REGULATOR_CHANGE_VOLTAGE \ |
| 482 | | REGULATOR_CHANGE_STATUS, 0, _max_uV, 1000, 1000, 0, \ |
| 483 | RPM_VREG_PIN_CTRL_NONE, _freq, RPM_VREG_PIN_FN_8960_NONE, \ |
David Collins | 1578904 | 2012-03-19 10:44:36 -0700 | [diff] [blame] | 484 | RPM_VREG_FORCE_MODE_8960_NONE, \ |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 485 | RPM_VREG_FORCE_MODE_8960_NONE, RPM_VREG_POWER_MODE_8960_PWM, \ |
| 486 | RPM_VREG_STATE_OFF, _sleep_selectable, _always_on, \ |
| 487 | _supply_regulator, 0) |
| 488 | |
| 489 | /* Pin control initialization */ |
| 490 | #define RPM_PC_INIT(_id, _always_on, _pin_fn, _pin_ctrl, _supply_regulator) \ |
| 491 | { \ |
| 492 | .init_data = { \ |
| 493 | .constraints = { \ |
| 494 | .valid_ops_mask = REGULATOR_CHANGE_STATUS, \ |
| 495 | .always_on = _always_on, \ |
| 496 | }, \ |
| 497 | .num_consumer_supplies = \ |
| 498 | ARRAY_SIZE(vreg_consumers_##_id##_PC), \ |
| 499 | .consumer_supplies = vreg_consumers_##_id##_PC, \ |
| 500 | .supply_regulator = _supply_regulator, \ |
| 501 | }, \ |
| 502 | .id = RPM_VREG_ID_PM8921_##_id##_PC, \ |
| 503 | .pin_fn = RPM_VREG_PIN_FN_8960_##_pin_fn, \ |
| 504 | .pin_ctrl = _pin_ctrl, \ |
| 505 | } |
| 506 | |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 507 | /* GPIO regulator constraints */ |
| 508 | struct gpio_regulator_platform_data |
| 509 | apq8064_gpio_regulator_pdata[] __devinitdata = { |
| 510 | /* ID vreg_name gpio_label gpio supply */ |
| 511 | GPIO_VREG(EXT_5V, "ext_5v", "ext_5v_en", PM8921_MPP_PM_TO_SYS(7), NULL), |
| 512 | GPIO_VREG(EXT_3P3V, "ext_3p3v", "ext_3p3v_en", |
| 513 | APQ8064_EXT_3P3V_REG_EN_GPIO, NULL), |
David Collins | 390fc33 | 2012-02-07 14:38:16 -0800 | [diff] [blame] | 514 | GPIO_VREG(EXT_TS_SW, "ext_ts_sw", "ext_ts_sw_en", |
| 515 | PM8921_GPIO_PM_TO_SYS(23), "ext_3p3v"), |
Jay Chokshi | 1de4f9d | 2012-02-07 16:11:31 -0800 | [diff] [blame] | 516 | GPIO_VREG(EXT_MPP8, "ext_mpp8", "ext_mpp8_en", |
| 517 | PM8921_MPP_PM_TO_SYS(8), NULL), |
David Collins | f0d0073 | 2012-01-25 15:46:50 -0800 | [diff] [blame] | 518 | }; |
| 519 | |
Jay Chokshi | 1b7eaa9 | 2012-04-04 14:53:14 -0700 | [diff] [blame] | 520 | struct gpio_regulator_platform_data |
| 521 | mpq8064_gpio_regulator_pdata[] __devinitdata = { |
| 522 | GPIO_VREG(FRC_5V, "frc_5v", "frc_5v_en", SX150X_GPIO(4, 10), NULL), |
| 523 | GPIO_VREG(AVC_1P2V, "avc_1p2v", "avc_1p2v_en", SX150X_GPIO(4, 2), NULL), |
| 524 | GPIO_VREG(AVC_1P8V, "avc_1p8v", "avc_1p8v_en", SX150X_GPIO(4, 4), NULL), |
| 525 | GPIO_VREG(AVC_2P2V, "avc_2p2v", "avc_2p2v_en", |
| 526 | SX150X_GPIO(4, 14), NULL), |
| 527 | GPIO_VREG(AVC_5V, "avc_5v", "avc_5v_en", SX150X_GPIO(4, 3), NULL), |
| 528 | GPIO_VREG(AVC_3P3V, "avc_3p3v", "avc_3p3v_en", |
| 529 | SX150X_GPIO(4, 15), "avc_5v"), |
| 530 | }; |
| 531 | |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 532 | /* SAW regulator constraints */ |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 533 | struct regulator_init_data msm8064_saw_regulator_pdata_8921_s5 = |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 534 | /* ID vreg_name min_uV max_uV */ |
Tianyi Gou | d750d74 | 2012-03-02 14:38:58 -0800 | [diff] [blame] | 535 | SAW_VREG_INIT(S5, "8921_s5", 950000, 1300000); |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 536 | struct regulator_init_data msm8064_saw_regulator_pdata_8921_s6 = |
Tianyi Gou | d750d74 | 2012-03-02 14:38:58 -0800 | [diff] [blame] | 537 | SAW_VREG_INIT(S6, "8921_s6", 950000, 1300000); |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 538 | |
| 539 | struct regulator_init_data msm8064_saw_regulator_pdata_8821_s0 = |
| 540 | /* ID vreg_name min_uV max_uV */ |
Tianyi Gou | d750d74 | 2012-03-02 14:38:58 -0800 | [diff] [blame] | 541 | SAW_VREG_INIT(8821_S0, "8821_s0", 950000, 1300000); |
Jay Chokshi | 7805b5a | 2011-11-07 15:55:30 -0800 | [diff] [blame] | 542 | struct regulator_init_data msm8064_saw_regulator_pdata_8821_s1 = |
Tianyi Gou | d750d74 | 2012-03-02 14:38:58 -0800 | [diff] [blame] | 543 | SAW_VREG_INIT(8821_S1, "8821_s1", 950000, 1300000); |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 544 | |
| 545 | /* PM8921 regulator constraints */ |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 546 | struct pm8xxx_regulator_platform_data |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 547 | msm8064_pm8921_regulator_pdata[] __devinitdata = { |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 548 | /* |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 549 | * ID name always_on pd min_uV max_uV en_t supply |
David Collins | 7501674 | 2011-12-02 15:04:25 -0800 | [diff] [blame] | 550 | * system_uA reg_ID |
| 551 | */ |
Matt Wagantall | ed36d82 | 2012-05-25 18:13:40 -0700 | [diff] [blame] | 552 | PM8XXX_NLDO1200(L26, "8921_l26", 0, 1, 375000, 1050000, 200, "8921_s7", |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 553 | 0, 1), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 554 | |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 555 | /* ID name always_on pd en_t supply reg_ID */ |
| 556 | PM8XXX_VS300(USB_OTG, "8921_usb_otg", 0, 0, 0, "ext_5v", 2), |
| 557 | PM8XXX_VS300(HDMI_MVS, "8921_hdmi_mvs", 0, 1, 0, "ext_5v", 3), |
| 558 | }; |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 559 | |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 560 | static struct rpm_regulator_init_data |
| 561 | apq8064_rpm_regulator_init_data[] __devinitdata = { |
David Collins | 3d2b945 | 2012-03-19 11:00:30 -0700 | [diff] [blame] | 562 | /* ID a_on pd ss min_uV max_uV supply sys_uA freq fm ss_fm */ |
| 563 | RPM_SMPS(S1, 1, 1, 0, 1225000, 1225000, NULL, 100000, 3p20, NONE, NONE), |
| 564 | RPM_SMPS(S2, 0, 1, 0, 1300000, 1300000, NULL, 0, 1p60, NONE, NONE), |
| 565 | RPM_SMPS(S3, 0, 1, 1, 500000, 1150000, NULL, 100000, 4p80, NONE, NONE), |
David Collins | 423c05d | 2012-04-26 17:31:02 -0700 | [diff] [blame] | 566 | RPM_SMPS(S4, 1, 1, 0, 1800000, 1800000, NULL, 100000, 1p60, AUTO, AUTO), |
David Collins | 3d2b945 | 2012-03-19 11:00:30 -0700 | [diff] [blame] | 567 | RPM_SMPS(S7, 0, 1, 0, 1300000, 1300000, NULL, 100000, 3p20, NONE, NONE), |
David Collins | 1bf88da | 2012-05-03 14:58:34 -0700 | [diff] [blame] | 568 | RPM_SMPS(S8, 0, 1, 0, 2200000, 2200000, NULL, 0, 1p60, NONE, NONE), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 569 | |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 570 | /* ID a_on pd ss min_uV max_uV supply sys_uA init_ip */ |
David Collins | 423c05d | 2012-04-26 17:31:02 -0700 | [diff] [blame] | 571 | RPM_LDO(L1, 1, 1, 0, 1100000, 1100000, "8921_s4", 0, 1000), |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 572 | RPM_LDO(L2, 0, 1, 0, 1200000, 1200000, "8921_s4", 0, 0), |
| 573 | RPM_LDO(L3, 0, 1, 0, 3075000, 3075000, NULL, 0, 0), |
David Collins | 423c05d | 2012-04-26 17:31:02 -0700 | [diff] [blame] | 574 | RPM_LDO(L4, 1, 1, 0, 1800000, 1800000, NULL, 0, 10000), |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 575 | RPM_LDO(L5, 0, 1, 0, 2950000, 2950000, NULL, 0, 0), |
| 576 | RPM_LDO(L6, 0, 1, 0, 2950000, 2950000, NULL, 0, 0), |
| 577 | RPM_LDO(L7, 0, 1, 0, 1850000, 2950000, NULL, 0, 0), |
| 578 | RPM_LDO(L8, 0, 1, 0, 2800000, 2800000, NULL, 0, 0), |
Anirudh Ghayal | 62cec44 | 2012-02-17 13:02:39 -0800 | [diff] [blame] | 579 | RPM_LDO(L9, 0, 1, 0, 3000000, 3000000, NULL, 0, 0), |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 580 | RPM_LDO(L10, 0, 1, 0, 2900000, 2900000, NULL, 0, 0), |
| 581 | RPM_LDO(L11, 0, 1, 0, 3000000, 3000000, NULL, 0, 0), |
| 582 | RPM_LDO(L12, 0, 1, 0, 1200000, 1200000, "8921_s4", 0, 0), |
| 583 | RPM_LDO(L14, 0, 1, 0, 1800000, 1800000, NULL, 0, 0), |
| 584 | RPM_LDO(L15, 0, 1, 0, 1800000, 2950000, NULL, 0, 0), |
| 585 | RPM_LDO(L16, 0, 1, 0, 2800000, 2800000, NULL, 0, 0), |
| 586 | RPM_LDO(L17, 0, 1, 0, 2000000, 2000000, NULL, 0, 0), |
| 587 | RPM_LDO(L18, 0, 1, 0, 1300000, 1800000, "8921_s4", 0, 0), |
David Collins | 1bf88da | 2012-05-03 14:58:34 -0700 | [diff] [blame] | 588 | RPM_LDO(L21, 0, 1, 0, 1050000, 1050000, NULL, 0, 0), |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 589 | RPM_LDO(L22, 0, 1, 0, 2600000, 2600000, NULL, 0, 0), |
| 590 | RPM_LDO(L23, 0, 1, 0, 1800000, 1800000, NULL, 0, 0), |
| 591 | RPM_LDO(L24, 0, 1, 1, 750000, 1150000, "8921_s1", 10000, 10000), |
| 592 | RPM_LDO(L25, 1, 1, 0, 1225000, 1225000, "8921_s1", 10000, 10000), |
| 593 | RPM_LDO(L27, 0, 1, 0, 1100000, 1100000, "8921_s7", 0, 0), |
| 594 | RPM_LDO(L28, 0, 1, 0, 1050000, 1050000, "8921_s7", 0, 0), |
David Collins | 1bf88da | 2012-05-03 14:58:34 -0700 | [diff] [blame] | 595 | RPM_LDO(L29, 0, 1, 0, 2000000, 2000000, NULL, 0, 0), |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 596 | |
| 597 | /* ID a_on pd ss supply */ |
| 598 | RPM_VS(LVS1, 0, 1, 0, "8921_s4"), |
| 599 | RPM_VS(LVS2, 0, 1, 0, "8921_s1"), |
| 600 | RPM_VS(LVS3, 0, 1, 0, "8921_s4"), |
| 601 | RPM_VS(LVS4, 0, 1, 0, "8921_s4"), |
| 602 | RPM_VS(LVS5, 0, 1, 0, "8921_s4"), |
| 603 | RPM_VS(LVS6, 0, 1, 0, "8921_s4"), |
Jay Chokshi | 9dace16 | 2012-03-13 19:07:57 -0700 | [diff] [blame] | 604 | RPM_VS(LVS7, 0, 1, 1, "8921_s4"), |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 605 | |
| 606 | /* ID a_on ss min_uV max_uV supply freq */ |
| 607 | RPM_NCP(NCP, 0, 0, 1800000, 1800000, "8921_l6", 1p60), |
Jay Chokshi | ea67c62 | 2011-07-29 17:12:26 -0700 | [diff] [blame] | 608 | }; |
| 609 | |
| 610 | int msm8064_pm8921_regulator_pdata_len __devinitdata = |
| 611 | ARRAY_SIZE(msm8064_pm8921_regulator_pdata); |
David Collins | 2782b5c | 2012-02-06 10:02:42 -0800 | [diff] [blame] | 612 | |
| 613 | struct rpm_regulator_platform_data apq8064_rpm_regulator_pdata __devinitdata = { |
| 614 | .init_data = apq8064_rpm_regulator_init_data, |
| 615 | .num_regulators = ARRAY_SIZE(apq8064_rpm_regulator_init_data), |
| 616 | .version = RPM_VREG_VERSION_8960, |
| 617 | .vreg_id_vdd_mem = RPM_VREG_ID_PM8921_L24, |
| 618 | .vreg_id_vdd_dig = RPM_VREG_ID_PM8921_S3, |
| 619 | }; |