All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anand Moon <linux.amoon@gmail.com>
To: Michael Riesch <michael.riesch@wolfvision.net>
Cc: Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>, Chukun Pan <amadeus@jmu.edu.cn>,
	Peter Geis <pgwipeout@gmail.com>,
	devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.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
Date: Wed, 7 Dec 2022 09:59:34 +0530	[thread overview]
Message-ID: <CANAwSgTLL3nJ5pUuaFpKe8tc6oVREo_WOJ+_Q3kO3OmgPTa0Bw@mail.gmail.com> (raw)
In-Reply-To: <0f0c87d9-cff5-3bc8-07e2-7022a190cc86@wolfvision.net>

Hi Michael

On Tue, 22 Nov 2022 at 22:16, Michael Riesch
<michael.riesch@wolfvision.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

WARNING: multiple messages have this Message-ID (diff)
From: Anand Moon <linux.amoon@gmail.com>
To: Michael Riesch <michael.riesch@wolfvision.net>
Cc: Rob Herring <robh+dt@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	 Chukun Pan <amadeus@jmu.edu.cn>,
	Peter Geis <pgwipeout@gmail.com>,
	devicetree@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	 linux-kernel@vger.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
Date: Wed, 7 Dec 2022 09:59:34 +0530	[thread overview]
Message-ID: <CANAwSgTLL3nJ5pUuaFpKe8tc6oVREo_WOJ+_Q3kO3OmgPTa0Bw@mail.gmail.com> (raw)
In-Reply-To: <0f0c87d9-cff5-3bc8-07e2-7022a190cc86@wolfvision.net>

Hi Michael

On Tue, 22 Nov 2022 at 22:16, Michael Riesch
<michael.riesch@wolfvision.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

_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Anand Moon <linux.amoon@gmail.com>
To: Michael Riesch <michael.riesch@wolfvision.net>
Cc: Rob Herring <robh+dt@kernel.org>,
	 Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>,
	 Chukun Pan <amadeus@jmu.edu.cn>,
	Peter Geis <pgwipeout@gmail.com>,
	devicetree@vger.kernel.org,
	 linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org,
	 linux-kernel@vger.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
Date: Wed, 7 Dec 2022 09:59:34 +0530	[thread overview]
Message-ID: <CANAwSgTLL3nJ5pUuaFpKe8tc6oVREo_WOJ+_Q3kO3OmgPTa0Bw@mail.gmail.com> (raw)
In-Reply-To: <0f0c87d9-cff5-3bc8-07e2-7022a190cc86@wolfvision.net>

Hi Michael

On Tue, 22 Nov 2022 at 22:16, Michael Riesch
<michael.riesch@wolfvision.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

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

  reply	other threads:[~2022-12-07  4:29 UTC|newest]

Thread overview: 81+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20221116200150.4657-1-linux.amoon@gmail.com>
2022-11-16 20:01 ` [linux-next-v2 1/5] arm64: dts: rockchip: Fix gmac phy mode to rgmii on Rock 3A SBC Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-16 20:36   ` Peter Geis
2022-11-16 20:36     ` Peter Geis
2022-11-16 20:36     ` Peter Geis
2022-11-17 14:44     ` Anand Moon
2022-11-17 14:44       ` Anand Moon
2022-11-17 14:44       ` Anand Moon
2022-11-18  7:03   ` Michael Riesch
2022-11-18  7:03     ` Michael Riesch
2022-11-18  7:03     ` Michael Riesch
2022-11-18  9:34     ` Anand Moon
2022-11-18  9:34       ` Anand Moon
2022-11-18  9:34       ` Anand Moon
2022-11-18 18:13       ` Peter Geis
2022-11-18 18:13         ` Peter Geis
2022-11-18 18:13         ` Peter Geis
2022-11-22 14:19         ` Anand Moon
2022-11-22 14:19           ` Anand Moon
2022-11-22 14:19           ` Anand Moon
2022-11-22 22:34   ` (subset) " Heiko Stuebner
2022-11-22 22:34     ` Heiko Stuebner
2022-11-22 22:34     ` Heiko Stuebner
2022-11-16 20:01 ` [linux-next-v2 2/5] arm64: dts: rockchip: Add support of external clock to ethernet node " Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-22 11:18   ` Michael Riesch
2022-11-22 11:18     ` Michael Riesch
2022-11-22 11:18     ` Michael Riesch
2022-11-23 13:00     ` Anand Moon
2022-11-23 13:00       ` Anand Moon
2022-11-23 13:00       ` Anand Moon
2022-11-23 13:47       ` Heiko Stuebner
2022-11-23 13:47         ` Heiko Stuebner
2022-11-23 13:47         ` Heiko Stuebner
2022-11-16 20:01 ` [linux-next-v2 3/5] arm64: dts: rockchip: Add support of regulator for " Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-22 11:23   ` Michael Riesch
2022-11-22 11:23     ` Michael Riesch
2022-11-22 11:23     ` Michael Riesch
2022-11-16 20:01 ` [linux-next-v2 4/5] arm64: dts: rockchip: Add support of interrupt to " Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-22 16:10   ` Michael Riesch
2022-11-22 16:10     ` Michael Riesch
2022-11-22 16:10     ` Michael Riesch
2022-11-23 13:00     ` Anand Moon
2022-11-23 13:00       ` Anand Moon
2022-11-23 13:00       ` Anand Moon
2022-11-16 20:01 ` Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-16 20:01 ` [linux-next-v2 5/5] arm64: dts: rockchip: Add missing of ethernet-phy-id to reset the phy " Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-16 20:01   ` Anand Moon
2022-11-16 20:46   ` Peter Geis
2022-11-16 20:46     ` Peter Geis
2022-11-16 20:46     ` Peter Geis
2022-11-17  5:57     ` Anand Moon
2022-11-17  5:57       ` Anand Moon
2022-11-17  5:57       ` Anand Moon
2022-11-17 10:54       ` Robin Murphy
2022-11-17 10:54         ` Robin Murphy
2022-11-17 10:54         ` Robin Murphy
2022-11-17 14:55         ` Anand Moon
2022-11-17 14:55           ` Anand Moon
2022-11-17 14:55           ` Anand Moon
2022-11-17 19:10           ` Peter Geis
2022-11-17 19:10             ` Peter Geis
2022-11-17 19:10             ` Peter Geis
2022-11-22 14:20             ` Anand Moon
2022-11-22 14:20               ` Anand Moon
2022-11-22 14:20               ` Anand Moon
2022-11-22 16:46   ` Michael Riesch
2022-11-22 16:46     ` Michael Riesch
2022-11-22 16:46     ` Michael Riesch
2022-12-07  4:29     ` Anand Moon [this message]
2022-12-07  4:29       ` Anand Moon
2022-12-07  4:29       ` Anand Moon

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=CANAwSgTLL3nJ5pUuaFpKe8tc6oVREo_WOJ+_Q3kO3OmgPTa0Bw@mail.gmail.com \
    --to=linux.amoon@gmail.com \
    --cc=amadeus@jmu.edu.cn \
    --cc=devicetree@vger.kernel.org \
    --cc=heiko@sntech.de \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=michael.riesch@wolfvision.net \
    --cc=pgwipeout@gmail.com \
    --cc=robh+dt@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 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.