UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

Reply

SPIDEV errors in Petalinux 2017.1

Accepted Solution Solved
Highlighted
Explorer
Posts: 103
Registered: ‎03-26-2010
Accepted Solution

SPIDEV errors in Petalinux 2017.1

[ Edited ]

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?


Accepted Solutions
Explorer
Posts: 103
Registered: ‎03-26-2010

Re: SPIDEV errors in Petalinux 2017.1

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.

View solution in original post


All Replies
Explorer
Posts: 103
Registered: ‎03-26-2010

Re: SPIDEV errors in Petalinux 2017.1

[ Edited ]

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?

Explorer
Posts: 103
Registered: ‎03-26-2010

Re: SPIDEV errors in Petalinux 2017.1

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.