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	pma8084_0: pma8084@0 {
10		compatible = "qcom,pma8084", "qcom,spmi-pmic";
11		reg = <0x0 SPMI_USID>;
12		#address-cells = <1>;
13		#size-cells = <0>;
14
15		rtc@6000 {
16			compatible = "qcom,pm8941-rtc";
17			reg = <0x6000>,
18			      <0x6100>;
19			reg-names = "rtc", "alarm";
20			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
21		};
22
23		pon@800 {
24			compatible = "qcom,pm8941-pon";
25			reg = <0x800>;
26
27			pwrkey {
28				compatible = "qcom,pm8941-pwrkey";
29				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
30				debounce = <15625>;
31				bias-pull-up;
32				linux,code = <KEY_POWER>;
33			};
34		};
35
36		pma8084_gpios: gpio@c000 {
37			compatible = "qcom,pma8084-gpio", "qcom,spmi-gpio";
38			reg = <0xc000>;
39			gpio-controller;
40			gpio-ranges = <&pma8084_gpios 0 0 22>;
41			#gpio-cells = <2>;
42			interrupt-controller;
43			#interrupt-cells = <2>;
44		};
45
46		pma8084_mpps: mpps@a000 {
47			compatible = "qcom,pma8084-mpp", "qcom,spmi-mpp";
48			reg = <0xa000>;
49			gpio-controller;
50			#gpio-cells = <2>;
51			gpio-ranges = <&pma8084_mpps 0 0 8>;
52			interrupt-controller;
53			#interrupt-cells = <2>;
54		};
55
56		pma8084_temp: temp-alarm@2400 {
57			compatible = "qcom,spmi-temp-alarm";
58			reg = <0x2400>;
59			interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
60			#thermal-sensor-cells = <0>;
61			io-channels = <&pma8084_vadc VADC_DIE_TEMP>;
62			io-channel-names = "thermal";
63		};
64
65		pma8084_vadc: adc@3100 {
66			compatible = "qcom,spmi-vadc";
67			reg = <0x3100>;
68			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
69			#address-cells = <1>;
70			#size-cells = <0>;
71			#io-channel-cells = <1>;
72
73			channel@8 {
74				reg = <VADC_DIE_TEMP>;
75			};
76
77			channel@9 {
78				reg = <VADC_REF_625MV>;
79			};
80
81			channel@a {
82				reg = <VADC_REF_1250MV>;
83			};
84
85			channel@c {
86				reg = <VADC_SPARE1>;
87			};
88
89			channel@e {
90				reg = <VADC_GND_REF>;
91			};
92
93			channel@f {
94				reg = <VADC_VDD_VADC>;
95			};
96		};
97	};
98
99	pma8084_1: pma8084@1 {
100		compatible = "qcom,pma8084", "qcom,spmi-pmic";
101		reg = <0x1 SPMI_USID>;
102		#address-cells = <1>;
103		#size-cells = <0>;
104	};
105};
106