Forum Discussion

Altera_Forum's avatar
Altera_Forum
Icon for Honored Contributor rankHonored Contributor
8 years ago

HPS SPI slave

In my HPS system I have enabled the SPI Slave 0 (SPIS0 is set to FPGA, and Mode is set to Full).

In my device tree source (in the XML file) I have:


<DTAppend name="spi@0xffe02000" type="node" parentlabel="sopc0" newlabel="hps_0_spis0"/>
<DTAppend name="compatible" type="string" parentlabel="hps_0_spis0" val="snps,dw-spi-mmio-15.1" />
<DTAppend name="compatible" type="string" parentlabel="hps_0_spis0" val="snps,dw-spi-mmio" action="add" />
<DTAppend name="compatible" type="string" parentlabel="hps_0_spis0" val="snps,dw-apb-ssi" action="add" />
<DTAppend name="interrupt-parent" type="phandle" parentlabel="hps_0_spis0" val="hps_0_arm_gic_0" />
<DTAppend name="interrupts" parentlabel="hps_0_spis0">
	<val type="number">0</val>
	<val type="number">156</val>
	<val type="number">4</val>
</DTAppend>
<DTAppend name="#address-cells" type="number" parentlabel="hps_0_spis0" val="1"/>
<DTAppend name="#size-cells" type="number" parentlabel="hps_0_spis0" val="0"/>
<DTAppend name="reg" parentlabel="hps_0_spis0" >
    <val type="hex">0xffe02000</val>
	<val type="hex">0x1000</val>
</DTAppend>
<DTAppend name="spi-max-frequency" parentlabel="hps_0_spis0" >
    <val type="number">100000000</val>
</DTAppend>
<DTAppend name="enable-dma" parentlabel="hps_0_spis0" >
    <val type="number">1</val>
</DTAppend>

This gets compiled into a device tree blob and loaded onto the system. When it boots, I get the error:

"Trying to free already-free IRQ 188" (this is 156+32 so is the SPI IRQ number).

And loading the driver then bombs out.

If I comment out the interrupt lines then it instead complains about lack of interrupt resource.

What am I doing wrong? Why can't I get the SPI driver to load?

Cheers,

Simon
No RepliesBe the first to reply