move thermals to its own file, update status of thermals
This commit is contained in:
parent
2628d3d541
commit
fc449f9e00
3 changed files with 189 additions and 190 deletions
|
|
@ -28,7 +28,7 @@ Some notes on my work getting Mobian to run on the Xperia 10 III (codename pdx21
|
|||
| RTC | ✅ | ✅ | [yes, needs review](https://lore.kernel.org/all/20260926-pdx213-upstream-3-v1-0-1609c18b5c1d@erebion.eu/) |
|
||||
| Sound | to do | | |
|
||||
| SMS | should work when modem is up, needs testing | | |
|
||||
| Thermals | wip | | |
|
||||
| Thermals | ✅ | | |
|
||||
| Touch | ✅ | was already part of upstream | - |
|
||||
| UFS | broken, need help | | |
|
||||
| USB-C | idk, USB networking works, need to check whether host mode works by plugging in at least a USB stick | | |
|
||||
|
|
@ -56,6 +56,8 @@ Further detail on some components can be found in the `notes` folder in this rep
|
|||
|
||||
My working branch: https://salsa.debian.org/erebion/linux/-/tree/erebion/pdx213-wip
|
||||
|
||||
Please note that I'm not keeping this branch up to date with the latest kernel versions or fixes. I rarely update, as I don't want a moving target while debugging.
|
||||
|
||||
The plan is to submit all my patches to https://github.com/sm6350-mainline/linux and to then upstream them to the kernel.
|
||||
|
||||
Note: I'm rebasing occasionally to make sure it does not become too chaotic, so pulling from that repo will lead to merge conflicts.
|
||||
|
|
|
|||
|
|
@ -1,192 +1,3 @@
|
|||
# Downstream.. things
|
||||
|
||||
A lot of things here might be called "stuff" or "things" because I don't know the right term.
|
||||
|
||||
## 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 | no, getting -40 degrees (celsius?) |
|
||||
| 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 | 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
|
||||
|
||||
```
|
||||
&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 | no, something is wrong |
|
||||
|
||||
Table complete from downstram DT: yes
|
||||
|
||||
## Components
|
||||
|
||||
Some interesting compatible strings in the downstram device tree.
|
||||
|
|
|
|||
186
notes/thermals.md
Normal file
186
notes/thermals.md
Normal file
|
|
@ -0,0 +1,186 @@
|
|||
# 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
|
||||
Loading…
Reference in a new issue