AnsweredAssumed Answered

SPI Ethernet driver probing issue

Question asked by Analogics Tech India Limited on Mar 23, 2019
Latest reply on Apr 16, 2019 by Victor Linnik

Hi,

I am using spi to ethernet WIZNET w5500 driver for imx6ull.

Unable to configure the network after inserting the driver. the following is debug reported error message

"udevd[126]: worker [844] /devices/platform/soc/2000000.aips-bus/2000000.spba-bus/2008000.ecspi/spi_master/spi0/spi0.0/net/eth0 is taking a lone".

 

eth0 is listed on #/sbin/ifconfig -a but on making #/sbin/ifconfig eth0 up kernel is getting crashed and there comes need to Hard reset it. Moreover interrupt status cannot being altered from 0 on plugging the Ethernet.

 

#cat /proc/interrupts
144:          0  gpio-mxc  14 Level     w5500

 

#dmesg
 w5500: 2.0.0
 w5500 probe
 zhuhandon----gpio--rest
 zhuhandon----gpio--rest
 Version : 01
 iinchip_socket_sethwaddr():423=0:8:dc:91:97:98
 w5500: MAC [01:01:01:01:01:01]
 w5500: socket(0) Tx(0x4000,0x3fff,0x0) Rx(0x4000,0x3fff,0x0)
 w5500: socket(1) Tx(0x0,0x0,0x0) Rx(0x0,0x0,0x0)
 w5500: socket(2) Tx(0x0,0x0,0x0) Rx(0x0,0x0,0x0)
 w5500: socket(3) Tx(0x0,0x0,0x0) Rx(0x0,0x0,0x0)
 w5500: socket(4) Tx(0x0,0x0,0x0) Rx(0x0,0x0,0x0)
 w5500: socket(5) Tx(0x0,0x0,0x0) Rx(0x0,0x0,0x0)
 w5500: socket(6) Tx(0x0,0x0,0x0) Rx(0x0,0x0,0x0)
 w5500: socket(7) Tx(0x0,0x0,0x0) Rx(0x0,0x0,0x0)
 w5500 spi register succeed
# cat /sys/bus/spi/devices/spi0.0/uevent 
 DRIVER=law_ethernet5500
 OF_NAME=law_ethernet5500
 OF_FULLNAME=/soc/aips-bus@02000000/spba-bus@02000000/ecspi@02008000/law_ethernet5500@0
 OF_COMPATIBLE_0=law,ethernet5500
 OF_COMPATIBLE_N=1
 MODALIAS=spi:ethernet5500
# imx6ull-14x14-evk.dts
 &ecspi1 {
        status = "okay";
        pinctrl-names = "default";
        fsl,spi-num-chipselects = <1>;
        pinctrl-0 = <&ecspi1_pins>;
        law_ethernet5500@0 {
                status = "okay";
                reg = <0>;
                compatible = "law,ethernet5500";
                pinctrl-names = "default";
                pinctrl-0 = <&wiznet_pins_default>;
                interrupt-parent = <&gpio4>;
                interrupts = <14 IRQ_TYPE_EDGE_FALLING>;
                /*reset-gpios = <&gpio4 13 0x00>;
                interrupt-gpios = <&gpio4 14 0x00>;*/
                spi-max-frequency = <5000000>;
        };
};
ecspi-Gpio-pins declared as :
ecspi1_pins:ecspi1_pins_default {
                        fsl,pins = <
                                MX6UL_PAD_CSI_DATA07__ECSPI1_MISO       0x70a1
                                MX6UL_PAD_CSI_DATA06__ECSPI1_MOSI       0x79
                                MX6UL_PAD_CSI_DATA04__ECSPI1_SCLK       0x70a1
                                MX6UL_PAD_CSI_DATA05__ECSPI1_SS0        0x70a1
                        >;
                };
Declaration of interrupt and reset pins :
wiznet_pins_default: wiznet_pins {
                        fsl,pins = <
                                MX6UL_PAD_NAND_CE1_B__GPIO4_IO14        0x79
                                MX6UL_PAD_NAND_CE0_B__GPIO4_IO13        0x79
                                         >;
                                };
Please do let me know if any changes required. Any suggestions would be well appreciated.
Thanks.

Outcomes