1// SPDX-License-Identifier: BSD-3-Clause
2/*
3 * Copyright (c) 2019, The Linux Foundation. All rights reserved.
4 */
5
6#include <dt-bindings/iio/qcom,spmi-vadc.h>
7#include <dt-bindings/interrupt-controller/irq.h>
8#include <dt-bindings/spmi/spmi.h>
9
10/ {
11	thermal-zones {
12		pm6150l-thermal {
13			polling-delay-passive = <0>;
14			polling-delay = <0>;
15
16			thermal-sensors = <&pm6150l_temp>;
17
18			trips {
19				trip0 {
20					temperature = <95000>;
21					hysteresis = <0>;
22					type = "passive";
23				};
24
25				trip1 {
26					temperature = <115000>;
27					hysteresis = <0>;
28					type = "hot";
29				};
30
31				trip2 {
32					temperature = <125000>;
33					hysteresis = <0>;
34					type = "critical";
35				};
36			};
37		};
38	};
39};
40
41&spmi_bus {
42	pm6150l_lsid4: pmic@4 {
43		compatible = "qcom,pm6150l", "qcom,spmi-pmic";
44		reg = <0x4 SPMI_USID>;
45		#address-cells = <1>;
46		#size-cells = <0>;
47
48		pm6150l_temp: temp-alarm@2400 {
49			compatible = "qcom,spmi-temp-alarm";
50			reg = <0x2400>;
51			interrupts = <0x4 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
52			#thermal-sensor-cells = <0>;
53		};
54
55		pm6150l_adc: adc@3100 {
56			compatible = "qcom,spmi-adc5";
57			reg = <0x3100>;
58			interrupts = <0x4 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
59			#address-cells = <1>;
60			#size-cells = <0>;
61			#io-channel-cells = <1>;
62
63			adc-chan@0 {
64				reg = <ADC5_REF_GND>;
65				qcom,pre-scaling = <1 1>;
66				label = "ref_gnd";
67			};
68
69			adc-chan@1 {
70				reg = <ADC5_1P25VREF>;
71				qcom,pre-scaling = <1 1>;
72				label = "vref_1p25";
73			};
74
75			adc-chan@6 {
76				reg = <ADC5_DIE_TEMP>;
77				qcom,pre-scaling = <1 1>;
78				label = "die_temp";
79			};
80
81			adc-chan@83 {
82				reg = <ADC5_VPH_PWR>;
83				qcom,pre-scaling = <1 3>;
84				label = "vph_pwr";
85			};
86		};
87
88		pm6150l_adc_tm: adc-tm@3500 {
89			compatible = "qcom,spmi-adc-tm5";
90			reg = <0x3500>;
91			interrupts = <0x4 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
92			#thermal-sensor-cells = <1>;
93			#address-cells = <1>;
94			#size-cells = <0>;
95			status = "disabled";
96		};
97
98		pm6150l_gpios: gpio@c000 {
99			compatible = "qcom,pm6150l-gpio", "qcom,spmi-gpio";
100			reg = <0xc000>;
101			gpio-controller;
102			gpio-ranges = <&pm6150l_gpios 0 0 12>;
103			#gpio-cells = <2>;
104			interrupt-controller;
105			#interrupt-cells = <2>;
106		};
107	};
108
109	pm6150l_lsid5: pmic@5 {
110		compatible = "qcom,pm6150l", "qcom,spmi-pmic";
111		reg = <0x5 SPMI_USID>;
112		#address-cells = <1>;
113		#size-cells = <0>;
114
115		pm6150l_flash: led-controller@d300 {
116			compatible = "qcom,pm6150l-flash-led", "qcom,spmi-flash-led";
117			reg = <0xd300>;
118			status = "disabled";
119		};
120
121		pm6150l_wled: leds@d800 {
122			compatible = "qcom,pm6150l-wled";
123			reg = <0xd800>, <0xd900>;
124			interrupts = <0x5 0xd8 0x1 IRQ_TYPE_EDGE_RISING>;
125			interrupt-names = "ovp";
126			label = "backlight";
127
128			status = "disabled";
129		};
130	};
131};
132