# Thermal Zones and ADC stuff Thermal zones marked as not working should work with this patch applied: https://lore.kernel.org/all/20260724-adc-tm5-drop-iio-val-int-check-v1-1-0b85a0895dd7@oss.qualcomm.com/#t ## ADC stuff Relevant docs: - include/dt-bindings/iio/qcom,spmi-vadc.h ### pm6150l #### pm6150l@4 ##### pm6150l_adc (adc@3100) | 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 | yes | | msm_therm | 0x4e | | yes | yes | sdm-skin-thermal | | | pa_therm1 | 0x4f | pa-therm0 | yes | yes | pa0-thermal | yes | | get_stageid_adc | 0x52 | | | | | | | rfc_cam_therm | 0x53 | rear-cam-sensor | yes | yes | rear-cam-thermal | yes | | rear_cam_flash_therm | 0x54 | rear-cam-flash-therm | yes | yes | rfc-flash-thermal | yes | | quiet_therm | 0x55 | quiet-therm | yes | yes | quiet-thermal | yes | 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 | gpio7 | | | quiet-therm | 0x55 | gpio4 (should it be gpio10? is that just what downstream calls it?) | | Table complete from downstram DT: yes There's no gpio10 in `include/dt-bindings/iio/qcom,spmi-vadc.h` and I'm not sure how to define it... ##### ? (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 | 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 ``` &pm7250b_vbus { regulator-min-microamp = <500000>; regulator-max-microamp = <1500000>; status = "okay"; }; ``` #### 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 | yes | | conn_therm | 0x4f | | yes | yes | conn-thermal | yes | | 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 | | ------------------ | ---- | ------------- | | charger_skin_therm | 0x4d | | | conn_therm | 0x4f | | 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>; qcom,vibrator@5300 { compatible = "qcom,qpnp-vibrator-ldo"; reg = <0x5300 0x100>; qcom,vib-ldo-volt-uv = <0x2dc6c0>; qcom,disable-overdrive; phandle = <0x307>; }; }; ``` so... this is where the vibrator is ### pm8008 #### pm8008@9 Contains regulators, downstream calls them `qcom,pm8008-regulator` - Downstram compatible string: `qcom,pm8008-regulator` - Upstream compatible string: ? Regulators are: | downstream name | upstream name | | --------------- | ------------ | | pm8008_en-supply | | | 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 | yes | 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 | yes | Table complete from downstram DT: yes