xref: /openbmc/linux/scripts/dtc/include-prefixes/arm64/qcom/pm8150.dtsi (revision c900529f3d9161bfde5cca0754f83b4d3c3e0220)
15101f22aSVinod Koul// SPDX-License-Identifier: BSD-3-Clause
25101f22aSVinod Koul/*
35101f22aSVinod Koul * Copyright (c) 2017-2019, The Linux Foundation. All rights reserved.
45101f22aSVinod Koul * Copyright (c) 2019, Linaro Limited
55101f22aSVinod Koul */
65101f22aSVinod Koul
75101f22aSVinod Koul#include <dt-bindings/input/input.h>
85101f22aSVinod Koul#include <dt-bindings/interrupt-controller/irq.h>
95101f22aSVinod Koul#include <dt-bindings/spmi/spmi.h>
105101f22aSVinod Koul#include <dt-bindings/iio/qcom,spmi-vadc.h>
115101f22aSVinod Koul
124c5a410dSDmitry Baryshkov/ {
134c5a410dSDmitry Baryshkov	thermal-zones {
143a786086SManivannan Sadhasivam		pm8150-thermal {
154c5a410dSDmitry Baryshkov			polling-delay-passive = <100>;
164c5a410dSDmitry Baryshkov			polling-delay = <0>;
174c5a410dSDmitry Baryshkov
184c5a410dSDmitry Baryshkov			thermal-sensors = <&pm8150_temp>;
194c5a410dSDmitry Baryshkov
204c5a410dSDmitry Baryshkov			trips {
214c5a410dSDmitry Baryshkov				trip0 {
224c5a410dSDmitry Baryshkov					temperature = <95000>;
234c5a410dSDmitry Baryshkov					hysteresis = <0>;
244c5a410dSDmitry Baryshkov					type = "passive";
254c5a410dSDmitry Baryshkov				};
264c5a410dSDmitry Baryshkov
274c5a410dSDmitry Baryshkov				trip1 {
284c5a410dSDmitry Baryshkov					temperature = <115000>;
294c5a410dSDmitry Baryshkov					hysteresis = <0>;
304c5a410dSDmitry Baryshkov					type = "hot";
314c5a410dSDmitry Baryshkov				};
324c5a410dSDmitry Baryshkov
334c5a410dSDmitry Baryshkov				trip2 {
344c5a410dSDmitry Baryshkov					temperature = <145000>;
354c5a410dSDmitry Baryshkov					hysteresis = <0>;
364c5a410dSDmitry Baryshkov					type = "critical";
374c5a410dSDmitry Baryshkov				};
384c5a410dSDmitry Baryshkov			};
394c5a410dSDmitry Baryshkov		};
404c5a410dSDmitry Baryshkov	};
414c5a410dSDmitry Baryshkov};
424c5a410dSDmitry Baryshkov
435101f22aSVinod Koul&spmi_bus {
445101f22aSVinod Koul	pm8150_0: pmic@0 {
455101f22aSVinod Koul		compatible = "qcom,pm8150", "qcom,spmi-pmic";
465101f22aSVinod Koul		reg = <0x0 SPMI_USID>;
475101f22aSVinod Koul		#address-cells = <1>;
485101f22aSVinod Koul		#size-cells = <0>;
495101f22aSVinod Koul
5087783dbeSKrzysztof Kozlowski		pon: pon@800 {
51a153d317SDmitry Baryshkov			compatible = "qcom,pm8998-pon";
525101f22aSVinod Koul			reg = <0x0800>;
53c5c24373SDmitry Baryshkov			mode-bootloader = <0x2>;
54c5c24373SDmitry Baryshkov			mode-recovery = <0x1>;
55d0a6ce59SKonrad Dybcio
56d0a6ce59SKonrad Dybcio			pon_pwrkey: pwrkey {
575101f22aSVinod Koul				compatible = "qcom,pm8941-pwrkey";
585101f22aSVinod Koul				interrupts = <0x0 0x8 0x0 IRQ_TYPE_EDGE_BOTH>;
595101f22aSVinod Koul				debounce = <15625>;
605101f22aSVinod Koul				bias-pull-up;
615101f22aSVinod Koul				linux,code = <KEY_POWER>;
625101f22aSVinod Koul
635101f22aSVinod Koul				status = "disabled";
645101f22aSVinod Koul			};
65b135d097SKonrad Dybcio
66b135d097SKonrad Dybcio			pon_resin: resin {
67b135d097SKonrad Dybcio				compatible = "qcom,pm8941-resin";
68b135d097SKonrad Dybcio				interrupts = <0x0 0x8 0x1 IRQ_TYPE_EDGE_BOTH>;
69b135d097SKonrad Dybcio				debounce = <15625>;
70b135d097SKonrad Dybcio				bias-pull-up;
71b135d097SKonrad Dybcio
72b135d097SKonrad Dybcio				status = "disabled";
73b135d097SKonrad Dybcio			};
745101f22aSVinod Koul		};
755101f22aSVinod Koul
764c5a410dSDmitry Baryshkov		pm8150_temp: temp-alarm@2400 {
774c5a410dSDmitry Baryshkov			compatible = "qcom,spmi-temp-alarm";
784c5a410dSDmitry Baryshkov			reg = <0x2400>;
794c5a410dSDmitry Baryshkov			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
804c5a410dSDmitry Baryshkov			io-channels = <&pm8150_adc ADC5_DIE_TEMP>;
814c5a410dSDmitry Baryshkov			io-channel-names = "thermal";
824c5a410dSDmitry Baryshkov			#thermal-sensor-cells = <0>;
834c5a410dSDmitry Baryshkov		};
844c5a410dSDmitry Baryshkov
855101f22aSVinod Koul		pm8150_adc: adc@3100 {
865101f22aSVinod Koul			compatible = "qcom,spmi-adc5";
875101f22aSVinod Koul			reg = <0x3100>;
885101f22aSVinod Koul			#address-cells = <1>;
895101f22aSVinod Koul			#size-cells = <0>;
905101f22aSVinod Koul			#io-channel-cells = <1>;
915101f22aSVinod Koul			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
925101f22aSVinod Koul
93*41c18552SMarijn Suijten			channel@0 {
945101f22aSVinod Koul				reg = <ADC5_REF_GND>;
955101f22aSVinod Koul				qcom,pre-scaling = <1 1>;
965101f22aSVinod Koul				label = "ref_gnd";
975101f22aSVinod Koul			};
985101f22aSVinod Koul
99*41c18552SMarijn Suijten			channel@1 {
1005101f22aSVinod Koul				reg = <ADC5_1P25VREF>;
1015101f22aSVinod Koul				qcom,pre-scaling = <1 1>;
1025101f22aSVinod Koul				label = "vref_1p25";
1035101f22aSVinod Koul			};
1045101f22aSVinod Koul
105*41c18552SMarijn Suijten			channel@6 {
1065101f22aSVinod Koul				reg = <ADC5_DIE_TEMP>;
1075101f22aSVinod Koul				qcom,pre-scaling = <1 1>;
1085101f22aSVinod Koul				label = "die_temp";
1095101f22aSVinod Koul			};
1105101f22aSVinod Koul		};
1115101f22aSVinod Koul
11228a7eb65SDmitry Baryshkov		pm8150_adc_tm: adc-tm@3500 {
11328a7eb65SDmitry Baryshkov			compatible = "qcom,spmi-adc-tm5";
11428a7eb65SDmitry Baryshkov			reg = <0x3500>;
11528a7eb65SDmitry Baryshkov			interrupts = <0x0 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
11628a7eb65SDmitry Baryshkov			#thermal-sensor-cells = <1>;
11728a7eb65SDmitry Baryshkov			#address-cells = <1>;
11828a7eb65SDmitry Baryshkov			#size-cells = <0>;
11928a7eb65SDmitry Baryshkov			status = "disabled";
12028a7eb65SDmitry Baryshkov		};
12128a7eb65SDmitry Baryshkov
12240a5aa1fSBjorn Andersson		rtc@6000 {
1235101f22aSVinod Koul			compatible = "qcom,pm8941-rtc";
124ceb01bb8SEric Chanudet			reg = <0x6000>, <0x6100>;
1255101f22aSVinod Koul			reg-names = "rtc", "alarm";
1265101f22aSVinod Koul			interrupts = <0x0 0x61 0x1 IRQ_TYPE_NONE>;
1275101f22aSVinod Koul		};
1285101f22aSVinod Koul
1295101f22aSVinod Koul		pm8150_gpios: gpio@c000 {
130019102a9SKrzysztof Kozlowski			compatible = "qcom,pm8150-gpio", "qcom,spmi-gpio";
1315101f22aSVinod Koul			reg = <0xc000>;
1325101f22aSVinod Koul			gpio-controller;
133b07bfd8eSKrzysztof Kozlowski			gpio-ranges = <&pm8150_gpios 0 0 10>;
1345101f22aSVinod Koul			#gpio-cells = <2>;
13561d2ca50SJonathan Marek			interrupt-controller;
13661d2ca50SJonathan Marek			#interrupt-cells = <2>;
1375101f22aSVinod Koul		};
1385101f22aSVinod Koul	};
1395101f22aSVinod Koul
1405101f22aSVinod Koul	pmic@1 {
1415101f22aSVinod Koul		compatible = "qcom,pm8150", "qcom,spmi-pmic";
1425101f22aSVinod Koul		reg = <0x1 SPMI_USID>;
1435101f22aSVinod Koul		#address-cells = <1>;
1445101f22aSVinod Koul		#size-cells = <0>;
1455101f22aSVinod Koul	};
1465101f22aSVinod Koul};
147