Skip to content

Commit 8cf636a

Browse files
lweiss-fairphoneandersson
authored andcommitted
arm64: dts: qcom: sm7225-fairphone-fp4: Add PM6150L thermals
Configure the thermals for the PA_THERM1, MSM_THERM, PA_THERM0, RFC_CAM_THERM, CAM_FLASH_THERM and QUIET_THERM thermistors connected to PM6150L. Due to hardware constraints we can only register 4 zones with pm6150l_adc_tm, the other 2 we can register via generic-adc-thermal. The trip points can really only be considered as placeholders, more configuration with cooling etc. can be added later. Signed-off-by: Luca Weiss <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Bjorn Andersson <[email protected]>
1 parent 4d37847 commit 8cf636a

File tree

1 file changed

+189
-0
lines changed

1 file changed

+189
-0
lines changed

arch/arm64/boot/dts/qcom/sm7225-fairphone-fp4.dts

Lines changed: 189 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,20 @@
9393
};
9494
};
9595

96+
msm_therm_sensor: thermal-sensor-msm {
97+
compatible = "generic-adc-thermal";
98+
#thermal-sensor-cells = <0>;
99+
io-channels = <&pm6150l_adc ADC5_AMUX_THM2_100K_PU>;
100+
io-channel-names = "sensor-channel";
101+
};
102+
103+
rear_cam_sensor: thermal-sensor-rear-cam {
104+
compatible = "generic-adc-thermal";
105+
#thermal-sensor-cells = <0>;
106+
io-channels = <&pm6150l_adc ADC5_GPIO2_100K_PU>;
107+
io-channel-names = "sensor-channel";
108+
};
109+
96110
thermal-zones {
97111
chg-skin-thermal {
98112
thermal-sensors = <&pm7250b_adc_tm 0>;
@@ -118,6 +132,30 @@
118132
};
119133
};
120134

135+
pa0-thermal {
136+
thermal-sensors = <&pm6150l_adc_tm 1>;
137+
138+
trips {
139+
active-config0 {
140+
temperature = <125000>;
141+
hysteresis = <1000>;
142+
type = "passive";
143+
};
144+
};
145+
};
146+
147+
pa1-thermal {
148+
thermal-sensors = <&pm6150l_adc_tm 0>;
149+
150+
trips {
151+
active-config0 {
152+
temperature = <125000>;
153+
hysteresis = <1000>;
154+
type = "passive";
155+
};
156+
};
157+
};
158+
121159
pm8008-thermal {
122160
polling-delay-passive = <100>;
123161
thermal-sensors = <&pm8008>;
@@ -137,6 +175,64 @@
137175
};
138176
};
139177

178+
quiet-thermal {
179+
thermal-sensors = <&pm6150l_adc_tm 3>;
180+
181+
trips {
182+
active-config0 {
183+
temperature = <125000>;
184+
hysteresis = <1000>;
185+
type = "passive";
186+
};
187+
};
188+
};
189+
190+
rear-cam-thermal {
191+
polling-delay-passive = <1000>;
192+
polling-delay = <5000>;
193+
thermal-sensors = <&rear_cam_sensor>;
194+
195+
trips {
196+
active-config0 {
197+
temperature = <125000>;
198+
hysteresis = <1000>;
199+
type = "passive";
200+
};
201+
};
202+
};
203+
204+
rfc-flash-thermal {
205+
thermal-sensors = <&pm6150l_adc_tm 2>;
206+
207+
trips {
208+
active-config0 {
209+
temperature = <125000>;
210+
hysteresis = <1000>;
211+
type = "passive";
212+
};
213+
};
214+
};
215+
216+
sdm-skin-thermal {
217+
polling-delay-passive = <1000>;
218+
polling-delay = <5000>;
219+
thermal-sensors = <&msm_therm_sensor>;
220+
221+
trips {
222+
trip0 {
223+
temperature = <45000>;
224+
hysteresis = <0>;
225+
type = "passive";
226+
};
227+
228+
trip1 {
229+
temperature = <55000>;
230+
hysteresis = <0>;
231+
type = "critical";
232+
};
233+
};
234+
};
235+
140236
xo-thermal {
141237
thermal-sensors = <&pmk8350_adc_tm 0>;
142238

@@ -596,6 +692,91 @@
596692
status = "okay";
597693
};
598694

695+
&pm6150l_adc {
696+
pinctrl-0 = <&pm6150l_adc_default>;
697+
pinctrl-names = "default";
698+
699+
channel@4d {
700+
reg = <ADC5_AMUX_THM1_100K_PU>;
701+
label = "pa_therm1";
702+
qcom,hw-settle-time = <200>;
703+
qcom,pre-scaling = <1 1>;
704+
qcom,ratiometric;
705+
};
706+
707+
channel@4e {
708+
reg = <ADC5_AMUX_THM2_100K_PU>;
709+
label = "msm_therm";
710+
qcom,hw-settle-time = <200>;
711+
qcom,pre-scaling = <1 1>;
712+
qcom,ratiometric;
713+
};
714+
715+
channel@4f {
716+
reg = <ADC5_AMUX_THM3_100K_PU>;
717+
label = "pa_therm0";
718+
qcom,hw-settle-time = <200>;
719+
qcom,pre-scaling = <1 1>;
720+
qcom,ratiometric;
721+
};
722+
723+
channel@53 {
724+
reg = <ADC5_GPIO2_100K_PU>;
725+
label = "rear_cam_therm";
726+
qcom,hw-settle-time = <200>;
727+
qcom,pre-scaling = <1 1>;
728+
qcom,ratiometric;
729+
};
730+
731+
channel@54 {
732+
reg = <ADC5_GPIO3_100K_PU>;
733+
label = "rear_cam_flash_therm";
734+
qcom,hw-settle-time = <200>;
735+
qcom,pre-scaling = <1 1>;
736+
qcom,ratiometric;
737+
};
738+
739+
channel@55 {
740+
reg = <ADC5_GPIO4_100K_PU>;
741+
label = "quiet_therm";
742+
qcom,hw-settle-time = <200>;
743+
qcom,pre-scaling = <1 1>;
744+
qcom,ratiometric;
745+
};
746+
};
747+
748+
&pm6150l_adc_tm {
749+
status = "okay";
750+
751+
pa-therm1@0 {
752+
reg = <0>;
753+
io-channels = <&pm6150l_adc ADC5_AMUX_THM1_100K_PU>;
754+
qcom,hw-settle-time-us = <200>;
755+
qcom,ratiometric;
756+
};
757+
758+
pa-therm0@1 {
759+
reg = <1>;
760+
io-channels = <&pm6150l_adc ADC5_AMUX_THM3_100K_PU>;
761+
qcom,hw-settle-time-us = <200>;
762+
qcom,ratiometric;
763+
};
764+
765+
rear-cam-flash-therm@2 {
766+
reg = <2>;
767+
io-channels = <&pm6150l_adc ADC5_GPIO3_100K_PU>;
768+
qcom,hw-settle-time-us = <200>;
769+
qcom,ratiometric;
770+
};
771+
772+
quiet-therm@3 {
773+
reg = <3>;
774+
io-channels = <&pm6150l_adc ADC5_GPIO4_100K_PU>;
775+
qcom,hw-settle-time-us = <200>;
776+
qcom,ratiometric;
777+
};
778+
};
779+
599780
&pm6150l_flash {
600781
status = "okay";
601782

@@ -618,6 +799,14 @@
618799
};
619800
};
620801

802+
&pm6150l_gpios {
803+
pm6150l_adc_default: adc-default-state {
804+
pins = "gpio6", "gpio7", "gpio10";
805+
function = PMIC_GPIO_FUNC_NORMAL;
806+
bias-high-impedance;
807+
};
808+
};
809+
621810
&pm6150l_wled {
622811
qcom,switching-freq = <800>;
623812
qcom,current-limit-microamp = <20000>;

0 commit comments

Comments
 (0)