cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Contributor
Contributor
9,321 Views
Registered: ‎01-28-2014

AMP: spi drivers not working on cpu1

Jump to solution

I'm using a Zynq 702 and based on the xapp1078 reference design I have an AMP system.

Linux is run on the cpu0 and a standalone system is run on cpu1. I'm using the latest Linux kernel and uboot. The hardware is built with Vivado 2015.2 and is similar to the default 702 config but with an extra UART1 and SPI1.

The SPI device is run on cpu1 and all other peripherals are controlled by the cpu0 with Linux.

 

The problem is that the SPI device does not work correctly. The Linux kernel loads correctly and the cpu1 app is started but the spi_self_test does not work and neither does the polled transfer.

The strange thing is that when I debug the app using the JTAG, the program runs fine. I use the same hardware, bsp and code when I debug so it seems like this should be fine. However, using it with Linux produces errors from the spi drivers. I've disabled the SPI in the Linux device tree but could Linux still somehow be interfering with cpu1?

0 Kudos
1 Solution

Accepted Solutions
Highlighted
Visitor
Visitor
17,163 Views
Registered: ‎07-17-2015

Re: AMP: spi drivers not working on cpu1

Jump to solution

Hi,

 

Did you try to let the SPI driver enable in the devicetree ?

 

I currently have the same kind of problem on zed. I want to run Linux on CPU0 with stdout on UART0 and run baremetal on CPU1 controlling UART1 and GPIO. I started from xapp1078.

 

When I start CPU1 from Linux, nothing appears on UART1 output and no GPIO action works, but the counter COMM_VAL is incrementing and I am able to read its value from Linux.

So CPU0 loads CPU1 app correctly, but drivers don't work.

 

Then, I added these devices (UART1 and GPIO) in the devicetree, and it works!

 

But, it is not the proper way to do in my point of view because I don't want Linux has a control on these devices. In another hand, I don't understand why the devicetree passed to CPU0 for Linux can still interfer on CPU1.

Any ideas ?

View solution in original post

0 Kudos
4 Replies
Highlighted
Visitor
Visitor
17,164 Views
Registered: ‎07-17-2015

Re: AMP: spi drivers not working on cpu1

Jump to solution

Hi,

 

Did you try to let the SPI driver enable in the devicetree ?

 

I currently have the same kind of problem on zed. I want to run Linux on CPU0 with stdout on UART0 and run baremetal on CPU1 controlling UART1 and GPIO. I started from xapp1078.

 

When I start CPU1 from Linux, nothing appears on UART1 output and no GPIO action works, but the counter COMM_VAL is incrementing and I am able to read its value from Linux.

So CPU0 loads CPU1 app correctly, but drivers don't work.

 

Then, I added these devices (UART1 and GPIO) in the devicetree, and it works!

 

But, it is not the proper way to do in my point of view because I don't want Linux has a control on these devices. In another hand, I don't understand why the devicetree passed to CPU0 for Linux can still interfer on CPU1.

Any ideas ?

View solution in original post

0 Kudos
Highlighted
Contributor
Contributor
9,221 Views
Registered: ‎01-28-2014

Re: AMP: spi drivers not working on cpu1

Jump to solution

Hi,

 

thanks for the advice. Yeah, that sounds quite peculiar. I initially had the spi enabled in the device-tree and it wasn't working which is why I disabled it. But I'll try enabling again and see if it helps.

I also don't understand why the devicetree would affect cpu1 :/

0 Kudos
Highlighted
Contributor
Contributor
9,126 Views
Registered: ‎01-28-2014

Re: AMP: spi drivers not working on cpu1

Jump to solution

yeah this seemed to be the issue. The device needs to be enabled in the device tree if the peripheral is part of the PS but this is not necessary if the peripheral is implemented in the PL.

Thanks.

0 Kudos
Highlighted
Visitor
Visitor
9,112 Views
Registered: ‎07-17-2015

Re: AMP: spi drivers not working on cpu1

Jump to solution

Sorry for the previous post. You're right, when the peripheral is implemented in the PL, without enable it in the devicetree, CPU1 has control on it. Thanks for the advice.

 

0 Kudos