xref: /freebsd/sys/contrib/device-tree/src/arm64/qcom/pm8953.dtsi (revision 5ca8e32633c4ffbbcd6762e5888b6a4ba0708c6c)
1// SPDX-License-Identifier: BSD-3-Clause
2/* Copyright (c) 2022, The Linux Foundation. All rights reserved. */
3
4#include <dt-bindings/iio/qcom,spmi-vadc.h>
5#include <dt-bindings/interrupt-controller/irq.h>
6#include <dt-bindings/input/linux-event-codes.h>
7#include <dt-bindings/spmi/spmi.h>
8
9&spmi_bus {
10	pmic@0 {
11		compatible = "qcom,pm8953", "qcom,spmi-pmic";
12		reg = <0 SPMI_USID>;
13		#address-cells = <1>;
14		#size-cells = <0>;
15
16		pm8953_pon: pon@800 {
17			compatible = "qcom,pm8916-pon";
18			reg = <0x800>;
19			mode-bootloader = <0x2>;
20			mode-recovery = <0x1>;
21
22			pwrkey {
23				compatible = "qcom,pm8941-pwrkey";
24				interrupts = <0x00 0x08 0 IRQ_TYPE_EDGE_BOTH>;
25				debounce = <15625>;
26				bias-pull-up;
27				linux,code = <KEY_POWER>;
28			};
29
30			pm8953_resin: resin {
31				compatible = "qcom,pm8941-resin";
32				interrupts = <0x00 0x08 1 IRQ_TYPE_EDGE_BOTH>;
33				debounce = <15625>;
34				bias-pull-up;
35				status = "disabled";
36			};
37		};
38
39		temp-alarm@2400 {
40			compatible = "qcom,spmi-temp-alarm";
41			reg = <0x2400>;
42			interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_RISING>;
43			io-channels = <&pm8953_vadc VADC_DIE_TEMP>;
44			io-channel-names = "thermal";
45			#thermal-sensor-cells = <0>;
46		};
47
48		pm8953_vadc: adc@3100 {
49			compatible = "qcom,spmi-vadc";
50			reg = <0x3100>;
51			interrupts = <0x00 0x31 0x00 0x01>;
52			#address-cells = <1>;
53			#size-cells = <0>;
54			#io-channel-cells = <1>;
55
56			adc-chan@8 {
57				reg = <VADC_DIE_TEMP>;
58			};
59			adc-chan@9 {
60				reg = <VADC_REF_625MV>;
61			};
62			adc-chan@a {
63				reg = <VADC_REF_1250MV>;
64			};
65			adc-chan@c {
66				reg = <VADC_SPARE1>;
67			};
68			adc-chan@e {
69				reg = <VADC_GND_REF>;
70			};
71			adc-chan@f {
72				reg = <VADC_VDD_VADC>;
73			};
74		};
75
76		rtc@6000 {
77			compatible = "qcom,pm8941-rtc";
78			reg = <0x6000>, <0x6100>;
79			reg-names = "rtc", "alarm";
80			interrupts = <0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
81		};
82
83		pm8953_gpios: gpio@c000 {
84			compatible = "qcom,pm8953-gpio", "qcom,spmi-gpio";
85			reg = <0xc000>;
86			gpio-controller;
87			gpio-ranges = <&pm8953_gpios 0 0 8>;
88			#gpio-cells = <2>;
89			interrupt-controller;
90			#interrupt-cells = <2>;
91		};
92	};
93
94	pmic@1 {
95		compatible = "qcom,pm8953", "qcom,spmi-pmic";
96		reg = <1 SPMI_USID>;
97		#address-cells = <1>;
98		#size-cells = <0>;
99	};
100};
101