devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Lunn <andrew@lunn.ch>
To: Artem Shimko <a.shimko.dev@gmail.com>
Cc: netdev@vger.kernel.org, Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S . Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	linux-kernel@vger.kernel.org, devicetree@vger.kernel.org
Subject: Re: [PATCH net-next v5 3/3] net: phy: add DAPU Telecom DAP8211R(I) Gigabit Ethernet PHY driver
Date: Tue, 4 Aug 2026 04:30:51 +0200	[thread overview]
Message-ID: <239a7699-bbda-4fab-bfa0-604b1d8806a9@lunn.ch> (raw)
In-Reply-To: <20260803101734.270821-4-a.shimko.dev@gmail.com>

> +/* Initial RGMII RX delay per hardware specification: 0 * 150ps == 0.00ns */
> +#define DAP8211R_INITIAL_RX_DEL_VAL	0
> +/* Initial RGMII TX delay per hardware specification: 1 * 150ps == 0.15ns*/
> +#define DAP8211R_INITIAL_TX_DEL_VAL	1
> +/* Default RGMII delay: 13 * 150 == 1.95ns */
> +#define DAP8211R_DEFAULT_DEL_SEL	0xD


> +static int dap8211r_config_init(struct phy_device *phydev)
> +{
> +	u16 set = 0;
> +	int ret, val;
> +	s32 rx_internal_delay = DAP8211R_INITIAL_RX_DEL_VAL;
> +	s32 tx_internal_delay = DAP8211R_INITIAL_TX_DEL_VAL;
> +
> +	if (!phy_interface_is_rgmii(phydev))
> +		return 0;
> +
> +	if (phydev->interface != PHY_INTERFACE_MODE_RGMII_TXID)
> +		rx_internal_delay = phy_get_internal_delay(phydev, dap8211r_internal_delay,
> +							   DAP8211R_DELAY_SIZE, true);
> +
> +	if (phydev->interface != PHY_INTERFACE_MODE_RGMII_RXID)
> +		tx_internal_delay = phy_get_internal_delay(phydev, dap8211r_internal_delay,
> +							   DAP8211R_DELAY_SIZE, false);
> +
> +	switch (phydev->interface) {
> +	case PHY_INTERFACE_MODE_RGMII:
> +		if (rx_internal_delay < 0)
> +			rx_internal_delay = DAP8211R_INITIAL_RX_DEL_VAL;
> +
> +		if (tx_internal_delay < 0)
> +			tx_internal_delay = DAP8211R_INITIAL_TX_DEL_VAL;
> +		break;

Why 0.00 for one and 0.15ns for the other? PHY_INTERFACE_MODE_RGMII
means no delays.

	Andrew

  reply	other threads:[~2026-08-04  2:31 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-08-03 10:17 [PATCH net-next v5 0/3] Add DAPU Telecom DAP8211R(I) Gigabit Ethernet PHY driver Artem Shimko
2026-08-03 10:17 ` [PATCH net-next v5 1/3] dt-bindings: vendor-prefixes: add Guangdong Dapu Telecom Co., Ltd Artem Shimko
2026-08-04  6:46   ` Krzysztof Kozlowski
2026-08-04  7:14     ` Artem Shimko
2026-08-03 10:17 ` [PATCH net-next v5 2/3] dt-bindings: net: add DAPU Telecom DAP8211R(I) PHY binding Artem Shimko
2026-08-03 10:17 ` [PATCH net-next v5 3/3] net: phy: add DAPU Telecom DAP8211R(I) Gigabit Ethernet PHY driver Artem Shimko
2026-08-04  2:30   ` Andrew Lunn [this message]
2026-08-04  7:13     ` Artem Shimko
2026-08-04 13:26       ` Andrew Lunn
2026-08-04 14:05         ` Artem Shimko
2026-08-04 10:17   ` sashiko-bot
2026-08-04 10:38     ` Artem Shimko
2026-08-04  2:32 ` [PATCH net-next v5 0/3] Add " Andrew Lunn
2026-08-04  7:03   ` Artem Shimko
2026-08-04 13:32     ` Andrew Lunn
2026-08-04 14:08       ` Artem Shimko
2026-08-04 14:41         ` Andrew Lunn
2026-08-04 15:12           ` Artem Shimko

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=239a7699-bbda-4fab-bfa0-604b1d8806a9@lunn.ch \
    --to=andrew@lunn.ch \
    --cc=a.shimko.dev@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=krzk+dt@kernel.org \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=robh@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;
as well as URLs for NNTP newsgroup(s).