| 1 |
// SPDX-License-Identifier: GPL-2.0 |
| 2 |
// Copyright (c) 2019, AngeloGioacchino Del Regno <[email protected]> |
| 3 |
|
| 4 |
#include <dt-bindings/iio/qcom,spmi-vadc.h> |
| 5 |
#include <dt-bindings/interrupt-controller/irq.h> |
| 6 |
#include <dt-bindings/spmi/spmi.h> |
| 7 |
|
| 8 |
&spmi_bus { |
| 9 |
pmic@2 { |
| 10 |
compatible = "qcom,pmi8950", "qcom,spmi-pmic"; |
| 11 |
reg = <0x2 SPMI_USID>; |
| 12 |
#address-cells = <1>; |
| 13 |
#size-cells = <0>; |
| 14 |
|
| 15 |
pmi8950_vadc: adc@3100 { |
| 16 |
compatible = "qcom,spmi-vadc"; |
| 17 |
reg = <0x3100>; |
| 18 |
interrupts = <0x2 0x31 0x0 IRQ_TYPE_EDGE_RISING>; |
| 19 |
#address-cells = <1>; |
| 20 |
#size-cells = <0>; |
| 21 |
#io-channel-cells = <1>; |
| 22 |
|
| 23 |
channel@0 { |
| 24 |
reg = <VADC_USBIN>; |
| 25 |
qcom,pre-scaling = <1 20>; |
| 26 |
label = "usbin"; |
| 27 |
}; |
| 28 |
|
| 29 |
channel@1 { |
| 30 |
reg = <VADC_DCIN>; |
| 31 |
qcom,pre-scaling = <1 20>; |
| 32 |
label = "dcin"; |
| 33 |
}; |
| 34 |
|
| 35 |
channel@2 { |
| 36 |
reg = <VADC_VCHG_SNS>; |
| 37 |
qcom,pre-scaling = <1 3>; |
| 38 |
label = "vchg_sns"; |
| 39 |
}; |
| 40 |
|
| 41 |
channel@9 { |
| 42 |
reg = <VADC_REF_625MV>; |
| 43 |
qcom,pre-scaling = <1 1>; |
| 44 |
label = "ref_625mv"; |
| 45 |
}; |
| 46 |
|
| 47 |
channel@a { |
| 48 |
reg = <VADC_REF_1250MV>; |
| 49 |
qcom,pre-scaling = <1 1>; |
| 50 |
label = "ref_1250mv"; |
| 51 |
}; |
| 52 |
|
| 53 |
channel@d { |
| 54 |
reg = <VADC_SPARE2>; |
| 55 |
qcom,pre-scaling = <1 1>; |
| 56 |
label = "chg_temp"; |
| 57 |
}; |
| 58 |
|
| 59 |
channel@e { |
| 60 |
reg = <VADC_GND_REF>; |
| 61 |
}; |
| 62 |
|
| 63 |
channel@f { |
| 64 |
reg = <VADC_VDD_VADC>; |
| 65 |
}; |
| 66 |
}; |
| 67 |
|
| 68 |
pmi8950_mpps: mpps@a000 { |
| 69 |
compatible = "qcom,pmi8950-mpp", "qcom,spmi-mpp"; |
| 70 |
reg = <0xa000>; |
| 71 |
gpio-controller; |
| 72 |
gpio-ranges = <&pmi8950_mpps 0 0 4>; |
| 73 |
#gpio-cells = <2>; |
| 74 |
interrupt-controller; |
| 75 |
#interrupt-cells = <2>; |
| 76 |
}; |
| 77 |
|
| 78 |
pmi8950_gpios: gpio@c000 { |
| 79 |
compatible = "qcom,pmi8950-gpio", "qcom,spmi-gpio"; |
| 80 |
reg = <0xc000>; |
| 81 |
gpio-controller; |
| 82 |
gpio-ranges = <&pmi8950_gpios 0 0 2>; |
| 83 |
#gpio-cells = <2>; |
| 84 |
interrupt-controller; |
| 85 |
#interrupt-cells = <2>; |
| 86 |
}; |
| 87 |
}; |
| 88 |
|
| 89 |
pmic@3 { |
| 90 |
compatible = "qcom,pmi8950", "qcom,spmi-pmic"; |
| 91 |
reg = <0x3 SPMI_USID>; |
| 92 |
#address-cells = <1>; |
| 93 |
#size-cells = <0>; |
| 94 |
|
| 95 |
labibb { |
| 96 |
compatible = "qcom,pmi8950-lab-ibb", |
| 97 |
"qcom,pmi8998-lab-ibb"; |
| 98 |
|
| 99 |
ibb: ibb { |
| 100 |
interrupts = <0x3 0xdc 0x2 IRQ_TYPE_EDGE_RISING>, |
| 101 |
<0x3 0xdc 0x0 IRQ_TYPE_LEVEL_LOW>; |
| 102 |
interrupt-names = "sc-err", "ocp"; |
| 103 |
}; |
| 104 |
|
| 105 |
lab: lab { |
| 106 |
interrupts = <0x3 0xde 0x1 IRQ_TYPE_EDGE_RISING>, |
| 107 |
<0x3 0xde 0x0 IRQ_TYPE_LEVEL_LOW>; |
| 108 |
interrupt-names = "sc-err", "ocp"; |
| 109 |
}; |
| 110 |
}; |
| 111 |
|
| 112 |
pmi8950_pwm: pwm { |
| 113 |
compatible = "qcom,pmi8950-pwm"; |
| 114 |
#pwm-cells = <2>; |
| 115 |
|
| 116 |
status = "disabled"; |
| 117 |
}; |
| 118 |
|
| 119 |
pmi8950_wled: leds@d800 { |
| 120 |
compatible = "qcom,pmi8950-wled"; |
| 121 |
reg = <0xd800>, <0xd900>; |
| 122 |
interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>, |
| 123 |
<0x3 0xd8 0x2 IRQ_TYPE_EDGE_RISING>; |
| 124 |
interrupt-names = "ovp", "short"; |
| 125 |
label = "backlight"; |
| 126 |
|
| 127 |
status = "disabled"; |
| 128 |
}; |
| 129 |
}; |
| 130 |
}; |