I am looking for some help getting the adin2111 driver working on my imx8mm based board.
I am at a point where I see the interfaces after boot. They both have the some HWaddr, which is a problem I think I need to solve, but in the meantime can change the HWaddr of one of the interfaces manually.
I am using the EVAL-ADIN1100 as a media converter and I have the 10BASE-T1L side connect to my board, and the Ethernet side connect to a PC with a manually IP address set to 10.10.10.200. Both link lights are lit on the EVAL-ADIN1100. I even see the occasional blink indicating activity on the EVAL-ADIN1100 and on my board.
If I set an IP address 10.10.10.2 on eth1 and try to ping 10.10.10.200 I get no response, no link activity and no traffic detected on Wireshark running on the PC.
If I ping from the PC, don't get a response, but on my board something strange happens.
I notice using top that irq/78 (irq assigned to the adin2111 chip) is consuming 30% CPU and if I check the interrupt line with a scope I see activity but the interrupt is spending most of it's time low. So the driver is actively trying to read from the adin2111 but is unable to clear the interrupt.
So it seems I can't send packets from the board, and if I try to send packets to the board, the interrupt gets stuck and I receive no traffic.
I've tried to load the driver as a module, thinking starting it up after boot might help, but it did not.
I've looked the configuration of the SPI_CFG0 and SPI_CFG1 thinking spi might have be accidently configured as open alliance, but it looks like it's configured as generic spi.
I've kept spi speed low for now to make sure that isn't causing a problem.
I've verified the reset gpio is correctly resetting the chip during probe.
Does anyone have suggestions on what might be wrong, or what I can try next to troubleshoot?
Here is my device tree
&ecspi2 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi2>;
cs-gpios = <0>;
status = "okay";
ethernet@0 {
compatible = "adi,adin2111";
pinctrl-1 = <&pinctrl_spe>;
/* SPI CS number */
reg = <0>;
reset-gpios = <&gpio1 13 GPIO_ACTIVE_LOW>;
/* will need 23 MHz for 10 Mbps, lower speeds will result in lower bandwidth */
spi-max-frequency = <1000000>;
/* optional, will check all control read/writes over SPI */
adi,spi-crc;
#address-cells = <1>;
#size-cells = <0>;
/* an IRQ is required, INT_N pin is configured to signal RX/TX frames */
interrupt-parent = <&gpio1>;
interrupts = <14 IRQ_TYPE_LEVEL_LOW>;
/* This is the host MAC address, by default ADIN2111 will also accept broadcast frames */
mac-address = [ CA 2F B7 10 23 63 ];
phy@0 {
compatible = "ethernet-phy-id0283.bca1";
reg = <0x0>;
};
phy@1 {
compatible = "ethernet-phy-id0283.bca1";
reg = <0x1>;
};
};
};
&iomuxc {
/*spi to the ADIN2111*/
pinctrl_ecspi2: ecspi2grp {
fsl,pins = <
MX8MM_IOMUXC_ECSPI2_MOSI_ECSPI2_MOSI 0x10
MX8MM_IOMUXC_ECSPI2_MISO_ECSPI2_MISO 0x90
MX8MM_IOMUXC_ECSPI2_SCLK_ECSPI2_SCLK 0x90
MX8MM_IOMUXC_ECSPI2_SS0_ECSPI2_SS0 0x90
>;
};
pinctrl_spe: spegrp {
fsl,pins = <
/* spe int */
MX8MM_IOMUXC_GPIO1_IO14_GPIO1_IO14 0x90
>;
};
};