xref: /linux/arch/arm64/boot/dts/qcom/pm4125.dtsi (revision 24168c5e6dfbdd5b414f048f47f75d64533296ca)
1// SPDX-License-Identifier: (GPL-2.0+ OR BSD-3-Clause)
2/*
3 * Copyright (c) 2023, Linaro Ltd
4 */
5
6#include <dt-bindings/iio/qcom,spmi-vadc.h>
7#include <dt-bindings/input/input.h>
8#include <dt-bindings/interrupt-controller/irq.h>
9#include <dt-bindings/spmi/spmi.h>
10
11&spmi_bus {
12	pmic@0 {
13		compatible = "qcom,pm2250", "qcom,spmi-pmic";
14		reg = <0x0 SPMI_USID>;
15		#address-cells = <1>;
16		#size-cells = <0>;
17
18		pon@800 {
19			compatible = "qcom,pm8916-pon";
20			reg = <0x800>;
21
22			pm4125_pwrkey: pwrkey {
23				compatible = "qcom,pm8941-pwrkey";
24				interrupts-extended = <&spmi_bus 0x0 0x8 0 IRQ_TYPE_EDGE_BOTH>;
25				linux,code = <KEY_POWER>;
26				debounce = <15625>;
27				bias-pull-up;
28			};
29
30			pm4125_resin: resin {
31				compatible = "qcom,pm8941-resin";
32				interrupts-extended = <&spmi_bus 0x0 0x8 1 IRQ_TYPE_EDGE_BOTH>;
33				debounce = <15625>;
34				bias-pull-up;
35				status = "disabled";
36			};
37		};
38
39		pm4125_vbus: usb-vbus-regulator@1100 {
40			compatible = "qcom,pm4125-vbus-reg", "qcom,pm8150b-vbus-reg";
41			reg = <0x1100>;
42			status = "disabled";
43		};
44
45		pm4125_typec: typec@1500 {
46			compatible = "qcom,pm4125-typec", "qcom,pmi632-typec";
47			reg = <0x1500>;
48			interrupts = <0x0 0x15 0x00 IRQ_TYPE_EDGE_RISING>,
49				     <0x0 0x15 0x01 IRQ_TYPE_EDGE_BOTH>,
50				     <0x0 0x15 0x02 IRQ_TYPE_EDGE_RISING>,
51				     <0x0 0x15 0x03 IRQ_TYPE_EDGE_BOTH>,
52				     <0x0 0x15 0x04 IRQ_TYPE_EDGE_RISING>,
53				     <0x0 0x15 0x05 IRQ_TYPE_EDGE_RISING>,
54				     <0x0 0x15 0x06 IRQ_TYPE_EDGE_BOTH>,
55				     <0x0 0x15 0x07 IRQ_TYPE_EDGE_RISING>;
56			interrupt-names = "or-rid-detect-change",
57					  "vpd-detect",
58					  "cc-state-change",
59					  "vconn-oc",
60					  "vbus-change",
61					  "attach-detach",
62					  "legacy-cable-detect",
63					  "try-snk-src-detect";
64			vdd-vbus-supply = <&pm4125_vbus>;
65
66			status = "disabled";
67		};
68
69		rtc@6000 {
70			compatible = "qcom,pm8941-rtc";
71			reg = <0x6000>, <0x6100>;
72			reg-names = "rtc", "alarm";
73			interrupts-extended = <&spmi_bus 0x0 0x61 0x1 IRQ_TYPE_EDGE_RISING>;
74		};
75
76		pm4125_gpios: gpio@c000 {
77			compatible = "qcom,pm2250-gpio", "qcom,spmi-gpio";
78			reg = <0xc000>;
79			gpio-controller;
80			gpio-ranges = <&pm4125_gpios 0 0 10>;
81			#gpio-cells = <2>;
82			interrupt-controller;
83			#interrupt-cells = <2>;
84		};
85	};
86
87	pmic@1 {
88		compatible = "qcom,pm2250", "qcom,spmi-pmic";
89		reg = <0x1 SPMI_USID>;
90		#address-cells = <1>;
91		#size-cells = <0>;
92	};
93};
94