All of lore.kernel.org
 help / color / mirror / Atom feed
From: Soeren Moch <smoch@web.de>
To: u-boot@lists.denx.de
Subject: U-Boot atheros PHY support and cubox ethernet
Date: Thu, 25 Jun 2020 11:56:05 +0200	[thread overview]
Message-ID: <bb71800b-eaec-b1c2-e5d6-854896246e89@web.de> (raw)
In-Reply-To: <CAOMZO5Dg9+7-iy+PChnUq4LMpG_Ce4bn9VAS-8CapVrRAR7m4w@mail.gmail.com>

Hi Fabio,

On 25.06.20 01:19, Fabio Estevam wrote:
> Hi Soeren,
>
> On Wed, Jun 24, 2020 at 7:29 PM Soeren Moch <smoch@web.de> wrote:
>
>> Unfortunately I have no access to my usual development board (and will
>> not have until the v2020.07 release). I only can use an old board
>> without working USB-OTG, limited to eMMC boot. So I tried to avoid
>> bisecting, because a bad commit could completely brick this board.
> Ok, understood.
>
> We could check if the issue on your board is due to:
>
> commit 6333cbb3817ed551cd7d4e92f7359c73ccc567fc
> Author: Michael Walle <michael@walle.cc>
> Date:   Thu May 7 00:11:58 2020 +0200
>
>     phy: atheros: ar8035: remove static clock config
>
>     We can configure the clock output in the device tree. Disable the
>     hardcoded one in here. This is highly board-specific and should have
>     never been enabled in the PHY driver.
>
>     If bisecting shows that this commit breaks your board it probably
>     depends on the clock output of your Atheros AR8035 PHY. Please have a
>     look at doc/device-tree-bindings/net/phy/atheros.txt. You need to set
>     "clk-out-frequency = <125000000>" because that value was the hardcoded
>     value until this commit.
>
>     Signed-off-by: Michael Walle <michael@walle.cc>
>     Acked-by: Joe Hershberger <joe.hershberger@ni.com>
>
> On your board, are you able to measure with a scope the AR8035 CLK_25M pin?
>
> Prior to this commit the CLK_25M was hardcoded to output a 125MHz clock.
>
> Now that this setting from the ar8035 phy driver is gone we should
> pass this information in some form:
>
> - We tried via devicetree with the "qca,clk-out-frequency" property,
> but it did not work. This is an area where you could add some debug
> prints inside drivers/net/phy/atheros.c and see if if
> qca,clk-out-frequency is being parsed correctly to configure a 125MHz
> clock output. This is the method I used on mx6cuboxi last week and it
> works.
The phy-handle was missing in the fec node. With this added everything
works fine:

---8<---
diff --git a/arch/arm/dts/imx6q-tbs2910.dts b/arch/arm/dts/imx6q-tbs2910.dts
index cc5df37b46..5b9b025bb6 100644
--- a/arch/arm/dts/imx6q-tbs2910.dts
+++ b/arch/arm/dts/imx6q-tbs2910.dts
@@ -105,9 +105,20 @@
?&fec {
??????? pinctrl-names = "default";
??????? pinctrl-0 = <&pinctrl_enet>;
+?????? phy-handle = <&phy>;
??????? phy-mode = "rgmii-id";
??????? phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
??????? status = "okay";
+
+?????? mdio {
+?????????????? #address-cells = <1>;
+?????????????? #size-cells = <0>;
+
+?????????????? phy: ethernet-phy at 4 {
+?????????????????????? reg = <4>;
+?????????????????????? qca,clk-out-frequency = <125000000>;
+?????????????? };
+?????? };
?};
?
?&hdmi {
---8<---
>
> - Other way to configure the AR803x is via board code. Please try to
> copy the ar8031_phy_fixup() and board_phy_config() from
> board/freescale/mx6sabresd/mx6sabresd.c into your board file.
>
> (I plan to remove this board PHY code in mx6sabresd after 2020.07 and
> use "qca,clk-out-frequency" to do the job).
OK, so I think we should use the dts patch as fix for u-boot now and
sync that to linux afterwards.
Do you want to send a proper patch for that? Otherwise I can do so.

Thanks for your help and suggestions,
Soeren

  parent reply	other threads:[~2020-06-25  9:56 UTC|newest]

Thread overview: 49+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-06-16 19:55 U-Boot atheros PHY support and cubox ethernet Tom Rini
2020-06-16 19:58 ` Vladimir Oltean
2020-06-16 20:10   ` Tom Rini
2020-06-16 20:21     ` Vladimir Oltean
2020-06-16 20:31       ` Tom Rini
2020-06-16 20:37         ` Vladimir Oltean
2020-06-16 21:35           ` Tom Rini
2020-06-16 21:57             ` Vladimir Oltean
2020-06-17  7:19               ` Michael Walle
2020-06-16 21:30       ` Michael Walle
2020-06-16 21:37         ` Tom Rini
2020-06-16 20:42 ` Fabio Estevam
2020-06-16 20:48   ` Vladimir Oltean
2020-06-16 20:51   ` Tom Rini
2020-06-16 20:55     ` Fabio Estevam
2020-06-16 20:58       ` Tom Rini
2020-06-16 21:01         ` Fabio Estevam
2020-06-16 22:30           ` Tom Rini
2020-06-17 12:04             ` Fabio Estevam
2020-06-17 13:06               ` Fabio Estevam
2020-06-17 13:23                 ` Tom Rini
2020-06-17 17:31                   ` Fabio Estevam
2020-06-17 19:00               ` Tom Rini
2020-06-17 19:09                 ` Fabio Estevam
2020-06-17 19:18                   ` Fabio Estevam
2020-06-17 19:24                     ` Tom Rini
2020-06-17 19:19                   ` Tom Rini
2020-06-17 21:28                 ` Fabio Estevam
2020-06-17 21:30                   ` Tom Rini
2020-06-18  0:41                     ` Fabio Estevam
2020-06-18 13:39                       ` Tom Rini
2020-06-20  2:14                         ` Fabio Estevam
2020-06-24 19:20                           ` Soeren Moch
2020-06-24 19:39                             ` Fabio Estevam
2020-06-24 20:13                               ` Soeren Moch
2020-06-24 20:29                                 ` Fabio Estevam
2020-06-24 20:45                                   ` Sören Moch
2020-06-24 21:35                                     ` Fabio Estevam
2020-06-24 22:29                                       ` Soeren Moch
2020-06-24 23:19                                         ` Fabio Estevam
2020-06-24 23:44                                           ` Fabio Estevam
2020-06-25  9:56                                           ` Soeren Moch [this message]
2020-06-25 10:26                                             ` Fabio Estevam
2020-06-18  3:05                   ` Fabio Estevam
2020-06-16 21:01         ` Vladimir Oltean
2020-06-16 21:04           ` Vladimir Oltean
2020-06-16 21:57             ` Tom Rini
2020-06-16 21:59               ` Vladimir Oltean
2020-06-16 21:50           ` Tom Rini

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=bb71800b-eaec-b1c2-e5d6-854896246e89@web.de \
    --to=smoch@web.de \
    --cc=u-boot@lists.denx.de \
    /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.