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