04-20-2019 02:15 AM
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:
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.
04-21-2019 06:25 PM
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?
04-21-2019 06:37 PM
04-21-2019 06:38 PM
I think whether a spi device connect or not , the spi device driver can setup success and find a /dev/spixx node .
04-22-2019 12:34 AM
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.
04-23-2019 03:36 AM
Hi @wangdengwen ,
Could you please try using below mentioned compatible name.
compatible = "zynqmp,ps_spi", "rohm,dh2228fv" ;
spi-max-frequency = <100000>;
reg = <0>;
10-31-2019 07:45 AM
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