Hello everyone
I am using ubuntu 14.04 ,vivado 2015.2 and petalinux.BSP 2015.2 version and working for Xilinx Zedboard 7z020
I want to send /receive data from Spi, I created my project and generate the .hdf and .bit file after that export it to SDK
then I create a project using defined BSP
$petalinux-create -t project -s /Downloads/Avnet-2015.2.BSP
get the hardware
$ petalinux-config --get-hw-description=~/my_program/my_program.sdk
run petalinux configuration
$petalinux-config
subsystem Auto hardware setting->Advance bootable image storage setting and select sd-card for boot image ,kernel image and dtb image setting
in the system-top.dts I add the following lines
&spi0 {
is-decoded-cs = <0>;
num-cs = <3>;
status = "okay";
spidev@0x01 {
compatible = "spidev2";
spi-max-frequency = <20000000>;
reg = <1>;
};
};
&spi1 {
is-decoded-cs = <0>;
num-cs = <3>;
status = "okay";
spidev@0x00 {
compatible = "spidev1";
spi-max-frequency = <20000000>;
reg = <1>;
};
};
build the images
$petalinux-build
generate BOOT.BIN:
$petalinux-package --boot --format BIN --fsbl ~/Avnet-Digilent-ZedBoard-2015.2/images/linux/zynq_fsbl.elf --fpga ~my_program/my_program.sdk/system_wrapper_hw_platform_0/system_wrapper.bit --u-boot
generate rootfs.cpio with the following command because I want to boot the board with sd-card
$petalinux-package --image -c rootfs --format initramfs
IN the sd card copy BOOT.BIN , image.ub and system.dtb into BOOT partition and rootfs.cpio into rootfs partition then run the following command
$sudo pax -rvf rootfs.cpio
In the last boot the board with this sd card
and the result is, I cannot find any /dev/spidev
even whatever changes I made in the sytem-top.dts after running the above commands these changes has been removed and the file name is system.dts, I also checked result is same if i am not adding the above defined lines in the system-top.dts
can anyone help me where i am doing mistake ??/
One more thing I want to check that is this kernel is working or not , I run the following commands
$ cd /sys/class/gpio
/sys/class/gpio$ echo 61>export
but no node generated for GPIO
that means it is also not working
what mistake I am doing??
thanks in advance