Linux-PHY Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Bruno Banelli" <bbanelli@gmail.com>
Cc: olteanv@gmail.com, neil.armstrong@linaro.org,
	linux-phy@lists.infradead.org, vkoul@kernel.org
Subject: Re: [PATCH v2 2/2] phy: spacemit: enable K1 USB 2.0 PHY by default on ARCH_SPACEMIT
Date: Tue, 25 Aug 2026 07:03:16 +0000	[thread overview]
Message-ID: <20260825070316.C04EA1F000E9@smtp.kernel.org> (raw)
In-Reply-To: <20260825065007.69353-3-bbanelli@gmail.com>

Thank you for your contribution! Sashiko AI review found 3 potential issue(s) to consider:

Pre-existing issues:
- [High] Missing `select MFD_SYSCON` or `depends on MFD_SYSCON` for PHY_SPACEMIT_K1_PCIE
- [Medium] Incomplete fix: PHY_SPACEMIT_K3_COMBO_PHY is missing `default ARCH_SPACEMIT`
- [Medium] PHY_SPACEMIT_K3_COMBO_PHY is missing `depends on HAS_IOMEM`
--

--- Patch [2]: [PATCH v2 2/2] phy: spacemit: enable K1 USB 2.0 PHY by default on ARCH_SPACEMIT ---
commit 24c737090e69ed7db66ac129f68b1a45eb92ca1e
Author: Bruno Banelli <bbanelli@gmail.com>

phy: spacemit: enable K1 USB 2.0 PHY by default on ARCH_SPACEMIT

This commit adds a default ARCH_SPACEMIT to the PHY_SPACEMIT_K1_USB2 Kconfig
entry. This resolves an issue where the USB 2.0 PHY driver was disabled by
default on SpacemiT K1 boards, preventing USB from working.

> diff --git a/drivers/phy/spacemit/Kconfig b/drivers/phy/spacemit/Kconfig
> index cd7ae48d8ea2f..b5f36621b2075 100644
> --- a/drivers/phy/spacemit/Kconfig
> +++ b/drivers/phy/spacemit/Kconfig
> @@ -22,6 +22,7 @@ config PHY_SPACEMIT_K1_USB2
>  	depends on USB_COMMON
>  	select GENERIC_PHY
>  	select REGMAP_MMIO
> +	default ARCH_SPACEMIT

[Severity: High]
This is a pre-existing issue, but I noticed PHY_SPACEMIT_K1_PCIE is missing
a dependency on MFD_SYSCON:

drivers/phy/spacemit/Kconfig:PHY_SPACEMIT_K1_PCIE {
    config PHY_SPACEMIT_K1_PCIE
        tristate "PCIe and combo PHY driver for the SpacemiT K1 SoC"
        depends on ARCH_SPACEMIT || COMPILE_TEST
        ...
}

If MFD_SYSCON is not enabled, the kernel will still build successfully,
but at runtime the driver probe will silently fail returning -ENOTSUPP:

drivers/phy/spacemit/phy-k1-pcie.c:k1_pcie_combo_phy_probe() {
    ...
    regmap = syscon_regmap_lookup_by_phandle(dev_of_node(dev), SYSCON_APMU);
    ...
}

Does this config need to select or depend on MFD_SYSCON to prevent this?


[Severity: Medium]
This is a pre-existing issue, but PHY_SPACEMIT_K3_COMBO_PHY seems to be
missing the same default configuration being added here:

drivers/phy/spacemit/Kconfig:PHY_SPACEMIT_K3_COMBO_PHY {
    config PHY_SPACEMIT_K3_COMBO_PHY
        tristate "SpacemiT K3 USB3/PCIe PHY support"
        depends on (ARCH_SPACEMIT || COMPILE_TEST) && OF
        ...
}

Since the K3 combo PHY driver manages USB3/PCIe on SpacemiT SoCs, could
this missing default lead to similar broken USB behavior on K3 boards?
Would it make sense to add default ARCH_SPACEMIT there as well?


[Severity: Medium]
This is a pre-existing issue, but PHY_SPACEMIT_K3_COMBO_PHY also appears
to be missing a dependency on HAS_IOMEM:

drivers/phy/spacemit/Kconfig:PHY_SPACEMIT_K3_COMBO_PHY {
    config PHY_SPACEMIT_K3_COMBO_PHY
        tristate "SpacemiT K3 USB3/PCIe PHY support"
        depends on (ARCH_SPACEMIT || COMPILE_TEST) && OF
        depends on COMMON_CLK
        select PHY_SPACEMIT_K3_COMMON_OPS
}

The PHY_SPACEMIT_K3_COMBO_PHY driver uses devm_platform_ioremap_resource(),
which operates on MMIO memory. Could omitting the HAS_IOMEM dependency
lead to build or probe failures under COMPILE_TEST?

>  	help
>  	  Enable this to support K1 USB 2.0 PHY driver. This driver takes care of
>  	  enabling and clock setup and will be used by K1 udc/ehci/otg/xhci driver.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20260825065007.69353-1-bbanelli@gmail.com?part=2

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

  reply	other threads:[~2026-08-25  7:03 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-25  6:50 [PATCH v2 0/2] phy: spacemit: fix and enable the K1 USB 2.0 PHY Bruno Banelli
2026-08-25  6:50 ` [PATCH v2 1/2] phy: spacemit: fix K1 USB 2.0 PHY Kconfig dependencies Bruno Banelli
2026-08-25  6:50 ` [PATCH v2 2/2] phy: spacemit: enable K1 USB 2.0 PHY by default on ARCH_SPACEMIT Bruno Banelli
2026-08-25  7:03   ` sashiko-bot [this message]
2026-08-25 23:07 ` [PATCH v2 0/2] phy: spacemit: fix and enable the K1 USB 2.0 PHY Yixun Lan

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=20260825070316.C04EA1F000E9@smtp.kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=bbanelli@gmail.com \
    --cc=linux-phy@lists.infradead.org \
    --cc=neil.armstrong@linaro.org \
    --cc=olteanv@gmail.com \
    --cc=sashiko-reviews@lists.linux.dev \
    --cc=vkoul@kernel.org \
    /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