[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CANAwSgTLL3nJ5pUuaFpKe8tc6oVREo_WOJ+_Q3kO3OmgPTa0Bw@mail.gmail.com>
Date: Wed, 7 Dec 2022 09:59:34 +0530
From: Anand Moon <linux.amoon@...il.com>
To: Michael Riesch <michael.riesch@...fvision.net>
Cc: Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Heiko Stuebner <heiko@...ech.de>,
Chukun Pan <amadeus@....edu.cn>,
Peter Geis <pgwipeout@...il.com>, devicetree@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org,
linux-rockchip@...ts.infradead.org, linux-kernel@...r.kernel.org
Subject: Re: [linux-next-v2 5/5] arm64: dts: rockchip: Add missing of
ethernet-phy-id to reset the phy on Rock 3A SBC
Hi Michael
On Tue, 22 Nov 2022 at 22:16, Michael Riesch
<michael.riesch@...fvision.net> wrote:
>
> Hi Anand,
>
> On 11/16/22 21:01, Anand Moon wrote:
> > Add MDIO description with ethernet-phy-id compatible string
> > which enable calling reset of the phy. The PHY will then be probed,
> > independent of if it can be found on the bus or not,
> > and that probing will enable the GPIO.
> >
> > ethernet-phy-id is read from ethenet register dump reg2 and reg3.
> >
> > Fix following warning.
> > [ 12.323417] rk_gmac-dwmac fe010000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
> > [ 12.324078] rk_gmac-dwmac fe010000.ethernet eth0: no phy at addr -1
> > [ 12.324099] rk_gmac-dwmac fe010000.ethernet eth0: __stmmac_open: Cannot attach to PHY (error: -19)
>
> Without this patch, the phy on my ROCK3A is properly detected:
>
> [ 1.494963] rk_gmac-dwmac fe010000.ethernet eth0: PHY [stmmac-0:00]
> driver [RTL8211F Gigabit Ethernet)
>
> but with the patch applied, only a generic phy is recognized:
>
> [ 1.398674] rk_gmac-dwmac fe010000.ethernet eth0: PHY [stmmac-0:00]
> driver [Generic PHY] (irq=POLL)
>
> This does not seem right at all. NACK to this patch!
>
Yep you are correct I found way to read the ethernet id
# there is kernel module witch help read the ethernet-id using netlink socket.
$ git clone https://github.com/wkz/mdio-tools
$ sudo mdio
fixed-0
stmmac-0
$ sudo mdio stmmac-0
DEV PHY-ID LINK
0x00 0x001cc916 up
0x01 0x001cc916 up
with the above ethernet id I update the compatible string
compatible = "ethernet-phy-id001c.c916", "ethernet-phy-ieee802.3-c22";
I could get the ethernet registered correctly.
[ 9.865059] rk_gmac-dwmac fe010000.ethernet end0: Register
MEM_TYPE_PAGE_POOL RxQ-0
[ 10.061904] rk_gmac-dwmac fe010000.ethernet end0: PHY [stmmac-0:00]
driver [RTL8211F Gigabit Ethernet] (irq=POLL)
Thanks
-Anand
Powered by blists - more mailing lists