imx: wandboard: convert FEC support to DM_ETH
authorAnatolij Gustschin <agust@denx.de>
Fri, 20 Sep 2019 20:49:06 +0000 (22:49 +0200)
committerStefano Babic <sbabic@denx.de>
Tue, 8 Oct 2019 14:36:36 +0000 (16:36 +0200)
Remove CONFIG_DM_ETH conversion warning to avoid board removal.

Signed-off-by: Anatolij Gustschin <agust@denx.de>
arch/arm/dts/imx6qdl-wandboard.dtsi
board/wandboard/wandboard.c
configs/wandboard_defconfig
include/configs/wandboard.h

index 90aa43d21bb61e1f132b084d83c6b932bdadffba..35a88bf5a765eef2172336610fb5151678ba341e 100644 (file)
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_enet>;
        phy-mode = "rgmii-id";
+       phy-handle = <&ethphy>;
        phy-reset-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>;
        interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
                              <&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
        fsl,err006687-workaround-present;
        status = "okay";
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy: ethernet-phy@1 {
+                       reg = <1>;
+               };
+       };
 };
 
 &spdif {
index 69cdf3e9c96b18b7d15ac77816bc7faeb55c6ebb..11acbad78b7b08628e0bc6e2efeed278ed78e6ce 100644 (file)
@@ -71,21 +71,6 @@ static iomux_v3_cfg_t const uart1_pads[] = {
 };
 
 static iomux_v3_cfg_t const enet_pads[] = {
-       IOMUX_PADS(PAD_ENET_MDIO__ENET_MDIO  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_ENET_MDC__ENET_MDC    | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_TXC__RGMII_TXC  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_TD0__RGMII_TD0  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_TD1__RGMII_TD1  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_TD2__RGMII_TD2  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_TD3__RGMII_TD3  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_TX_CTL__RGMII_TX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_ENET_REF_CLK__ENET_TX_CLK  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_RXC__RGMII_RXC  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_RD0__RGMII_RD0  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_RD1__RGMII_RD1  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_RD2__RGMII_RD2  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_RD3__RGMII_RD3  | MUX_PAD_CTRL(ENET_PAD_CTRL)),
-       IOMUX_PADS(PAD_RGMII_RX_CTL__RGMII_RX_CTL | MUX_PAD_CTRL(ENET_PAD_CTRL)),
        /* AR8031 PHY Reset */
        IOMUX_PADS(PAD_EIM_D29__GPIO3_IO29    | MUX_PAD_CTRL(NO_PAD_CTRL)),
 };
@@ -358,13 +343,6 @@ static void setup_display(void)
 }
 #endif /* CONFIG_VIDEO_IPUV3 */
 
-int board_eth_init(bd_t *bis)
-{
-       setup_iomux_enet();
-
-       return cpu_eth_init(bis);
-}
-
 int board_early_init_f(void)
 {
        setup_iomux_uart();
@@ -464,6 +442,7 @@ int board_late_init(void)
        else
                env_set("board_name", "B1");
 #endif
+       setup_iomux_enet();
        return 0;
 }
 
index a8b6b413234415eae6ef422c28981e9a90779c0b..d7eb8fd4b37e943186261e9d179bc1990e3a45b1 100644 (file)
@@ -57,6 +57,9 @@ CONFIG_SYS_I2C_MXC_I2C3=y
 CONFIG_DM_MMC=y
 CONFIG_FSL_USDHC=y
 CONFIG_PHYLIB=y
+CONFIG_PHY_ATHEROS=y
+CONFIG_DM_ETH=y
+CONFIG_FEC_MXC=y
 CONFIG_MII=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_IMX6=y
index 8faf5f0f789d6e58a356eb213743b33c708bed50..a0a78eab27bf277adfc30fbfa206b421e61d8e7a 100644 (file)
 #define CONFIG_MXC_USB_PORTSC          (PORT_PTS_UTMI | PORT_PTS_PTW)
 #define CONFIG_MXC_USB_FLAGS           0
 
-/* Ethernet Configuration */
-#define CONFIG_FEC_MXC
-#define IMX_FEC_BASE                   ENET_BASE_ADDR
-#define CONFIG_FEC_XCV_TYPE            RGMII
-#define CONFIG_ETHPRIME                        "FEC"
-#define CONFIG_FEC_MXC_PHYADDR         1
-#define CONFIG_PHY_ATHEROS
-
 /* Framebuffer */
 #define CONFIG_VIDEO_BMP_RLE8
 #define CONFIG_SPLASH_SCREEN