net: fec: Allow the PHY node to be retrieved
[oweals/u-boot.git] / drivers / net / fec_mxc.h
index 3b935afe2c056344d71f584e675fc35f729b4cb6..659d62646f8b4398c5d68b69c7ddb35d0caa7e65 100644 (file)
@@ -16,6 +16,8 @@
 #ifndef __FEC_MXC_H
 #define __FEC_MXC_H
 
+#include <clk.h>
+
 /* Layout description of the FEC */
 struct ethernet_regs {
        /* [10:2]addr = 00 */
@@ -186,6 +188,8 @@ struct ethernet_regs {
 #define FEC_ECNTRL_ETHER_EN            0x00000002      /* enable the FEC */
 #define FEC_ECNTRL_SPEED               0x00000020
 #define FEC_ECNTRL_DBSWAP              0x00000100
+#define FEC_ECNTRL_TXC_DLY             0x00010000      /* TXC delayed */
+#define FEC_ECNTRL_RXC_DLY             0x00020000      /* RXC delayed */
 
 #define FEC_X_WMRK_STRFWD              0x00000100
 
@@ -246,18 +250,30 @@ struct fec_priv {
        struct mii_dev *bus;
 #ifdef CONFIG_PHYLIB
        struct phy_device *phydev;
+       ofnode phy_of_node;
 #else
        int phy_id;
        int (*mii_postcall)(int);
 #endif
-
+#ifdef CONFIG_DM_REGULATOR
+       struct udevice *phy_supply;
+#endif
+#if CONFIG_IS_ENABLED(DM_GPIO)
+       struct gpio_desc phy_reset_gpio;
+       uint32_t reset_delay;
+       uint32_t reset_post_delay;
+#endif
 #ifdef CONFIG_DM_ETH
        u32 interface;
 #endif
+       struct clk ipg_clk;
+       struct clk ahb_clk;
+       struct clk clk_enet_out;
+       struct clk clk_ref;
+       struct clk clk_ptp;
+       u32 clk_rate;
 };
 
-void imx_get_mac_from_fuse(int dev_id, unsigned char *mac);
-
 /**
  * @brief Numbers of buffer descriptors for receiving
  *