imx6ULL ethernet PHY IRQ

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

imx6ULL ethernet PHY IRQ

1,260 Views
claudio1
Contributor II

Hello

I made a custom board with a imx6ull chip. On the board there is a ksz8041 ethernet phy.

I have added this chip to my u-boot device tree:

&fec1 {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_enet1>;
 phy-mode = "rmii";
 phy-handle = <&ethphy0>;
 status = "okay";

 mdio {
  #address-cells = <1>;
  #size-cells = <0>;

  ethphy0: ethernet-phy@2 {
   compatible = "ethernet-phy-ieee802.3-c22";
   reg = <2>;
  };
 };
};



&iomuxc {
 pinctrl-names = "default";
 pinctrl-0 = <&pinctrl_hog_1>;
 eval1a {

  pinctrl_enet1: enet1grp {
   fsl,pins = <
    MX6UL_PAD_ENET1_RX_EN__ENET1_RX_EN 0x1b0b0
    MX6UL_PAD_ENET1_RX_ER__ENET1_RX_ER 0x1b0b0
    MX6UL_PAD_ENET1_RX_DATA0__ENET1_RDATA00 0x1b0b0
    MX6UL_PAD_ENET1_RX_DATA1__ENET1_RDATA01 0x1b0b0
    MX6UL_PAD_ENET1_TX_EN__ENET1_TX_EN 0x1b0b0
    MX6UL_PAD_ENET1_TX_DATA0__ENET1_TDATA00 0x1b0b0
    MX6UL_PAD_ENET1_TX_DATA1__ENET1_TDATA01 0x1b0b0
    MX6UL_PAD_ENET1_TX_CLK__ENET1_REF_CLK1 0x4001b031
    MX6UL_PAD_GPIO1_IO07__ENET1_MDC  0x1b0b0
    MX6UL_PAD_GPIO1_IO06__ENET1_MDIO 0x1b0b0
   >;
  };‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍‍

Unfortunately i have forgotten to route the IRQ from the PHY chip to some pin of the imx6.

U-Boot can actually not communicate with the PHY correctly. But i see data on the RX and TX lines from the PHY to the imx with an oscilloscope.

I have some pins left over for a possible connection:

SPI4 CLK

SPI4 MOSI

SPI4 MISO

SPI4 CS

GPIO1_00

GPIO1_01

Now my questions:

1) how do i define the IRQ-Line for my PHY in the device-tree?

2) Can i use one of the above mentioned lines for the PHY IRQ Connection? If no, is there any other way to get the PHY working? (Actually im not sure if it is the missing IRQ or something else that prevents U-Boot from talking with the PHY correctly)

3) What means the hex-number at the end of the Pinmux config in the device tree? For example: 0x1b0b0 or 0x4001b031

Thanks for your help

Labels (2)
0 Kudos
2 Replies

985 Views
igorpadykov
NXP Employee
NXP Employee

Hi claudio

uboot does not use interrupts so enet should work without interrupt signal.

In general any gpio can be used for interrupt.

Hex-number at the end of the pinmux means value of IOMUXC_SW_PAD_CTL_PAD_* register.

Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos

985 Views
claudio1
Contributor II

Hi igor

Thanks for your answer.

After some debugging i figured out, that dhcp broadcast pakets are going out of the phy (i saw the pakets with wireshark) DHCP answers them but the IMX6 does not receive/proceed them. I can also see Traffix on the RXD0/D1 and RX_EN Lines on the phy chip with oscilloscope.

Do you have any idea what could cause such a behaviour?

I am using a random mac address...

Thanks

0 Kudos