From: Peter Ujfalusi <peter.ujfalusi@ti.com>
To: Vinod Koul <vkoul@kernel.org>,
David S Miller <davem@davemloft.net>,
Roger Quadros <rogerq@ti.com>
Cc: netdev@vger.kernel.org, linux-arm-msm@vger.kernel.org,
Niklas Cassel <niklas.cassel@linaro.org>,
Bjorn Andersson <bjorn.andersson@linaro.org>,
Andrew Lunn <andrew@lunn.ch>,
Florian Fainelli <f.fainelli@gmail.com>,
"Nori, Sekhar" <nsekhar@ti.com>
Subject: Re: [v3,4/5] net: phy: at803x: Disable phy delay for RGMII mode
Date: Tue, 12 Feb 2019 12:55:33 +0200 [thread overview]
Message-ID: <147151c4-d162-4ebe-189a-564492d84d18@ti.com> (raw)
In-Reply-To: <20190121091318.20079-5-vkoul@kernel.org>
Vinod,
On 21/01/2019 11.13, Vinod Koul wrote:
> For RGMII mode, phy delay should be disabled. Add this case along
> with disable delay routines.
In next-20190211 I need to revert this patch to get cpsw networking to work on am335x-evmsk. The board uses AR8031_AL1A PHY, which is handled by the phy/at803x.c
On next-20190211:
[ 3.374601] net eth0: initializing cpsw version 1.12 (0)
[ 3.384484] Atheros 8031 ethernet 4a101000.mdio:00: attached PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
[ 3.400041] cpsw 4a100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 3.410813] mmc1: new SDIO card at address 0001
[ 3.439362] IP-Config: Complete:
[ 3.442649] device=eth0, hwaddr=bc:6a:29:7d:2c:a9, ipaddr=10.0.0.90, mask=255.255.255.0, gw=10.0.0.1
[ 3.452840] host=10.0.0.90, domain=, nis-domain=(none)
[ 3.458462] bootserver=10.0.0.30, rootserver=10.0.0.30, rootpath=
[ 3.466296] vwl1271: disabling
[ 3.470195] ALSA device list:
[ 3.473189] #0: AM335x-EVMSK
After reverting this patch:
[ 3.374636] net eth0: initializing cpsw version 1.12 (0)
[ 3.384534] Atheros 8031 ethernet 4a101000.mdio:00: attached PHY driver [Atheros 8031 ethernet] (mii_bus:phy_addr=4a101000.mdio:00, irq=POLL)
[ 3.400125] cpsw 4a100000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[ 3.410866] mmc1: new SDIO card at address 0001
[ 3.439379] IP-Config: Complete:
[ 3.442666] device=eth0, hwaddr=bc:6a:29:7d:2c:a9, ipaddr=10.0.0.90, mask=255.255.255.0, gw=10.0.0.1
[ 3.452865] host=10.0.0.90, domain=, nis-domain=(none)
[ 3.458482] bootserver=10.0.0.30, rootserver=10.0.0.30, rootpath=
[ 3.466334] vwl1271: disabling
[ 3.470245] ALSA device list:
[ 3.473241] #0: AM335x-EVMSK
[ 3.501052] VFS: Mounted root (nfs filesystem) readonly on device 0:15.
[ 3.508694] devtmpfs: mounted
[ 3.514546] Freeing unused kernel memory: 1024K
[ 3.520567] Run /sbin/init as init process
and the board boots to nfsroot fine.
> Signed-off-by: Vinod Koul <vkoul@kernel.org>
> ---
> drivers/net/phy/at803x.c | 22 ++++++++++++----------
> 1 file changed, 12 insertions(+), 10 deletions(-)
>
> diff --git a/drivers/net/phy/at803x.c b/drivers/net/phy/at803x.c
> index f9432d053a22..8ff12938ab47 100644
> --- a/drivers/net/phy/at803x.c
> +++ b/drivers/net/phy/at803x.c
> @@ -110,16 +110,16 @@ static int at803x_debug_reg_mask(struct phy_device *phydev, u16 reg,
> return phy_write(phydev, AT803X_DEBUG_DATA, val);
> }
>
> -static inline int at803x_enable_rx_delay(struct phy_device *phydev)
> +static inline int at803x_disable_rx_delay(struct phy_device *phydev)
> {
> - return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0, 0,
> - AT803X_DEBUG_RX_CLK_DLY_EN);
> + return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_0,
> + AT803X_DEBUG_RX_CLK_DLY_EN, 0);
> }
>
> -static inline int at803x_enable_tx_delay(struct phy_device *phydev)
> +static inline int at803x_disable_tx_delay(struct phy_device *phydev)
> {
> - return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5, 0,
> - AT803X_DEBUG_TX_CLK_DLY_EN);
> + return at803x_debug_reg_mask(phydev, AT803X_DEBUG_REG_5,
> + AT803X_DEBUG_TX_CLK_DLY_EN, 0);
> }
>
> /* save relevant PHY registers to private copy */
> @@ -256,15 +256,17 @@ static int at803x_config_init(struct phy_device *phydev)
> return ret;
>
> if (phydev->interface == PHY_INTERFACE_MODE_RGMII_RXID ||
> - phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) {
> - ret = at803x_enable_rx_delay(phydev);
> + phydev->interface == PHY_INTERFACE_MODE_RGMII_ID ||
> + phydev->interface == PHY_INTERFACE_MODE_RGMII) {
> + ret = at803x_disable_rx_delay(phydev);
> if (ret < 0)
> return ret;
> }
>
> if (phydev->interface == PHY_INTERFACE_MODE_RGMII_TXID ||
> - phydev->interface == PHY_INTERFACE_MODE_RGMII_ID) {
> - ret = at803x_enable_tx_delay(phydev);
> + phydev->interface == PHY_INTERFACE_MODE_RGMII_ID ||
> + phydev->interface == PHY_INTERFACE_MODE_RGMII) {
> + ret = at803x_disable_tx_delay(phydev);
> if (ret < 0)
> return ret;
> }
>
- Péter
Texas Instruments Finland Oy, Porkkalankatu 22, 00180 Helsinki. Y-tunnus/Business ID: 0615521-4. Kotipaikka/Domicile: Helsinki
next prev parent reply other threads:[~2019-02-12 10:55 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-21 9:13 [PATCH v3 0/5] net: Add support for Qualcomm ethqos Vinod Koul
2019-01-21 9:13 ` [PATCH v3 1/5] dt-bindings: net: Add Qualcomm ethqos binding Vinod Koul
2019-01-21 15:31 ` Rob Herring
2019-01-21 9:13 ` [PATCH v3 2/5] net: stmmac: Add driver for Qualcomm ethqos Vinod Koul
2019-01-21 9:13 ` [PATCH v3 3/5] MAINTAINER: Add entry for Qualcomm ETHQOS ethernet driver Vinod Koul
2019-01-21 9:13 ` [PATCH v3 4/5] net: phy: at803x: Disable phy delay for RGMII mode Vinod Koul
2019-02-12 10:55 ` Peter Ujfalusi [this message]
2019-02-12 11:31 ` [v3,4/5] " Vinod Koul
2019-02-12 12:09 ` Peter Ujfalusi
2019-02-12 12:17 ` Vinod Koul
2019-02-12 13:34 ` Marc Gonzalez
2019-01-21 9:13 ` [PATCH v3 5/5] net: dsa: qca8k: disable " Vinod Koul
2019-01-23 3:38 ` [PATCH v3 0/5] net: Add support for Qualcomm ethqos David Miller
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=147151c4-d162-4ebe-189a-564492d84d18@ti.com \
--to=peter.ujfalusi@ti.com \
--cc=andrew@lunn.ch \
--cc=bjorn.andersson@linaro.org \
--cc=davem@davemloft.net \
--cc=f.fainelli@gmail.com \
--cc=linux-arm-msm@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=niklas.cassel@linaro.org \
--cc=nsekhar@ti.com \
--cc=rogerq@ti.com \
--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;
as well as URLs for NNTP newsgroup(s).