cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Visitor
Visitor
1,138 Views
Registered: ‎02-22-2019

zcu102 revision1.1 spi dev attach error

Hi ALL

I download "xilinx-zcu102-v2018.3-final.bsp" and create a project and compile follow UG1144. Then i want to setup spi device in linux, so i change the dts file do the flowing:

spi@ff040000 {
compatible = "cdns,spi-r1p6";
status = "okay";                                 // I change the status from disable to okay
interrupt-parent = <0x4>;
interrupts = <0x0 0x13 0x4>;
reg = <0x0 0xff040000 0x0 0x1000>;
clock-names = "ref_clk", "pclk";
#address-cells = <0x1>;
#size-cells = <0x0>;
power-domains = <0x29>;
clocks = <0x3 0x3a 0x3 0x1f>;
};

after compile and down to sdcard, i start the board and found the spi device setup error, I only want to setup spi device node at /dev/.

the following is part of my dmesg:

        ..................

        ..................

[ 3.782853] i2c i2c-1: Added multiplexed i2c bus 16
[ 3.787846] i2c i2c-1: Added multiplexed i2c bus 17
[ 3.792834] i2c i2c-1: Added multiplexed i2c bus 18
[ 3.797827] i2c i2c-1: Added multiplexed i2c bus 19
[ 3.802818] i2c i2c-1: Added multiplexed i2c bus 20
[ 3.807810] i2c i2c-1: Added multiplexed i2c bus 21
[ 3.812688] pca954x 1-0075: registered 8 multiplexed busses for I2C switch pca9548
[ 3.820273] cdns-i2c ff030000.i2c: 400 kHz mmio ff030000 irq 26
[ 3.872325] mmc0: SDHCI controller on ff170000.mmc [ff170000.mmc] using ADMA 64-bit
[ 3.885953] zynqmp_gpd_attach_dev error -13, node 35
[ 3.890917] cdns-spi ff040000.spi: failed to add to PM domain pd-spi0: -13
[ 3.897893] zynqmp_gpd_attach_dev error -13, node 36
[ 3.902851] cdns-spi ff050000.spi: failed to add to PM domain pd-spi1: -13
[ 3.910561] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[ 3.917422] of_cfs_init
[ 3.919875] of_cfs_init: OK
[ 3.922833] PLL: shutdown
[ 3.925449] zynqmp_pll_disable() clock disable failed for dpll_int, ret = -13
[ 3.932677] PLL: shutdown
[ 3.937561] zynqmp_gpd_attach_dev error -13, node 35
[ 3.942528] cdns-spi ff040000.spi: failed to add to PM domain pd-spi0: -13
[ 3.949500] zynqmp_gpd_attach_dev error -13, node 36
[ 3.949564] Freeing unused kernel memory: 448K
[ 3.958894] cdns-spi ff050000.spi: failed to add to PM domain pd-spi1: -13
INIT: version 2.88 booting
[ 3.997850] mmc0: new high speed SDHC card at address aaaa

         ................................

         ................................

I don't understand why this error happen , please help me ,thank you.

0 Kudos
11 Replies
Highlighted
Xilinx Employee
Xilinx Employee
1,095 Views
Registered: ‎09-01-2014

Re: zcu102 revision1.1 spi dev attach error

What device do you connect to SPI? I don't remember there is a SPI device on ZCU102 board.
0 Kudos
Highlighted
Visitor
Visitor
1,092 Views
Registered: ‎02-22-2019

Re: zcu102 revision1.1 spi dev attach error

I connected a ADRV9009 card to the HPC1 , and i will use spi to config the ADI chip.

I want to know why "zynqmp_gpd_attach_dev" of spi failed, Is there any DTS config error? 

0 Kudos
Highlighted
Xilinx Employee
Xilinx Employee
1,086 Views
Registered: ‎09-01-2014

Re: zcu102 revision1.1 spi dev attach error

I think you didn’t add a new SPI device on SPI bus, try to add the following to your system-user.dtsi
&spi0 {
spidev@0 {
compatible = "spidev";
reg = <0>;
spi-max-frequency = <25000000>;
};
};
0 Kudos
Highlighted
Visitor
Visitor
1,086 Views
Registered: ‎02-22-2019

Re: zcu102 revision1.1 spi dev attach error

I think whether a spi device connect or not , the spi device driver can setup success and find a /dev/spixx node .

0 Kudos
Highlighted
Visitor
Visitor
1,053 Views
Registered: ‎02-22-2019

Re: zcu102 revision1.1 spi dev attach error

I added this code to system-user.dtsi, but its not helpful,is there any config special on PM?

0 Kudos
Highlighted
Visitor
Visitor
1,036 Views
Registered: ‎02-22-2019

Re: zcu102 revision1.1 spi dev attach error

I analyzied the code, found that the "do_fw_call_smc" return error code 13, and this error code means "Permission denied". So zynqmp_gpd_attach_dev failed at request spi for permission denied. 

I guess that is there any thing need to change at PMU or FSBL if i want to add spi.

0 Kudos
Highlighted
Visitor
Visitor
1,019 Views
Registered: ‎02-22-2019

Re: zcu102 revision1.1 spi dev attach error

Hi all

    Thanks for your help, I had resolved this problem.

0 Kudos
Highlighted
Moderator
Moderator
998 Views
Registered: ‎06-27-2017

Re: zcu102 revision1.1 spi dev attach error

Hi @wangdengwen ,

Could you please try using below mentioned compatible name.

        spidev@0 {

                compatible = "zynqmp,ps_spi", "rohm,dh2228fv"  ;

                spi-max-frequency = <100000>;

                reg = <0>;

        };

Best Regards
Kranthi
--------------------------
Don't forget to reply, kudo, and accept as solution.
0 Kudos
Highlighted
Observer
Observer
895 Views
Registered: ‎09-27-2010

Re: zcu102 revision1.1 spi dev attach error

Hi, wang

  I have the same problem on USB3.0,  please help me,  How can I solve this problem?

0 Kudos
Highlighted
607 Views
Registered: ‎09-20-2019

Re: zcu102 revision1.1 spi dev attach error

Hi wang,

we are facing the same problem with spi device and Zynq ultrascale board (trenz).

cdns-spi ff040000.spi: failed to add to PM domain pd-spi0: -13

I don't know how to overcome this problem

Could you give us some hints?

Thanks in advance

Nicola

 

0 Kudos
Highlighted
Newbie
Newbie
37 Views
Registered: ‎06-29-2020

Re: zcu102 revision1.1 spi dev attach error

maybe you need to rebuild  the fsbl with your hardware platform.

Tags (1)
0 Kudos