Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Wang Yang" <yang.wang@deepcomputing.io>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH v2 11/13] riscv: dts: spacemit: Describe the K3 eSPI controller
Date: Fri, 04 Dec 2026 04:48:31 +0000	[thread overview]
Message-ID: <sashiko-outbox-249103@kernel.org> (raw)
In-Reply-To: <20261204042112.2985112-12-yang.wang@deepcomputing.io>

Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] riscv: dts: spacemit: espi0 sets spacemit,pr-mem-base1 to its
  own MMIO base
- [Low] riscv: dts: spacemit: commit message uses revision-delta
  phrasing
- [Low] riscv: dts: spacemit: board-level eSPI flags hardcoded in shared
  k3.dtsi
--

commit f467024ef82df1d6d6bcf1c8b90cb44fb44533de
Author: Wang Yang <yang.wang@deepcomputing.io>

> riscv: dts: spacemit: Describe the K3 eSPI controller
>
> Describe the controller resources and corrected link properties.
> Require explicit MEM1 configuration; retain the BSP value until vendor
> register documentation establishes a different interpretation.
>
> Prepared with OpenAI Codex assistance.
>
> Signed-off-by: Wang Yang <yang.wang@deepcomputing.io>

[Severity: Low]
Can the commit message be rewritten to stand on its own?  This patch adds
the espi0 node to k3.dtsi for the first time, so "corrected link properties"
reads like revision-changelog wording that belongs below the "---"
separator.

Similarly, "Require explicit MEM1 configuration" describes a binding and
driver policy from earlier patches in the series rather than what this DTS
change does.  Describing why the K3 eSPI node is added and how its resources
are configured would make the permanent commit log clearer.

> diff --git a/arch/riscv/boot/dts/spacemit/k3.dtsi b/arch/riscv/boot/dts/spacemit/k3.dtsi
> index e89d2cc5ca8cc..88a265973d13d 100644
> --- a/arch/riscv/boot/dts/spacemit/k3.dtsi
> +++ b/arch/riscv/boot/dts/spacemit/k3.dtsi
> @@ -648,6 +648,36 @@ gmac1_axi_setup: stmmac-axi-config {
>  			};
>  		};
>  
> +		espi0: espi@cac8c000 {
> +			compatible = "spacemit,k3-espi";
> +			reg = <0x0 0xcac8c000 0x0 0x1000>;
> +			ranges = <0x0 0x0 0x84000000 0x1000>;

[ ... ]

> +			max-frequency = <20000000>;
> +			spacemit,pr-mem-base1 = <0xcac8c000>;

[Severity: Medium]
Should spacemit,pr-mem-base1 point to the controller's own MMIO register
base (0xcac8c000)?  spacemit_espi_program_window() writes this value
directly into ESPI_PR_BASE_ADDR_MEM1, which the binding documents as the
second peripheral-channel memory base register.

If ESPI_PR_BASE_ADDR_MEM1 configures a second peripheral memory decode
window, programming 0xcac8c000 aliases the eSPI controller's own control
registers and omits the window from standard DT ranges translation.  If the
register has different hardware semantics, retaining an unverified BSP value
bakes an inaccurate description into the stable Devicetree ABI.

> +			spacemit,io-mode = "single";
> +			spacemit,alert-mode = "io1";
> +			spacemit,alert-type = "open-drain";
> +			spacemit,watchdog-timeout = <0xffff>;
> +			spacemit,crc-enable;
> +			spacemit,auto-gating-enable;
> +			spacemit,peripheral-channel-enable;
> +			spacemit,vwire-channel-enable;
> +			spacemit,oob-channel-enable;
> +			spacemit,flash-channel-enable;

[Severity: Low]
Should these board-level link and channel properties live in the board DTS
rather than k3.dtsi?  Because spacemit_espi_parse_dt() reads the six
boolean flags with of_property_read_bool(), placing them in the shared SoC
file forces boards to inherit them or use /delete-property/ to disable them.

In particular, inheriting the vwire, OOB, and flash channel flags causes
spacemit_espi_configure_channels() to enable those channels on any EC that
advertises them, even though drivers/bus/spacemit-k3-espi.c has no IRQ
handler or RX drain path for them.

In addition, spacemit,alert-type = "open-drain" is ignored when
spacemit,alert-mode is "io1", and the five link value properties
(max-frequency, io-mode, alert-mode, alert-type, and watchdog-timeout) all
duplicate the binding and driver defaults.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261204042112.2985112-1-yang.wang@deepcomputing.io?part=11

  reply	other threads:[~2026-12-04  4:48 UTC|newest]

Thread overview: 10+ 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 ` [PATCH v2 05/13] dt-bindings: embedded-controller: Add SpacemiT K3 EC window Wang Yang
2026-12-04  4:32   ` sashiko-bot
2026-12-04  4:21 ` [PATCH v2 06/13] dt-bindings: bus: Add SpacemiT K3 Intel eSPI controller Wang Yang
2026-12-04  4:44   ` sashiko-bot
2026-12-04  4:21 ` [PATCH v2 10/13] riscv: dts: spacemit: Add K3 eSPI pin group Wang Yang
2026-12-04  4:41   ` sashiko-bot
2026-12-04  4:21 ` [PATCH v2 11/13] riscv: dts: spacemit: Describe the K3 eSPI controller Wang Yang
2026-12-04  4:48   ` sashiko-bot [this message]
2026-12-04  4:21 ` [PATCH v2 12/13] riscv: dts: spacemit: Enable the FML13V05 EC keyboard 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=sashiko-outbox-249103@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=yang.wang@deepcomputing.io \
    /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