Using ENC28J60 on iMX7D + Torizon

I’m trying to enable ENC28J60 with iMX7 using Torizon OS as an additional ethernet interface, but without success so far. I’m handling device tree overlays through arm32v7-debian-dev-tools container to enable it.

My pinout:
SPI_CS: 86
INT: 45 (GPIO1_IO01)

DTS Code:

/ {
	compatible = "toradex,colibri-imx7s";
	fragment@0 {
		target = <&ecspi1>;
		__overlay__ {
			status = "okay";		
			ethernet: enc28j60@0 {
				#address-cells = <1>;
				#size-cells = <1>;
				compatible = "microchip,enc28j60";
				spi-max-frequency = <12000000>;
				intr-gpio = <&gpio1 1 0>;
				reg = <0>;
				status = "okay";

Thanks in advance.

Greetings @eduegs,

I believe your core issue is that you’re using the wrong ecspi interface. The default configured ready to go ecspi on i.MX7D is ecspi3 unless your intention is to use ecspi1. If not then ecspi3 should more or less be ready to use, as the standard SPI pins (88, 86, 90, 92) are assigned to ecspi3 by default.

You will need to pinmux your INT pin however, do note that SODIMM 45 is currently pinmuxed to a different interface by default so you’ll either need to fix this conflict or use another pin that is free.

Best Regards,