mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jie Luo <quic_luoj@quicinc.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: <agross@kernel.org>, <andersson@kernel.org>,
	<konrad.dybcio@linaro.org>, <davem@davemloft.net>,
	<edumazet@google.com>, <kuba@kernel.org>, <pabeni@redhat.com>,
	<robh+dt@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
	<conor+dt@kernel.org>, <hkallweit1@gmail.com>,
	<linux@armlinux.org.uk>, <robert.marko@sartura.hr>,
	<linux-arm-msm@vger.kernel.org>, <netdev@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<quic_srichara@quicinc.com>
Subject: Re: [PATCH 3/9] net: mdio: ipq4019: Enable GPIO reset for ipq5332 platform
Date: Mon, 4 Dec 2023 16:53:10 +0800	[thread overview]
Message-ID: <312f2ea7-e0a5-4f0e-884d-85c3450e1ce3@quicinc.com> (raw)
In-Reply-To: <dd2c3cfa-f7ee-4abb-9eff-2aac04fa914f@lunn.ch>



On 11/17/2023 1:20 AM, Andrew Lunn wrote:
>> FYI, here is the sequence to bring up qca8084.
>> a. enable clock output to qca8084.
>> b. do gpio reset of qca8084.
>> c. customize MDIO address and initialization configurations.
>> d. the PHY ID can be acquired.
> 
> This all sounds like it is specific to the qca8084, so it should be in
> the driver for the qca8084.
> 
> Its been pointed out you can get the driver to load by using the PHY
> ID in the compatible. You want the SoC clock driver to export a CCF
> clock, which the PHY driver can use. The PHY driver should also be
> able to get the GPIO. So i think the PHY driver can do all this.
> 
>       Andrew

Hi Andrew,
If i put the GPIO reset in the PHY device tree node, the PHY probe
function will be postponed to be called instead of being called
during the MDIO bus register, which leads to the PCS can't be
created correctly because of reading PHY capability failed before
the PHY probe function called.

my device tree nodes are as below.

ethernet_device {
	phy-handle = <&phy3>;
	phy-mode = "2500base-x";
	...
};

mdio@90000 {
	phy3: ethernet-phy@3 {
		compatible = "ethernet-phy-id004d.d180";
		reg = <4>;
		reset-gpios = <&tlmm 51 GPIO_ACTIVE_LOW>;
		reset-assert-us = <100000>;
		reset-deassert-us = <100000>;
		clocks = <...>;
		clock-names = "...";
	};
};

Since the PHY probe function of phy3 is postponed instead of
called during the MDIO bus driver register, and the initialization
of qca8084 is not called when the ethernet_device driver is called
to create PCS, where the phy3 capability is checked, which is failed
since the qca8084 PHY probe is not called.

Any idea to resolve this call sequence issue?
Thanks.


  parent reply	other threads:[~2023-12-04  8:53 UTC|newest]

Thread overview: 55+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-11-15  3:25 [PATCH 0/9] add MDIO changes on " Luo Jie
2023-11-15  3:25 ` [PATCH 1/9] net: mdio: ipq4019: increase eth_ldo_rdy for " Luo Jie
2023-11-15 13:44   ` Andrew Lunn
2023-11-16  9:35     ` Jie Luo
2023-11-16 11:57   ` Krzysztof Kozlowski
2023-11-17  9:56     ` Jie Luo
2023-11-15  3:25 ` [PATCH 2/9] net: mdio: ipq4019: Enable the clocks " Luo Jie
2023-11-20 14:22   ` Konrad Dybcio
2023-11-21 10:28     ` Jie Luo
2023-11-21 14:04       ` Andrew Lunn
2023-11-23 11:02         ` Jie Luo
2023-11-27  9:37   ` Simon Horman
2023-11-28  7:07     ` Jie Luo
2023-11-15  3:25 ` [PATCH 3/9] net: mdio: ipq4019: Enable GPIO reset " Luo Jie
2023-11-15 15:11   ` Andrew Lunn
2023-11-16 11:13     ` Jie Luo
2023-11-16 11:19       ` Robert Marko
2023-11-16 11:29         ` Jie Luo
2023-11-16 17:20       ` Andrew Lunn
2023-11-17  9:59         ` Jie Luo
2023-12-04  8:53         ` Jie Luo [this message]
2023-11-15  3:25 ` [PATCH 4/9] net: mdio: ipq4019: configure CMN PLL clock for ipq5332 Luo Jie
2023-11-15 15:19   ` Andrew Lunn
2023-11-16 10:48     ` Jie Luo
2023-11-22 20:24   ` Konrad Dybcio
2023-11-15  3:25 ` [PATCH 5/9] net: mdio: ipq4019: support MDIO clock frequency divider Luo Jie
2023-11-15 15:22   ` Andrew Lunn
2023-11-16 10:47     ` Jie Luo
2023-11-15  3:25 ` [PATCH 6/9] net: mdio: ipq4019: Support qca8084 switch register access Luo Jie
2023-11-15  3:25 ` [PATCH 7/9] net: mdio: ipq4019: program phy address when "fixup" defined Luo Jie
2023-11-15 16:17   ` Andrew Lunn
2023-11-16 11:17     ` Jie Luo
2023-11-15  3:25 ` [PATCH 8/9] net: mdio: ipq4019: add qca8084 configurations Luo Jie
2023-11-15 16:20   ` Andrew Lunn
2023-11-15 17:01     ` Konrad Dybcio
2023-11-15 17:03       ` Robert Marko
2023-11-16 10:45         ` Jie Luo
2023-11-16 17:08           ` Andrew Lunn
2023-11-17 10:05             ` Jie Luo
2023-11-16 10:44       ` Jie Luo
2023-11-16 10:47     ` Jie Luo
2023-11-16 17:12       ` Andrew Lunn
2023-11-17 10:15         ` Jie Luo
2023-11-15  3:25 ` [PATCH 9/9] dt-bindings: net: ipq4019-mdio: Document ipq5332 platform Luo Jie
2023-11-15  4:20   ` Rob Herring
2023-11-15 14:35   ` Andrew Lunn
2023-11-16 11:22     ` Jie Luo
2023-11-16 11:56   ` Krzysztof Kozlowski
2023-11-17 10:36     ` Jie Luo
2023-11-17 10:40       ` Krzysztof Kozlowski
2023-11-17 11:20         ` Jie Luo
2023-11-17 12:43           ` Krzysztof Kozlowski
2023-11-18  8:07             ` Jie Luo
2023-11-18 15:36               ` Andrew Lunn
2023-11-20  9:00                 ` Jie Luo

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=312f2ea7-e0a5-4f0e-884d-85c3450e1ce3@quicinc.com \
    --to=quic_luoj@quicinc.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=konrad.dybcio@linaro.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=quic_srichara@quicinc.com \
    --cc=robert.marko@sartura.hr \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®