Skip to content
Snippets Groups Projects
Commit 08e2d98d authored by Troy Kisky's avatar Troy Kisky
Browse files

boundary: common: eth: add CONFIG_FEC_RESET_PULLUP support

parent 334bafc0
No related branches found
No related tags found
No related merge requests found
......@@ -11,6 +11,10 @@ config MAX77823
default y if TARGET_NITROGEN6_SCM
default y if TARGET_VP
config FEC_RESET_PULLUP
bool
default y if TARGET_NITROGEN8MM
config OTG_CHARGER
bool "otg_charger"
depends on MAX77823
......
......@@ -19,7 +19,11 @@
#ifdef CONFIG_PHY_ATHEROS
static const iomux_v3_cfg_t enet_ar8035_gpio_pads[] = {
#define GP_RGMII_PHY_RESET IMX_GPIO_NR(3, 15)
#ifdef CONFIG_FEC_RESET_PULLUP
IMX8MM_PAD_NAND_RE_B_GPIO3_IO15 | MUX_PAD_CTRL(WEAK_PULLUP_OUTPUT),
#else
IMX8MM_PAD_NAND_RE_B_GPIO3_IO15 | MUX_PAD_CTRL(WEAK_PULLDN_OUTPUT),
#endif
IMX8MM_PAD_ENET_RD0_GPIO1_IO26 | MUX_PAD_CTRL(PULL_GP(STRAP_AR8035, 0)),
IMX8MM_PAD_ENET_RD1_GPIO1_IO27 | MUX_PAD_CTRL(PULL_GP(STRAP_AR8035, 1)),
IMX8MM_PAD_ENET_RD2_GPIO1_IO28 | MUX_PAD_CTRL(PULL_GP(STRAP_AR8035, 2)),
......
......@@ -376,6 +376,15 @@ static void setup_enet_ksz9021(void)
#endif
#if defined(CONFIG_PHY_ATHEROS) || defined(CONFIG_PHY_MICREL)
static void release_phy_reset(int gp)
{
#ifdef CONFIG_FEC_RESET_PULLUP
gpio_direction_input(gp);
#else
gpio_set_value(gp, 1);
#endif
}
static void setup_iomux_enet(int kz)
{
#ifdef GP_KS8995_RESET
......@@ -396,11 +405,13 @@ static void setup_iomux_enet(int kz)
/* 1 ms minimum reset pulse for ar8035 */
udelay(1000 * 10);
#ifdef GP_RGMII2_PHY_RESET
gpio_set_value(GP_RGMII2_PHY_RESET, 1); /* PHY reset */
release_phy_reset(GP_RGMII2_PHY_RESET);
#endif
#ifdef GP_RGMII_PHY_RESET
gpio_set_value(GP_RGMII_PHY_RESET, 1); /* PHY reset */
release_phy_reset(GP_RGMII_PHY_RESET);
#endif
#ifdef GP_KS8995_POWER_DOWN
gpio_direction_output(GP_KS8995_POWER_DOWN, 1);
#endif
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment