cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
lancebj
Visitor
Visitor
556 Views
Registered: ‎01-22-2021

Petalinux 2019.1 zynqmp "failed to add to PM domain" SPI

Jump to solution

I have a zynqmp US+ using petalinux 2019.1. I am trying to enable SPI (not QSPI, which is already enabled). I enabled SPI master and spidev in the kernel config. I added the following to system-user.dtsi:

&spi1 {
status = "okay";
spidev@0x00 {
compatible = "spidev";
spi-max-frequency = <10000000>;
reg = <0>;
};
};

In dmesg, I see the following:

[ 4.870203] cdns-spi ff040000.spi: failed to add to PM domain domain5: -13
[ 4.877079] cdns-spi: probe of ff040000.spi failed with error -13
[ 4.890374] cdns-spi ff050000.spi: failed to add to PM domain domain6: -13
[ 4.897248] cdns-spi: probe of ff050000.spi failed with error -13

I don't know what those messages mean or what I can do to fix them. Most of what I found regarding power-domains appears to have changed with 2019.1. Up to 2018.3, it appears that the convention was

power-domains = <&pd_spi0>;

but the zynqmp.dtsi in 2019.1 has lines like

power-domains = <&zynqmp_firmware 35>;

I cannot find documentation on what that means or how to diagnose the issue. What does "35" mean? Where do I find "zynqmp_firmware?" what are "domain5" and "domain6" and how do they relate to 35 (and 36) in the power-domains lines? The information I found in UG1137 referred to documentation and source files in the kernel that were not there -- perhaps it was out of date.

Note that device ("spidev@0x0") is just a simple shift register in another CPLD for now and will be fleshed out later. I wanted to be able to talk to it in user space.

On a related note, there is a program called spidev_test that appears in the linux source (under tools/spi), as well is in the /opt/Petalinux tree, but I can't see how to cause it to be built and included in the root file system.

Help on any of the above points would be greatly appreciated.

0 Kudos
1 Solution

Accepted Solutions
lancebj
Visitor
Visitor
521 Views
Registered: ‎01-22-2021

I partially answered my own question. I rebuilt BOOT.BIN and the problem went away. I am guessing that the something in the PMU firmware sets up that power domain and the petalinux tools automatically build that into one of the fsbl files.

I still don't know the proper way to get spidev_test built into the RFS, but, works case, I can probably make a special recipe for it.

View solution in original post

4 Replies
lancebj
Visitor
Visitor
522 Views
Registered: ‎01-22-2021

I partially answered my own question. I rebuilt BOOT.BIN and the problem went away. I am guessing that the something in the PMU firmware sets up that power domain and the petalinux tools automatically build that into one of the fsbl files.

I still don't know the proper way to get spidev_test built into the RFS, but, works case, I can probably make a special recipe for it.

View solution in original post

carrick
Visitor
Visitor
122 Views
Registered: ‎09-14-2021

hi,i have same issues,after rebuilt BOOT.BIN,the issue also;do you tell me your rebuilting step? petalinux-package --boot --u-boot --force?

0 Kudos
lancebj
Visitor
Visitor
108 Views
Registered: ‎01-22-2021

@carrick, it has been a while since I did this, but I believe I first did a rebuild of fsbl and u-boot using petalinux-build. You can check the petalinux user guide for the exact parameters for selectively rebuilding components, or you can just rebuild everything (petalinux-build -x cleansstate; petalinux-build).  Then I packaged boot.bin using:

petalinux-package --force --boot --u-boot

Note that, in my case, I do not include in the FPGA boot image, but if you do then:

petalinux-package --force --boot --fpga images/linux/system.bit --u-boot

 

 

0 Kudos
carrick
Visitor
Visitor
65 Views
Registered: ‎09-14-2021

thanks,i try your comments, the issue also;my Petalinux 2020.1;

in MPSOC PS SPI not working with Petalinux - Community Forums (xilinx.com); Disabling the power manager(disable CONFIG_PM) did help,but if idisable CONFIG_PM,the system can not start up;

0 Kudos