File Index
Files and directories
Sign in
FILE

pm7250b.dtsi

File preview with syntax highlighting.

linux-6.19.14/arch/arm64/boot/dts/qcom/pm7250b.dtsi DEVICETREE
  1// SPDX-License-Identifier: BSD-3-Clause
  2/*
  3 * Copyright (C) 2022 Luca Weiss <luca.weiss@fairphone.com>
  4 */
  5
  6#include <dt-bindings/iio/qcom,spmi-vadc.h>
  7#include <dt-bindings/interrupt-controller/irq.h>
  8#include <dt-bindings/spmi/spmi.h>
  9
 10/ {
 11	thermal-zones {
 12		pm7250b-thermal {
 13			polling-delay-passive = <100>;
 14
 15			thermal-sensors = <&pm7250b_temp>;
 16
 17			trips {
 18				trip0 {
 19					temperature = <95000>;
 20					hysteresis = <0>;
 21					type = "passive";
 22				};
 23
 24				trip1 {
 25					temperature = <115000>;
 26					hysteresis = <0>;
 27					type = "hot";
 28				};
 29
 30				trip2 {
 31					temperature = <145000>;
 32					hysteresis = <0>;
 33					type = "critical";
 34				};
 35			};
 36		};
 37	};
 38};
 39
 40&spmi_bus {
 41	pmic@PM7250B_SID {
 42		compatible = "qcom,pm7250b", "qcom,spmi-pmic";
 43		reg = <PM7250B_SID SPMI_USID>;
 44		#address-cells = <1>;
 45		#size-cells = <0>;
 46
 47		pm7250b_vbus: usb-vbus-regulator@1100 {
 48			compatible = "qcom,pm7250b-vbus-reg", "qcom,pm8150b-vbus-reg";
 49			reg = <0x1100>;
 50			status = "disabled";
 51		};
 52
 53		pm7250b_typec: typec@1500 {
 54			compatible = "qcom,pm7250b-typec", "qcom,pm8150b-typec";
 55			reg = <0x1500>,
 56			      <0x1700>;
 57			interrupts = <PM7250B_SID 0x15 0x00 IRQ_TYPE_EDGE_RISING>,
 58				     <PM7250B_SID 0x15 0x01 IRQ_TYPE_EDGE_BOTH>,
 59				     <PM7250B_SID 0x15 0x02 IRQ_TYPE_EDGE_RISING>,
 60				     <PM7250B_SID 0x15 0x03 IRQ_TYPE_EDGE_BOTH>,
 61				     <PM7250B_SID 0x15 0x04 IRQ_TYPE_EDGE_RISING>,
 62				     <PM7250B_SID 0x15 0x05 IRQ_TYPE_EDGE_RISING>,
 63				     <PM7250B_SID 0x15 0x06 IRQ_TYPE_EDGE_BOTH>,
 64				     <PM7250B_SID 0x15 0x07 IRQ_TYPE_EDGE_RISING>,
 65				     <PM7250B_SID 0x17 0x00 IRQ_TYPE_EDGE_RISING>,
 66				     <PM7250B_SID 0x17 0x01 IRQ_TYPE_EDGE_RISING>,
 67				     <PM7250B_SID 0x17 0x02 IRQ_TYPE_EDGE_RISING>,
 68				     <PM7250B_SID 0x17 0x03 IRQ_TYPE_EDGE_RISING>,
 69				     <PM7250B_SID 0x17 0x04 IRQ_TYPE_EDGE_RISING>,
 70				     <PM7250B_SID 0x17 0x05 IRQ_TYPE_EDGE_RISING>,
 71				     <PM7250B_SID 0x17 0x06 IRQ_TYPE_EDGE_RISING>,
 72				     <PM7250B_SID 0x17 0x07 IRQ_TYPE_EDGE_RISING>;
 73			interrupt-names = "or-rid-detect-change",
 74					  "vpd-detect",
 75					  "cc-state-change",
 76					  "vconn-oc",
 77					  "vbus-change",
 78					  "attach-detach",
 79					  "legacy-cable-detect",
 80					  "try-snk-src-detect",
 81					  "sig-tx",
 82					  "sig-rx",
 83					  "msg-tx",
 84					  "msg-rx",
 85					  "msg-tx-failed",
 86					  "msg-tx-discarded",
 87					  "msg-rx-discarded",
 88					  "fr-swap";
 89			vdd-vbus-supply = <&pm7250b_vbus>;
 90			status = "disabled";
 91		};
 92
 93		pm7250b_temp: temp-alarm@2400 {
 94			compatible = "qcom,spmi-temp-alarm";
 95			reg = <0x2400>;
 96			interrupts = <PM7250B_SID 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
 97			io-channels = <&pm7250b_adc ADC5_DIE_TEMP>;
 98			io-channel-names = "thermal";
 99			#thermal-sensor-cells = <0>;
100		};
101
102		pm7250b_adc: adc@3100 {
103			compatible = "qcom,spmi-adc5";
104			reg = <0x3100>;
105			#address-cells = <1>;
106			#size-cells = <0>;
107			#io-channel-cells = <1>;
108			interrupts = <PM7250B_SID 0x31 0x0 IRQ_TYPE_EDGE_RISING>;
109
110			channel@0 {
111				reg = <ADC5_REF_GND>;
112				qcom,pre-scaling = <1 1>;
113				label = "ref_gnd";
114			};
115
116			channel@1 {
117				reg = <ADC5_1P25VREF>;
118				qcom,pre-scaling = <1 1>;
119				label = "vref_1p25";
120			};
121
122			channel@2 {
123				reg = <ADC5_DIE_TEMP>;
124				qcom,pre-scaling = <1 1>;
125				label = "die_temp";
126			};
127
128			channel@7 {
129				reg = <ADC5_USB_IN_I>;
130				qcom,pre-scaling = <1 1>;
131				label = "usb_in_i_uv";
132			};
133
134			channel@8 {
135				reg = <ADC5_USB_IN_V_16>;
136				qcom,pre-scaling = <1 16>;
137				label = "usb_in_v_div_16";
138			};
139
140			channel@9 {
141				reg = <ADC5_CHG_TEMP>;
142				qcom,pre-scaling = <1 1>;
143				label = "chg_temp";
144			};
145
146			channel@e {
147				reg = <ADC5_AMUX_THM2>;
148				qcom,hw-settle-time = <200>;
149				qcom,pre-scaling = <1 1>;
150				label = "smb1390_therm";
151			};
152
153			channel@1e {
154				reg = <ADC5_MID_CHG_DIV6>;
155				qcom,pre-scaling = <1 6>;
156				label = "chg_mid";
157			};
158
159			channel@4b {
160				reg = <ADC5_BAT_ID_100K_PU>;
161				qcom,hw-settle-time = <200>;
162				qcom,pre-scaling = <1 1>;
163				qcom,ratiometric;
164				label = "bat_id";
165			};
166
167			channel@83 {
168				reg = <ADC5_VPH_PWR>;
169				qcom,pre-scaling = <1 3>;
170				label = "vph_pwr";
171			};
172
173			channel@84 {
174				reg = <ADC5_VBAT_SNS>;
175				qcom,pre-scaling = <1 3>;
176				label = "vbat_sns";
177			};
178
179			channel@99 {
180				reg = <ADC5_SBUx>;
181				qcom,pre-scaling = <1 3>;
182				label = "chg_sbux";
183			};
184		};
185
186		pm7250b_adc_tm: adc-tm@3500 {
187			compatible = "qcom,spmi-adc-tm5";
188			reg = <0x3500>;
189			interrupts = <PM7250B_SID 0x35 0x0 IRQ_TYPE_EDGE_RISING>;
190			#thermal-sensor-cells = <1>;
191			#address-cells = <1>;
192			#size-cells = <0>;
193			status = "disabled";
194		};
195
196		pm7250b_gpios: gpio@c000 {
197			compatible = "qcom,pm7250b-gpio", "qcom,spmi-gpio";
198			reg = <0xc000>;
199			gpio-controller;
200			gpio-ranges = <&pm7250b_gpios 0 0 12>;
201			#gpio-cells = <2>;
202			interrupt-controller;
203			#interrupt-cells = <2>;
204		};
205	};
206
207	pmic@PM7250B_SID1 {
208		compatible = "qcom,pm7250b", "qcom,spmi-pmic";
209		reg = <PM7250B_SID1 SPMI_USID>;
210		#address-cells = <1>;
211		#size-cells = <0>;
212	};
213};
~/ Read-only file preview.