From: Sjoerd Simons <sjoerd@collabora.com>
To: Nishanth Menon <nm@ti.com>
Cc: linux-arm-kernel@lists.infradead.org,
Roger Quadros <rogerq@kernel.org>,
kernel@collabora.com, Conor Dooley <conor+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Rob Herring <robh+dt@kernel.org>, Tero Kristo <kristo@kernel.org>,
Vignesh Raghavendra <vigneshr@ti.com>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] arm64: dts: ti: k3-am625-beagleplay: Use the builtin mdio bus
Date: Fri, 12 Jan 2024 15:20:19 +0100 [thread overview]
Message-ID: <2ce27ed917b9bd569ee4a7f87b3d9b78d07cecbd.camel@collabora.com> (raw)
In-Reply-To: <20240112135000.b54xz3boeua7y2jf@music>
On Fri, 2024-01-12 at 07:50 -0600, Nishanth Menon wrote:
> On 13:44-20240112, Sjoerd Simons wrote:
> > The beagleplay dts was using a bit-bang gpio mdio bus as a work-
> > around
> > for errata i2329. However since commit d04807b80691 ("net:
> > ethernet: ti:
> > davinci_mdio: Add workaround for errata i2329") the mdio driver
> > itself
> > already takes care of this errata for effected silicon, which
> > landed
> > well before the beagleplay dts. So i suspect the reason for the
> > workaround in upstream was simply due to copying the vendor dts.
> >
> > Switch the dts to the ti,cpsw-mdio instead so it described the
> > actual
> > hardware and is consistent with other AM625 based boards
> >
> > Signed-off-by: Sjoerd Simons <sjoerd@collabora.com>
> >
> > ---
>
> We have had issues with the ethernet integration previously (also why
> ethernet in u-boot is not yet functional on beagleplay[1]).
>
> https://openbeagle.org/beagleplay/beagleplay/-/issues/101
>
> we should probably do a 1000 boot nfs test or something to ensure
> this
> doesn't introduce regressions (I recollect mdio wasn't stable on
> beagleplay) and switching to bitbang driver stopped all complains.
I can do a longer test with that over the weekend sure; For reference
I'm seeing issues in u-boot as well on initial probe with these
changes, but i've not seen the same on the linux side.
Do you remember with what kernel versions users saw the mdio
instabilities? I wonder if that was a version with the commit mentioned
that includes the errata fix for the mdio driver.
>
> [1]
> https://lore.kernel.org/u-boot/20230822121350.51324-1-rogerq@kernel.org/
> >
> > .../arm64/boot/dts/ti/k3-am625-beagleplay.dts | 42 +++++++--------
> > ----
> > 1 file changed, 16 insertions(+), 26 deletions(-)
> >
> > diff --git a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
> > b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
> > index eadbdd9ffe37..49fb21ba62b0 100644
> > --- a/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
> > +++ b/arch/arm64/boot/dts/ti/k3-am625-beagleplay.dts
> > @@ -29,7 +29,6 @@ aliases {
> > i2c3 = &main_i2c3;
> > i2c4 = &wkup_i2c0;
> > i2c5 = &mcu_i2c0;
> > - mdio-gpio0 = &mdio0;
> > mmc0 = &sdhci0;
> > mmc1 = &sdhci1;
> > mmc2 = &sdhci2;
> > @@ -231,27 +230,6 @@ simple-audio-card,codec {
> > };
> > };
> >
> > - /* Workaround for errata i2329 - just use mdio bitbang */
> > - mdio0: mdio {
> > - compatible = "virtual,mdio-gpio";
> > - pinctrl-names = "default";
> > - pinctrl-0 = <&mdio0_pins_default>;
> > - gpios = <&main_gpio0 86 GPIO_ACTIVE_HIGH>, /* MDC
> > */
> > - <&main_gpio0 85 GPIO_ACTIVE_HIGH>; /* MDIO
> > */
> > - #address-cells = <1>;
> > - #size-cells = <0>;
> > -
> > - cpsw3g_phy0: ethernet-phy@0 {
> > - reg = <0>;
> > - };
> > -
> > - cpsw3g_phy1: ethernet-phy@1 {
> > - reg = <1>;
> > - reset-gpios = <&main_gpio1 5
> > GPIO_ACTIVE_LOW>;
> > - reset-assert-us = <25>;
> > - reset-deassert-us = <60000>; /* T2 */
> > - };
> > - };
> > };
> >
> > &main_pmx0 {
> > @@ -312,8 +290,8 @@ AM62X_IOPAD(0x00b4, PIN_INPUT_PULLUP, 1) /*
> > (K24) GPMC0_CSn3.I2C2_SDA */
> >
> > mdio0_pins_default: mdio0-default-pins {
> > pinctrl-single,pins = <
> > - AM62X_IOPAD(0x0160, PIN_OUTPUT, 7) /*
> > (AD24) MDIO0_MDC.GPIO0_86 */
> > - AM62X_IOPAD(0x015c, PIN_INPUT, 7) /*
> > (AB22) MDIO0_MDIO.GPIO0_85 */
> > + AM62X_IOPAD(0x0160, PIN_OUTPUT, 0) /*
> > (AD24) MDIO0_MDC */
> > + AM62X_IOPAD(0x015c, PIN_INPUT, 0) /*
> > (AB22) MDIO0_MDIO */
> > >;
> > };
> >
> > @@ -611,8 +589,20 @@ &cpsw_port2 {
> > };
> >
> > &cpsw3g_mdio {
> > - /* Workaround for errata i2329 - Use mdio bitbang */
> > - status = "disabled";
> > + status = "okay";
> > + pinctrl-names = "default";
> > + pinctrl-0 = <&mdio0_pins_default>;
> > +
> > + cpsw3g_phy0: ethernet-phy@0 {
> > + reg = <0>;
> > + };
> > +
> > + cpsw3g_phy1: ethernet-phy@1 {
> > + reg = <1>;
> > + reset-gpios = <&main_gpio1 5 GPIO_ACTIVE_LOW>;
> > + reset-assert-us = <25>;
> > + reset-deassert-us = <60000>; /* T2 */
> > + };
> > };
> >
> > &main_gpio0 {
> > --
> > 2.43.0
> >
>
--
Sjoerd Simons
Collabora Ltd.
next prev parent reply other threads:[~2024-01-12 14:20 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-12 12:44 [PATCH] arm64: dts: ti: k3-am625-beagleplay: Use the builtin mdio bus Sjoerd Simons
2024-01-12 13:50 ` Nishanth Menon
2024-01-12 14:20 ` Sjoerd Simons [this message]
2024-01-12 14:25 ` Nishanth Menon
2024-01-15 9:58 ` Sjoerd Simons
2024-01-15 11:16 ` Roger Quadros
2024-02-06 4:29 ` Vignesh Raghavendra
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=2ce27ed917b9bd569ee4a7f87b3d9b78d07cecbd.camel@collabora.com \
--to=sjoerd@collabora.com \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=kernel@collabora.com \
--cc=kristo@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nm@ti.com \
--cc=robh+dt@kernel.org \
--cc=rogerq@kernel.org \
--cc=vigneshr@ti.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;
as well as URLs for NNTP newsgroup(s).