marcosartore
Posts: 14
Joined: Thu Jan 15, 2015 3:07 pm

100baseT ethernet controller

Thu Apr 13, 2017 8:19 am

Hello,
I am interested in connecting a 100baseT ethernet chip to the SPI of a Compute Module 3. I have read the document "Compute module attaching and enabling peripherals Guide", which explains in Example 2 how to attach a 10baseT ENC28J60 SPI Ethernet Controller on BANK0.

I wish to ask if anybody could please suggest how to:
1) connect instead a 100baseT chip, for example the ENC424J600
2) use SPI1 instead of SPI0
3) modify the config.txt and related dtoverlay line to handle this chip and the SPI1

Many thanks in advance,
Marco

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8688
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: 100baseT ethernet controller

Thu Apr 13, 2017 9:17 am

Yes in theory you should be able to, but the ENCX24J600 driver is not built as part of the default Pi kernel.
If you want to enable it then you need to add "CONFIG_ENCX24J600=m" to arch/arm/configs/bcm2709_defconfig and arch/arm/configs/bcmrpi_defconfig and rebuild.

The device tree side should then follow very similar lines to https://github.com/raspberrypi/linux/bl ... verlay.dts or https://github.com/raspberrypi/linux/bl ... verlay.dts, but with the initial target being <&spi1>, renaming the nodes to be encx24j600, and the compatible seems to be "encx24j600".

Whether there is any gain in doing so is a different question. SPI normally runs at relatively low speeds, so is there sufficient bandwidth to handle 100Mbit/s ethernet?
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

marcosartore
Posts: 14
Joined: Thu Jan 15, 2015 3:07 pm

Re: 100baseT ethernet controller

Thu Apr 13, 2017 10:07 am

Many thanks for your detailed answer. I will consider the speed issue that you have pointed out....
Greetings,
Marco

benjamin2044
Posts: 4
Joined: Mon Jul 29, 2019 1:26 am

Re: 100baseT ethernet controller

Wed Apr 15, 2020 11:29 am

Hi,
I know it is a old post but has anyone been able to build enc424j600 driver in the kernel so that the Raspi can easily support ethernet connection through SPI as discussed in this topic here.
I would be greatly thankful if anyone could provide steps for doing so.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 8688
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: 100baseT ethernet controller

Wed Apr 15, 2020 1:09 pm

You follow the instructions on https://www.raspberrypi.org/documentati ... uilding.md for how to build the kernel, but between "make <variant>_defconfig" and "make -j4 zImage modules dtbs" you need to alter the config to add the config option for CONFIG_ENCX24J600.

If you're running X11 on your build machine, then "make xconfig" should start a GUI app to allow editing the config. Ctrl-F will bring up a search dialog. Enter "ENCX24J600" (without the quotes), and it should bring up "ENCX24J600 support". Click once in the square box to get a dot to build as a module
(probably what you want). Click again to get a tick to build it into the base kernel image (not normally what you want).

Exit the app, and then continue your build process.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

benjamin2044
Posts: 4
Joined: Mon Jul 29, 2019 1:26 am

Re: 100baseT ethernet controller

Fri Jun 19, 2020 7:54 am

Tried but totally lost.
Is it possible that RaspberryPi can include driver support for ENC424J600 in the future, so that the users can just go to /boot/config.txt and just add a line dtoverlay=enc424j600.
Thanks.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2870
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: 100baseT ethernet controller

Thu Jun 25, 2020 2:18 pm

I've just seen this post. Create an issue at https://github.com/raspberrypi/linux/issues, linking back to this thread, and saying briefly that you'd like the driver module enabled and for a suitable overlay to be written.

Return to “Device Tree”