Device tree for VF61 dual ethernet and SPI ports

I am using a VF61 on a custom carrier board. I have previously created a custom device tree to implement a single ethernet port, three serial ports, and two SPI ports (one with two chip selects, and one with a single chip select). the SPI ports appeard as spidev1.0, spidev1.1 and spidev2.1 in Linux. I created this device tree as a modification of the vf610-colibri-eval-v3.dts device tree file.

I now have need of a similar configuration, but using two ethernet ports. I am using the Toradex dual ethernet example as a starting point, and am attempting to modify the vf610-colibri-dual-eth.dts device tree file to add the necessary SPI ports. I am trying to use dspi1 with chip select 0 on PTD5 and chip select 3 on PTE12, and dspi2 with chip select 1 on PTD31. Try as I might, I cannot get three spi devices to show up in Linux. I have tried many different things, but all I can get is spidev1.1 and spidev2.1.

My modified version of the vf610-colibri-dual-eth.dts file is attached. Please, I need someone to tell me what I need to do to get the spi ports configured properly. My device tree file compiles without error, but it does not give me three spi devices.

my device tree file

Hi @irbsd

Did you compile the correct version of the devicetree, since there is a special devicetree for dual-eth on Colibri VF-61, which is described here. Further you also need to change the U-Boot Parameter.

Could you share the dmesg log?

Thanks and Best regards,
Jaski

I have been working on this problem all day. I have created a new custom device tree file called vf610-colibri-dual-ethmine.dts starting with a copy of vf610-colibri-dual-eth.dts, and modifying it to add two SPI interfaces, starting out simple with only one chip select on each SPI interface. I thought I was making good progress, and resolved pin conflicts with pins PTD31, PTD29 and PTD28. Then I got an error at boot time about a conflict on pin PTC1. The system says “vf610-pinctrl 40048000.iomuxc: pin VF610_PAD_PTC1 already requested by 40048000.iomuxc; cannot claim for 400d0000.ethernet”. However, the only reference to PTC1 that I can find is in iomuxc as a GPIO pin. I cannot find where this pin is being used by the ethernet interface in the device tree.

And my spi device is still showing up in Linux as spidev1.1 instead of the expected spidev1.0.

When I use the unmodified Toradex device tree vf610-colibri-dual-eth.dts I do not see any pin conflicts when booting, but of course I don’t have any SPI ports either. My application needs two SPI interfaces., which is why I am creating a modified device tree file.

My modified device tree file is vf610-colibri-dual-ethmine.dts

The dmesg log with my modified device tree file is dmesg2.log

The dmesg log with the unmodified Toradex dual ethernet device tree is dmesg1.log

And no, I don’t need to change any U-Boot parameters because I change the name on my compiled dtb file to vf610-colibri-eval-v3.dtb when I copy it to the SD card to flash it onto the VF61 module.

Hi

You still are having Pin Muxing Conflicts. The best would be if you could share ( git diff ) in a text file?

And no, I don’t need to change any U-Boot parameters because I change the name on my compiled dtb file to vf610-colibri-eval-v3.dtb when I copy it to the SD card to flash it onto the VF61 module.

Yeah, but did you include the dual-ethmine.dts in your final .dtb?

Best regards,
Jaski