This adds binding, drivers and the DT support for the Huawei Matebook E Go (sc8280xp) Embedded Controller which is also found in Huawei Matebook E Go LTE (sc8180x), but I don't have the sc8180x one to perferform test, so this series enable support for sc8280xp variant only, this series provides the following features: - battery and charger information report - charging thresholds control - FN lock (An alternative method) - LID switch detection - Temperature sensors - USB Type-C altmode - USB Type-C PD(high power) Thanks to the work of Bjorn and Dmitry([1]), the work of Nikita([2]), writing a EC driver won't be suffering. This work refers a lot to their work, also, many other works. I mentioned them in the source file. Depends: https://lore.kernel.org/linux-arm-msm/20241220160530.444864-1-mitltlatltl@xxxxxxxxx [1] https://lore.kernel.org/all/20240614-yoga-ec-driver-v7-0-9f0b9b40ae76@xxxxxxxxxx/ [2] https://lore.kernel.org/all/20240315-aspire1-ec-v5-0-f93381deff39@xxxxxxx/ Signed-off-by: Pengyu Luo <mitltlatltl@xxxxxxxxx> --- Pengyu Luo (5): dt-bindings: platform: Add Huawei Matebook E Go EC platform: arm64: add Huawei Matebook E Go (sc8280xp) EC driver usb: typec: ucsi: add Huawei Matebook E Go (sc8280xp) ucsi driver power: supply: add Huawei Matebook E Go (sc8280xp) psy driver arm64: dts: qcom: gaokun3: Add Embedded Controller node .../bindings/platform/huawei,gaokun-ec.yaml | 116 ++++ .../boot/dts/qcom/sc8280xp-huawei-gaokun3.dts | 139 ++++ drivers/platform/arm64/Kconfig | 19 + drivers/platform/arm64/Makefile | 2 + drivers/platform/arm64/huawei-gaokun-ec.c | 598 ++++++++++++++++++ drivers/platform/arm64/huawei-gaokun-wmi.c | 283 +++++++++ drivers/power/supply/Kconfig | 9 + drivers/power/supply/Makefile | 1 + drivers/power/supply/huawei-gaokun-battery.c | 446 +++++++++++++ drivers/usb/typec/ucsi/Kconfig | 9 + drivers/usb/typec/ucsi/Makefile | 1 + drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c | 481 ++++++++++++++ .../linux/platform_data/huawei-gaokun-ec.h | 90 +++ 13 files changed, 2194 insertions(+) create mode 100644 Documentation/devicetree/bindings/platform/huawei,gaokun-ec.yaml create mode 100644 drivers/platform/arm64/huawei-gaokun-ec.c create mode 100644 drivers/platform/arm64/huawei-gaokun-wmi.c create mode 100644 drivers/power/supply/huawei-gaokun-battery.c create mode 100644 drivers/usb/typec/ucsi/ucsi_huawei_gaokun.c create mode 100644 include/linux/platform_data/huawei-gaokun-ec.h -- 2.47.1