Skip to content

arm64: dts: qcom: shikra: Add PMIC thermal and ADC support#888

Open
kotarake wants to merge 1 commit intoqualcomm-linux:early/hwe/shikra/dtfrom
kotarake:shikra-dt
Open

arm64: dts: qcom: shikra: Add PMIC thermal and ADC support#888
kotarake wants to merge 1 commit intoqualcomm-linux:early/hwe/shikra/dtfrom
kotarake:shikra-dt

Conversation

@kotarake
Copy link
Copy Markdown
Contributor

@kotarake kotarake commented Apr 6, 2026

Add PMIC topic overlay changes for Shikra SOM variants (CQM, CQS, IQS):

  • Add pm4125 temp-alarm and VADC channel nodes
  • Add pm8005 temp-alarm node
  • Add thermal zones for PMIC and system thermistors
  • Add GPIO key (volume up) bindings
  • Add ADC thermal bridge nodes for pa/quiet/msm thermistors
  • Disable pm8005 regulators across SOM variants

@Komal-Bajaj Komal-Bajaj force-pushed the early/hwe/shikra/dt branch from 74255bb to 16980ad Compare April 8, 2026 06:06
@kotarake kotarake force-pushed the shikra-dt branch 3 times, most recently from bcde924 to a057960 Compare April 8, 2026 11:44
};

channel@2a {
reg = <ADC5_BAT_THERM_30K_PU>;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can remove the channels with these channel numbers:

ADC5_BAT_THERM_30K_PU
ADC5_BAT_THERM_100K_PU
ADC5_BAT_THERM_400K_PU
ADC5_PARALLEL_ISENSE

Because these are not present in the mapping table in the ADC driver I see upstream, so their scaling functions will not be supported right now.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

pm8005_tz: temp-alarm@2400 {
compatible = "qcom,spmi-temp-alarm";
reg = <0x2400>;
interrupts = <0x0 0x24 0x0 IRQ_TYPE_EDGE_BOTH>;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The SID is 4, not 0

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update in next patch

};

&pm4125_resin {
linux,code = <KEY_VOLUMEUP>;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be KEY_VOLUMEDOWN

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update in next patch-set

gpios = <&pm4125_gpios 9 GPIO_ACTIVE_LOW>;
linux,input-type = <1>;
linux,code = <KEY_VOLUMEUP>;
gpio-key,wakeup;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think "gpio-key,wakeup" does not exist.....should this be wakeup-source ?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update in next patch-set

pinctrl-names = "default";

channel@56 {
reg = <ADC5_GPIO5_100K_PU>;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

GPIOs 5 and 6 of Cocos have channel numbers 0x54 and 0x55, which are ADC5_GPIO3_100K_PU and ADC5_GPIO4_100K_PU

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update in next patch-set

};

&pm8150_adc_tm {
status = "okay";
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check the indentation for this line

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done

sys-therm-3 {
polling-delay-passive = <2000>;
polling-delay = <0>;
thermal-sensors = <&pm8150_adc_tm 3>;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be <&pm8150_adc_tm 2>; ? Because the adctm reg properties above have values 0, 1 and 2.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

update in next patch-set


&thermal_zones {
sys-therm-1 {
polling-delay-passive = <2000>;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this polling delay value correct? I think it is not needed for ADC_TM thermistors

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removed the polling delay values

Add PMIC topic overlay changes for Shikra SOM variants (CQM, CQS, IQS):
- Add pm4125 temp-alarm and VADC channel nodes
- Add pm8005 temp-alarm node
- Add thermal zones for PMIC and system thermistors
- Add GPIO key (volume up) bindings
- Add ADC thermal bridge nodes for pa/quiet/msm thermistors
- Disable pm8005 regulators across SOM variants
- Switch SPMI interrupt to MPM edge-triggered

Signed-off-by: Rakesh Kota <rakesh.kota@oss.qualcomm.com>
qcom,hw-settle-time = <200>;
qcom,pre-scaling = <1 1>;
};

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove extra line


pa-therm@0 {
reg = <0>;
io-channels = <&pm8150_adc ADC5_GPIO4_100K_PU>;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is an extra space between &pm8150_adc and ADC5_GPIO4_100K_PU, remove it

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants