Skip to contentSkip to conversation

ARM: imx6: DHCOM i.MX6 PDK: Convert to DM_ETH

PATCH New Harald Seiler 2 participants 2 messages Apr 15, 2020 – Apr 19, 2020

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH v4 1/1 ARM: imx6: DHCOM i.MX6 PDK: Convert to DM_ETH

Use DM_ETH instead of legacy networking. Add VIO as a fixed regulator to the relevant device-trees and augment the FEC node with properties for the reset GPIO.

It should be noted that the relevant properties for the reset GPIO already exist in the PHY node (reset-gpios, reset-delay-us, reset-post-delay-us) but U-Boot currently ignores those and only supports the bus-level reset properties in the FEC node (phy-reset-gpios, phy-reset-duration, phy-reset-post-delay).

---

Notes:
Changes in v2:
- Move reset and VIO to device-tree.
- Always enable the clock, not just if CONFIG_FEC_MXC=y.

Changes in v3:
- Rename the dt file to imx6qdl-dhcom-pdk2-u-boot.dtsi because the PHY is pdk2 specific.
- More verbose commit message.

Changes in v4:
- Remove regulator-always-on.
- Change ACTIVE_HIGH to ACTIVE_LOW to properly reflect the non-DM code.

 arch/arm/dts/imx6dl-dhcom-pdk2-u-boot.dtsi  |  6 +++
 arch/arm/dts/imx6q-dhcom-pdk2-u-boot.dtsi   |  2 +
 arch/arm/dts/imx6qdl-dhcom-pdk2-u-boot.dtsi | 21 +++++++++
 board/dhelectronics/dh_imx6/dh_imx6.c       | 51 +--------------------
 configs/dh_imx6_defconfig                   |  2 +
 5 files changed, 33 insertions(+), 49 deletions(-)
 create mode 100644 arch/arm/dts/imx6dl-dhcom-pdk2-u-boot.dtsi
 create mode 100644 arch/arm/dts/imx6qdl-dhcom-pdk2-u-boot.dtsi
arch/arm/dts/imx6dl-dhcom-pdk2-u-boot.dtsi new file +6 -0
new file mode 100644
index 000000000000..fc7dffea2a69
@@ -0,0 +1,6 @@
+// SPDX-License-Identifier: (GPL-2.0+)
+/*
+ * Copyright (C) 2020 Harald Seiler <[email protected]>
+ */
+
+#include "imx6qdl-dhcom-pdk2-u-boot.dtsi"
arch/arm/dts/imx6q-dhcom-pdk2-u-boot.dtsi +2 -0
index b94231edb3fb..026342df5a4a 100644
@@ -3,6 +3,8 @@
  * Copyright (C) 2019 Claudius Heine <[email protected]>
  */
 
+#include "imx6qdl-dhcom-pdk2-u-boot.dtsi"
+
 / {
 	wdt-reboot {
 		compatible = "wdt-reboot";
arch/arm/dts/imx6qdl-dhcom-pdk2-u-boot.dtsi new file +21 -0
new file mode 100644
index 000000000000..a54e421de3e4
@@ -0,0 +1,21 @@
+// SPDX-License-Identifier: (GPL-2.0+)
+/*
+ * Copyright (C) 2020 Harald Seiler <[email protected]>
+ */
+
+/ {
+	fec_vio: regulator-fec {
+		compatible = "regulator-fixed";
+
+		regulator-name = "fec-vio";
+		gpio = <&gpio1 7 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&fec {
+	phy-reset-gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
+	phy-reset-duration = <1>;
+	phy-reset-post-delay = <10>;
+
+	phy-supply = <&fec_vio>;
+};
board/dhelectronics/dh_imx6/dh_imx6.c +2 -49

76 lines not on this page · raw message

configs/dh_imx6_defconfig +2 -0
index cbfc3c394e7d..40de1d82031b 100644
@@ -74,6 +74,8 @@ CONFIG_SPI_FLASH_MTD=y
 CONFIG_PHYLIB=y
 CONFIG_PHY_MICREL=y
 CONFIG_PHY_MICREL_KSZ90X1=y
+CONFIG_DM_ETH=y
+CONFIG_DM_MDIO=y
 CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
Signature · 1 line
2.26.0
#1 lore raw

PATCH v4 1/1 ARM: imx6: DHCOM i.MX6 PDK: Convert to DM_ETH

Quoted 9 lines

Use DM_ETH instead of legacy networking. Add VIO as a fixed regulator to the relevant device-trees and augment the FEC node with properties for the reset GPIO.
It should be noted that the relevant properties for the reset GPIO already exist in the PHY node (reset-gpios, reset-delay-us, reset-post-delay-us) but U-Boot currently ignores those and only supports the bus-level reset properties in the FEC node (phy-reset-gpios, phy-reset-duration, phy-reset-post-delay).

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================