eldho
1
Hello Everyone,
I'm trying to interface w5500 Ethernet module (SPI to Lan) with Raspberry Pi Zero but it is not initializing.
Packages installed:
kmod-spi-bcm2835 - 5.15.134-1
kmod-spi-bitbang - 5.15.134-1
kmod-spi-dev - 5.15.134-1
kmod-spi-gpio - 5.15.134-1
kmod-spi-ks8995 - 5.15.134-1
I see
ls /boot/overlays/w55*
/boot/overlays/w5500.dtbo
I have tried enabling in /boot/config.txt
1.
dtoverlay=spi-bcm2835
dtoverlay=anyspi,spi0-0,dev="wiznet,w5500",speed=30000000
2. (Works in Raspbian OS)
dtparam=spi=on
dtoverlay=w5500
Please let me know how i can solve this issue. Thanks.
does it work in Rasbian, or whatever the RPi OS is called ?
eldho
3
Yes the below edit in config.txt
will enable the interface
in that case, what modules does Rapbian load, and which kernel version does it run ?
brada4
5
Run ethtool -i eth5
to determine driver in use (also run modinfo modulename
to determine its version and running kernel)
1 Like
eldho
6
Kernel:
uname -r
6.1.21+
uname -a
Linux raspberrypi 6.1.21+ #1642 Mon Apr 3 17:19:14 BST 2023 armv6l
Modules loaded (SPI)
lsmod | grep spi
w5100_spi 7440 0
w5100 12989 1 w5100_spi
spidev 9491 0
spi_bcm2835 11936 0
This comes up in both OS
cat /sys/class/spi_master/spi0/spi0.0/modalias
spi:w5500
cat /sys/class/spi_master/spi0/spi0.1/modalias
spi:spidev
Trying a snapshot might be a good idea.
eldho
8
@frollic not sure what you meant by snapshot here
brada4
9
Please OCR your image. Does not have any ethtool or modinfo.
eldho
10
ethtool -i eth0
driver: w5100
version: 2012-04-04
firmware-version:
expansion-rom-version:
bus-info: spi0.0
supports-statistics: no
supports-test: no
supports-eeprom-access: no
supports-register-dump: yes
supports-priv-flags: no
eldho
12
Sorry i missed it, here it is
$ modinfo w5100
filename: /lib/modules/6.1.21+/kernel/drivers/net/ethernet/wiznet/w5100.ko.xz
license: GPL
alias: platform:w5100
author: Mike Sinkovsky <msink@permonline.ru>
description: WIZnet W5100 Ethernet driver v2012-04-04
srcversion: D7A57ADA524266AD08793DA
depends:
intree: Y
name: w5100
vermagic: 6.1.21+ mod_unload modversions ARMv6 p2v8
$ modinfo w5100-spi
filename: /lib/modules/6.1.21+/kernel/drivers/net/ethernet/wiznet/w5100-spi.ko.xz
license: GPL
author: Akinobu Mita <akinobu.mita@gmail.com>
description: WIZnet W5100/W5200/W5500 Ethernet driver for SPI mode
srcversion: FDF6443D981571F99C29532
alias: of:N*T*Cwiznet,w5500C*
alias: of:N*T*Cwiznet,w5500
alias: of:N*T*Cwiznet,w5200C*
alias: of:N*T*Cwiznet,w5200
alias: of:N*T*Cwiznet,w5100C*
alias: of:N*T*Cwiznet,w5100
alias: spi:w5500
alias: spi:w5200
alias: spi:w5100
depends: w5100
intree: Y
name: w5100_spi
vermagic: 6.1.21+ mod_unload modversions ARMv6 p2v8
brada4
13
You can ask to package in-tree kmod via github bug tracker, or better (faster, to make into next stable release) try yourself and make a PR.