xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/pm8937.dtsi (revision ae5de77ed78ae54d86cead5604869212e8008e6b)
12846c905SEmmanuel Vadot// SPDX-License-Identifier: BSD-3-Clause
22846c905SEmmanuel Vadot/*
32846c905SEmmanuel Vadot * Copyright (c) 2023, Dang Huynh <danct12@riseup.net>
42846c905SEmmanuel Vadot */
52846c905SEmmanuel Vadot
62846c905SEmmanuel Vadot#include <dt-bindings/iio/qcom,spmi-vadc.h>
72846c905SEmmanuel Vadot#include <dt-bindings/input/linux-event-codes.h>
82846c905SEmmanuel Vadot#include <dt-bindings/spmi/spmi.h>
92846c905SEmmanuel Vadot
102846c905SEmmanuel Vadot/ {
112846c905SEmmanuel Vadot	thermal-zones {
122846c905SEmmanuel Vadot		pm8937-thermal {
132846c905SEmmanuel Vadot			polling-delay-passive = <0>;
142846c905SEmmanuel Vadot			polling-delay = <0>;
152846c905SEmmanuel Vadot			thermal-sensors = <&pm8937_temp>;
162846c905SEmmanuel Vadot
172846c905SEmmanuel Vadot			trips {
182846c905SEmmanuel Vadot				trip0 {
192846c905SEmmanuel Vadot					temperature = <105000>;
202846c905SEmmanuel Vadot					hysteresis = <0>;
212846c905SEmmanuel Vadot					type = "passive";
222846c905SEmmanuel Vadot				};
232846c905SEmmanuel Vadot
242846c905SEmmanuel Vadot				trip1 {
252846c905SEmmanuel Vadot					temperature = <125000>;
262846c905SEmmanuel Vadot					hysteresis = <0>;
272846c905SEmmanuel Vadot					type = "hot";
282846c905SEmmanuel Vadot				};
292846c905SEmmanuel Vadot
302846c905SEmmanuel Vadot				trip2 {
312846c905SEmmanuel Vadot					temperature = <145000>;
322846c905SEmmanuel Vadot					hysteresis = <0>;
332846c905SEmmanuel Vadot					type = "critical";
342846c905SEmmanuel Vadot				};
352846c905SEmmanuel Vadot			};
362846c905SEmmanuel Vadot		};
372846c905SEmmanuel Vadot	};
382846c905SEmmanuel Vadot};
392846c905SEmmanuel Vadot
402846c905SEmmanuel Vadot&spmi_bus {
412846c905SEmmanuel Vadot	pmic@0 {
422846c905SEmmanuel Vadot		compatible = "qcom,pm8937", "qcom,spmi-pmic";
432846c905SEmmanuel Vadot		reg = <0x0 SPMI_USID>;
442846c905SEmmanuel Vadot		#address-cells = <1>;
452846c905SEmmanuel Vadot		#size-cells = <0>;
462846c905SEmmanuel Vadot
472846c905SEmmanuel Vadot		pon@800 {
482846c905SEmmanuel Vadot			compatible = "qcom,pm8916-pon";
492846c905SEmmanuel Vadot			reg = <0x800>;
502846c905SEmmanuel Vadot			mode-bootloader = <0x2>;
512846c905SEmmanuel Vadot			mode-recovery = <0x1>;
522846c905SEmmanuel Vadot
532846c905SEmmanuel Vadot			pm8937_pwrkey: pwrkey {
542846c905SEmmanuel Vadot				compatible = "qcom,pm8941-pwrkey";
552846c905SEmmanuel Vadot				interrupts = <0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
562846c905SEmmanuel Vadot				debounce = <15625>;
572846c905SEmmanuel Vadot				bias-pull-up;
582846c905SEmmanuel Vadot				linux,code = <KEY_POWER>;
592846c905SEmmanuel Vadot			};
602846c905SEmmanuel Vadot
612846c905SEmmanuel Vadot			pm8937_resin: resin {
622846c905SEmmanuel Vadot				compatible = "qcom,pm8941-resin";
632846c905SEmmanuel Vadot				interrupts = <0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
642846c905SEmmanuel Vadot				debounce = <15625>;
652846c905SEmmanuel Vadot				bias-pull-up;
662846c905SEmmanuel Vadot				status = "disabled";
672846c905SEmmanuel Vadot			};
682846c905SEmmanuel Vadot		};
692846c905SEmmanuel Vadot
702846c905SEmmanuel Vadot		pm8937_gpios: gpio@c000 {
712846c905SEmmanuel Vadot			compatible = "qcom,pm8937-gpio", "qcom,spmi-gpio";
722846c905SEmmanuel Vadot			reg = <0xc000>;
732846c905SEmmanuel Vadot			gpio-controller;
742846c905SEmmanuel Vadot			gpio-ranges = <&pm8937_gpios 0 0 8>;
752846c905SEmmanuel Vadot			#gpio-cells = <2>;
762846c905SEmmanuel Vadot			interrupt-controller;
772846c905SEmmanuel Vadot			#interrupt-cells = <2>;
782846c905SEmmanuel Vadot		};
792846c905SEmmanuel Vadot
802846c905SEmmanuel Vadot		pm8937_mpps: mpps@a000 {
812846c905SEmmanuel Vadot			compatible = "qcom,pm8937-mpp", "qcom,spmi-mpp";
822846c905SEmmanuel Vadot			reg = <0xa000>;
832846c905SEmmanuel Vadot			gpio-controller;
842846c905SEmmanuel Vadot			gpio-ranges = <&pm8937_mpps 0 0 4>;
852846c905SEmmanuel Vadot			#gpio-cells = <2>;
862846c905SEmmanuel Vadot			interrupt-controller;
872846c905SEmmanuel Vadot			#interrupt-cells = <2>;
882846c905SEmmanuel Vadot		};
892846c905SEmmanuel Vadot
902846c905SEmmanuel Vadot		pm8937_temp: temp-alarm@2400 {
912846c905SEmmanuel Vadot			compatible = "qcom,spmi-temp-alarm";
922846c905SEmmanuel Vadot			reg = <0x2400>;
932846c905SEmmanuel Vadot			interrupts = <0 0x24 0 IRQ_TYPE_EDGE_RISING>;
942846c905SEmmanuel Vadot			io-channels = <&pm8937_vadc VADC_DIE_TEMP>;
952846c905SEmmanuel Vadot			io-channel-names = "thermal";
962846c905SEmmanuel Vadot			#thermal-sensor-cells = <0>;
972846c905SEmmanuel Vadot		};
982846c905SEmmanuel Vadot
992846c905SEmmanuel Vadot		pm8937_vadc: adc@3100 {
1002846c905SEmmanuel Vadot			compatible = "qcom,spmi-vadc";
1012846c905SEmmanuel Vadot			reg = <0x3100>;
1022846c905SEmmanuel Vadot			interrupts = <0 0x31 0 IRQ_TYPE_EDGE_RISING>;
1032846c905SEmmanuel Vadot			#address-cells = <1>;
1042846c905SEmmanuel Vadot			#size-cells = <0>;
1052846c905SEmmanuel Vadot			#io-channel-cells = <1>;
1062846c905SEmmanuel Vadot
1072846c905SEmmanuel Vadot			channel@8 {
1082846c905SEmmanuel Vadot				reg = <VADC_DIE_TEMP>;
1092846c905SEmmanuel Vadot			};
1102846c905SEmmanuel Vadot
1112846c905SEmmanuel Vadot			channel@9 {
1122846c905SEmmanuel Vadot				reg = <VADC_REF_625MV>;
1132846c905SEmmanuel Vadot			};
1142846c905SEmmanuel Vadot
1152846c905SEmmanuel Vadot			channel@a {
1162846c905SEmmanuel Vadot				reg = <VADC_REF_1250MV>;
1172846c905SEmmanuel Vadot			};
1182846c905SEmmanuel Vadot
1192846c905SEmmanuel Vadot			channel@c {
1202846c905SEmmanuel Vadot				reg = <VADC_SPARE1>;
1212846c905SEmmanuel Vadot			};
1222846c905SEmmanuel Vadot
1232846c905SEmmanuel Vadot			channel@e {
1242846c905SEmmanuel Vadot				reg = <VADC_GND_REF>;
1252846c905SEmmanuel Vadot			};
1262846c905SEmmanuel Vadot
1272846c905SEmmanuel Vadot			channel@f {
1282846c905SEmmanuel Vadot				reg = <VADC_VDD_VADC>;
1292846c905SEmmanuel Vadot			};
1302846c905SEmmanuel Vadot		};
1312846c905SEmmanuel Vadot
1322846c905SEmmanuel Vadot		rtc@6000 {
1332846c905SEmmanuel Vadot			compatible = "qcom,pm8941-rtc";
1342846c905SEmmanuel Vadot			reg = <0x6000>, <0x6100>;
1352846c905SEmmanuel Vadot			reg-names = "rtc", "alarm";
1362846c905SEmmanuel Vadot			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
1372846c905SEmmanuel Vadot		};
1382846c905SEmmanuel Vadot	};
1392846c905SEmmanuel Vadot
1402846c905SEmmanuel Vadot	pmic@1 {
1412846c905SEmmanuel Vadot		compatible = "qcom,pm8937", "qcom,spmi-pmic";
1422846c905SEmmanuel Vadot		reg = <0x1 SPMI_USID>;
1432846c905SEmmanuel Vadot		#address-cells = <1>;
1442846c905SEmmanuel Vadot		#size-cells = <0>;
1452846c905SEmmanuel Vadot
146*ae5de77eSEmmanuel Vadot		pm8937_pwm: pwm {
147*ae5de77eSEmmanuel Vadot			compatible = "qcom,pm8937-pwm", "qcom,pm8916-pwm";
148*ae5de77eSEmmanuel Vadot
149*ae5de77eSEmmanuel Vadot			#pwm-cells = <2>;
150*ae5de77eSEmmanuel Vadot
151*ae5de77eSEmmanuel Vadot			status = "disabled";
152*ae5de77eSEmmanuel Vadot		};
153*ae5de77eSEmmanuel Vadot
1542846c905SEmmanuel Vadot		pm8937_spmi_regulators: regulators {
1552846c905SEmmanuel Vadot			compatible = "qcom,pm8937-regulators";
1562846c905SEmmanuel Vadot		};
1572846c905SEmmanuel Vadot	};
1582846c905SEmmanuel Vadot};
159