linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
From: Shawn Guo <shawnguo@kernel.org>
To: wei.fang@nxp.com
Cc: robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
	s.hauer@pengutronix.de, kernel@pengutronix.de,
	festevam@gmail.com, linux-imx@nxp.com, Frank.Li@nxp.com,
	shenwei.wang@nxp.com, xiaoning.wang@nxp.com,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] arm64: dts: imx8dxl: Disable hibernation mode of AR8031 for EQOS
Date: Sun, 1 Jan 2023 10:42:21 +0800	[thread overview]
Message-ID: <20230101024220.GM6112@T480> (raw)
In-Reply-To: <20221216011434.967813-1-wei.fang@nxp.com>

On Fri, Dec 16, 2022 at 09:14:34AM +0800, wei.fang@nxp.com wrote:
> From: Wei Fang <wei.fang@nxp.com>
> 
> The hibernation mode of AR8031 PHY defaults to be enabled after hardware
> reset. When the cable is unplugged, the PHY will enter hibernation mode
> after about 10 senconds and the PHY clocks will be stopped to save
> power. However, due to the design of EQOS, the mac needs the RX_CLK of
> PHY for software reset to complete. Otherwise the software reset of EQOS
> will be failed and do not work correctly. The only way is to disable
> hibernation mode of AR8031 PHY for EQOS, the "qca,disable-hibernation-mode"
> property is used for this purpose and has already been submitted to the
> upstream, for more details please refer to the below link:
> https://lore.kernel.org/netdev/20220818030054.1010660-2-wei.fang@nxp.com/
> 
> This issue is easy to reproduce, just unplug the cable and "ifconfig eth0
> down", after about 10 senconds, then "ifconfig eth0 up", you will see
> failure log on the serial port. The log is shown as following:
> root@imx8dxlevk:~#
> [34.941970] imx-dwmac 5b050000.ethernet eth0: Link is Down
> root@imx8dxlevk:~# ifconfig eth0 down
> [35.437814] imx-dwmac 5b050000.ethernet eth0: FPE workqueue stop
> [35.507913] imx-dwmac 5b050000.ethernet eth0: PHY [stmmac-1:00] driver [Qualcomm Atheros AR8031/AR8033] (irq=POLL)
> [35.518613] imx-dwmac 5b050000.ethernet eth0: configuring for phy/rgmii-id link mode
> root@imx8dxlevk:~# ifconfig eth0 up
> [71.143044] imx-dwmac 5b050000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
> [71.215855] imx-dwmac 5b050000.ethernet eth0: PHY [stmmac-1:00] driver [Qualcomm Atheros AR8031/AR8033] (irq=POLL)
> [72.230417] imx-dwmac 5b050000.ethernet: Failed to reset the dma
> [72.236512] imx-dwmac 5b050000.ethernet eth0: stmmac_hw_setup: DMA engine initialization failed
> [72.245258] imx-dwmac 5b050000.ethernet eth0: __stmmac_open: Hw setup failed
> SIOCSIFFLAGS: Connection timed out
> 
> After applying this patch, the software reset of EQOS will be
> successful. And the log is shown as below.
> root@imx8dxlevk:~# ifconfig eth0 up
> [96.114344] imx-dwmac 5b050000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
> [96.171466] imx-dwmac 5b050000.ethernet eth0: PHY [stmmac-1:00] driver [Qualcomm Atheros AR8031/AR8033] (irq=POLL)
> [96.188883] imx-dwmac 5b050000.ethernet eth0: No Safety Features support found
> [96.196221] imx-dwmac 5b050000.ethernet eth0: IEEE 1588-2008 Advanced Timestamp supported
> [96.204846] imx-dwmac 5b050000.ethernet eth0: registered PTP clock
> [96.225558] imx-dwmac 5b050000.ethernet eth0: FPE workqueue start
> [96.236858] imx-dwmac 5b050000.ethernet eth0: configuring for phy/rgmii-id link mode
> [96.249358] 8021q: adding VLAN 0 to HW filter on device eth0
> 
> Signed-off-by: Wei Fang <wei.fang@nxp.com>
> Reviewed-by: Clark Wang <xiaoning.wang@nxp.com>

I updated the subject prefix like below to make it clear this is
an imx8dxl-evk board change.

  arm64: dts: imx8dxl-evk: ...

Applied, thanks!

Shawn

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

      reply	other threads:[~2023-01-01  2:43 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-12-16  1:14 [PATCH v2] arm64: dts: imx8dxl: Disable hibernation mode of AR8031 for EQOS wei.fang
2023-01-01  2:42 ` Shawn Guo [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=20230101024220.GM6112@T480 \
    --to=shawnguo@kernel.org \
    --cc=Frank.Li@nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-imx@nxp.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=robh+dt@kernel.org \
    --cc=s.hauer@pengutronix.de \
    --cc=shenwei.wang@nxp.com \
    --cc=wei.fang@nxp.com \
    --cc=xiaoning.wang@nxp.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: 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).