Tom Rini | 93743d2 | 2024-04-01 09:08:13 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0 |
| 2 | |
| 3 | &ssbi { |
| 4 | pm8921: pmic { |
| 5 | compatible = "qcom,pm8921"; |
| 6 | #interrupt-cells = <2>; |
| 7 | interrupt-controller; |
| 8 | #address-cells = <1>; |
| 9 | #size-cells = <0>; |
| 10 | |
| 11 | pwrkey@1c { |
| 12 | compatible = "qcom,pm8921-pwrkey"; |
| 13 | reg = <0x1c>; |
| 14 | interrupts-extended = <&pm8921 50 IRQ_TYPE_EDGE_RISING>, |
| 15 | <&pm8921 51 IRQ_TYPE_EDGE_RISING>; |
| 16 | debounce = <15625>; |
| 17 | pull-up; |
| 18 | }; |
| 19 | |
| 20 | pm8921_mpps: mpps@50 { |
| 21 | compatible = "qcom,pm8921-mpp", |
| 22 | "qcom,ssbi-mpp"; |
| 23 | reg = <0x50>; |
| 24 | gpio-controller; |
| 25 | #gpio-cells = <2>; |
| 26 | gpio-ranges = <&pm8921_mpps 0 0 12>; |
| 27 | interrupt-controller; |
| 28 | #interrupt-cells = <2>; |
| 29 | }; |
| 30 | |
| 31 | rtc@11d { |
| 32 | compatible = "qcom,pm8921-rtc"; |
| 33 | reg = <0x11d>; |
| 34 | interrupts-extended = <&pm8921 39 IRQ_TYPE_EDGE_RISING>; |
| 35 | allow-set-time; |
| 36 | }; |
| 37 | |
| 38 | pm8921_keypad: keypad@148 { |
| 39 | compatible = "qcom,pm8921-keypad"; |
| 40 | reg = <0x148>; |
| 41 | interrupts-extended = <&pm8921 74 IRQ_TYPE_EDGE_RISING>, |
| 42 | <&pm8921 75 IRQ_TYPE_EDGE_RISING>; |
| 43 | debounce = <15>; |
| 44 | scan-delay = <32>; |
| 45 | row-hold = <91500>; |
| 46 | status = "disabled"; |
| 47 | }; |
| 48 | |
| 49 | pm8921_gpio: gpio@150 { |
| 50 | |
| 51 | compatible = "qcom,pm8921-gpio", |
| 52 | "qcom,ssbi-gpio"; |
| 53 | reg = <0x150>; |
| 54 | interrupt-controller; |
| 55 | #interrupt-cells = <2>; |
| 56 | gpio-controller; |
| 57 | gpio-ranges = <&pm8921_gpio 0 0 44>; |
| 58 | #gpio-cells = <2>; |
| 59 | |
| 60 | }; |
| 61 | |
| 62 | pm8921_xoadc: xoadc@197 { |
| 63 | compatible = "qcom,pm8921-adc"; |
| 64 | reg = <0x197>; |
| 65 | interrupts-extended = <&pm8921 78 IRQ_TYPE_EDGE_RISING>; |
| 66 | #address-cells = <2>; |
| 67 | #size-cells = <0>; |
| 68 | #io-channel-cells = <2>; |
| 69 | |
| 70 | vcoin: adc-channel@0 { |
| 71 | reg = <0x00 0x00>; |
| 72 | }; |
| 73 | |
| 74 | vbat: adc-channel@1 { |
| 75 | reg = <0x00 0x01>; |
| 76 | }; |
| 77 | |
| 78 | dcin: adc-channel@2 { |
| 79 | reg = <0x00 0x02>; |
| 80 | }; |
| 81 | |
| 82 | vph_pwr: adc-channel@4 { |
| 83 | reg = <0x00 0x04>; |
| 84 | }; |
| 85 | |
| 86 | batt_therm: adc-channel@8 { |
| 87 | reg = <0x00 0x08>; |
| 88 | }; |
| 89 | |
| 90 | batt_id: adc-channel@9 { |
| 91 | reg = <0x00 0x09>; |
| 92 | }; |
| 93 | |
| 94 | usb_vbus: adc-channel@a { |
| 95 | reg = <0x00 0x0a>; |
| 96 | }; |
| 97 | |
| 98 | die_temp: adc-channel@b { |
| 99 | reg = <0x00 0x0b>; |
| 100 | }; |
| 101 | |
| 102 | ref_625mv: adc-channel@c { |
| 103 | reg = <0x00 0x0c>; |
| 104 | }; |
| 105 | |
| 106 | ref_1250mv: adc-channel@d { |
| 107 | reg = <0x00 0x0d>; |
| 108 | }; |
| 109 | |
| 110 | chg_temp: adc-channel@e { |
| 111 | reg = <0x00 0x0e>; |
| 112 | }; |
| 113 | |
| 114 | ref_muxoff: adc-channel@f { |
| 115 | reg = <0x00 0x0f>; |
| 116 | }; |
| 117 | }; |
| 118 | }; |
| 119 | }; |
| 120 | |
| 121 | / { |
| 122 | /* |
| 123 | * These channels from the ADC are simply hardware monitors. |
| 124 | * That is why the ADC is referred to as "HKADC" - HouseKeeping |
| 125 | * ADC. |
| 126 | */ |
| 127 | iio-hwmon { |
| 128 | compatible = "iio-hwmon"; |
| 129 | io-channels = <&pm8921_xoadc 0x00 0x01>, /* Battery */ |
| 130 | <&pm8921_xoadc 0x00 0x02>, /* DC in (charger) */ |
| 131 | <&pm8921_xoadc 0x00 0x04>, /* VPH the main system voltage */ |
| 132 | <&pm8921_xoadc 0x00 0x0b>, /* Die temperature */ |
| 133 | <&pm8921_xoadc 0x00 0x0c>, /* Reference voltage 1.25V */ |
| 134 | <&pm8921_xoadc 0x00 0x0d>, /* Reference voltage 0.625V */ |
| 135 | <&pm8921_xoadc 0x00 0x0e>; /* Charger temperature */ |
| 136 | }; |
| 137 | }; |