Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 1 | /* Copyright (c) 2013-2014, 2016-2018, The Linux Foundation. All rights reserved. |
| 2 | * |
| 3 | * This program is free software; you can redistribute it and/or modify |
| 4 | * it under the terms of the GNU General Public License version 2 and |
| 5 | * only version 2 as published by the Free Software Foundation. |
| 6 | * |
| 7 | * This program is distributed in the hope that it will be useful, |
| 8 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 9 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 10 | * GNU General Public License for more details. |
| 11 | */ |
| 12 | |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 13 | #include <dt-bindings/interrupt-controller/irq.h> |
| 14 | #include <dt-bindings/spmi/spmi.h> |
| 15 | |
| 16 | &spmi_bus { |
| 17 | |
Stephen Boyd | 2bce84c | 2015-11-20 15:31:19 -0800 | [diff] [blame] | 18 | pm8916_0: pm8916@0 { |
| 19 | compatible = "qcom,pm8916", "qcom,spmi-pmic"; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 20 | reg = <0x0 SPMI_USID>; |
| 21 | #address-cells = <1>; |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 22 | #size-cells = <1>; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 23 | |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 24 | pm8916_revid: qcom,revid@100 { |
| 25 | compatible = "qcom,qpnp-revid"; |
| 26 | reg = <0x100 0x100>; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 27 | }; |
| 28 | |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 29 | pm8916_pon: qcom,power-on@800 { |
| 30 | compatible = "qcom,qpnp-power-on"; |
| 31 | reg = <0x800 0x100>; |
| 32 | interrupts = <0x0 0x8 0x0 IRQ_TYPE_NONE>, |
| 33 | <0x0 0x8 0x1 IRQ_TYPE_NONE>; |
| 34 | interrupt-names = "kpdpwr", "resin"; |
| 35 | qcom,pon-dbc-delay = <15625>; |
| 36 | qcom,system-reset; |
| 37 | qcom,clear-warm-reset; |
| 38 | qcom,store-hard-reset-reason; |
| 39 | |
| 40 | qcom,pon_1 { |
| 41 | qcom,pon-type = <0>; |
| 42 | qcom,support-reset = <1>; |
| 43 | qcom,pull-up = <1>; |
| 44 | qcom,s1-timer = <10256>; |
| 45 | qcom,s2-timer = <2000>; |
| 46 | qcom,s2-type = <1>; |
| 47 | linux,code = <116>; |
| 48 | }; |
| 49 | |
| 50 | qcom,pon_2 { |
| 51 | qcom,pon-type = <1>; |
| 52 | qcom,pull-up = <1>; |
| 53 | linux,code = <114>; |
| 54 | }; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 55 | }; |
| 56 | |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 57 | pm8916_gpios: pinctrl@c000 { |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 58 | compatible = "qcom,pm8916-gpio"; |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 59 | reg = <0xc000 0x400>; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 60 | gpio-controller; |
| 61 | #gpio-cells = <2>; |
| 62 | interrupts = <0 0xc0 0 IRQ_TYPE_NONE>, |
| 63 | <0 0xc1 0 IRQ_TYPE_NONE>, |
| 64 | <0 0xc2 0 IRQ_TYPE_NONE>, |
| 65 | <0 0xc3 0 IRQ_TYPE_NONE>; |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 66 | interrupt-names = "pm8916_gpio1", "pm8916_gpio2", |
| 67 | "pm8916_gpio3", "pm8916_gpio4"; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 68 | }; |
| 69 | |
| 70 | pm8916_mpps: mpps@a000 { |
| 71 | compatible = "qcom,pm8916-mpp"; |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 72 | reg = <0xa000 0x400>; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 73 | gpio-controller; |
| 74 | #gpio-cells = <2>; |
| 75 | interrupts = <0 0xa0 0 IRQ_TYPE_NONE>, |
| 76 | <0 0xa1 0 IRQ_TYPE_NONE>, |
| 77 | <0 0xa2 0 IRQ_TYPE_NONE>, |
| 78 | <0 0xa3 0 IRQ_TYPE_NONE>; |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 79 | interrupt-names = "pm8916_mpp1", "pm8916_mpp2", |
| 80 | "pm8916_mpp3", "pm8916_mpp4"; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 81 | }; |
| 82 | |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 83 | pm8916_rtc: qcom,pm8916_rtc { |
| 84 | compatible = "qcom,qpnp-rtc"; |
| 85 | #address-cells = <1>; |
| 86 | #size-cells = <1>; |
| 87 | qcom,qpnp-rtc-write = <0>; |
| 88 | qcom,qpnp-rtc-alarm-pwrup = <0>; |
| 89 | |
| 90 | qcom,pm8916_rtc_rw@6000 { |
| 91 | reg = <0x6000 0x100>; |
| 92 | }; |
| 93 | qcom,pm8916_rtc_alarm@6100 { |
| 94 | reg = <0x6100 0x100>; |
| 95 | interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; |
| 96 | }; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 97 | }; |
| 98 | |
| 99 | pm8916_vadc: vadc@3100 { |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 100 | compatible = "qcom,qpnp-vadc"; |
| 101 | reg = <0x3100 0x100>; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 102 | #address-cells = <1>; |
| 103 | #size-cells = <0>; |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 104 | interrupts = <0x0 0x31 0x0 IRQ_TYPE_NONE>; |
| 105 | interrupt-names = "eoc-int-en-set"; |
| 106 | qcom,adc-bit-resolution = <15>; |
| 107 | qcom,adc-vdd-reference = <1800>; |
| 108 | qcom,vadc-poll-eoc; |
| 109 | qcom,pmic-revid = <&pm8916_revid>; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 110 | |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 111 | chan@8 { |
| 112 | label = "die_temp"; |
| 113 | reg = <8>; |
| 114 | qcom,decimation = <0>; |
| 115 | qcom,pre-div-channel-scaling = <0>; |
| 116 | qcom,calibration-type = "absolute"; |
| 117 | qcom,scale-function = <3>; |
| 118 | qcom,hw-settle-time = <0>; |
| 119 | qcom,fast-avg-setup = <0>; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 120 | }; |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 121 | |
| 122 | chan@9 { |
| 123 | label = "ref_625mv"; |
| 124 | reg = <9>; |
| 125 | qcom,decimation = <0>; |
| 126 | qcom,pre-div-channel-scaling = <0>; |
| 127 | qcom,calibration-type = "absolute"; |
| 128 | qcom,scale-function = <0>; |
| 129 | qcom,hw-settle-time = <0>; |
| 130 | qcom,fast-avg-setup = <0>; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 131 | }; |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 132 | |
| 133 | chan@a { |
| 134 | label = "ref_1250v"; |
| 135 | reg = <0xa>; |
| 136 | qcom,decimation = <0>; |
| 137 | qcom,pre-div-channel-scaling = <0>; |
| 138 | qcom,calibration-type = "absolute"; |
| 139 | qcom,scale-function = <0>; |
| 140 | qcom,hw-settle-time = <0>; |
| 141 | qcom,fast-avg-setup = <0>; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 142 | }; |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 143 | }; |
| 144 | |
| 145 | pm8916_tz: qcom,temp-alarm@2400 { |
| 146 | compatible = "qcom,qpnp-temp-alarm"; |
| 147 | reg = <0x2400 0x100>; |
| 148 | interrupts = <0x0 0x24 0x0 IRQ_TYPE_NONE>; |
| 149 | label = "pm8916_tz"; |
| 150 | qcom,channel-num = <8>; |
| 151 | qcom,threshold-set = <0>; |
| 152 | qcom,temp_alarm-vadc = <&pm8916_vadc>; |
| 153 | }; |
| 154 | |
| 155 | pm8916_adc_tm: vadc@3400 { |
| 156 | compatible = "qcom,qpnp-adc-tm"; |
| 157 | reg = <0x3400 0x100>; |
| 158 | #address-cells = <1>; |
| 159 | #size-cells = <0>; |
| 160 | interrupts = <0x0 0x34 0x0 IRQ_TYPE_NONE>, |
| 161 | <0x0 0x34 0x3 IRQ_TYPE_NONE>, |
| 162 | <0x0 0x34 0x4 IRQ_TYPE_NONE>; |
| 163 | interrupt-names = "eoc-int-en-set", |
| 164 | "high-thr-en-set", |
| 165 | "low-thr-en-set"; |
| 166 | qcom,adc-bit-resolution = <15>; |
| 167 | qcom,adc-vdd-reference = <1800>; |
| 168 | qcom,adc_tm-vadc = <&pm8916_vadc>; |
| 169 | qcom,pmic-revid = <&pm8916_revid>; |
| 170 | }; |
| 171 | |
| 172 | pm8916_leds: qcom,leds@a100 { |
| 173 | compatible = "qcom,leds-qpnp"; |
| 174 | reg = <0xa100 0x100>; |
| 175 | label = "mpp"; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 176 | }; |
| 177 | }; |
| 178 | |
Stephen Boyd | 2bce84c | 2015-11-20 15:31:19 -0800 | [diff] [blame] | 179 | pm8916_1: pm8916@1 { |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 180 | compatible = "qcom,pm8916", "qcom,spmi-pmic"; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 181 | reg = <0x1 SPMI_USID>; |
| 182 | #address-cells = <1>; |
Sundara Vinayagam | bde65ab | 2018-03-19 14:27:33 +0530 | [diff] [blame^] | 183 | #size-cells = <1>; |
| 184 | |
| 185 | pm8916_pwm: pwm@bc00 { |
| 186 | compatible = "qcom,qpnp-pwm"; |
| 187 | reg = <0xbc00 0x100>; |
| 188 | reg-names = "qpnp-lpg-channel-base"; |
| 189 | qcom,channel-id = <0>; |
| 190 | qcom,supported-sizes = <6>, <9>; |
| 191 | #pwm-cells = <2>; |
| 192 | }; |
| 193 | |
| 194 | pm8916_vib: qcom,vibrator@c000 { |
| 195 | compatible = "qcom,qpnp-vibrator"; |
| 196 | reg = <0xc000 0x100>; |
| 197 | label = "vibrator"; |
| 198 | status = "disabled"; |
| 199 | }; |
| 200 | |
| 201 | pm8916_tombak_dig: msm8x16_wcd_codec@f000{ |
| 202 | compatible = "qcom,msm8x16_wcd_codec"; |
| 203 | reg = <0xf000 0x100>; |
| 204 | interrupt-parent = <&spmi_bus>; |
| 205 | interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>, |
| 206 | <0x1 0xf0 0x1 IRQ_TYPE_NONE>, |
| 207 | <0x1 0xf0 0x2 IRQ_TYPE_NONE>, |
| 208 | <0x1 0xf0 0x3 IRQ_TYPE_NONE>, |
| 209 | <0x1 0xf0 0x4 IRQ_TYPE_NONE>, |
| 210 | <0x1 0xf0 0x5 IRQ_TYPE_NONE>, |
| 211 | <0x1 0xf0 0x6 IRQ_TYPE_NONE>, |
| 212 | <0x1 0xf0 0x7 IRQ_TYPE_NONE>; |
| 213 | interrupt-names = "spk_cnp_int", |
| 214 | "spk_clip_int", |
| 215 | "spk_ocp_int", |
| 216 | "ins_rem_det1", |
| 217 | "but_rel_det", |
| 218 | "but_press_det", |
| 219 | "ins_rem_det", |
| 220 | "mbhc_int"; |
| 221 | |
| 222 | cdc-vdda-cp-supply = <&pm8916_s4>; |
| 223 | qcom,cdc-vdda-cp-voltage = <1800000 2200000>; |
| 224 | qcom,cdc-vdda-cp-current = <770000>; |
| 225 | |
| 226 | cdc-vdda-h-supply = <&pm8916_l5>; |
| 227 | qcom,cdc-vdda-h-voltage = <1800000 1800000>; |
| 228 | qcom,cdc-vdda-h-current = <20000>; |
| 229 | |
| 230 | cdc-vdd-px-supply = <&pm8916_s4>; |
| 231 | qcom,cdc-vdd-px-voltage = <1800000 2200000>; |
| 232 | qcom,cdc-vdd-px-current = <770000>; |
| 233 | |
| 234 | cdc-vdd-pa-supply = <&pm8916_l5>; |
| 235 | qcom,cdc-vdd-pa-voltage = <1800000 1800000>; |
| 236 | qcom,cdc-vdd-pa-current = <5000>; |
| 237 | |
| 238 | cdc-vdd-mic-bias-supply = <&pm8916_l13>; |
| 239 | qcom,cdc-vdd-mic-bias-voltage = <3075000 3075000>; |
| 240 | qcom,cdc-vdd-mic-bias-current = <25000>; |
| 241 | |
| 242 | qcom,cdc-mclk-clk-rate = <9600000>; |
| 243 | |
| 244 | qcom,cdc-static-supplies = "cdc-vdda-h", |
| 245 | "cdc-vdd-px", |
| 246 | "cdc-vdd-pa", |
| 247 | "cdc-vdda-cp"; |
| 248 | |
| 249 | qcom,cdc-on-demand-supplies = "cdc-vdd-mic-bias"; |
| 250 | qcom,subsys-name = "modem"; |
| 251 | }; |
| 252 | |
| 253 | pm8916_tombak_analog: msm8x16_wcd_codec@f100{ |
| 254 | compatible = "qcom,msm8x16_wcd_codec"; |
| 255 | reg = <0xf100 0x100>; |
| 256 | interrupt-parent = <&spmi_bus>; |
| 257 | interrupts = <0x1 0xf1 0x0 IRQ_TYPE_NONE>, |
| 258 | <0x1 0xf1 0x1 IRQ_TYPE_NONE>, |
| 259 | <0x1 0xf1 0x2 IRQ_TYPE_NONE>, |
| 260 | <0x1 0xf1 0x3 IRQ_TYPE_NONE>, |
| 261 | <0x1 0xf1 0x4 IRQ_TYPE_NONE>, |
| 262 | <0x1 0xf1 0x5 IRQ_TYPE_NONE>; |
| 263 | interrupt-names = "ear_ocp_int", |
| 264 | "hphr_ocp_int", |
| 265 | "hphl_ocp_det", |
| 266 | "ear_cnp_int", |
| 267 | "hphr_cnp_int", |
| 268 | "hphl_cnp_int"; |
| 269 | }; |
Ivan T. Ivanov | 729ee9c | 2015-04-20 10:45:39 +0300 | [diff] [blame] | 270 | }; |
| 271 | }; |