Hello
I am working on 7z020 board. I want to use spi device.I am telling the whole detail what i did and where I am stuck.
To activate spidev I recompile the uImage
So I did the following steps and made my u-boot and then uImage
U-boot:
$git clone -b xlnx_v2015.3 git://github.com/Xilinx/u-boot-xlnx.git
$export CROSS_COMPILE=arm-xilinx-linux-gnueabi-
$make zynq_zed_config
$make
I got u-boot
For uImage:
$git clone -b xlnx_v2015.3 git://github.com/Xilinx/linux-xlnx.git
after that to make relation between this u-boot and uImage
$ $export PATH=$PATH:$PWD (pwd=U-boot-xlnx/tools)
$make xilinx_zynq_defconfig
In the xilinx_zynq_defconfig all the spi are active bydefault
"CONFIG_SPI=y
CONFIG_SPI_CADENCE=y
CONFIG_SPI_XILINX=y
CONFIG_SPI_ZYNQ_QSPI=y"
$ make menuconfig
make menuconfig ->device driver ->SPI support -> then enabled xilinx SPI controller common module.
and also add the following lines in zynq_7000.dtsi
spi0: spi@e0006000 {
tttcompatible = "xlnx,zynq-spi-r1p6";
tttreg = <0xe0006000 0x1000>;
tttstatus = "disabled";
tttinterrupt-parent = <&intc>;
tttinterrupts = <0 49 4>;
tttclocks = <&clkc 26>, <&clkc 35>;
tttclock-names = "ref_clk", "pclk";
ttt#address-cells = <1>;
ttt#size-cells = <0>;
ttttspidev@0{
ttttcompatible="spidev";
ttttreg =<0>; //chipselect 0
ttttspi-max-frequency= <50000000>;
ttt};
tttspidev@1{
ttttcompatible="spidev";
ttttreg =<1>; //chipselect 1
ttttspi-max-frequency= <50000000>;
ttt};
tt};
In last run the following command
$make ARCH=arm UIMAGE_LOADADDR=0x8000 uImage
devicetree:
I add following in the zynq_zed.dts (because I read in tutorial/forum "There is no device tree generator yet for Zynq. yet such that hand editing the device tree is the current method."
&spi0 {
tstatus = "okay";
reg = <0xe0006000 0x1000>;
tt} ;
then $make ARCH=arm zynq_zed.dtb
I am using 14.7-release so I only changed uImage ,u-boot and devicetree.dtb the system runs reached the terminal root#
but no /dev/spidev is visible.
Itried to make my own boot.bin for that i made my design in XpS genrate bit stream
after that I export the hardware to sdk and make fsbl
SDK->New->application project ->
project name->fsbl
hardware platform ->system_hw_platform
processor ->ps7_cortex9_0
OS platform ->standalone
Board support package ->create new
and then selct zynq_fsbl ->result fsbl.elf
I use this fsbl+system.bit+u-boot.elf(recompile by myself)->boot.bin the result is
"reading zImage
** Unable to read "zImage" from mmc 0:1 **
reading devicetree.dtb
9693 bytes read
reading ramdisk32M.image.gz
** Unable to read "ramdisk32M.image.gz" from mmc 0:1 **
## Starting application at 0x00008000 ..."
then I copied zImage and ramdisk32M.image.gz then it stops at the following line
"3871273 bytes read
## Starting application at 0x00008000 ..." (I read from the forum that it could be the devicetree means some problem. I changed my devicetree to the 2015.2-release but the result is same)
I hope you understand my problem and any suggestion are most welcome
Thanks
Sana