xref: /openbmc/linux/arch/arm64/boot/dts/qcom/pm8998.dtsi (revision e77cc85ee3902303c71b3923f772680f4cb3de99)
18ea4ffcaSStephen Boyd// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
28ea4ffcaSStephen Boyd/* Copyright 2018 Google LLC. */
38ea4ffcaSStephen Boyd
443fb4431SMatthias Kaehlcke#include <dt-bindings/iio/qcom,spmi-vadc.h>
561020aa5SBjorn Andersson#include <dt-bindings/input/linux-event-codes.h>
68ea4ffcaSStephen Boyd#include <dt-bindings/interrupt-controller/irq.h>
743fb4431SMatthias Kaehlcke#include <dt-bindings/spmi/spmi.h>
81b9d8bd6SMatthias Kaehlcke#include <dt-bindings/thermal/thermal.h>
98ea4ffcaSStephen Boyd
101b9d8bd6SMatthias Kaehlcke/ {
111b9d8bd6SMatthias Kaehlcke	thermal-zones {
121b9d8bd6SMatthias Kaehlcke		pm8998 {
131b9d8bd6SMatthias Kaehlcke			polling-delay-passive = <250>;
141b9d8bd6SMatthias Kaehlcke			polling-delay = <1000>;
151b9d8bd6SMatthias Kaehlcke
161b9d8bd6SMatthias Kaehlcke			thermal-sensors = <&pm8998_temp>;
171b9d8bd6SMatthias Kaehlcke
181b9d8bd6SMatthias Kaehlcke			trips {
191b9d8bd6SMatthias Kaehlcke				pm8998_alert0: pm8998-alert0 {
201b9d8bd6SMatthias Kaehlcke					temperature = <105000>;
211b9d8bd6SMatthias Kaehlcke					hysteresis = <2000>;
221b9d8bd6SMatthias Kaehlcke					type = "passive";
231b9d8bd6SMatthias Kaehlcke				};
241b9d8bd6SMatthias Kaehlcke				pm8998_crit: pm8998-crit {
251b9d8bd6SMatthias Kaehlcke					temperature = <125000>;
261b9d8bd6SMatthias Kaehlcke					hysteresis = <2000>;
271b9d8bd6SMatthias Kaehlcke					type = "critical";
281b9d8bd6SMatthias Kaehlcke				};
291b9d8bd6SMatthias Kaehlcke			};
301b9d8bd6SMatthias Kaehlcke		};
311b9d8bd6SMatthias Kaehlcke	};
321b9d8bd6SMatthias Kaehlcke};
3361020aa5SBjorn Andersson
348ea4ffcaSStephen Boyd&spmi_bus {
358ea4ffcaSStephen Boyd	pm8998_lsid0: pmic@0 {
368ea4ffcaSStephen Boyd		compatible = "qcom,pm8998", "qcom,spmi-pmic";
378ea4ffcaSStephen Boyd		reg = <0x0 SPMI_USID>;
388ea4ffcaSStephen Boyd		#address-cells = <1>;
398ea4ffcaSStephen Boyd		#size-cells = <0>;
408ea4ffcaSStephen Boyd
4161020aa5SBjorn Andersson		pm8998_pon: pon@800 {
426fd7c4daSJohn Stultz			compatible = "qcom,pm8998-pon";
4361020aa5SBjorn Andersson
4461020aa5SBjorn Andersson			reg = <0x800>;
4561020aa5SBjorn Andersson			mode-bootloader = <0x2>;
4661020aa5SBjorn Andersson			mode-recovery = <0x1>;
4761020aa5SBjorn Andersson
4861020aa5SBjorn Andersson			pwrkey {
4961020aa5SBjorn Andersson				compatible = "qcom,pm8941-pwrkey";
5061020aa5SBjorn Andersson				interrupts = <0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
5161020aa5SBjorn Andersson				debounce = <15625>;
5261020aa5SBjorn Andersson				bias-pull-up;
5361020aa5SBjorn Andersson				linux,code = <KEY_POWER>;
5461020aa5SBjorn Andersson			};
5561020aa5SBjorn Andersson		};
5661020aa5SBjorn Andersson
57104e6415SMatthias Kaehlcke		pm8998_temp: temp-alarm@2400 {
58104e6415SMatthias Kaehlcke			compatible = "qcom,spmi-temp-alarm";
59104e6415SMatthias Kaehlcke			reg = <0x2400>;
60104e6415SMatthias Kaehlcke			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
617bfd90f5SMatthias Kaehlcke			io-channels = <&pm8998_adc ADC5_DIE_TEMP>;
627bfd90f5SMatthias Kaehlcke			io-channel-names = "thermal";
63104e6415SMatthias Kaehlcke			#thermal-sensor-cells = <0>;
64104e6415SMatthias Kaehlcke		};
65104e6415SMatthias Kaehlcke
6661020aa5SBjorn Andersson		pm8998_coincell: coincell@2800 {
6761020aa5SBjorn Andersson			compatible = "qcom,pm8941-coincell";
6861020aa5SBjorn Andersson			reg = <0x2800>;
6961020aa5SBjorn Andersson
7061020aa5SBjorn Andersson			status = "disabled";
7161020aa5SBjorn Andersson		};
7261020aa5SBjorn Andersson
7343fb4431SMatthias Kaehlcke		pm8998_adc: adc@3100 {
7443fb4431SMatthias Kaehlcke			compatible = "qcom,spmi-adc-rev2";
7543fb4431SMatthias Kaehlcke			reg = <0x3100>;
7643fb4431SMatthias Kaehlcke			interrupts = <0x0 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
7743fb4431SMatthias Kaehlcke			#address-cells = <1>;
7843fb4431SMatthias Kaehlcke			#size-cells = <0>;
7943fb4431SMatthias Kaehlcke			#io-channel-cells = <1>;
80a789fd0bSMatthias Kaehlcke
81*e77cc85eSVinod Koul			adc-chan@6 {
82a789fd0bSMatthias Kaehlcke				reg = <ADC5_DIE_TEMP>;
83a789fd0bSMatthias Kaehlcke				label = "die_temp";
84a789fd0bSMatthias Kaehlcke			};
8543fb4431SMatthias Kaehlcke		};
8643fb4431SMatthias Kaehlcke
8761020aa5SBjorn Andersson		rtc@6000 {
8861020aa5SBjorn Andersson			compatible = "qcom,pm8941-rtc";
8961020aa5SBjorn Andersson			reg = <0x6000>, <0x6100>;
9061020aa5SBjorn Andersson			reg-names = "rtc", "alarm";
9161020aa5SBjorn Andersson			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
9261020aa5SBjorn Andersson		};
9361020aa5SBjorn Andersson
948ea4ffcaSStephen Boyd		pm8998_gpio: gpios@c000 {
958ea4ffcaSStephen Boyd			compatible = "qcom,pm8998-gpio", "qcom,spmi-gpio";
968ea4ffcaSStephen Boyd			reg = <0xc000>;
978ea4ffcaSStephen Boyd			gpio-controller;
9899c70e72SBrian Masney			gpio-ranges = <&pm8998_gpio 0 0 26>;
998ea4ffcaSStephen Boyd			#gpio-cells = <2>;
100a1738363SBrian Masney			interrupt-controller;
101a1738363SBrian Masney			#interrupt-cells = <2>;
1028ea4ffcaSStephen Boyd		};
1038ea4ffcaSStephen Boyd
1048ea4ffcaSStephen Boyd	};
1058ea4ffcaSStephen Boyd
1068ea4ffcaSStephen Boyd	pm8998_lsid1: pmic@1 {
1078ea4ffcaSStephen Boyd		compatible = "qcom,pm8998", "qcom,spmi-pmic";
1088ea4ffcaSStephen Boyd		reg = <0x1 SPMI_USID>;
1098ea4ffcaSStephen Boyd		#address-cells = <1>;
1108ea4ffcaSStephen Boyd		#size-cells = <0>;
1118ea4ffcaSStephen Boyd	};
1128ea4ffcaSStephen Boyd};
113