.../embedded-controller/qcom,hamoa-crd-ec.yaml | 56 +++ MAINTAINERS | 8 + arch/arm64/boot/dts/qcom/glymur-crd.dts | 22 + arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 16 + arch/arm64/boot/dts/qcom/x1-crd.dtsi | 16 + drivers/platform/arm64/Kconfig | 12 + drivers/platform/arm64/Makefile | 1 + drivers/platform/arm64/qcom-hamoa-ec.c | 451 +++++++++++++++++++++ 8 files changed, 582 insertions(+)
From: Anvesh Jain P <anvesh.p@oss.qualcomm.com>
Add Embedded controller driver support for Hamoa/Purwa/Glymur Qualcomm
reference boards. It handles fan control, temperature sensors, access
to EC state changes and supports reporting suspend entry/exit to the EC.
---
Changes in v7:
- Fixed alphabetical ordering of MAINTAINERS entry.
- Link to v6: https://lore.kernel.org/r/20260325-add-driver-for-ec-v6-0-a8e888d09f0f@oss.qualcomm.com
Changes in v6:
- Add missing includes: <linux/bits.h>, <linux/device.h>
and <linux/err.h>.
- Change the thermistor_mask format specifier from %d to %x.
- Change loop counter to unsigned int.
- Replace snprintf() with scnprintf() for safer string handling.
- Use sizeof(name) instead of the EC_FAN_NAME_SIZE macro directly.
- Add missing braces.
- Link to v5: https://lore.kernel.org/r/20260317-add-driver-for-ec-v5-0-38d11f524856@oss.qualcomm.com
Changes in v5:
- Fix subject line and commit description, drop redundant
"bindings for".
- Rename binding file: qcom,hamoa-ec.yaml → qcom,hamoa-crd-ec.yaml
to match the compatible string.
- Update $id URI to match the new filename.
- Add <linux/interrupt.h> and <linux/slab.h> includes.
- Switch to devm_thermal_of_cooling_device_register, remove manual
unroll loop.
- Ratelimit all IRQ handler log messages.
- Promote unknown EC event log from dev_dbg to dev_notice.
- Remove redundant error message after devm_request_threaded_irq.
- Simplify qcom_ec_sci_evt_control, resume, and suspend using direct
returns.
- Add dev_warn + early return for zero fan count; driver stays loaded
for PM notifications.
- Fix thermistor presence bitmask documentation: 1 = present, 0 = absent.
- Fix snprintf format specifier to %u to suppress -Wformat-truncation.
- Remove unused cdev variable from qcom_ec_probe.
- Fix typo: "exluding" → "excluding" in register map comments.
- Fix capitalization: "ec" → "EC" in error messages.
- Link to v4: https://lore.kernel.org/r/20260313-v04-add-driver-for-ec-v4-0-ca9d0efd62aa@oss.qualcomm.com
Changes in v4:
- Fix fan count calculation to use min() instead of max() to correctly
cap fan_cnt at EC_MAX_FAN_CNT.
- Remove unnecessary mutex lock/unlock.
- Disable fan debug mode on ec module removal.
- Fix issue reported by kernel test robot.
- Consolidate hamoa-iot-evk specific changes into hamoa-iot-evk.dts.
- Add board-specific compatible strings as per review comments.
- Link to v3: https://lore.kernel.org/all/20260308233646.2318676-1-sibi.sankar@oss.qualcomm.com/
Changes in v3:
- Revamp the bindings and driver to support generic ec specification
that works across Qualcomm Hamoa/Purwa and Glymur reference devices.
- Add ec nodes to Hamoa/Purwa CRDs and IOT-EVKs.
- Add ec node to Glymur CRDs.
- Link to v2: https://lore.kernel.org/lkml/20241219200821.8328-1-maccraft123mc@gmail.com/
- Link to v1: https://lore.kernel.org/lkml/20240927185345.3680-1-maccraft123mc@gmail.com/
---
Maya Matuszczyk (1):
dt-bindings: embedded-controller: Add Qualcomm reference device EC description
Sibi Sankar (4):
platform: arm64: Add driver for EC found on Qualcomm reference devices
arm64: dts: qcom: glymur-crd: Add Embedded controller node
arm64: dts: qcom: x1-crd: Add Embedded controller node
arm64: dts: qcom: hamoa-iot-evk: Add Embedded controller node
.../embedded-controller/qcom,hamoa-crd-ec.yaml | 56 +++
MAINTAINERS | 8 +
arch/arm64/boot/dts/qcom/glymur-crd.dts | 22 +
arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 16 +
arch/arm64/boot/dts/qcom/x1-crd.dtsi | 16 +
drivers/platform/arm64/Kconfig | 12 +
drivers/platform/arm64/Makefile | 1 +
drivers/platform/arm64/qcom-hamoa-ec.c | 451 +++++++++++++++++++++
8 files changed, 582 insertions(+)
---
base-commit: 85964cdcad0fac9a0eb7b87a0f9d88cc074b854c
change-id: 20260309-add-driver-for-ec-3fa478f264d9
Best regards,
--
Anvesh Jain P <anvesh.p@oss.qualcomm.com>
On 3/27/2026 3:38 PM, Anvesh Jain P wrote: > From: Anvesh Jain P <anvesh.p@oss.qualcomm.com> > > Add Embedded controller driver support for Hamoa/Purwa/Glymur Qualcomm > reference boards. It handles fan control, temperature sensors, access > to EC state changes and supports reporting suspend entry/exit to the EC. Just a question, is it possible to force fan to run at full speed constantly? That would be helpful to keep the passive cooling minimal and get a more consistent results while doing performance profiling. I see that you are registering a cooling device in this series. So I suppose we just need to update the cooling sysfs nodes. -Akhil > > --- > Changes in v7: > - Fixed alphabetical ordering of MAINTAINERS entry. > - Link to v6: https://lore.kernel.org/r/20260325-add-driver-for-ec-v6-0-a8e888d09f0f@oss.qualcomm.com > > Changes in v6: > - Add missing includes: <linux/bits.h>, <linux/device.h> > and <linux/err.h>. > - Change the thermistor_mask format specifier from %d to %x. > - Change loop counter to unsigned int. > - Replace snprintf() with scnprintf() for safer string handling. > - Use sizeof(name) instead of the EC_FAN_NAME_SIZE macro directly. > - Add missing braces. > - Link to v5: https://lore.kernel.org/r/20260317-add-driver-for-ec-v5-0-38d11f524856@oss.qualcomm.com > > Changes in v5: > - Fix subject line and commit description, drop redundant > "bindings for". > - Rename binding file: qcom,hamoa-ec.yaml → qcom,hamoa-crd-ec.yaml > to match the compatible string. > - Update $id URI to match the new filename. > - Add <linux/interrupt.h> and <linux/slab.h> includes. > - Switch to devm_thermal_of_cooling_device_register, remove manual > unroll loop. > - Ratelimit all IRQ handler log messages. > - Promote unknown EC event log from dev_dbg to dev_notice. > - Remove redundant error message after devm_request_threaded_irq. > - Simplify qcom_ec_sci_evt_control, resume, and suspend using direct > returns. > - Add dev_warn + early return for zero fan count; driver stays loaded > for PM notifications. > - Fix thermistor presence bitmask documentation: 1 = present, 0 = absent. > - Fix snprintf format specifier to %u to suppress -Wformat-truncation. > - Remove unused cdev variable from qcom_ec_probe. > - Fix typo: "exluding" → "excluding" in register map comments. > - Fix capitalization: "ec" → "EC" in error messages. > - Link to v4: https://lore.kernel.org/r/20260313-v04-add-driver-for-ec-v4-0-ca9d0efd62aa@oss.qualcomm.com > > Changes in v4: > - Fix fan count calculation to use min() instead of max() to correctly > cap fan_cnt at EC_MAX_FAN_CNT. > - Remove unnecessary mutex lock/unlock. > - Disable fan debug mode on ec module removal. > - Fix issue reported by kernel test robot. > - Consolidate hamoa-iot-evk specific changes into hamoa-iot-evk.dts. > - Add board-specific compatible strings as per review comments. > - Link to v3: https://lore.kernel.org/all/20260308233646.2318676-1-sibi.sankar@oss.qualcomm.com/ > > Changes in v3: > - Revamp the bindings and driver to support generic ec specification > that works across Qualcomm Hamoa/Purwa and Glymur reference devices. > - Add ec nodes to Hamoa/Purwa CRDs and IOT-EVKs. > - Add ec node to Glymur CRDs. > - Link to v2: https://lore.kernel.org/lkml/20241219200821.8328-1-maccraft123mc@gmail.com/ > - Link to v1: https://lore.kernel.org/lkml/20240927185345.3680-1-maccraft123mc@gmail.com/ > > --- > Maya Matuszczyk (1): > dt-bindings: embedded-controller: Add Qualcomm reference device EC description > > Sibi Sankar (4): > platform: arm64: Add driver for EC found on Qualcomm reference devices > arm64: dts: qcom: glymur-crd: Add Embedded controller node > arm64: dts: qcom: x1-crd: Add Embedded controller node > arm64: dts: qcom: hamoa-iot-evk: Add Embedded controller node > > .../embedded-controller/qcom,hamoa-crd-ec.yaml | 56 +++ > MAINTAINERS | 8 + > arch/arm64/boot/dts/qcom/glymur-crd.dts | 22 + > arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts | 16 + > arch/arm64/boot/dts/qcom/x1-crd.dtsi | 16 + > drivers/platform/arm64/Kconfig | 12 + > drivers/platform/arm64/Makefile | 1 + > drivers/platform/arm64/qcom-hamoa-ec.c | 451 +++++++++++++++++++++ > 8 files changed, 582 insertions(+) > --- > base-commit: 85964cdcad0fac9a0eb7b87a0f9d88cc074b854c > change-id: 20260309-add-driver-for-ec-3fa478f264d9 > > Best regards,
On 3/29/2026 7:52 PM, Akhil P Oommen wrote: > On 3/27/2026 3:38 PM, Anvesh Jain P wrote: >> From: Anvesh Jain P <anvesh.p@oss.qualcomm.com> >> >> Add Embedded controller driver support for Hamoa/Purwa/Glymur Qualcomm >> reference boards. It handles fan control, temperature sensors, access >> to EC state changes and supports reporting suspend entry/exit to the EC. > > Just a question, is it possible to force fan to run at full speed > constantly? That would be helpful to keep the passive cooling minimal > and get a more consistent results while doing performance profiling. > > I see that you are registering a cooling device in this series. So I > suppose we just need to update the cooling sysfs nodes. > > -Akhil > Hi Akhil, Yes, that is possible. The cooling device registered by this driver exposes the standard thermal sysfs interface. You can force the fan to full speed by writing the maximum cooling state directly: # Find the max state cat /sys/class/thermal/cooling_deviceX/max_state # Set to max state (force full speed) echo <max_state> > /sys/class/thermal/cooling_deviceX/cur_state Where X is the index of the cooling device corresponding to the EC fan. -- Best Regards, Anvesh
On Sun, Mar 29, 2026 at 11:57 PM Anvesh Jain P <anvesh.p@oss.qualcomm.com> wrote: > > > > On 3/29/2026 7:52 PM, Akhil P Oommen wrote: > > On 3/27/2026 3:38 PM, Anvesh Jain P wrote: > >> From: Anvesh Jain P <anvesh.p@oss.qualcomm.com> > >> > >> Add Embedded controller driver support for Hamoa/Purwa/Glymur Qualcomm > >> reference boards. It handles fan control, temperature sensors, access > >> to EC state changes and supports reporting suspend entry/exit to the EC. > > > > Just a question, is it possible to force fan to run at full speed > > constantly? That would be helpful to keep the passive cooling minimal > > and get a more consistent results while doing performance profiling. > > > > I see that you are registering a cooling device in this series. So I > > suppose we just need to update the cooling sysfs nodes. > > > > -Akhil > > > > Hi Akhil, > > Yes, that is possible. The cooling device registered by this driver > exposes the standard thermal sysfs interface. You can force the fan > to full speed by writing the maximum cooling state directly: > > # Find the max state > cat /sys/class/thermal/cooling_deviceX/max_state > > # Set to max state (force full speed) > echo <max_state> > /sys/class/thermal/cooling_deviceX/cur_state > > Where X is the index of the cooling device corresponding to the EC fan. Getting a bit off topic, but is there a good way to associated cooling devices and thermal sensors to the GPU device? I could see that being useful for nvtop (which currently supports shows GPU load and memory metrics, but thermal metrics are missing for us) BR, -R > -- > Best Regards, > Anvesh > >
On Mon, Mar 30, 2026 at 07:08:45AM -0700, Rob Clark wrote: > On Sun, Mar 29, 2026 at 11:57 PM Anvesh Jain P > <anvesh.p@oss.qualcomm.com> wrote: > > > > > > > > On 3/29/2026 7:52 PM, Akhil P Oommen wrote: > > > On 3/27/2026 3:38 PM, Anvesh Jain P wrote: > > >> From: Anvesh Jain P <anvesh.p@oss.qualcomm.com> > > >> > > >> Add Embedded controller driver support for Hamoa/Purwa/Glymur Qualcomm > > >> reference boards. It handles fan control, temperature sensors, access > > >> to EC state changes and supports reporting suspend entry/exit to the EC. > > > > > > Just a question, is it possible to force fan to run at full speed > > > constantly? That would be helpful to keep the passive cooling minimal > > > and get a more consistent results while doing performance profiling. > > > > > > I see that you are registering a cooling device in this series. So I > > > suppose we just need to update the cooling sysfs nodes. > > > > > > -Akhil > > > > > > > Hi Akhil, > > > > Yes, that is possible. The cooling device registered by this driver > > exposes the standard thermal sysfs interface. You can force the fan > > to full speed by writing the maximum cooling state directly: > > > > # Find the max state > > cat /sys/class/thermal/cooling_deviceX/max_state > > > > # Set to max state (force full speed) > > echo <max_state> > /sys/class/thermal/cooling_deviceX/cur_state > > > > Where X is the index of the cooling device corresponding to the EC fan. > > Getting a bit off topic, but is there a good way to associated cooling > devices and thermal sensors to the GPU device? I could see that being > useful for nvtop (which currently supports shows GPU load and memory > metrics, but thermal metrics are missing for us) I had a dirty patch, providing temp readings in NVMem. Probably I need to clean it up and submit upstream. > > BR, > -R > > > -- > > Best Regards, > > Anvesh > > > > -- With best wishes Dmitry
© 2016 - 2026 Red Hat, Inc.