Devicetree
 help / color / mirror / Atom feed
From: sashiko-bot@kernel.org
To: "Mohd Ayaan Anwar" <mohd.anwar@oss.qualcomm.com>
Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org
Subject: Re: [PATCH net-next v4 10/10] net: stmmac: qcom-ethqos: add QCS615 EMAC support
Date: Wed, 18 Nov 2026 08:47:16 +0000	[thread overview]
Message-ID: <sashiko-outbox-220503@kernel.org> (raw)
In-Reply-To: <20261117-shikra_ethernet-v4-10-c41902e5f2fa@oss.qualcomm.com>

Thank you for your contribution! Sashiko AI review found 2 potential
issues to consider:
- [Medium] net: stmmac: qcom-ethqos: missing rgmii_por in qcs615_data
  breaks non-rgmii-id
- [Medium] net: stmmac: qcom-ethqos: missing delay check in
  ethqos_set_clk_tx_rate()
--

commit ff8ea751ebe2e9565a1a5cafb4eabe2a1f08cfa9
Author: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>

net: stmmac: qcom-ethqos: add QCS615 EMAC support

This commit adds a dedicated qcom,qcs615-ethqos match entry and driver
data descriptor with phy_managed_delays enabled for QCS615.

> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> index a7fdba73da2ba..790159ae1be7a 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
> @@ -250,6 +250,13 @@ static const struct ethqos_emac_driver_data emac_v2_3_0_data = {
>  	.setup = ethqos_hlos_setup,
>  };
>  
> +static const struct ethqos_emac_driver_data qcs615_data = {
> +	.rgmii_config_loopback_en = true,
> +	.phy_managed_delays = true,

[Severity: Medium]
Should ethqos_set_clk_tx_rate() also check ethqos->data->phy_managed_delays
before skipping the clock rate doubling for PHY_INTERFACE_MODE_RGMII_ID?

drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c:ethqos_set_clk_tx_rate() {
    ...
	if (ethqos->phy_mode != PHY_INTERFACE_MODE_RGMII_ID ||
	    speed == SPEED_1000)
		rate *= 2;

	return clk_set_rate(ethqos->link_clk, rate);
}

ethqos_fix_mac_speed_rgmii() only uses the DLL-bypass path when both
ethqos->data->phy_managed_delays and PHY_INTERFACE_MODE_RGMII_ID are set.
On platforms where phy_managed_delays is false (such as QCS404), using
rgmii-id still configures the MAC for non-bypass mode (expecting 50 MHz and
5 MHz at 100M and 10M), but ethqos_set_clk_tx_rate() requests the
DLL-bypass rates of 25 MHz and 2.5 MHz, causing clk_set_rate() to fail on
clock controllers that do not support those rates.

> +	.has_emac_ge_3 = false,
> +	.setup = ethqos_hlos_setup,
> +};

[Severity: Medium]
Does omitting .rgmii_por and .num_rgmii_por from qcs615_data break RGMII
modes other than rgmii-id on QCS615?

Previously, QCS615 matched the qcom,qcs404-ethqos fallback
(emac_v2_3_0_data), which sets .rgmii_por = emac_v2_3_0_por and
.num_rgmii_por = ARRAY_SIZE(emac_v2_3_0_por).  When ethqos->phy_mode is
PHY_INTERFACE_MODE_RGMII, PHY_INTERFACE_MODE_RGMII_RXID, or
PHY_INTERFACE_MODE_RGMII_TXID, ethqos_fix_mac_speed_rgmii() does not take
the ethqos_configure_rgmii_id() path and instead relies on the rgmii_por
loop to reset RGMII_IO_MACRO_CONFIG, SDCC_HC_REG_DLL_CONFIG, and
SDCC_HC_REG_DDR_CONFIG before applying speed-specific bits via
read-modify-write helpers.  With num_rgmii_por left as 0, those registers
are never initialized or cleared across link speed changes.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261117-shikra_ethernet-v4-0-c41902e5f2fa@oss.qualcomm.com?part=10

      reply	other threads:[~2026-11-18  8:47 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17  8:45 [PATCH net-next v4 00/10] net: stmmac: qcom-ethqos: add Shikra EMAC support Mohd Ayaan Anwar
2026-11-17  8:45 ` [PATCH net-next v4 01/10] dt-bindings: net: ti,dp83867: add supply properties Mohd Ayaan Anwar
2026-11-17  8:45 ` [PATCH net-next v4 02/10] net: phy: dp83867: add regulator supply management Mohd Ayaan Anwar
2026-11-17  8:45 ` [PATCH net-next v4 03/10] dt-bindings: net: qcom,ethqos: add qcom,shikra-ethqos compatible Mohd Ayaan Anwar
2026-11-17  8:45 ` [PATCH net-next v4 04/10] net: stmmac: qcom-ethqos: convert ethqos_rgmii_macro_init() to void Mohd Ayaan Anwar
2026-11-17  8:45 ` [PATCH net-next v4 05/10] net: stmmac: qcom-ethqos: add DLL-bypass for PHY-managed RGMII delays Mohd Ayaan Anwar
2026-11-18  8:47   ` sashiko-bot
2026-11-17  8:45 ` [PATCH net-next v4 06/10] net: stmmac: qcom-ethqos: set initial RGMII link clock to lowest speed Mohd Ayaan Anwar
2026-11-17  8:45 ` [PATCH net-next v4 07/10] net: stmmac: qcom-ethqos: share common GMAC4 address table Mohd Ayaan Anwar
2026-11-17  8:45 ` [PATCH net-next v4 08/10] net: stmmac: qcom-ethqos: add per-platform NOC clock voting Mohd Ayaan Anwar
2026-11-17  8:45 ` [PATCH net-next v4 09/10] net: stmmac: qcom-ethqos: add Shikra EMAC support Mohd Ayaan Anwar
2026-11-17  8:45 ` [PATCH net-next v4 10/10] net: stmmac: qcom-ethqos: add QCS615 " Mohd Ayaan Anwar
2026-11-18  8:47   ` sashiko-bot [this message]

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-220503@kernel.org \
    --to=sashiko-bot@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=mohd.anwar@oss.qualcomm.com \
    --cc=robh@kernel.org \
    --cc=sashiko-reviews@lists.linux.dev \
    /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