From: "Wang Yang" <yang.wang@deepcomputing.io>
To: <linux-kernel@vger.kernel.org>
Cc: "Rob Herring" <robh@kernel.org>,
"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Benson Leung" <bleung@chromium.org>,
"Guenter Roeck" <groeck@chromium.org>,
"Yixun Lan" <dlan@kernel.org>,
"Troy Mitchell" <troy.mitchell@linux.spacemit.com>,
<devicetree@vger.kernel.org>, <chrome-platform@lists.linux.dev>,
<linux-riscv@lists.infradead.org>, <spacemit@lists.linux.dev>
Subject: [PATCH v2 05/13] dt-bindings: embedded-controller: Add SpacemiT K3 EC window
Date: Fri, 4 Dec 2026 12:21:03 +0800 [thread overview]
Message-ID: <20261204042112.2985112-6-yang.wang@deepcomputing.io> (raw)
In-Reply-To: <20261204042112.2985112-1-yang.wang@deepcomputing.io>
Describe the K3 non-linear peripheral window before the controller
binding references it. Reuse the existing keyboard and I2C tunnel
schemas. Keep the Google EC binding unchanged.
Prepared with OpenAI Codex assistance.
Signed-off-by: Wang Yang <yang.wang@deepcomputing.io>
---
.../spacemit,k3-cros-ec.yaml | 77 +++++++++++++++++++
1 file changed, 77 insertions(+)
create mode 100644 Documentation/devicetree/bindings/embedded-controller/spacemit,k3-cros-ec.yaml
diff --git a/Documentation/devicetree/bindings/embedded-controller/spacemit,k3-cros-ec.yaml b/Documentation/devicetree/bindings/embedded-controller/spacemit,k3-cros-ec.yaml
new file mode 100644
index 000000000000..fa9343e3ebf7
--- /dev/null
+++ b/Documentation/devicetree/bindings/embedded-controller/spacemit,k3-cros-ec.yaml
@@ -0,0 +1,77 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/embedded-controller/spacemit,k3-cros-ec.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: ChromeOS EC on the SpacemiT K3 peripheral window
+
+maintainers:
+ - Wang Yang <yang.wang@deepcomputing.io>
+
+description: |
+ The embedded controller implements ChromeOS EC host commands through the
+ memory-mapped peripheral window of the SpacemiT K3 eSPI controller. The
+ window uses a non-linear LPC register layout. Offset 0x00 provides host
+ command writes and status reads; offset 0x01 provides host data/results.
+ Protocol v2 arguments and parameters are at 0x10 and 0x18, protocol v3
+ packets at 0x100, and the EC memory map at 0x200. This programming interface
+ is distinct from an EC connected to an ordinary SPI controller. Child
+ functions use the common ChromeOS EC host-command interface. Devices on
+ an EC-controlled I2C bus are described below an I2C tunnel child.
+
+properties:
+ compatible:
+ const: spacemit,k3-cros-ec
+
+ reg:
+ maxItems: 1
+ description: EC peripheral memory window, at least 0x300 bytes.
+
+ interrupts:
+ maxItems: 1
+
+ wakeup-source: true
+
+ keyboard-controller:
+ $ref: /schemas/input/google,cros-ec-keyb.yaml#
+
+patternProperties:
+ "^i2c-tunnel[0-9]*$":
+ type: object
+ $ref: /schemas/i2c/google,cros-ec-i2c-tunnel.yaml#
+
+required:
+ - compatible
+ - reg
+ - interrupts
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ bus {
+ #address-cells = <1>;
+ #size-cells = <1>;
+
+ ec@0 {
+ compatible = "spacemit,k3-cros-ec";
+ reg = <0x0 0x1000>;
+ interrupt-parent = <&gpio>;
+ interrupts = <1 11 IRQ_TYPE_EDGE_RISING>;
+
+ i2c-tunnel {
+ compatible = "google,cros-ec-i2c-tunnel";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ google,remote-bus = <4>;
+
+ battery@b {
+ compatible = "sbs,sbs-battery";
+ reg = <0xb>;
+ };
+ };
+ };
+ };
--
2.43.0
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-12-04 4:22 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-04 4:20 [PATCH v2 00/13] Add SpacemiT K3 FML13V05 EC keyboard support Wang Yang
2026-12-04 4:21 ` Wang Yang [this message]
2026-12-04 4:21 ` [PATCH v2 06/13] dt-bindings: bus: Add SpacemiT K3 Intel eSPI controller Wang Yang
2026-12-04 4:21 ` [PATCH v2 07/13] bus: Add SpacemiT K3 eSPI controller support Wang Yang
2026-12-04 4:21 ` [PATCH v2 09/13] platform/chrome: Add SpacemiT K3 eSPI EC transport Wang Yang
2026-12-04 4:21 ` [PATCH v2 10/13] riscv: dts: spacemit: Add K3 eSPI pin group Wang Yang
2026-12-04 4:21 ` [PATCH v2 11/13] riscv: dts: spacemit: Describe the K3 eSPI controller Wang Yang
2026-12-04 4:21 ` [PATCH v2 12/13] riscv: dts: spacemit: Enable the FML13V05 EC keyboard Wang Yang
2026-12-04 4:21 ` [PATCH v2 13/13] riscv: defconfig: Enable the FML13V05 EC keyboard modules Wang Yang
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261204042112.2985112-6-yang.wang@deepcomputing.io \
--to=yang.wang@deepcomputing.io \
--cc=bleung@chromium.org \
--cc=chrome-platform@lists.linux.dev \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dlan@kernel.org \
--cc=groeck@chromium.org \
--cc=krzk+dt@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=robh@kernel.org \
--cc=spacemit@lists.linux.dev \
--cc=troy.mitchell@linux.spacemit.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox