David Collins | dba7baf | 2017-03-10 11:48:37 -0800 | [diff] [blame] | 1 | /* Copyright (c) 2016-2017, 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 | |
| 13 | #include <dt-bindings/spmi/spmi.h> |
| 14 | #include <dt-bindings/interrupt-controller/irq.h> |
Subbaraman Narayanamurthy | d5d4e7b | 2017-04-06 14:32:39 -0700 | [diff] [blame] | 15 | #include <dt-bindings/msm/power-on.h> |
David Collins | dba7baf | 2017-03-10 11:48:37 -0800 | [diff] [blame] | 16 | |
| 17 | &spmi_bus { |
| 18 | qcom,pm8998@0 { |
| 19 | compatible = "qcom,spmi-pmic"; |
| 20 | reg = <0x0 SPMI_USID>; |
| 21 | #address-cells = <2>; |
| 22 | #size-cells = <0>; |
| 23 | |
| 24 | pm8998_revid: qcom,revid@100 { |
| 25 | compatible = "qcom,qpnp-revid"; |
| 26 | reg = <0x100 0x100>; |
| 27 | }; |
| 28 | |
| 29 | 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 | <0x0 0x8 0x4 IRQ_TYPE_NONE>, |
| 35 | <0x0 0x8 0x5 IRQ_TYPE_NONE>; |
| 36 | interrupt-names = "kpdpwr", "resin", |
| 37 | "resin-bark", "kpdpwr-resin-bark"; |
| 38 | qcom,pon-dbc-delay = <15625>; |
Subbaraman Narayanamurthy | 94676ad | 2017-05-12 16:49:36 -0700 | [diff] [blame^] | 39 | qcom,kpdpwr-sw-debounce; |
David Collins | dba7baf | 2017-03-10 11:48:37 -0800 | [diff] [blame] | 40 | qcom,system-reset; |
| 41 | qcom,store-hard-reset-reason; |
| 42 | |
| 43 | qcom,pon_1 { |
| 44 | qcom,pon-type = <0>; |
| 45 | qcom,pull-up = <1>; |
| 46 | linux,code = <116>; |
David Collins | dba7baf | 2017-03-10 11:48:37 -0800 | [diff] [blame] | 47 | }; |
| 48 | |
| 49 | qcom,pon_2 { |
| 50 | qcom,pon-type = <1>; |
| 51 | qcom,pull-up = <1>; |
| 52 | linux,code = <114>; |
| 53 | }; |
| 54 | |
| 55 | qcom,pon_3 { |
| 56 | qcom,pon-type = <3>; |
| 57 | qcom,support-reset = <1>; |
| 58 | qcom,pull-up = <1>; |
| 59 | qcom,s1-timer = <6720>; |
| 60 | qcom,s2-timer = <2000>; |
Subbaraman Narayanamurthy | d5d4e7b | 2017-04-06 14:32:39 -0700 | [diff] [blame] | 61 | qcom,s2-type = <PON_POWER_OFF_DVDD_HARD_RESET>; |
David Collins | dba7baf | 2017-03-10 11:48:37 -0800 | [diff] [blame] | 62 | qcom,use-bark; |
| 63 | }; |
| 64 | }; |
| 65 | |
Ram Chandrasekar | a311528 | 2017-04-21 17:33:01 -0600 | [diff] [blame] | 66 | pm8998_tz: qcom,temp-alarm@2400 { |
David Collins | dba7baf | 2017-03-10 11:48:37 -0800 | [diff] [blame] | 67 | compatible = "qcom,qpnp-temp-alarm"; |
| 68 | reg = <0x2400 0x100>; |
| 69 | interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>; |
| 70 | label = "pm8998_tz"; |
David Collins | 249d44d | 2017-03-14 14:58:35 -0700 | [diff] [blame] | 71 | qcom,channel-num = <6>; |
| 72 | qcom,temp_alarm-vadc = <&pm8998_vadc>; |
Ram Chandrasekar | a311528 | 2017-04-21 17:33:01 -0600 | [diff] [blame] | 73 | #thermal-sensor-cells = <0>; |
David Collins | dba7baf | 2017-03-10 11:48:37 -0800 | [diff] [blame] | 74 | }; |
| 75 | |
Fenglin Wu | 5a50fc8 | 2017-03-22 12:27:31 +0800 | [diff] [blame] | 76 | pm8998_gpios: pinctrl@c000 { |
| 77 | compatible = "qcom,spmi-gpio"; |
| 78 | reg = <0xc000 0x1a00>; |
| 79 | interrupts = <0x0 0xc0 0 IRQ_TYPE_NONE>, |
| 80 | <0x0 0xc1 0 IRQ_TYPE_NONE>, |
| 81 | <0x0 0xc3 0 IRQ_TYPE_NONE>, |
| 82 | <0x0 0xc4 0 IRQ_TYPE_NONE>, |
| 83 | <0x0 0xc5 0 IRQ_TYPE_NONE>, |
| 84 | <0x0 0xc6 0 IRQ_TYPE_NONE>, |
| 85 | <0x0 0xc7 0 IRQ_TYPE_NONE>, |
| 86 | <0x0 0xc8 0 IRQ_TYPE_NONE>, |
| 87 | <0x0 0xc9 0 IRQ_TYPE_NONE>, |
| 88 | <0x0 0xca 0 IRQ_TYPE_NONE>, |
| 89 | <0x0 0xcb 0 IRQ_TYPE_NONE>, |
| 90 | <0x0 0xcc 0 IRQ_TYPE_NONE>, |
| 91 | <0x0 0xcd 0 IRQ_TYPE_NONE>, |
| 92 | <0x0 0xcf 0 IRQ_TYPE_NONE>, |
| 93 | <0x0 0xd0 0 IRQ_TYPE_NONE>, |
| 94 | <0x0 0xd1 0 IRQ_TYPE_NONE>, |
| 95 | <0x0 0xd2 0 IRQ_TYPE_NONE>, |
| 96 | <0x0 0xd4 0 IRQ_TYPE_NONE>, |
| 97 | <0x0 0xd6 0 IRQ_TYPE_NONE>; |
| 98 | interrupt-names = "pm8998_gpio1", "pm8998_gpio2", |
| 99 | "pm8998_gpio4", "pm8998_gpio5", |
| 100 | "pm8998_gpio6", "pm8998_gpio7", |
| 101 | "pm8998_gpio8", "pm8998_gpio9", |
| 102 | "pm8998_gpio10", "pm8998_gpio11", |
| 103 | "pm8998_gpio12", "pm8998_gpio13", |
| 104 | "pm8998_gpio14", "pm8998_gpio16", |
| 105 | "pm8998_gpio17", "pm8998_gpio18", |
| 106 | "pm8998_gpio19", "pm8998_gpio21", |
| 107 | "pm8998_gpio23"; |
David Collins | dba7baf | 2017-03-10 11:48:37 -0800 | [diff] [blame] | 108 | gpio-controller; |
| 109 | #gpio-cells = <2>; |
Fenglin Wu | 5a50fc8 | 2017-03-22 12:27:31 +0800 | [diff] [blame] | 110 | qcom,gpios-disallowed = <3 15 20 22 24 25 26>; |
David Collins | dba7baf | 2017-03-10 11:48:37 -0800 | [diff] [blame] | 111 | }; |
| 112 | |
| 113 | pm8998_coincell: qcom,coincell@2800 { |
| 114 | compatible = "qcom,qpnp-coincell"; |
| 115 | reg = <0x2800 0x100>; |
| 116 | }; |
| 117 | |
| 118 | pm8998_rtc: qcom,pm8998_rtc { |
| 119 | compatible = "qcom,qpnp-rtc"; |
| 120 | #address-cells = <1>; |
| 121 | #size-cells = <1>; |
| 122 | qcom,qpnp-rtc-write = <0>; |
| 123 | qcom,qpnp-rtc-alarm-pwrup = <0>; |
| 124 | |
| 125 | qcom,pm8998_rtc_rw@6000 { |
| 126 | reg = <0x6000 0x100>; |
| 127 | }; |
| 128 | qcom,pm8998_rtc_alarm@6100 { |
| 129 | reg = <0x6100 0x100>; |
| 130 | interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>; |
| 131 | }; |
| 132 | }; |
| 133 | |
| 134 | pm8998_vadc: vadc@3100 { |
| 135 | compatible = "qcom,qpnp-vadc-hc"; |
| 136 | reg = <0x3100 0x100>; |
| 137 | #address-cells = <1>; |
| 138 | #size-cells = <0>; |
| 139 | interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; |
| 140 | interrupt-names = "eoc-int-en-set"; |
| 141 | qcom,adc-bit-resolution = <15>; |
| 142 | qcom,adc-vdd-reference = <1875>; |
Siddartha Mohanadoss | 0fbfc82 | 2017-04-21 11:41:32 -0700 | [diff] [blame] | 143 | #thermal-sensor-cells = <1>; |
David Collins | dba7baf | 2017-03-10 11:48:37 -0800 | [diff] [blame] | 144 | |
| 145 | chan@6 { |
| 146 | label = "die_temp"; |
| 147 | reg = <6>; |
| 148 | qcom,decimation = <2>; |
| 149 | qcom,pre-div-channel-scaling = <0>; |
| 150 | qcom,calibration-type = "absolute"; |
| 151 | qcom,scale-function = <3>; |
| 152 | qcom,hw-settle-time = <0>; |
| 153 | qcom,fast-avg-setup = <0>; |
| 154 | qcom,cal-val = <0>; |
| 155 | }; |
| 156 | |
| 157 | chan@0 { |
| 158 | label = "ref_gnd"; |
| 159 | reg = <0>; |
| 160 | qcom,decimation = <2>; |
| 161 | qcom,pre-div-channel-scaling = <0>; |
| 162 | qcom,calibration-type = "absolute"; |
| 163 | qcom,scale-function = <0>; |
| 164 | qcom,hw-settle-time = <0>; |
| 165 | qcom,fast-avg-setup = <0>; |
| 166 | qcom,cal-val = <0>; |
| 167 | }; |
| 168 | |
| 169 | chan@1 { |
| 170 | label = "ref_1250v"; |
| 171 | reg = <1>; |
| 172 | qcom,decimation = <2>; |
| 173 | qcom,pre-div-channel-scaling = <0>; |
| 174 | qcom,calibration-type = "absolute"; |
| 175 | qcom,scale-function = <0>; |
| 176 | qcom,hw-settle-time = <0>; |
| 177 | qcom,fast-avg-setup = <0>; |
| 178 | qcom,cal-val = <0>; |
| 179 | }; |
| 180 | }; |
| 181 | |
| 182 | pm8998_adc_tm: vadc@3400 { |
| 183 | compatible = "qcom,qpnp-adc-tm-hc"; |
| 184 | reg = <0x3400 0x100>; |
| 185 | #address-cells = <1>; |
| 186 | #size-cells = <0>; |
| 187 | interrupts = <0x0 0x34 0x0 IRQ_TYPE_EDGE_RISING>; |
| 188 | interrupt-names = "eoc-int-en-set"; |
| 189 | qcom,adc-bit-resolution = <15>; |
| 190 | qcom,adc-vdd-reference = <1875>; |
| 191 | qcom,adc_tm-vadc = <&pm8998_vadc>; |
| 192 | qcom,decimation = <0>; |
| 193 | qcom,fast-avg-setup = <0>; |
| 194 | }; |
| 195 | }; |
| 196 | |
| 197 | qcom,pm8998@1 { |
| 198 | compatible ="qcom,spmi-pmic"; |
| 199 | reg = <0x1 SPMI_USID>; |
| 200 | #address-cells = <2>; |
| 201 | #size-cells = <0>; |
| 202 | }; |
| 203 | }; |
Ram Chandrasekar | a311528 | 2017-04-21 17:33:01 -0600 | [diff] [blame] | 204 | |
| 205 | &thermal_zones { |
| 206 | pm8998_temp_alarm: pm8998_tz { |
| 207 | polling-delay-passive = <0>; |
| 208 | polling-delay = <0>; |
| 209 | thermal-governor = "step_wise"; |
| 210 | thermal-sensors = <&pm8998_tz>; |
| 211 | |
| 212 | trips { |
| 213 | pm8998_trip0: pm8998-trip0 { |
| 214 | temperature = <105000>; |
| 215 | hysteresis = <0>; |
| 216 | type = "passive"; |
| 217 | }; |
| 218 | pm8998_trip1: pm8998-trip1 { |
| 219 | temperature = <125000>; |
| 220 | hysteresis = <0>; |
| 221 | type = "passive"; |
| 222 | }; |
| 223 | pm8998_trip2: pm8998-trip2 { |
| 224 | temperature = <145000>; |
| 225 | hysteresis = <0>; |
| 226 | type = "critical"; |
| 227 | }; |
| 228 | }; |
| 229 | }; |
| 230 | }; |