From: Christian Marangi <ansuelsmth@gmail.com>
To: Jie Luo <quic_luoj@quicinc.com>
Cc: 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>, Andrew Lunn <andrew@lunn.ch>,
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,
Sergey Ryazanov <ryazanov.s.a@gmail.com>
Subject: Re: [net-next PATCH 0/3] net: mdio-ipq4019: fix wrong default MDC rate
Date: Thu, 25 Jan 2024 12:36:45 +0100 [thread overview]
Message-ID: <65b247d1.df0a0220.12334.efd9@mx.google.com> (raw)
In-Reply-To: <53445feb-a02c-4859-a993-ccf957208115@quicinc.com>
On Thu, Jan 25, 2024 at 01:57:20PM +0800, Jie Luo wrote:
>
>
> On 1/25/2024 5:36 AM, Christian Marangi wrote:
> > This was a long journey to arrive and discover this problem.
> >
> > To not waste too much char, there is a race problem with PHY and driver
> > probe. This was observed with Aquantia PHY firmware loading.
> >
> > With some hacks the race problem was workarounded but an interesting
> > thing was notice. It took more than a minute for the firmware to load
> > via MDIO.
> >
> > This was strange as the same operation was done by UBoot in at max 5
> > second and the same data was loaded.
> >
> > A similar problem was observed on a mtk board that also had an
> > Aquantia PHY where the load was very slow. It was notice that the cause
> > was the MDIO bus running at a very low speed and the firmware
> > was missing a property (present in mtk sdk) that set the right frequency
> > to the MDIO bus.
> >
> > It was fun to find that THE VERY SAME PROBLEM is present on IPQ in a
> > different form. The MDIO apply internally a division to the feed clock
> > resulting in the bus running at 390KHz instead of 6.25Mhz.
> >
> > Searching around the web for some documentation and some include and
> > analyzing the uboot codeflow resulted in the divider being set wrongly
> > at /256 instead of /16 as the value was actually never set.
> > Applying the value restore the original load time for the Aquantia PHY.
> >
> > This series mainly handle this by adding support for the "clock-frequency"
> > property.
> >
> > Christian Marangi (3):
> > dt-bindings: net: ipq4019-mdio: document now supported clock-frequency
> > net: mdio: ipq4019: add support for clock-frequency property
> > arm64: dts: qcom: ipq8074: add clock-frequency to MDIO node
> >
> > .../bindings/net/qcom,ipq4019-mdio.yaml | 10 +++
> > arch/arm64/boot/dts/qcom/ipq8074.dtsi | 2 +
> > drivers/net/mdio/mdio-ipq4019.c | 68 +++++++++++++++++--
> > 3 files changed, 75 insertions(+), 5 deletions(-)
> >
>
> Hi Christian,
> Just a gentle reminder.
>
Hi Jie,
hope you can understand my reason.
> The MDIO frequency config is already added by the following patch series.
> https://lore.kernel.org/netdev/28c8b31c-8dcb-4a19-9084-22c77a74b9a1@linaro.org/T/#m840cb8d269dca133c3ad3da3d112c63382ec2058
>
Wasn't aware of this, as I said in the cover letter this all comes by a
problem we notice in the Aquantia firmware load that was slow as hell
and we just notice the misconfiguration of the divisor.
The feature in this series is really a simple one and almost ready (I
already have v2 ready for the request from Andrew to follow 802.3 spec)
and we really need it ASAP as we are trying to move our ipq807x targets to
upstream driver and finally start using the integrated firmware loading
for Aquantia PHY.
Also I can see some fundamental difference between the 2 patch, mainly
in how the value is applied and setting a sane divisor by default
instead of using 0xff. (probably Andrew would have pointed out the same
thing in some later revision to your series)
Looking at the linked series I notice there are still some thing to
polish and to clarify with DT and driver and I think it's only
beneficial if this feature is worked separately as it's not only needed
for ipq50xx but affects every user of this (ipq40xx, ipq807x, ipq60xx)
and it would be a pitty to wait the entire ipq50xx series to be handled
just to fix a long lasting misconfiguration on various SoC family.
Hope you can understand these reasons, it's all for the sake of making
this driver more mature quicker.
> This MDIO patch series will be updated to just keep the MDIO frequency
> patch and DT document for this MDIO frequency property added.
>
> For CMN PLL config will be moved to the CMN PLL clock driver and the UNIPHY
> clock config will be moved the uniphy driver as suggested by
> Sergey's suggestions.
>
> Thanks.
>
>
--
Ansuel
next prev parent reply other threads:[~2024-01-25 11:36 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-24 21:36 [net-next PATCH 0/3] net: mdio-ipq4019: fix wrong default MDC rate Christian Marangi
2024-01-24 21:36 ` [net-next PATCH 1/3] dt-bindings: net: ipq4019-mdio: document now supported clock-frequency Christian Marangi
2024-01-24 22:23 ` Andrew Lunn
2024-01-24 22:27 ` Christian Marangi
2024-01-24 22:38 ` Andrew Lunn
2024-01-26 11:47 ` Krzysztof Kozlowski
2024-01-24 21:36 ` [net-next PATCH 2/3] net: mdio: ipq4019: add support for clock-frequency property Christian Marangi
2024-01-24 21:36 ` [net-next PATCH 3/3] arm64: dts: qcom: ipq8074: add clock-frequency to MDIO node Christian Marangi
2024-01-25 5:57 ` [net-next PATCH 0/3] net: mdio-ipq4019: fix wrong default MDC rate Jie Luo
2024-01-25 11:36 ` Christian Marangi [this message]
2024-01-25 17:18 ` Andrew Lunn
2024-01-26 16:03 ` Jie Luo
2024-01-26 17:20 ` Dmitry Baryshkov
2024-01-26 17:33 ` Christian Marangi
2024-01-29 13:59 ` Jie Luo
2024-01-29 14:25 ` Christian Marangi
2024-01-29 15:29 ` Andrew Lunn
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=65b247d1.df0a0220.12334.efd9@mx.google.com \
--to=ansuelsmth@gmail.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_luoj@quicinc.com \
--cc=robert.marko@sartura.hr \
--cc=robh+dt@kernel.org \
--cc=ryazanov.s.a@gmail.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