From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.127.231.37 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796358098; b=soniF5NcZR1nKoYQxVHpwmryRd8XQFKGjOGE4Sx0f2mBS7itDkMRmy12hn+rPIGjyC8z Dr+7vB4VhKmKtmtLLac6Dq7d5oHzW3n9TgmAACTlrJvmaYMpzoxl+HSgZe4etlsL0bPs6 yOrRnOFoUmH9V+saMbrzProj+sORXoY8/72Oh0csBrTvf3+KK3IA0BgsSRlkphnsBCNku tRJygTH9DRQMeQpUmREPTAswEeorV0HEmpDHq5ENBnCAFluV8vpeeAsQ+ImcDDBixJPKi 5jSi/l0IOpkyd1KnxKU1QkQ6BLFlB0V3PiaBkOpbEPJ2TWvp0P062nS7LI9p8zq9Jdg== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796358098; h=DMARC-Filter:DKIM-Signature:From:References:Content-Type:Subject: Mime-Version:Content-Transfer-Encoding:In-Reply-To:X-Original-From: X-Mailer:To:Cc:Date:Message-Id:Received:X-Lms-Return-Path; bh=rQ3+wNJXyIjJehAQj8kqC0Lr0zVnDuJnR9iDbyUmLZw=; b=YDYYI2xwRP9hyIr5ah4WdXGTk0u16rixTAi7PlVLrvGop6zGPWa8EmIcS9nPs/CcEb0a LTwBrSo92lxOSGi5+NXag5/tzZstbkCzC4gqAbV5vOr3xJaEdD/Fmgaxx9VTmFTNjz7vk 0pYXFNmyXaqzyV06hF6CwQDqBA0PKUHn0w0TXEEbUPw7rGzJMCwukB6N35nJVyNW36GQp FZNEvKVVayi1T524LsXW/sf1j8GZC9LF+De22xpCfqejXk8eED+KH10WEGFQz1QtuIfib 3tQJ1rCSwH6ILSo9tECgXlq5q3LVhXp+lePgo0wCrrJirVREgpHcLmWUvy+rwp/ci2Q== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=deepcomputing.io; spf=pass smtp.mailfrom=deepcomputing.io; dkim=pass header.d=deepcomputing-io.20200927.dkim.feishu.cn header.i=@deepcomputing-io.20200927.dkim.feishu.cn header.a=rsa-sha256 header.s=s1 header.b=lFzy+Cp9; arc=none smtp.remote-ip=209.127.231.37 Received: from va-2-37.ptr.blmpb.com (va-2-37.ptr.blmpb.com [209.127.231.37]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DF2F6606A333 for ; Fri, 4 Dec 2026 04:21:34 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org DF2F6606A333 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=deepcomputing.io Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=deepcomputing.io Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=deepcomputing-io.20200927.dkim.feishu.cn header.i=@deepcomputing-io.20200927.dkim.feishu.cn header.a=rsa-sha256 header.s=s1 header.b=lFzy+Cp9 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; s=s1; d=deepcomputing-io.20200927.dkim.feishu.cn; t=1796358090; h=from:subject:mime-version:from:date:message-id:subject:to:cc: reply-to:content-type:mime-version:in-reply-to:message-id; bh=rQ3+wNJXyIjJehAQj8kqC0Lr0zVnDuJnR9iDbyUmLZw=; b=lFzy+Cp9SuxwpNmZyp/vojRTtzvmCx2IeuqFPXO/RpP7eDkUFRtuc2fSHaODvJSRH73nKI S2X1A4baWP9n9DzRwygVWASRIDk5Vk4RKguuub3vgKd1LA8Uoz+v8DKzpDiCY7CY1U1YmM vHja5H3UgglyVbp4eHoe8lgfDa8dm6eQ9/RpF8492fEM0mMkCneqwOWfovkuGVbXi4HPb4 2OpHMPLdWcJXixfDViEMVcdQcH2Vtk1n9mb+lCdCE0Tpie51MUEOQkQqwOk8GEoktMEHGB oBjgDqu/0hAFetRtHlb6yIGWUr90gBHhlSLAQIZ+MrtYNu64WndpQdFbtsmuIQ== From: "Wang Yang" References: <20261204042112.2985112-1-yang.wang@deepcomputing.io> Content-Type: text/plain; charset=UTF-8 Subject: [PATCH v2 05/13] dt-bindings: embedded-controller: Add SpacemiT K3 EC window X-Mailing-List: chrome-platform@lists.linux.dev List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Mime-Version: 1.0 Content-Transfer-Encoding: 7bit In-Reply-To: <20261204042112.2985112-1-yang.wang@deepcomputing.io> X-Original-From: Wang Yang X-Mailer: git-send-email 2.43.0 To: Cc: "Rob Herring" , "Krzysztof Kozlowski" , "Conor Dooley" , "Benson Leung" , "Guenter Roeck" , "Yixun Lan" , "Troy Mitchell" , , , , Date: Fri, 4 Dec 2026 12:21:03 +0800 Message-Id: <20261204042112.2985112-6-yang.wang@deepcomputing.io> Received: from ubuntu.. ([183.23.101.24]) by smtp.feishu.cn with ESMTPS; Fri, 04 Dec 2026 12:21:28 +0800 X-Lms-Return-Path: 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 --- .../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 + +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 + + 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