thermal stuff...

This commit is contained in:
erebion 2026-10-03 19:01:54 +02:00
commit d153b4fdbb

View file

@ -1,171 +1,189 @@
# Downstream.. things # Downstream.. things
I really don't know what the stuff collected here is called. A lot of things here might be called "stuff" or "things" because I don't know the right term.
## Table with a lot of hex numbers ## Thermal Zones and ADC stuff
| channel | downstream | upstream | ### ADC stuff
| ------- | ---------- | -------- |
| 0x35 0x00 | pm7250b-ibat-lvl0 | |
| 0x35 0x01 | pm7250b-ibat-lvl1 | |
| 0x35 0x02 | pm7250b-vbat-lvl0 | |
| 0x35 0x03 | pm7250b-vbat-lvl1 | |
| 0x35 0x04 | pm7250b-vbat-lvl2 | |
| 0x35 0x05 | pm7250b-bcl-lvl0 | |
| 0x35 0x06 | pm7250b-bcl-lvl1 | |
| 0x35 0x07 | pm7250b-bcl-lvl2 | |
| 0x38 0x02 | pm6150l-vph-lvl0 | |
| 0x38 0x03 | pm6150l-vph-lvl1 | |
| 0x38 0x04 | pm6150l-vph-lvl2 | |
| 0x38 0x05 | pm6150l-bcl-lvl0 | |
| 0x38 0x06 | pm6150l-bcl-lvl1 | |
| 0x38 0x07 | pm6150l-bcl-lvl2 | |
| 0x39 0x00 | modem-lte-sub6-pa1 | |
| 0x39 0x01 | modem-lte-sub6-pa2 | |
| 0x39 0x05 | modem-0-usr | |
| 0x39 0x06 | modem-mmw0-usr | |
| 0x39 0x07 | modem-mmw1-usr | |
| 0x39 0x08 | modem-mmw2-usr | |
| 0x39 0x09 | modem-mmw3-usr | |
| 0x39 0x0a | modem-skin-usr | |
| 0x39 0x0d | modem-streamer-usr | |
| 0x39 0x0e | modem-mmw0-mod-usr | |
| 0x39 0x0f | modem-mmw1-mod-usr | |
| 0x39 0x10 | modem-mmw2-mod-usr | |
| 0x39 0x11 | modem-mmw3-mod-usr | |
| 0x39 0x17 | modem-wifi-usr | |
| 0x39 0x18 | modem-ambient-usr | |
| 0x39 0x19 | modem-1-usr | |
| 0x39 0x1a | modem-mmw-pa1-usr | |
| 0x39 0x1b | modem-mmw-pa2-usr | |
| 0x39 0x1c | modem-mmw-pa3-usr | |
| 0x3a 0x00 | aoss-0-usr | |
| 0x3a 0x01 | cpu-0-0-step | |
| 0x3a 0x01 | cpu-0-0-usr | |
| 0x3a 0x02 | cpu-0-1-step | |
| 0x3a 0x02 | cpu-0-1-usr | |
| 0x3a 0x03 | cpu-0-2-step | |
| 0x3a 0x03 | cpu-0-2-usr | |
| 0x3a 0x04 | cpu-0-3-step | |
| 0x3a 0x04 | cpu-0-3-usr | |
| 0x3a 0x05 | cpu-0-4-step | |
| 0x3a 0x05 | cpu-0-4-usr | |
| 0x3a 0x06 | cpu-0-5-step | |
| 0x3a 0x06 | cpu-0-5-usr | |
| 0x3a 0x07 | cpuss-0-usr | |
| 0x3a 0x08 | cpuss-1-usr | |
| 0x3a 0x09 | cpu-1-0-step | |
| 0x3a 0x09 | cpu-1-0-usr | |
| 0x3a 0x0a | cpu-1-1-step | |
| 0x3a 0x0a | cpu-1-1-usr | |
| 0x3a 0x0b | cpu-1-2-step | |
| 0x3a 0x0b | cpu-1-2-usr | |
| 0x3a 0x0c | cpu-1-3-step | |
| 0x3a 0x0c | cpu-1-3-usr | |
| 0x3a 0x0d | gpuss-0-usr | |
| 0x3a 0x0e | gpuss-1-usr | |
| 0x3a 0x10 | min-temp-0-lowc | |
| 0x3a 0x10 | min-temp-0-lowf | |
| 0x3b 0x00 | aoss-1-usr | |
| 0x3b 0x01 | cwlan-usr | |
| 0x3b 0x02 | audio-usr | |
| 0x3b 0x03 | ddr-usr | |
| 0x3b 0x04 | q6-hvx-step | |
| 0x3b 0x04 | q6-hvx-usr | |
| 0x3b 0x05 | camera-usr | |
| 0x3b 0x06 | mdm-core-0-usr | |
| 0x3b 0x07 | mdm-core-1-usr | |
| 0x3b 0x08 | mdm-vec-usr | |
| 0x3b 0x09 | mdm-scl-usr | |
| 0x3b 0x0a | npu-step | |
| 0x3b 0x0a | npu-usr | |
| 0x3b 0x0b | video-usr | |
| 0x3b 0x10 | min-temp-1-lowc | |
| 0x3b 0x10 | min-temp-1-lowf | |
| 0x58 0x4d | chg-skin-therm-usr | |
| 0x58 0x4f | conn-therm-usr | |
| 0x59 0x4e | msm-therm-usr | |
| 0x59 0x4e | sdm-skin-therm-usr | |
| 0x59 0x53 | rfc-cam-pa3-usr | |
| 0x5a 0x4d | pa-therm1-usr | pa_therm_1 (not yet added) |
| 0x5a 0x4f | pa-therm0-usr | pa_therm_0 (not yet added) |
| 0x5a 0x54 | camera-therm-usr | downstream calls it camera-therm-usr, probably matches what is rear_cam_flash_therm for FP4? |
| 0x5a 0x55 | quiet-therm-step | quiet_therm (not yet added) |
| 0x5a 0x55 | quiet-therm-usr | quiet_therm (not yet added) |
| 0x5b 0x644 | xo-therm-usr | |
### even more hex numbers Relevant docs:
| hex | name | - include/dt-bindings/iio/qcom,spmi-vadc.h
| --- | ---- |
| 0x33 | pm6350_tz |
| 0x34 | pm7250b-tz |
| 0x36 | soc |
| 0x37 | pm6150l-tz |
## that tm thing with "@" #### pm6150l
Someone really needs to tell me how those things are called, not knowing the right term makes it all much more complicated. ##### pm6150l@4
Also, why are there multiple adc_tm@3400 in the downstream Device Tree..? ###### pm6150l_adc (adc@3100)
Example: | downstram name | reg- | upstream name | need to add | added? | corresponding thermal zone | can get value from corresponding thermal zone |
| -------------------- | ---- | -------------------- | ----------- | ------ | -------------------------- | --------------------------------------------- |
| ref_gnd | 0x00 | | | | | |
| vref_1p25 | 0x01 | | | | | |
| die_temp | 0x06 | | | | | |
| vph_pwr | 0x83 | | | | | |
| pa_therm2 | 0x4d | pa-therm1 | yes | yes | pa1-thermal | no, something is wrong |
| msm_therm | 0x4e | | yes | yes | sdm-skin-thermal | |
| pa_therm1 | 0x4f | pa-therm0 | yes | yes | pa0-thermal | no, something is wrong |
| get_stageid_adc | 0x52 | | | | | |
| rfc_cam_therm | 0x53 | rear-cam-sensor | yes | yes | rear-cam-thermal | no, getting -40 degrees (celsius?) |
| rear_cam_flash_therm | 0x54 | rear-cam-flash-therm | yes | yes | rfc-flash-thermal | no, something is wrong |
| quiet_therm | 0x55 | quiet-therm | yes | yes | quiet-thermal | no, something is wrong |
Table complete from downstram DT: yes
###### pm6150l_adc_tm (adc-tm@3500)
compatible string: `qcom,adc-tm5`
| downstram name | reg | gpio | upstream name |
| -------------------- | ---- | ----- |-------------- |
| pa-therm1 | 0x4d | n/a | |
| pa-therm0 | 0x4f | n/a | |
| rear-cam-flash-therm | 0x54 | gpio3 (should it be gpio7?) | |
| quiet-therm | 0x55 | gpio4 (should it be gpio10?) | |
Table complete from downstram DT: yes
###### ? (adc-tm@3400)
this one is not defined in pm6150l.dtsi!
compatible string: `qcom,adc-tm5-iio`
| downstram name | reg | gpio | upstream name |
| -------------- | --- | ---- | ------------- |
| msm_therm | 0x4e | n/a | |
| rfc_cam_therm | 0x53 | gpio2 (should it be gpio6?) | rear_cam_therm |
Table complete from downstram DT: yes
##### pm6150l@5
Flash LED (added), Tri-LED (above screen, probably needs to be added), AMOLED regulator (does this need to be added?)
#### pm7250b
``` ```
adc_tm@3400 { &pm7250b_vbus {
compatible = "qcom,adc-tm7"; regulator-min-microamp = <500000>;
reg = <0x3400>; regulator-max-microamp = <1500000>;
interrupts = <0x06 0x34 0x00 0x01>;
interrupt-names = "thr-int-en"; status = "okay";
#address-cells = <0x01>; };
```
##### pm7250b@2
Need to find value in downstream device tree...
###### pm7250b_adc (adc@3100)
- downsteam compatible string: `qcom,spmi-adc5`
- upstream compatible string: ?
| downstram name | reg | upstream name | need to add | added? | corresponding thermal zone | can get value from thermal zone |
| ------------------ | --- | ------------- | | | | |
| ref_gnd@0 | 0x00 | | | | | |
| vref_1p25@1 | 0x01 | | | | | |
| die_temp@2 | 0x06 | | | | | |
| usb_in_i_uv@7 | 0x07 | | | | | |
| usb_in_v_div_16@8 | 0x08 | | | | | |
| chg_tmp@9 | 0x09 | | | | | |
| smb1390_therm@e | 0x0e | | | | | |
| mid_chg_div6@1e | 0x1e | | | | | |
| bat_therm_30k@2a | 0x2a | | | | | |
| bat_therm@4a | 0x4a | | | | | |
| bat_id@4b | 0x4b | | | | | |
| charger_skin_therm | 0x4d | | yes | yes | chg-skin-thermal | no, something is wrong |
| conn_therm | 0x4f | | yes | yes | conn-thermal | no, something is wrong |
| bat_therm_400k@6a | 0x6a | | | | | |
| vph_pwr@83 | 0x83 | | | | | |
| vbat_sns@84 | 0x84 | | | | | |
| chg_sbux@99 | 0x99 | | | | | |
| v_i_int_ext@b0 | 0xb0 | | | | | |
| v_i_parallel@b0 | 0xb4 | | | | | |
Table complete from downstram DT: yes
###### pm7250b_adc_tm (adc-tm@3500)
| downstram name | reg | upstream name | need to add | added? | corresponding thermal zone | can get value from thermal zone |
| ------------------ | ---- | ------------- | ----------- | ------ | -------------------------- | ------------------------------- |
| charger_skin_therm | 0x4d | | yes | yes | | no, something is wrong |
| conn_therm | 0x4f | | yes | yes | | no, something is wrong |
Table complete from downstram DT: yes
#### pm7250b@3
Downstream:
```
qcom,pm7250b@3 {
compatible = "qcom,spmi-pmic";
reg = <0x03 0x00>;
#address-cells = <0x02>;
#size-cells = <0x00>; #size-cells = <0x00>;
#thermal-sensor-cells = <0x01>;
io-channels = <0x7f 0x644>;
phandle = <0x5b>;
xo_therm { qcom,vibrator@5300 {
reg = <0x644>; compatible = "qcom,qpnp-vibrator-ldo";
qcom,ratiometric; reg = <0x5300 0x100>;
qcom,hw-settle-time = <0xc8>; qcom,vib-ldo-volt-uv = <0x2dc6c0>;
qcom,disable-overdrive;
phandle = <0x307>;
}; };
}; };
``` ```
and so... this is where the vibrator is
``` #### pm8008
adc_tm@3400 {
compatible = "qcom,adc-tm5-iio";
reg = <0x3400 0x100>;
#thermal-sensor-cells = <0x01>;
#address-cells = <0x01>;
#size-cells = <0x00>;
io-channels = <0x7c 0x4e 0x7c 0x53>;
phandle = <0x59>;
msm_therm { ##### pm8008@9
reg = <0x4e>;
qcom,ratiometric;
qcom,hw-settle-time = <0xc8>;
};
rfc_cam_therm { Contains regulators, downstream calls them `qcom,pm8008-regulator`
reg = <0x53>;
qcom,ratiometric;
qcom,hw-settle-time = <0xc8>;
};
};
};
```
The `compatible` string differs. My understanding is that this defines what something is, but how can it be two things at the same time..? - Downstram compatible string: `qcom,pm8008-regulator`
- Upstream compatible string: ?
| which tm thing (compatible) | what is listed there | Regulators are:
| -------------- | -------------------- |
| adc_tm@3400 (qcom,adc-tm7) | xo_therm | | downstream name | upstream name |
| adc_tm@3400 (qcom,adc-tm5-iio) | msm_therm, rfc_cam_therm | | --------------- | ------------ |
| adc_tm@3500 (qcom,adc-tm5) | charger_skin_therm, conn_therm | | pm8008_en-supply | |
| adc_tm@3500 (qcom,adc-tm5) | pa_therm1, pa_therm0, rear_cam_flash_therm, quiet_therm | | vdd_l1_l2-supply | |
| vdd_l3_l4-supply | |
| vdd_l5-supply | |
| vdd_l6-supply | |
| vdd_l7-supply | |
Table complete from downstream DT: yes
#### pmk8350
Also: RTC
##### pmk8350@6
###### pmk8350_adc (adc@3100)
| downstram name | reg | upstream name | need to add | added? | corresponding thermal zone | can get value from thermal zone |
| ------------------ | ----- | ------------- | ----------- | ------ | -------------------------- | ------------------------------- |
| ref_gnd | 0x600 | | | | | |
| vref_1p25 | 0x601 | | | | | |
| die_temp | 0x603 | | | | | |
| xo_therm | 0x644 | | yes | yes | xo-thermal | no, something is wrong |
Table complete from downstram DT: yes
###### pmk8350_adc_tm (adc_tm@3400)
| downstram name | reg | gpio | upstream name | need to add | added? | corresponding thermal zone | can get value from thermal zone |
| ------------------ | ----- | ---- | ------------- | ----------- | ------ | -------------------------- | ------------------------------- |
| xo-therm | 0x644 | n/a | | yes | yes | xo-thermal | no, something is wrong |
Table complete from downstram DT: yes
## Components ## Components
@ -189,3 +207,4 @@ Some interesting compatible strings in the downstram device tree.
| qcom,wcd938x-slave | audio related | perhaps this [./Documentation/devicetree/bindings/sound/qcom,wcd938x-sdw.yaml](https://www.kernel.org/doc/Documentation/devicetree/bindings/sound/qcom,wcd938x-sdw.yaml) | | qcom,wcd938x-slave | audio related | perhaps this [./Documentation/devicetree/bindings/sound/qcom,wcd938x-sdw.yaml](https://www.kernel.org/doc/Documentation/devicetree/bindings/sound/qcom,wcd938x-sdw.yaml) |
| rohm,bu520x1nvx | hall sensor | none | | rohm,bu520x1nvx | hall sensor | none |
| sony,pn553-pm-ops | NFC controller | [./Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml](https://www.kernel.org/doc/Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml) | | sony,pn553-pm-ops | NFC controller | [./Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml](https://www.kernel.org/doc/Documentation/devicetree/bindings/net/nfc/nxp,nci.yaml) |
| qcom,qpnp-vibrator-ldo | Vibrator, model unknown, located at /soc/qcom,spmi@c440000/qcom,pm7250b@3/qcom,vibrator@5300 | ? |