Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/embedded-controller/qcom,hamoa-crd-ec.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Qualcomm Hamoa Embedded Controller

maintainers:
- Sibi Sankar <sibi.sankar@oss.qualcomm.com>
- Anvesh Jain P <anvesh.p@oss.qualcomm.com>

description:
Qualcomm Snapdragon based Hamoa/Purwa and Glymur reference devices have an
EC running on different MCU chips. The EC handles things like fan control,
temperature sensors, access to EC internal state changes.

properties:
compatible:
oneOf:
- items:
- enum:
- qcom,glymur-crd-ec
- qcom,hamoa-iot-evk-ec
- const: qcom,hamoa-crd-ec
- enum:
- qcom,hamoa-crd-ec

reg:
const: 0x76

interrupts:
maxItems: 1

required:
- compatible
- reg
- interrupts

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
i2c {
#address-cells = <1>;
#size-cells = <0>;

embedded-controller@76 {
compatible = "qcom,hamoa-crd-ec";
reg = <0x76>;

interrupts-extended = <&tlmm 66 IRQ_TYPE_LEVEL_HIGH>;
};
};
...
8 changes: 8 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -21160,6 +21160,14 @@ F: Documentation/devicetree/bindings/misc/qcom,fastrpc.yaml
F: drivers/misc/fastrpc.c
F: include/uapi/misc/fastrpc.h

QUALCOMM HAMOA EMBEDDED CONTROLLER DRIVER
M: Anvesh Jain P <anvesh.p@oss.qualcomm.com>
M: Sibi Sankar <sibi.sankar@oss.qualcomm.com>
L: linux-arm-msm@vger.kernel.org
S: Maintained
F: Documentation/devicetree/bindings/embedded-controller/qcom,hamoa-crd-ec.yaml
F: drivers/platform/arm64/qcom-hamoa-ec.c

QUALCOMM HEXAGON ARCHITECTURE
M: Brian Cain <brian.cain@oss.qualcomm.com>
L: linux-hexagon@vger.kernel.org
Expand Down
16 changes: 16 additions & 0 deletions arch/arm64/boot/dts/qcom/hamoa-iot-evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -815,6 +815,16 @@
pinctrl-0 = <&eusb6_reset_n>;
pinctrl-names = "default";
};

embedded-controller@76 {
compatible = "qcom,hamoa-iot-evk-ec", "qcom,hamoa-crd-ec";
reg = <0x76>;

interrupts-extended = <&tlmm 66 IRQ_TYPE_EDGE_FALLING>;

pinctrl-0 = <&ec_int_n_default>;
pinctrl-names = "default";
};
};

&i2c7 {
Expand Down Expand Up @@ -1290,6 +1300,12 @@
};

&tlmm {
ec_int_n_default: ec-int-n-state {
pins = "gpio66";
function = "gpio";
bias-disable;
};

cam1_default: cam1-default-state {
mclk-pins {
pins = "gpio97";
Expand Down
16 changes: 16 additions & 0 deletions arch/arm64/boot/dts/qcom/x1-crd.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,16 @@

#phy-cells = <0>;
};

embedded-controller@76 {
compatible = "qcom,hamoa-crd-ec";
reg = <0x76>;

interrupts-extended = <&tlmm 66 IRQ_TYPE_EDGE_FALLING>;

pinctrl-0 = <&ec_int_n_default>;
pinctrl-names = "default";
};
};

&i2c7 {
Expand Down Expand Up @@ -1568,6 +1578,12 @@
<44 4>, /* SPI (TPM) */
<238 1>; /* UFS Reset */

ec_int_n_default: ec-int-n-state {
pins = "gpio66";
function = "gpio";
bias-disable;
};

cam_rgb_default: cam-rgb-default-state {
mclk-pins {
pins = "gpio100";
Expand Down
1 change: 1 addition & 0 deletions arch/arm64/configs/defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1356,6 +1356,7 @@ CONFIG_CROS_EC_RPMSG=m
CONFIG_CROS_EC_SPI=y
CONFIG_CROS_KBD_LED_BACKLIGHT=m
CONFIG_CROS_EC_CHARDEV=m
CONFIG_EC_QCOM_HAMOA=m
CONFIG_COMMON_CLK_RK808=y
CONFIG_COMMON_CLK_SCMI=y
CONFIG_COMMON_CLK_SCPI=y
Expand Down
13 changes: 13 additions & 0 deletions drivers/platform/arm64/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -90,4 +90,17 @@ config EC_LENOVO_THINKPAD_T14S

Say M or Y here to include this support.

config EC_QCOM_HAMOA
tristate "Embedded Controller driver for Qualcomm Hamoa/Glymur reference devices"
depends on ARCH_QCOM || COMPILE_TEST
depends on I2C
depends on THERMAL || THERMAL=n
help
Say M or Y here to enable the Embedded Controller driver for Qualcomm
Snapdragon-based Hamoa/Glymur reference devices. The driver handles fan
control, temperature sensors, access to EC state changes and supports
reporting suspend entry/exit to the EC.

This driver currently supports Hamoa/Purwa/Glymur reference devices.

endif # ARM64_PLATFORM_DEVICES
1 change: 1 addition & 0 deletions drivers/platform/arm64/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ obj-$(CONFIG_EC_ACER_ASPIRE1) += acer-aspire1-ec.o
obj-$(CONFIG_EC_HUAWEI_GAOKUN) += huawei-gaokun-ec.o
obj-$(CONFIG_EC_LENOVO_YOGA_C630) += lenovo-yoga-c630.o
obj-$(CONFIG_EC_LENOVO_THINKPAD_T14S) += lenovo-thinkpad-t14s.o
obj-$(CONFIG_EC_QCOM_HAMOA) += qcom-hamoa-ec.o
Loading