From: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> To: Florian Fainelli <f.fainelli@gmail.com>, Andrew Lunn <andrew@lunn.ch>, Mans Rullgard <mans@mansr.com>, Martin Blumenstingl <martin.blumenstingl@gmail.com>, Grygorii Strashko <grygorii.strashko@ti.com>, Fabio Estevam <fabio.estevam@nxp.com>, Zefir Kurtisi <zefir.kurtisi@neratec.com>, Timur Tabi <timur@codeaurora.org>, Daniel Mack <zonque@gmail.com> Cc: netdev <netdev@vger.kernel.org>, Linux ARM <linux-arm-kernel@lists.infradead.org>, "David S. Miller" <davem@davemloft.net>, Thibaud Cornic <thibaud_cornic@sigmadesigns.com>, Mason <slash.tmp@free.fr> Subject: [PATCH v2 1/4] net: phy: at803x: Document RGMII RX and TX clock delay issues Date: Fri, 21 Jul 2017 13:25:05 +0200 [thread overview] Message-ID: <051653a2-946f-6a0b-4cff-b403d1197038@sigmadesigns.com> (raw) In-Reply-To: <2617d673-ef81-5e7f-4730-ed3aa3f1c2c6@sigmadesigns.com> The current code supports enabling RGMII RX and TX clock delays. The unstated assumption is that these settings are disabled by default at reset, which is not the case. RX clock delay is enabled at reset. And TX clock delay "survives" across SW resets. Thus, if the bootloader enables TX clock delay, it will remain enabled at reset in Linux. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> --- drivers/net/phy/at803x.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index c1e52b9dc58d..7a0954513b91 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -283,6 +283,12 @@ static int at803x_config_init(struct phy_device *phydev) if (ret < 0) return ret; + /* + * NB: This code assumes that RGMII RX clock delay is disabled + * at reset, but actually, RX clock delay is enabled at reset. + * Disabling the delay if it has not been explicitly requested + * breaks boards that rely on the enabled-by-default behavior. + */ if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID || phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) { ret = at803x_enable_rx_delay(phydev); @@ -290,6 +296,12 @@ static int at803x_config_init(struct phy_device *phydev) return ret; } + /* + * NB: This code assumes that RGMII TX clock delay is disabled + * at reset, but actually, TX clock delay "survives" across SW + * resets. If the bootloader enables TX clock delay, Linux is + * stuck with that setting. + */ if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID || phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) { ret = at803x_enable_tx_delay(phydev); -- 2.11.0
WARNING: multiple messages have this Message-ID (diff)
From: marc_gonzalez@sigmadesigns.com (Marc Gonzalez) To: linux-arm-kernel@lists.infradead.org Subject: [PATCH v2 1/4] net: phy: at803x: Document RGMII RX and TX clock delay issues Date: Fri, 21 Jul 2017 13:25:05 +0200 [thread overview] Message-ID: <051653a2-946f-6a0b-4cff-b403d1197038@sigmadesigns.com> (raw) In-Reply-To: <2617d673-ef81-5e7f-4730-ed3aa3f1c2c6@sigmadesigns.com> The current code supports enabling RGMII RX and TX clock delays. The unstated assumption is that these settings are disabled by default at reset, which is not the case. RX clock delay is enabled at reset. And TX clock delay "survives" across SW resets. Thus, if the bootloader enables TX clock delay, it will remain enabled at reset in Linux. Signed-off-by: Marc Gonzalez <marc_gonzalez@sigmadesigns.com> --- drivers/net/phy/at803x.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c index c1e52b9dc58d..7a0954513b91 100644 --- a/drivers/net/phy/at803x.c +++ b/drivers/net/phy/at803x.c @@ -283,6 +283,12 @@ static int at803x_config_init(struct phy_device *phydev) if (ret < 0) return ret; + /* + * NB: This code assumes that RGMII RX clock delay is disabled + * at reset, but actually, RX clock delay is enabled@reset. + * Disabling the delay if it has not been explicitly requested + * breaks boards that rely on the enabled-by-default behavior. + */ if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID || phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) { ret = at803x_enable_rx_delay(phydev); @@ -290,6 +296,12 @@ static int at803x_config_init(struct phy_device *phydev) return ret; } + /* + * NB: This code assumes that RGMII TX clock delay is disabled + * at reset, but actually, TX clock delay "survives" across SW + * resets. If the bootloader enables TX clock delay, Linux is + * stuck with that setting. + */ if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID || phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) { ret = at803x_enable_tx_delay(phydev); -- 2.11.0
next prev parent reply other threads:[~2017-07-21 11:53 UTC|newest] Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top 2017-07-21 11:22 [PATCH v2 0/4] RGMII RX and TX clock delays using Atheros 8035 Marc Gonzalez 2017-07-21 11:22 ` Marc Gonzalez 2017-07-21 11:25 ` Marc Gonzalez [this message] 2017-07-21 11:25 ` [PATCH v2 1/4] net: phy: at803x: Document RGMII RX and TX clock delay issues Marc Gonzalez 2017-07-21 13:20 ` Timur Tabi 2017-07-21 13:20 ` Timur Tabi 2017-07-21 13:29 ` Marc Gonzalez 2017-07-21 13:29 ` Marc Gonzalez 2017-07-21 14:06 ` Timur Tabi 2017-07-21 14:06 ` Timur Tabi 2017-07-21 14:36 ` Marc Gonzalez 2017-07-21 14:36 ` Marc Gonzalez 2017-07-21 11:25 ` [PATCH v2 2/4] net: ethernet: nb8800: Set RGMII_MODE for all RGMII modes Marc Gonzalez 2017-07-21 11:25 ` Marc Gonzalez 2017-07-21 13:00 ` Måns Rullgård 2017-07-21 13:00 ` Måns Rullgård 2017-07-21 18:06 ` Florian Fainelli 2017-07-21 18:06 ` Florian Fainelli 2017-07-21 11:26 ` [PATCH v2 3/4] net: ethernet: nb8800: Fix RGMII TX clock delay setup Marc Gonzalez 2017-07-21 11:26 ` Marc Gonzalez 2017-07-21 13:04 ` Måns Rullgård 2017-07-21 13:04 ` Måns Rullgård 2017-07-21 13:43 ` Marc Gonzalez 2017-07-21 13:43 ` Marc Gonzalez 2017-07-21 13:47 ` Måns Rullgård 2017-07-21 13:47 ` Måns Rullgård 2017-07-21 14:18 ` Marc Gonzalez 2017-07-21 14:18 ` Marc Gonzalez 2017-07-21 14:24 ` Måns Rullgård 2017-07-21 14:24 ` Måns Rullgård 2017-07-21 18:15 ` Florian Fainelli 2017-07-21 18:15 ` Florian Fainelli 2017-07-21 11:29 ` [PATCH v2 4/4] ARM: dts: tango4: Add RGMII RX and TX clock delays Marc Gonzalez 2017-07-21 11:29 ` Marc Gonzalez 2017-07-21 12:47 ` [PATCH v2 0/4] RGMII RX and TX clock delays using Atheros 8035 Marc Gonzalez 2017-07-21 12:47 ` Marc Gonzalez 2017-07-21 13:16 ` Marc Gonzalez 2017-07-21 13:16 ` Marc Gonzalez
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=051653a2-946f-6a0b-4cff-b403d1197038@sigmadesigns.com \ --to=marc_gonzalez@sigmadesigns.com \ --cc=andrew@lunn.ch \ --cc=davem@davemloft.net \ --cc=f.fainelli@gmail.com \ --cc=fabio.estevam@nxp.com \ --cc=grygorii.strashko@ti.com \ --cc=linux-arm-kernel@lists.infradead.org \ --cc=mans@mansr.com \ --cc=martin.blumenstingl@gmail.com \ --cc=netdev@vger.kernel.org \ --cc=slash.tmp@free.fr \ --cc=thibaud_cornic@sigmadesigns.com \ --cc=timur@codeaurora.org \ --cc=zefir.kurtisi@neratec.com \ --cc=zonque@gmail.com \ /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: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.