devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jie Luo <quic_luoj@quicinc.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Christian Marangi <ansuelsmth@gmail.com>,
	Andy Gross <agross@kernel.org>,
	Bjorn Andersson <andersson@kernel.org>,
	Konrad Dybcio <konrad.dybcio@linaro.org>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh+dt@kernel.org>,
	Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	Robert Marko <robert.marko@sartura.hr>,
	<linux-arm-msm@vger.kernel.org>, <netdev@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>
Subject: Re: [net-next PATCH v2 2/3] net: mdio: ipq4019: add support for clock-frequency property
Date: Mon, 5 Feb 2024 11:24:16 +0800	[thread overview]
Message-ID: <05253a6d-7fa5-4c32-af6f-cda0f902cf77@quicinc.com> (raw)
In-Reply-To: <4cd01d93-7b6d-4766-8337-c4dc09aeedc2@lunn.ch>



On 2/4/2024 11:22 PM, Andrew Lunn wrote:
> On Sun, Feb 04, 2024 at 05:59:10PM +0800, Jie Luo wrote:
>>
>>
>> On 1/30/2024 8:35 AM, Christian Marangi wrote:
>>> +
>>> +	/* If div is /256 assume nobody have set this value and
>>> +	 * try to find one MDC rate that is close the 802.3 spec of
>>> +	 * 2.5MHz
>>> +	 */
>>> +	for (div = 256; div >= 8; div /= 2) {
>>> +		/* Stop as soon as we found a divider that
>>> +		 * reached the closest value to 2.5MHz
>>> +		 */
>>> +		if (DIV_ROUND_UP(ahb_rate, div) > 2500000)
>>> +			break;
>>
>> Hi Christian,
>> Sorry for the delayed review.
>>
>> The MDIO hardware block supports higher frequency 6.25M and 12.5M,
>> Would you remove this 2.5MHZ limitation? On the IPQ platform, we
>> normally use 6.25MHZ.
> 
> 802.3 says the clock has a maximum of 2.5MHz. So this code is correct.
> 
> It is however O.K. to go faster, but since that breaks the standard,
> you need each board to indicate it knows all the devices on the bus do
> support higher speeds and its O.K. to break the standard. You indicate
> this by using the DT property in its .dts file. For an MDIO bus which
> is totally internal, you could however put the DT property in the SoC
> .dtsi file.
> 
>        Andrew

Understand it, Thanks Andrew.

  reply	other threads:[~2024-02-05  3:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-30  0:35 [net-next PATCH v2 0/3] net: mdio-ipq4019: fix wrong default MDC rate Christian Marangi
2024-01-30  0:35 ` [net-next PATCH v2 1/3] dt-bindings: net: ipq4019-mdio: document now supported clock-frequency Christian Marangi
2024-01-30  0:49   ` Andrew Lunn
2024-01-30  0:35 ` [net-next PATCH v2 2/3] net: mdio: ipq4019: add support for clock-frequency property Christian Marangi
2024-01-30  0:53   ` Andrew Lunn
2024-02-04  9:59   ` Jie Luo
2024-02-04 15:22     ` Andrew Lunn
2024-02-05  3:24       ` Jie Luo [this message]
2024-01-30  0:35 ` [net-next PATCH v2 3/3] arm64: dts: qcom: ipq8074: add clock-frequency to MDIO node Christian Marangi
2024-01-30  0:55   ` Andrew Lunn
2024-01-30  0:57     ` Christian Marangi
2024-01-31  1:40       ` Jakub Kicinski
2024-01-31  2:28         ` Christian Marangi

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=05253a6d-7fa5-4c32-af6f-cda0f902cf77@quicinc.com \
    --to=quic_luoj@quicinc.com \
    --cc=agross@kernel.org \
    --cc=andersson@kernel.org \
    --cc=andrew@lunn.ch \
    --cc=ansuelsmth@gmail.com \
    --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=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;
as well as URLs for NNTP newsgroup(s).