Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | #include <dt-bindings/iio/qcom,spmi-vadc.h> |
| 3 | #include <dt-bindings/input/linux-event-codes.h> |
| 4 | #include <dt-bindings/interrupt-controller/irq.h> |
| 5 | #include <dt-bindings/spmi/spmi.h> |
| 6 | |
| 7 | &spmi_bus { |
| 8 | |
| 9 | pm8916_0: pmic@0 { |
| 10 | compatible = "qcom,pm8916", "qcom,spmi-pmic"; |
| 11 | reg = <0x0 SPMI_USID>; |
| 12 | #address-cells = <1>; |
| 13 | #size-cells = <0>; |
| 14 | |
| 15 | pon@800 { |
| 16 | compatible = "qcom,pm8916-pon"; |
| 17 | reg = <0x800>; |
| 18 | mode-bootloader = <0x2>; |
| 19 | mode-recovery = <0x1>; |
| 20 | |
| 21 | pwrkey { |
| 22 | compatible = "qcom,pm8941-pwrkey"; |
| 23 | interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>; |
| 24 | debounce = <15625>; |
| 25 | bias-pull-up; |
| 26 | linux,code = <KEY_POWER>; |
| 27 | }; |
| 28 | |
| 29 | pm8916_resin: resin { |
| 30 | compatible = "qcom,pm8941-resin"; |
| 31 | interrupts = <0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>; |
| 32 | debounce = <15625>; |
| 33 | bias-pull-up; |
| 34 | status = "disabled"; |
| 35 | }; |
| 36 | |
| 37 | watchdog { |
| 38 | compatible = "qcom,pm8916-wdt"; |
| 39 | interrupts = <0x0 0x8 6 IRQ_TYPE_EDGE_RISING>; |
| 40 | timeout-sec = <60>; |
| 41 | }; |
| 42 | }; |
| 43 | |
Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [diff] [blame^] | 44 | pm8916_charger: charger@1000 { |
| 45 | compatible = "qcom,pm8916-lbc"; |
| 46 | reg = <0x1000>, <0x1200>, <0x1300>, <0x1600>; |
| 47 | reg-names = "chgr", "bat_if", "usb", "misc"; |
| 48 | |
| 49 | interrupts = <0x0 0x10 0 IRQ_TYPE_EDGE_BOTH>, |
| 50 | <0x0 0x10 5 IRQ_TYPE_EDGE_BOTH>, |
| 51 | <0x0 0x10 6 IRQ_TYPE_EDGE_BOTH>, |
| 52 | <0x0 0x10 7 IRQ_TYPE_EDGE_BOTH>, |
| 53 | <0x0 0x12 0 IRQ_TYPE_EDGE_BOTH>, |
| 54 | <0x0 0x12 1 IRQ_TYPE_EDGE_BOTH>, |
| 55 | <0x0 0x13 0 IRQ_TYPE_EDGE_BOTH>, |
| 56 | <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>, |
| 57 | <0x0 0x13 2 IRQ_TYPE_EDGE_BOTH>, |
| 58 | <0x0 0x13 4 IRQ_TYPE_EDGE_BOTH>; |
| 59 | interrupt-names = "vbat_det", |
| 60 | "fast_chg", |
| 61 | "chg_fail", |
| 62 | "chg_done", |
| 63 | "bat_pres", |
| 64 | "temp_ok", |
| 65 | "coarse_det", |
| 66 | "usb_vbus", |
| 67 | "chg_gone", |
| 68 | "overtemp"; |
| 69 | |
| 70 | status = "disabled"; |
| 71 | }; |
| 72 | |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 73 | pm8916_usbin: usb-detect@1300 { |
| 74 | compatible = "qcom,pm8941-misc"; |
| 75 | reg = <0x1300>; |
| 76 | interrupts = <0x0 0x13 1 IRQ_TYPE_EDGE_BOTH>; |
| 77 | interrupt-names = "usb_vbus"; |
| 78 | status = "disabled"; |
| 79 | }; |
| 80 | |
| 81 | pm8916_temp: temp-alarm@2400 { |
| 82 | compatible = "qcom,spmi-temp-alarm"; |
| 83 | reg = <0x2400>; |
| 84 | interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>; |
| 85 | io-channels = <&pm8916_vadc VADC_DIE_TEMP>; |
| 86 | io-channel-names = "thermal"; |
| 87 | #thermal-sensor-cells = <0>; |
| 88 | }; |
| 89 | |
| 90 | pm8916_vadc: adc@3100 { |
| 91 | compatible = "qcom,spmi-vadc"; |
| 92 | reg = <0x3100>; |
| 93 | interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>; |
| 94 | #address-cells = <1>; |
| 95 | #size-cells = <0>; |
| 96 | #io-channel-cells = <1>; |
| 97 | |
| 98 | channel@0 { |
| 99 | reg = <VADC_USBIN>; |
| 100 | qcom,pre-scaling = <1 10>; |
| 101 | }; |
| 102 | channel@7 { |
| 103 | reg = <VADC_VSYS>; |
| 104 | qcom,pre-scaling = <1 3>; |
| 105 | }; |
| 106 | channel@8 { |
| 107 | reg = <VADC_DIE_TEMP>; |
| 108 | }; |
| 109 | channel@9 { |
| 110 | reg = <VADC_REF_625MV>; |
| 111 | }; |
| 112 | channel@a { |
| 113 | reg = <VADC_REF_1250MV>; |
| 114 | }; |
| 115 | channel@e { |
| 116 | reg = <VADC_GND_REF>; |
| 117 | }; |
| 118 | channel@f { |
| 119 | reg = <VADC_VDD_VADC>; |
| 120 | }; |
| 121 | }; |
| 122 | |
Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [diff] [blame^] | 123 | pm8916_bms: battery@4000 { |
| 124 | compatible = "qcom,pm8916-bms-vm"; |
| 125 | reg = <0x4000>; |
| 126 | interrupts = <0x0 0x40 0 IRQ_TYPE_EDGE_RISING>, |
| 127 | <0x0 0x40 1 IRQ_TYPE_EDGE_RISING>, |
| 128 | <0x0 0x40 2 IRQ_TYPE_EDGE_RISING>, |
| 129 | <0x0 0x40 3 IRQ_TYPE_EDGE_RISING>, |
| 130 | <0x0 0x40 4 IRQ_TYPE_EDGE_RISING>, |
| 131 | <0x0 0x40 5 IRQ_TYPE_EDGE_RISING>; |
| 132 | interrupt-names = "cv_leave", |
| 133 | "cv_enter", |
| 134 | "ocv_good", |
| 135 | "ocv_thr", |
| 136 | "fifo", |
| 137 | "state_chg"; |
| 138 | |
| 139 | status = "disabled"; |
| 140 | }; |
| 141 | |
Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 142 | rtc@6000 { |
| 143 | compatible = "qcom,pm8941-rtc"; |
| 144 | reg = <0x6000>, <0x6100>; |
| 145 | reg-names = "rtc", "alarm"; |
| 146 | interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>; |
| 147 | }; |
| 148 | |
| 149 | pm8916_mpps: mpps@a000 { |
| 150 | compatible = "qcom,pm8916-mpp", "qcom,spmi-mpp"; |
| 151 | reg = <0xa000>; |
| 152 | gpio-controller; |
| 153 | #gpio-cells = <2>; |
| 154 | gpio-ranges = <&pm8916_mpps 0 0 4>; |
| 155 | interrupt-controller; |
| 156 | #interrupt-cells = <2>; |
| 157 | }; |
| 158 | |
| 159 | pm8916_gpios: gpio@c000 { |
| 160 | compatible = "qcom,pm8916-gpio", "qcom,spmi-gpio"; |
| 161 | reg = <0xc000>; |
| 162 | gpio-controller; |
| 163 | gpio-ranges = <&pm8916_gpios 0 0 4>; |
| 164 | #gpio-cells = <2>; |
| 165 | interrupt-controller; |
| 166 | #interrupt-cells = <2>; |
| 167 | }; |
| 168 | }; |
| 169 | |
| 170 | pm8916_1: pmic@1 { |
| 171 | compatible = "qcom,pm8916", "qcom,spmi-pmic"; |
| 172 | reg = <0x1 SPMI_USID>; |
| 173 | #address-cells = <1>; |
| 174 | #size-cells = <0>; |
| 175 | |
| 176 | pm8916_pwm: pwm { |
| 177 | compatible = "qcom,pm8916-pwm"; |
| 178 | |
| 179 | #pwm-cells = <2>; |
| 180 | |
| 181 | status = "disabled"; |
| 182 | }; |
| 183 | |
| 184 | pm8916_vib: vibrator@c000 { |
| 185 | compatible = "qcom,pm8916-vib"; |
| 186 | reg = <0xc000>; |
| 187 | status = "disabled"; |
| 188 | }; |
| 189 | |
| 190 | pm8916_codec: audio-codec@f000 { |
| 191 | compatible = "qcom,pm8916-wcd-analog-codec"; |
| 192 | reg = <0xf000>; |
| 193 | interrupt-parent = <&spmi_bus>; |
| 194 | interrupts = <0x1 0xf0 0x0 IRQ_TYPE_NONE>, |
| 195 | <0x1 0xf0 0x1 IRQ_TYPE_NONE>, |
| 196 | <0x1 0xf0 0x2 IRQ_TYPE_NONE>, |
| 197 | <0x1 0xf0 0x3 IRQ_TYPE_NONE>, |
| 198 | <0x1 0xf0 0x4 IRQ_TYPE_NONE>, |
| 199 | <0x1 0xf0 0x5 IRQ_TYPE_NONE>, |
| 200 | <0x1 0xf0 0x6 IRQ_TYPE_NONE>, |
| 201 | <0x1 0xf0 0x7 IRQ_TYPE_NONE>, |
| 202 | <0x1 0xf1 0x0 IRQ_TYPE_NONE>, |
| 203 | <0x1 0xf1 0x1 IRQ_TYPE_NONE>, |
| 204 | <0x1 0xf1 0x2 IRQ_TYPE_NONE>, |
| 205 | <0x1 0xf1 0x3 IRQ_TYPE_NONE>, |
| 206 | <0x1 0xf1 0x4 IRQ_TYPE_NONE>, |
| 207 | <0x1 0xf1 0x5 IRQ_TYPE_NONE>; |
| 208 | interrupt-names = "cdc_spk_cnp_int", |
| 209 | "cdc_spk_clip_int", |
| 210 | "cdc_spk_ocp_int", |
| 211 | "mbhc_ins_rem_det1", |
| 212 | "mbhc_but_rel_det", |
| 213 | "mbhc_but_press_det", |
| 214 | "mbhc_ins_rem_det", |
| 215 | "mbhc_switch_int", |
| 216 | "cdc_ear_ocp_int", |
| 217 | "cdc_hphr_ocp_int", |
| 218 | "cdc_hphl_ocp_det", |
| 219 | "cdc_ear_cnp_int", |
| 220 | "cdc_hphr_cnp_int", |
| 221 | "cdc_hphl_cnp_int"; |
| 222 | #sound-dai-cells = <1>; |
| 223 | status = "disabled"; |
| 224 | }; |
| 225 | }; |
| 226 | }; |