AnsweredAssumed Answered

i.MX6Q SABRE SD - How to use FEC phy gpio IRQ

Question asked by Peter Tseng on Jul 9, 2013
Latest reply on Jul 14, 2013 by Anson Huang

Hello,


We are i.MX6Q Sabre SD board using Qualcomm Atheros AR8033 phy chip.

 

We found some code references AR8031 registers board-mx6q_sabresd.c board initialization file.

I need to interrupt pin GPIO_1_6 change GPIO_1_26

 

#ifdef CONFIG_MX6_ENET_IRQ_TO_GPIO

#define MX6_ENET_IRQ IMX_GPIO_NR(1, 26) //IMX_GPIO_NR(1, 6)

#define IOMUX_OBSRV_MUX1_OFFSET 0x3c

#define OBSRV_MUX1_MASK 0x3f

#define OBSRV_MUX1_ENET_IRQ 0x9

#endif

 

 

static struct fec_platform_data fec_data __initdata = {

  .init = mx6q_sabresd_fec_phy_init,

  .phy = PHY_INTERFACE_MODE_RGMII,

#ifdef CONFIG_MX6_ENET_IRQ_TO_GPIO

  .gpio_irq = MX6_ENET_IRQ,

#endif

};

 

 

 

 

static void __init mx6_sabresd_board_init(void)

{

.........

 

  imx6_init_fec(fec_data);

#ifdef CONFIG_MX6_ENET_IRQ_TO_GPIO

  /* Make sure the IOMUX_OBSRV_MUX1 is set to ENET_IRQ. */

  mxc_iomux_set_specialbits_register(IOMUX_OBSRV_MUX1_OFFSET,

  OBSRV_MUX1_ENET_IRQ, OBSRV_MUX1_MASK);

#endif

......

 

}

 

 

 

 

Thank you for anyone that will give us some hints.

 

 

Outcomes