Open plauria opened 7 years ago
Some modinfo: root@beaglebone:~# modinfo spi-mcspi-slave.ko filename: /root/spi-mcspi-slave.ko version: 1.0 description: SPI slave for McSPI controller. author: Patryk Mezydlo, mezydlo.p@gmail.com license: GPL v2 srcversion: F271B69947F792D8656DC9B alias: of:NTCspislave,spi-slave-debug* depends: spi-slave-core vermagic: 4.4.30-ti-r64 SMP mod_unload modversions ARMv7 p2v8
root@beaglebone:~# lsmod Module Size Used by spi_mcspi_slave 10312 0 spi_slave_core 9711 1 spi_mcspi_slave omap_aes_driver 23889 0 omap_sham 26513 0 omap_rng 5544 0 rng_core 9066 1 omap_rng evdev 13511 1 uio_pdrv_genirq 3923 0 uio 10524 1 uio_pdrv_genirq usb_f_acm 8361 1 u_serial 13753 3 usb_f_acm usb_f_rndis 25865 1 g_multi 6010 0 usb_f_mass_storage 49849 2 g_multi u_ether 14413 2 usb_f_rndis,g_multi libcomposite 53554 4 usb_f_acm,usb_f_rndis,g_multi,usb_f_mass_storage
Relevant dmesg:
[ 58.160486] bone_capemgr bone_capemgr: part_number 'SPI1_slave', version 'N/A' [ 58.160570] bone_capemgr bone_capemgr: slot #4: override [ 58.160613] bone_capemgr bone_capemgr: Using override eeprom data at slot 4 [ 58.160659] bone_capemgr bone_capemgr: slot #4: 'Override Board Name,00A0,Override Manuf,SPI1_slave' [ 58.199652] bone_capemgr bone_capemgr: slot #4: dtbo 'SPI1_slave-00A0.dtbo' loaded; overlay id #0 [ 99.350535] spislavecore: function: init
Checking slots: root@beaglebone:~# cat /sys/devices/platform/bone_capemgr/slots 0: PF---- -1 1: PF---- -1 2: PF---- -1 3: PF---- -1 4: P-O-L- 0 Override Board Name,00A0,Override Manuf,SPI1_slave
Hi,
Can you give me some time, I need to compile new kernel version for check it. Now I'm very busy. This weekend I will try to take care of it. Of what I remember about what you say I had no problem. Unfortunately, I do not support this project because probably soon kernel will support spi slave.
Patryk
Ok, thanks so much Patryk! If you need any other info from me just let me know, I appreciate you taking time for this project!
hi same problem at 4.4.8-ti-r22
dmesg [ 92.725630] bone_capemgr bone_capemgr: part_number 'SPI0_slave', version 'N/A' [ 92.725705] bone_capemgr bone_capemgr: slot #5: override [ 92.725747] bone_capemgr bone_capemgr: Using override eeprom data at slot 5 [ 92.725794] bone_capemgr bone_capemgr: slot #5: 'Override Board Name,00A0,Override Manuf,SPI0_slave' [ 92.754980] bone_capemgr bone_capemgr: slot #5: dtbo 'SPI0_slave-00A0.dtbo' loaded; overlay id #0 [ 119.916688] spislavecore: function: init
root@beaglebone:/home/debian/# lsmod Module Size Used by binfmt_misc 8862 1 spi_mcspi_slave 9077 0 spi_slave_core 8796 1 spi_mcspi_slave
and SPI device node is not created..
Had the same problem but with yocto and kernel 4.10. and found that after the latest commit the compatible strings in the dts files and spi-mcspi-slave.c did not match.
Changing that string fixed it for me.
diff --git a/driver/spi-mcspi-slave.c b/driver/spi-mcspi-slave.c
index b403ae0..2c6438e 100644
--- a/driver/spi-mcspi-slave.c
+++ b/driver/spi-mcspi-slave.c
@@ -569,7 +569,7 @@ struct omap2_mcspi_platform_config mcspi_slave_pdata = {
const struct of_device_id mcspi_slave_of_match[] = {
{
- .compatible = "spislave,spi-slave-debug",
+ .compatible = "ti,omap4-mcspi-slave",
.data = &mcspi_slave_pdata,
},
{ }
--
2.11.0
Now I'm curios if the module acctually works :)
hi I use the linux3.8.13-bone86. I have the same problem that can not find the /dev/spisalvedev device. so I try to modify the function in the file "spi-slave-dev.c'. In function "spislave_probe" ,I modify the function as the following: dev=device_create(spislave_class,&spi->dev,data->devt,data,"spislave%d,%d",SPISLAVE_MAJOR,data->id); I can find the device in the /dev now!
Hi
after loading the cape and drivers, there is no spi device created in /dev. This is with kernel 4.4.30-ti-r64. I've 'successfully' used insmod - all I see in dmesg is, after loading spislave core, the message :
spislavecore: function: init
Then I loaded spi-mcspi-slave.ko. Any ideas on what might have gone wrong? I have confirmed the SPI0_slave cape is the only one loaded and that spi_omap2_mcspi is blacklisted.
edit: I also tried the SPI1_slave cape to no effect. It doesn't look like the driver is properly initializing.
Can you let me know what kernel version I should be using for this to work?