From: Heiko Thiery <heiko.thiery@gmail.com>
To: u-boot@lists.denx.de
Cc: Stefano Babic <sbabic@denx.de>, Michael Walle <michael@walle.cc>,
Fabio Estevam <festevam@gmail.com>,
"NXP i . MX U-Boot Team" <uboot-imx@nxp.com>,
Peng Fan <peng.fan@nxp.com>,
Frieder Schrempf <frieder.schrempf@kontron.de>,
Marek Vasut <marex@denx.de>,
Heiko Thiery <heiko.thiery@gmail.com>
Subject: [PATCH v3] ARM: imx: imx8mn-*-evk: use DM settings for PHY configuration
Date: Wed, 23 Feb 2022 09:10:29 +0100 [thread overview]
Message-ID: <20220223081028.458971-1-heiko.thiery@gmail.com> (raw)
With the correct settings described in the device-tree the PHY settings
in the board init are no longer required. The values are taken from the
linux device tree.
The PHY latency settings are derived from the phy-mode property and the
voltage seetings are done via the regulator.
Suggested-by: Michael Walle <michael@walle.cc>
Signed-off-by: Heiko Thiery <heiko.thiery@gmail.com>
---
v2:
- remove phy-reset-gpios node (thanks to Michael)
When using DM_ETH_PHY the reset-gpios from the phy is used
v3:
- Only change remove/replace the voltage settings and the delay settings.
The pyh-reset-gpios vs. reset-gpios settings has to be discussed
arch/arm/dts/imx8mn-evk.dtsi | 6 ++++++
board/freescale/imx8mn_evk/imx8mn_evk.c | 16 ----------------
2 files changed, 6 insertions(+), 16 deletions(-)
diff --git a/arch/arm/dts/imx8mn-evk.dtsi b/arch/arm/dts/imx8mn-evk.dtsi
index 416fadb22b..fc2c7f1d44 100644
--- a/arch/arm/dts/imx8mn-evk.dtsi
+++ b/arch/arm/dts/imx8mn-evk.dtsi
@@ -64,6 +64,12 @@
ethphy0: ethernet-phy@0 {
compatible = "ethernet-phy-ieee802.3-c22";
reg = <0>;
+ vddio-supply = <&vddio>;
+
+ vddio: vddio-regulator {
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ };
};
};
};
diff --git a/board/freescale/imx8mn_evk/imx8mn_evk.c b/board/freescale/imx8mn_evk/imx8mn_evk.c
index b24342fd5c..e35d505aea 100644
--- a/board/freescale/imx8mn_evk/imx8mn_evk.c
+++ b/board/freescale/imx8mn_evk/imx8mn_evk.c
@@ -27,22 +27,6 @@ static void setup_fec(void)
clrsetbits_le32(&gpr->gpr[1], 0x2000, 0);
}
-int board_phy_config(struct phy_device *phydev)
-{
- /* enable rgmii rxc skew and phy mode select to RGMII copper */
- phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x1f);
- phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x8);
-
- phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x00);
- phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x82ee);
- phy_write(phydev, MDIO_DEVAD_NONE, 0x1d, 0x05);
- phy_write(phydev, MDIO_DEVAD_NONE, 0x1e, 0x100);
-
- if (phydev->drv->config)
- phydev->drv->config(phydev);
- return 0;
-}
-
int board_init(void)
{
setup_fec();
--
2.30.2
next reply other threads:[~2022-02-23 8:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-02-23 8:10 Heiko Thiery [this message]
2022-02-24 4:06 ` [PATCH v3] ARM: imx: imx8mn-*-evk: use DM settings for PHY configuration Marek Vasut
2022-02-24 11:15 ` Fabio Estevam
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=20220223081028.458971-1-heiko.thiery@gmail.com \
--to=heiko.thiery@gmail.com \
--cc=festevam@gmail.com \
--cc=frieder.schrempf@kontron.de \
--cc=marex@denx.de \
--cc=michael@walle.cc \
--cc=peng.fan@nxp.com \
--cc=sbabic@denx.de \
--cc=u-boot@lists.denx.de \
--cc=uboot-imx@nxp.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