From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796359483; b=Z0GOjwfu46zHazB430dhxCmAJ2KQhePe6H2pZ8QngKVjQ4S/37Yx9zF0ilS0tUU/Nr77 1GzG4GSD/i6i2yx3iuxAK9rv9qoP9ZtrceprwNVY9Ohx3+R+VQNU+LAoH5Y+iODWHpxtO QZhnb10Hdo2SBWmm+nJ8BM3Wj9ihqZx0MPeDlQoOpeZw9j4kFS3BUS+zl1cet2LkY5k+h ekDVxNmwbo5OUeAV430sBBo6/dEghrF3fdlD1hpElWls6AS+vKBa9Jq0yC0FWdhaaZiWq LjxGIYXzwGcCnyzrh8UE2jfGw/uud6tAPlY9WeTq9LzYqPbGgwSMZDovU1fq0xa7tIw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796359483; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=VJQ/kR6TfRwEDMc7jpoTDR6VXcqjc1ekd3MHPXGVlO4=; b=lXrq1ZHd5rZmH6HZCtir12A0nLufVXqw9/WbqcH4eaZIlcyrq0vCc7Yxq61KMO5HkfvT dHPYOGygvkN2Nup15qoqZlmbrMjGXrqRwplyjVNeUQvtekgvCaolAZsWMI9Ec8HEurO2l 2ey13FvjaehHLYh5xWKNDcylPKEbrlq+Cyt9I6Esy/vIFSA23XHPlPlV4cJM1fiacE6aN FTCM1MQeaQwSMfFy2UBdUh5O0/sTZS+HsoNb7HHsk4L4QlQnzJ2sk/JrhcFD2o7PNv/0l Qn9hYQHwtrJLwPkKAKSG6SS7BiluszZrcvgrfVxdIxcW+nosW2dIy+O+4CwuAQYeNzQ== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Wq5JB0SS; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 745A2606A322 for ; Fri, 4 Dec 2026 04:44:43 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Wq5JB0SS Received: by smtp.kernel.org (Postfix) with ESMTPSA id C806A1F000C2; Fri, 4 Dec 2026 04:44:42 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796359483; bh=VJQ/kR6TfRwEDMc7jpoTDR6VXcqjc1ekd3MHPXGVlO4=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Wq5JB0SSY+EBCHERt8BFSGsAxjMwd38l8pFBgc/ZmW5pNwH4c/+atGOSeWp01mNya PLr58NoZYmAyUkntqujq/IQXFA50/HUmRbNW90GrcFcwnMuf8n6Lk451Ivlp3RJ1AV +mrMvoaDqqAeO+gLwVsOgwozsQYxST4Mje2uVT6vWyA19bLlljHRqAbc4/Wiej2UPD 0B+8n2r6X7rGHIZ1FSXq1pLDxLLMz1Ha1vDcqr6ugSAuMy90GWVLbfMAe1Tx2yTt5a dckKBRjt0gNZTQGSH7eAjYwkJvJVkNTN6Qlj2csNLbEPBDVruKxzvjh5l9Dnx7xpMj FScn1J0nWXi/A== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH v2 06/13] dt-bindings: bus: Add SpacemiT K3 Intel eSPI controller Reply-To: sashiko-reviews@lists.linux.dev To: "Wang Yang" Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261204042112.2985112-7-yang.wang@deepcomputing.io> References: <20261204042112.2985112-1-yang.wang@deepcomputing.io> <20261204042112.2985112-7-yang.wang@deepcomputing.io> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 04:44:42 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 8 potential issues to consider: - [Medium] dt-bindings: bus: raw uint32 spacemit,pr-mem-base1 instead of ranges/reg - [Medium] dt-bindings: bus: unitless watchdog counter and policy toggles in DT ABI - [Medium] dt-bindings: bus: patternProperties locks eSPI bus to single EC compatible - [Medium] dt-bindings: bus: spacemit,k3-espi: exposes internal CCU mux in clocks - [Low] dt-bindings: bus: unprefixed max-frequency property misnamed and misordered - [Low] dt-bindings: bus: missing schema constraints for dependent eSPI properties - [Low] dt-bindings: bus: multiple resets lack reset-names and invert clocks order - [Low] dt-bindings: commit message has inaccurate series reference and revision notes -- commit 622dd2b421fba8b4cbf3a78e0da3e8ce4dbb3c5d Author: Wang Yang > dt-bindings: bus: Add SpacemiT K3 Intel eSPI controller > > Describe the Intel eSPI protocol replacing LPC and its CPU-accessible > peripheral window. Reference the already-added K3 EC schema from > the first commit. Use vendor properties and frequency units in Hz. > > Prepared with OpenAI Codex assistance. > > Signed-off-by: Wang Yang [Severity: Low] The commit message refers to "the already-added K3 EC schema from the first commit", but spacemit,k3-cros-ec.yaml was added in commit "dt-bindings: embedded-controller: Add SpacemiT K3 EC window", not the first patch of the series. Permanent git history should name the schema directly rather than relying on series numbering. The changelog also reads like revision notes rather than a standalone explanation of the new binding, and "Use vendor properties and frequency units in Hz" does not match the schema (max-frequency has neither a vendor prefix nor a -hz suffix, and spacemit,watchdog-timeout is a raw counter). > diff --git a/Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml = b/Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml > new file mode 100644 > index 0000000000000..4bd13cc33c908 > --- /dev/null > +++ b/Documentation/devicetree/bindings/bus/spacemit,k3-espi.yaml [ ... ] > + clocks: > + items: > + - description: Serial clock source > + - description: Serial clock > + - description: Bus clock > + > + clock-names: > + items: > + - const: sclk_src > + - const: sclk > + - const: mclk [Severity: Medium] Should sclk_src be required in clocks? In drivers/clk/spacemit/ccu-k3.c, APMU_ESPI_CLK_RES_CTRL has only two gated clock outputs to the eSPI block (espi_mclk and espi_sclk, matching the two reset domains), while espi_sclk_src is an ungated internal APMU parent mux feeding espi_sclk. Exposing sclk_src bakes a Linux CCU driver limitation (espi_sclk lacking CLK_SET_RATE_PARENT and ccu_mix_calc_best_rate() not propagating rate rounding to parents) into the permanent DT ABI. Propagating CLK_SET_RATE_PARENT in the clock driver and using assigned-clocks in DT would let clocks list only sclk and mclk. > + resets: > + items: > + - description: Bus reset > + - description: Serial clock reset [Severity: Low] Should this binding include a reset-names property for the two resets? Documentation/devicetree/bindings/writing-bindings.rst recommends reset-names when there is more than one reset entry, and listing bus before serial here inverts the order used by clocks, inviting positional mixups in DTS files. > + spacemit,pr-mem-base1: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Base address programmed into the controller's second pe= ripheral-channel memory base register. [Severity: Medium] Why is a hardware memory base address modeled as a required uint32 vendor property instead of ranges or reg? Encoding an address as uint32 hardcodes 32-bit addressing on a 64-bit SoC (k3.dtsi uses 2-cell addresses under soc), bypasses DT address translation, and leaves the address space unspecified. In the example, spacemit,pr-mem-base1 is set to 0xcac8c000, duplicating the controller's own MMIO reg base. If this register describes a second peripheral window it should use ranges or reg; if it only parks an unused window at the controller base, that address is already known from reg. > + max-frequency: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Maximum eSPI serial clock frequency in Hz. > + enum: [20000000, 25000000, 33333333, 50000000, 66666666] > + default: 20000000 [Severity: Low] Is unprefixed max-frequency appropriate for a bus controller binding? Across the tree max-frequency is an MMC-specific property, whereas bus and controller bindings use the core clock-frequency property (ordered before vendor properties) or a vendor-prefixed property with a -hz unit suffix such as spacemit,max-frequency-hz. [ ... ] > + spacemit,alert-mode: > + $ref: /schemas/types.yaml#/definitions/string > + description: Use the shared IO1 line or the dedicated alert pin. > + enum: [io1, pin] > + default: io1 > + > + spacemit,alert-type: > + $ref: /schemas/types.yaml#/definitions/string > + description: Electrical mode of the dedicated alert pin. > + enum: [open-drain, push-pull] > + default: open-drain [Severity: Low] Can spacemit,alert-type be restricted in the schema to when spacemit,alert-mode is "pin"? Without a constraint, contradictory nodes that set alert-mode to "io1" alongside alert-type pass dtbs_check silently. Similarly, spacemit,peripheral-channel-enable states in prose that it is required for an enabled EC child, but no schema rule enforces it. > + spacemit,watchdog-timeout: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: Controller watchdog counter value. > + maximum: 65535 > + default: 65535 > + > + spacemit,crc-enable: > + type: boolean > + description: Enable link CRC checking. > + > + spacemit,auto-gating-enable: > + type: boolean > + description: Enable automatic controller clock gating. > + > + spacemit,peripheral-channel-enable: > + type: boolean > + description: Enable the peripheral channel. Required for an enabled = EC child. > + > + spacemit,vwire-channel-enable: > + type: boolean > + description: Enable the virtual-wire channel. > + > + spacemit,oob-channel-enable: > + type: boolean > + description: Enable the out-of-band channel. > + > + spacemit,flash-channel-enable: > + type: boolean > + description: Enable the flash access channel. [Severity: Medium] Do these register-level and policy properties belong in the permanent DT ABI? spacemit,watchdog-timeout exposes a unitless 16-bit counter without a standard time unit suffix (such as -us or -ms) or documented tick rate. spacemit,crc-enable and spacemit,auto-gating-enable are runtime controller policy rather than board hardware description, and the four *-channel-enable booleans duplicate Intel eSPI capability negotiation and child-node presence, forcing DTS files to mirror static driver defaults. > +patternProperties: > + '^ec@[0-9a-f]+$': > + $ref: /schemas/embedded-controller/spacemit,k3-cros-ec.yaml# [Severity: Medium] Does patternProperties lock this SoC eSPI bus controller to a single ChromeOS EC compatible? Combined with additionalProperties: false and the const compatible in spacemit,k3-cros-ec.yaml, no K3 board can attach a different eSPI peripheral or use the standard embedded-controller@ node name without modifying the controller schema. Matching generic child nodes (such as '@[0-9a-f]+$' with type: object, additionalProperties: true, and required: [reg]) lets each attached eSPI device be validated by its own compatible-matched schema. --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261204042112.2985= 112-1-yang.wang@deepcomputing.io?part=3D6