-
Notifications
You must be signed in to change notification settings - Fork 5.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Please enable CONFIG_ENC28J60=m #795
Comments
Looks okay. |
Ask me nicely and I'll create you an overlay to get it loaded. |
Pretty please :) You would make my day. |
See: raspberrypi/linux#782 kernel: i2c: Fix grabbing lock from atomic context in i2c driver See: raspberrypi/linux#780 kernel: Add Add ENC28J60 SPI ethernet module See: raspberrypi/linux#795
See: raspberrypi/linux#782 kernel: i2c: Fix grabbing lock from atomic context in i2c driver See: raspberrypi/linux#780 kernel: Add Add ENC28J60 SPI ethernet module See: raspberrypi/linux#795
The module is enabled in latest rpi-update kernel. |
Thanks a million. That makes adding the eth0 on my A+ so much easier. |
See: raspberrypi/linux#782 kernel: config: Enable IP_NF_TARGET_CLUSTERIP See: raspberrypi/linux#812 kernel: config: enable ENC28J60 SPI ethernet module See: raspberrypi/linux#795
I haven't forgotten the overlay - I will get back to it eventually. |
See: raspberrypi/linux#782 kernel: config: Enable IP_NF_TARGET_CLUSTERIP See: raspberrypi/linux#812 kernel: config: enable ENC28J60 SPI ethernet module See: raspberrypi/linux#795
Wow, this is really good news. |
The overlay and slightly tweaked module are now in the rpi-3.18.y branch. Build with 'dtbs' as a make target, and copy arch/arm/boot/dtbs/enc28j60-overlay.dtb to /boot/overlays, add 'dtoverlay=enc28j60' and reboot. |
@pelwell's overlay is in latest rpi-update firmware. |
…e link fields See: #377 See: Hexxeh/rpi-firmware#77 kernel: dtoverlay added for ENC26J60 See: raspberrypi/linux#795
…e link fields See: raspberrypi/firmware#377 See: #77 kernel: dtoverlay added for ENC26J60 See: raspberrypi/linux#795
Thanks a lot guys! |
Are you happy to close this? |
Closing for lack of response. |
Hi pelwell, Thank you and the team for your help so far.
|
Same here, dmesg:
$ ip addr
|
I don't have a setup to test this. @DougieLawson, can you comment? |
Hi Phil, I'm not sure my hardware is working, I've run it up on an Arduino and it doesn't appear to work there. So I have a new one being shipped from China (don't you love eBay). When I get that I'll test it with the Arduino then on my A+. |
Could we re-open this bug until we have a working implementation? Thanks. |
My replacement hardware arrived today. I've tested this with I'll build a new 3.18.9 kernel tomorrow (with the patched version of bcm2708.c) and give that a try. |
I've got the hardware. I can't get it to work at all. |
Can you elaborate? That doesn't give us much to work with. |
The interface appears to be active, I can assign a hw MAC address, DHCP (I'm running dhcpcd not isc-dhcp-client) fails to get a IP assigned by my router so gives it a 169.254.xxx.yyy address. There's green and a winking orange light, the switch has a green light (the cable is known to be good as I've tested it with my 2B). I can ping the local side of the interface, I can't send traffic out through my router. I can't ping in from the network. That's running a kernel with the old hack for bcm2708.c and with the DT disabled. With this new hardware I've not tried it on my Arduino, but it's fresh from the Chinese ebayer that I bought it from. |
Thanks - that's much clearer. Unfortunately I don't think there's much I can do here, unless somebody can narrow down where the problem is. |
@DougieLawson what does |
Hi all, Thank you for your assistance. The new overlay is working fine. I am getting reasonable throughput (386kB/s average, with peeks over 400kB/s) without any issues so far. I have only tested the blob posted by pelwell, as the stock firmware has not been updated yet, and my Debian system can't compile the source (has old DT compiler). Hopefully the firmware will get updated soon so that we can close this topic. Thanks again. |
Hi all, I was able to compile the latest DT overlay source and confirm it is working. I have also looked at SPI clock with an oscilloscope.
This is working for most people, but the errata sheet for ENC28j60 describes a silicon bug for some revisions of this IC:
Current default does not meet this requirement. I propose to increase the default to 20000000 (chip maximum), which sets the SPI clock to 15.6 MHz (confirmed on the scope), well above the silicon bug. This has a side benefit of increasing the throughput from 386kB/s to 540kB/s on my Model A+. Perhaps some time in the future the divisor restriction will be lifted to allow us to use full 20MHz SPI clock. I believe this would be a reasonable default; one can always lower the frequency by changing the overlay parameter. Thanks |
well - there is a patch in the pipeline for the spi-bcm2835 driver that should also handle this case. But note that for me 20MHz did not work on my breadboard setup with multiple SPI devices - I am using 10MHz and there it works fine! |
If you can point me at the patch, which must be for spi-bcm2835.c, then we may apply it to spi-bcm2708.c, i.e. the driver used by the stock RPi kernels. |
[PATCH] SPI: BCM2835: clock divider can be a multiple of 2: https://www.marc.info/?l=linux-spi&m=142675575809112&w=3 |
The bcm2835 is now also loadable as a module with the right overlay - this was done to keep the development upstream... |
Hi all, I guess the SPI clock issue will take a bit longer to address. Let's keep the existing default for now. @pelwell, could you please update the binary firmware with latest DT overlay? Thanks |
A firmware build is in progress, so whatever has been checked in will appear in next rpi-update. |
See: raspberrypi/linux#766 kernel: Guard fiq_fsm_spin_lock with fiq_enable check See: raspberrypi/linux#913 kernel: BCM270x_DT: Add interrupt pin to enc28j60-overlay See: raspberrypi/linux#795 kernel: Add Device Tree support for RPi-DAC See: raspberrypi/linux#916 firmware: image_fx: Preserve the DATACORRUPT flag in the generated deinterlaced frame firmware: image_encode: Send ABORT_ENCODE when flushing codec to avoid a hang firmware: hdmi: Add config options for setting MAI threshold and dma priority See: http://forum.kodi.tv/showthread.php?tid=222061 firmware: gencmd: Add command for querying if hvs asserts have occurred See: #407
See: raspberrypi/linux#766 kernel: Guard fiq_fsm_spin_lock with fiq_enable check See: raspberrypi/linux#913 kernel: BCM270x_DT: Add interrupt pin to enc28j60-overlay See: raspberrypi/linux#795 kernel: Add Device Tree support for RPi-DAC See: raspberrypi/linux#916 firmware: image_fx: Preserve the DATACORRUPT flag in the generated deinterlaced frame firmware: image_encode: Send ABORT_ENCODE when flushing codec to avoid a hang firmware: hdmi: Add config options for setting MAI threshold and dma priority See: http://forum.kodi.tv/showthread.php?tid=222061 firmware: gencmd: Add command for querying if hvs asserts have occurred See: raspberrypi/firmware#407
Works like a charm! |
Hi, I've been trying for days now to make this device work, this thread has gotten me a lot closer, but I'm still not quite there. I've done the following:
I get the following error message: "failed to load overlay 'enc28j60'". I've tried changing the filename of the overlay to things like enc28j60.dts, changing the extention to .dtb etc. but it didn't help What am I doing wrong? I'm on kernel 3.18.7+ I've probably missed something pretty basic, I'm learning as I go. Could you please point me in the right direction? |
Update your kernel with |
You need to find a suitable version of dtc - the Device Tree compiler - to convert the .dts into a .dtb. You should really read the documentation here - it will save you a lot of time. You can also download from here: https://github.com/raspberrypi/firmware/blob/master/boot/overlays/enc28j60-overlay.dtb |
Hey all, |
Hello, i wrote a shell script as a workaround, and added it to
Then But it would be a nice feature to use the Serial from /proc/cpuinfo |
you could probably also create a udev rule to handle that for you, but do not ask about details how it works, but this maybe as a hint: |
Thanks, @gajdipajti , this workaround works (no pun intended). Incidentally I followed the steps from your blog https://gajdicookbook.wordpress.com to get the whole thing up and running :-) However, I was hoping for another solution, say some hidden device-tree binding for getting this done, so I could just specify the MAC address right in the .dts file or even in the dtoverlay=... directive in config.txt Thanks @msperl , I'd seen this but it seems to assume that the device has a MAC address of xx:xx:xx:xx:xx:xx which you're trying to spoof into yy:yy:yy:yy:yy:yy. The issue here is that its impossible (at least to me) to determine what the MAC address the module got at boot-time (since its different on every boot), so I can't write a udev rule that essentially depends on knowledge I won't have :-) However, you've given me an idea. It just might be possible to use the driver as the matching attribute rather than the permanent MAC address xx:xx:xx:xx:xx:xx. Since in theory there will be only one device for which the enc28j60 kernel module is loaded, then maybe the rule can be adjusted to target that...I'll give that a shot and let you know how it goes. Thanks! |
Hi Phil, I did much the same as Tamas. I've got a script that picks up the RPi serial number, prefixes that with B8:27:EB and issues a ifconfig eth0 ether B8:27:EB:xx:xx:xx That makes it look like a real Raspberry Pi to anything that scans my network. Regards, Dougie |
You probably could filter on the driver or on the first few bits of the mac - the driver uses some defaults pattern - you still need to figure out what it is... - or you filter on the driver type or similar (which - I believe is possible) |
I guess the filter: |
On 12 Jan 2016 4:48 pm, "msperl" [email protected] wrote:
|
I run that in /etc/network/if-pre-up.d on a system that doesn't have
|
Maybe a noob question, but can these be daisy chained, or do I need to make changes to my DTS? Also, does the DTS tell you how the enc28j60 should be wired? |
Please don't re-open closed issues for questions like this - use the Forums. |
…e link fields See: raspberrypi#377 See: Hexxeh/rpi-firmware#77 kernel: dtoverlay added for ENC26J60 See: raspberrypi/linux#795
See: raspberrypi/linux#766 kernel: Guard fiq_fsm_spin_lock with fiq_enable check See: raspberrypi/linux#913 kernel: BCM270x_DT: Add interrupt pin to enc28j60-overlay See: raspberrypi/linux#795 kernel: Add Device Tree support for RPi-DAC See: raspberrypi/linux#916 firmware: image_fx: Preserve the DATACORRUPT flag in the generated deinterlaced frame firmware: image_encode: Send ABORT_ENCODE when flushing codec to avoid a hang firmware: hdmi: Add config options for setting MAI threshold and dma priority See: http://forum.kodi.tv/showthread.php?tid=222061 firmware: gencmd: Add command for querying if hvs asserts have occurred See: raspberrypi#407
I've just hit the very same bug as @DougieLawson "transmit queue 0" after 250-300 seconds after bootup. The interface looses it's DHCP-acquired IP (seems to drop to the private 169.254 class for whatever reason) and stops responding. This is observed on the original RPi B (256M), newest kernel and overlays via rpi-update, stable Raspbian, module connected with int line on the default GPIO25, 15 cm cables. Has anyone found a reason for this to happen or even better - a solution? |
There was a question on the forum about a very similar looking issue but unfortunately it didn't get any response (https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=187567) |
With 3.18 we have moved to device tree based configuration, so we no longer need to put SPI connection specific information into a board file. Could we now enable ENC28J60 as a module so that both armv6 and amrv7 distribution kernels support this ethernet controller?
http://www.raspberrypi.org/forums/viewtopic.php?f=44&t=18397
Thanks!
The text was updated successfully, but these errors were encountered: