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
Comment thread arch/arm64/boot/dts/qcom/pm4125.dtsi Outdated
};

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

Comment thread arch/arm64/boot/dts/qcom/pm8005.dtsi Outdated
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

Comment thread arch/arm64/boot/dts/qcom/shikra-cqm-som.dtsi
};

&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

Comment thread arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi
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

Comment thread arch/arm64/boot/dts/qcom/shikra-iqs-som.dtsi

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


&pm4125_gpios {
key_vol_up {
key_vol_up_default: key_vol_up_default {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

node_label: node-name
no underscores in node name.

};

adc_gpio5 {
pm4125_adc_gpio5_default: pm4125_adc_gpio5_default {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

node_label: node-name
no underscores in node name.

};

adc_gpio6 {
pm4125_adc_gpio6_default: pm4125_adc_gpio6_default {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

node_label: node-name
no underscores in node name.

Comment thread arch/arm64/boot/dts/qcom/pm4125.dtsi Outdated
#thermal-sensor-cells = <0>;
};

pm4125_vadc: vadc@3100 {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

arch/arm64/boot/dts/qcom/shikra-cqs-evk.dtb: pmic@0 (qcom,pm2250): 'vadc@3100' does not match any of the regexes: '(.*)?(wled|leds)@[0-9a-f]+$', '^adc-tm@[0-9a-f]+$', '^adc@[0-9a-f]+$', '^audio-codec@[0-9a-f]+$', '^battery@[0-9a-f]+$', '^charger@[0-9a-f]+$', '^led-controller@[0-9a-f]+$', '^mpps@[0-9a-f]+$', '^nvram@[0-9a-f]+$', '^pbs@[0-9a-f]+$', '^pinctrl-[0-9]+$', '^rtc@[0-9a-f]+$', '^temp-alarm@[0-9a-f]+$', '^typec@[0-9a-f]+$', '^usb-detect@[0-9a-f]+$', '^usb-vbus-regulator@[0-9a-f]+$', '^vibrator@[0-9a-f]+$', 'gpio@[0-9a-f]+$', 'phy@[0-9a-f]+$', 'pon@[0-9a-f]+$'

pm4125_vadc: adc@3100 {

/* APQ (No Modem), Cocos + Kunlun PMIC */

&pm4125_gpios {
key_vol_up {
Copy link
Copy Markdown

@Komal-Bajaj Komal-Bajaj Apr 13, 2026

Choose a reason for hiding this comment

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

from schema $id: http://devicetree.org/schemas/pinctrl/qcom,pmic-gpio.yaml#
arch/arm64/boot/dts/qcom/shikra-cqs-evk.dtb: gpio_key (gpio-keys): 'vol_up' does not match any of the regexes: '^(button|event|key|switch|(button|event|key|switch)-[a-z0-9-]+|[a-z0-9-]+-(button|event|key|switch))$', '^pinctrl-[0-9]+$'

key-volume-up

};
};

pm4125_pa_therm_bridge: pm4125_pa_therm_bridge {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

nodes in soc@0: 'ranges' is a required property (simple-bus schema). These generic-adc-thermal nodes are placed directly under &soc which is a simple-bus, schema requires ranges. Fix either add ranges, to the nodes or place them outside the simple-bus scope.

};
};

pm4125_tz: temp-alarm@2400 {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Fix node address ordering -- reorder usb-vbus-regulator@1100 before the new nodes

Comment thread arch/arm64/boot/dts/qcom/pm4125.dtsi
qcom,pre-scaling = <1 1>;
};

channel@4d {
Copy link
Copy Markdown

@jprakash-qc jprakash-qc Apr 15, 2026

Choose a reason for hiding this comment

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

Please arrange the ADC nodes also based on node address order here and in other places

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>
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.

3 participants