06-15-2017 06:19 PM - edited 06-15-2017 06:20 PM
Hi all,
With Vivado/Petalinux 2017.1 I get spidev errors that are different from the others I've seen on the forum. When kernel boots up, I see this:
cdns-spi e0006000.spi: chipselect 0 already in use spi_master spi0: spi_device register error /amba/spi@e0006000/spidev@0 spi_master spi0: Failed to create SPI device for /amba/spi@e0006000/spidev@0
I have CONFIG_SPI_SPIDEV=y set in the kernel. Additionally, my system-user.dtsi has the same stuff everyone else uses:
&spi0 { status = "okay"; is-decoded-cs = <0>; num-cs = <1>; device@0 { compatible = "spidev"; reg = <0>; //chipselect 0 spi-max-frequency = <50000000>; }; };
I have edited the device-tree-generation_%.bbappend file in ...project-spec/meta-user/recipes-bsp/device-tree to include the system-user.dtsi. The hardware/software used has worked for Vivado/Petalinux 2016.2 in the past.
Anyone know what's going on?
06-19-2017 12:10 PM
I was able to solve my issues...
Thing to remember with Petalinux 2017.1 is that for whatever reason everything gets renamed - spidev numbers changed, uio numbers changed, no idea why. If the SW driver source is updated to reflect this then everything works again as it did under earlier releases.
06-15-2017 07:16 PM - edited 06-15-2017 08:38 PM
Made some progress - found that the kernel had a problem with the fact that I had
reg = <0>;
set for two different devices within spi0. This has not been a problem in Petalinux 2016.2 before. Now here's what I get in dmesg | grep spi:
spidev spi0.0: buggy DT: spidev listed directly in DT
My spi0 devices are ad9361-phy@0 for the AD9361 and the spidev device. There's only one chip select. What should both of these be set to? And why am I getting spi0.0 instead of spidev32766.1 the way I used to in 2016.2?
06-19-2017 12:10 PM
I was able to solve my issues...
Thing to remember with Petalinux 2017.1 is that for whatever reason everything gets renamed - spidev numbers changed, uio numbers changed, no idea why. If the SW driver source is updated to reflect this then everything works again as it did under earlier releases.
05-15-2018 04:24 PM
Hi dima2882
How did you set this "CONFIG_SPI_SPIDEV=y"?
05-15-2018 04:26 PM
writing this in system-user.dtsi gives errors.
I could not use the reference &spi0. Was there more you had in the system-user.dtsi?
&spi0 { status = "okay"; is-decoded-cs = <0>; num-cs = <1>; device@0 { compatible = "spidev"; reg = <0>; //chipselect 0 spi-max-frequency = <50000000>; }; };
05-16-2018 06:52 PM
This is what I had:
&spi0 { status = "okay"; num-cs = <1>; device@0 { spi-cpha; compatible = "spidev"; reg = <0>; //chipselect 0 spi-max-frequency = <10000000>; }; };
05-17-2018 09:00 AM
Hi dima2882,
modified the system-user.dtsi which looks close to your device-tree modification.
Here is the solved post:
Cheers!