14870c76cSKonrad Dybcio// SPDX-License-Identifier: BSD-3-Clause
24870c76cSKonrad Dybcio/*
34870c76cSKonrad Dybcio * Copyright (c) 2020, Konrad Dybcio
44870c76cSKonrad Dybcio */
54870c76cSKonrad Dybcio
64bf09754SKonrad Dybcio#include <dt-bindings/iio/qcom,spmi-vadc.h>
74870c76cSKonrad Dybcio#include <dt-bindings/input/linux-event-codes.h>
84870c76cSKonrad Dybcio#include <dt-bindings/interrupt-controller/irq.h>
94870c76cSKonrad Dybcio#include <dt-bindings/spmi/spmi.h>
104bf09754SKonrad Dybcio#include <dt-bindings/thermal/thermal.h>
114bf09754SKonrad Dybcio
124bf09754SKonrad Dybcio/ {
134bf09754SKonrad Dybcio	thermal-zones {
14*6b056f38SKrzysztof Kozlowski		pm660l-thermal {
154bf09754SKonrad Dybcio			polling-delay-passive = <250>;
164bf09754SKonrad Dybcio			polling-delay = <1000>;
174bf09754SKonrad Dybcio
184bf09754SKonrad Dybcio			thermal-sensors = <&pm660l_temp>;
194bf09754SKonrad Dybcio
204bf09754SKonrad Dybcio			trips {
214bf09754SKonrad Dybcio				pm660l_alert0: pm660l-alert0 {
224bf09754SKonrad Dybcio					temperature = <95000>;
234bf09754SKonrad Dybcio					hysteresis = <2000>;
244bf09754SKonrad Dybcio					type = "passive";
254bf09754SKonrad Dybcio				};
264bf09754SKonrad Dybcio				pm660l_crit: pm660l-crit {
274bf09754SKonrad Dybcio					temperature = <125000>;
284bf09754SKonrad Dybcio					hysteresis = <2000>;
294bf09754SKonrad Dybcio					type = "critical";
304bf09754SKonrad Dybcio				};
314bf09754SKonrad Dybcio			};
324bf09754SKonrad Dybcio		};
334bf09754SKonrad Dybcio	};
344bf09754SKonrad Dybcio};
354870c76cSKonrad Dybcio
364870c76cSKonrad Dybcio&spmi_bus {
374870c76cSKonrad Dybcio
384870c76cSKonrad Dybcio	pmic@2 {
394870c76cSKonrad Dybcio		compatible = "qcom,pm660l", "qcom,spmi-pmic";
404870c76cSKonrad Dybcio		reg = <0x2 SPMI_USID>;
414870c76cSKonrad Dybcio		#address-cells = <1>;
424870c76cSKonrad Dybcio		#size-cells = <0>;
434870c76cSKonrad Dybcio
444bf09754SKonrad Dybcio		pm660l_temp: temp-alarm@2400 {
454bf09754SKonrad Dybcio			compatible = "qcom,spmi-temp-alarm";
464bf09754SKonrad Dybcio			reg = <0x2400>;
474bf09754SKonrad Dybcio			interrupts = <0x2 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
484bf09754SKonrad Dybcio			#thermal-sensor-cells = <0>;
494bf09754SKonrad Dybcio		};
504bf09754SKonrad Dybcio
51c95243eeSKrzysztof Kozlowski		pm660l_gpios: gpio@c000 {
524870c76cSKonrad Dybcio			compatible = "qcom,pm660l-gpio", "qcom,spmi-gpio";
534870c76cSKonrad Dybcio			reg = <0xc000>;
544870c76cSKonrad Dybcio			gpio-controller;
554870c76cSKonrad Dybcio			gpio-ranges = <&pm660l_gpios 0 0 12>;
564870c76cSKonrad Dybcio			#gpio-cells = <2>;
574870c76cSKonrad Dybcio			interrupt-controller;
584870c76cSKonrad Dybcio			#interrupt-cells = <2>;
594870c76cSKonrad Dybcio		};
604870c76cSKonrad Dybcio	};
614870c76cSKonrad Dybcio
624870c76cSKonrad Dybcio	pmic@3 {
634870c76cSKonrad Dybcio		compatible = "qcom,pm660l", "qcom,spmi-pmic";
644870c76cSKonrad Dybcio		reg = <0x3 SPMI_USID>;
654870c76cSKonrad Dybcio		#address-cells = <1>;
664870c76cSKonrad Dybcio		#size-cells = <0>;
677b56a804SKonrad Dybcio
6815f50a48SKrzysztof Kozlowski		pm660l_lpg: pwm {
69fc41893fSMarijn Suijten			compatible = "qcom,pm660l-lpg";
70fc41893fSMarijn Suijten
71fc41893fSMarijn Suijten			status = "disabled";
72fc41893fSMarijn Suijten		};
73fc41893fSMarijn Suijten
747b56a804SKonrad Dybcio		pm660l_wled: leds@d800 {
757b56a804SKonrad Dybcio			compatible = "qcom,pm660l-wled";
76d66b1d2eSKrzysztof Kozlowski			reg = <0xd800>, <0xd900>;
777b56a804SKonrad Dybcio			interrupts = <0x3 0xd8 0x1 IRQ_TYPE_EDGE_RISING>;
787b56a804SKonrad Dybcio			interrupt-names = "ovp";
797b56a804SKonrad Dybcio			label = "backlight";
807b56a804SKonrad Dybcio
817b56a804SKonrad Dybcio			status = "disabled";
827b56a804SKonrad Dybcio		};
832a1fbb12SAngeloGioacchino Del Regno
84c29ed5afSKrzysztof Kozlowski		pm660l_spmi_regulators: regulators {
852a1fbb12SAngeloGioacchino Del Regno			compatible = "qcom,pm660l-regulators";
862a1fbb12SAngeloGioacchino Del Regno		};
874870c76cSKonrad Dybcio	};
884870c76cSKonrad Dybcio};
894870c76cSKonrad Dybcio
90