element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • About Us
  • Community Hub
    Community Hub
    • What's New on element14
    • Feedback and Support
    • Benefits of Membership
    • Personal Blogs
    • Members Area
    • Achievement Levels
  • Learn
    Learn
    • Ask an Expert
    • eBooks
    • element14 presents
    • Learning Center
    • Tech Spotlight
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents Projects
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Multicomp Pro
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Choose another store...
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
  • Settings
Avnet Boards Forums
  • Products
  • Dev Tools
  • Avnet Boards Community
  • Avnet Boards Forums
  • More
  • Cancel
Avnet Boards Forums
Software Application Development spidev not active in 7z020
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Join Avnet Boards Forums to participate - click to join for free!
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 3 replies
  • Subscribers 329 subscribers
  • Views 380 views
  • Users 0 members are here
Related

spidev not active in 7z020

ashahsana
ashahsana over 9 years ago

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



  • Sign in to reply
  • Cancel
Parents
  • Former Member
    0 Former Member over 9 years ago

    Sana,

      You have multiple problems here, which must be solved one at a time.   If you haven't done this already, start with a working, known good design.   Using an old tool flow and trying to piece together different versions of u-boot and kernel, while simultaneously trying to change the device tree is a difficult way to build a working solution.

    The first problem to address is why uboot is unable to load the files you have created on sd.  This indicates that you are using mismatched versions of u-boot and kernel, and u-boot is probably expecting a uImage rather than a zImage.

    I would recommend using a PetaLinux BSP for your board, which already has everything packaged correctly in one place in the build environment.  Once you get some experience with this, you can move on to the traditional open source build environment if you need to.

    Ron

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • Former Member
    0 Former Member over 9 years ago

    Sana,

      You have multiple problems here, which must be solved one at a time.   If you haven't done this already, start with a working, known good design.   Using an old tool flow and trying to piece together different versions of u-boot and kernel, while simultaneously trying to change the device tree is a difficult way to build a working solution.

    The first problem to address is why uboot is unable to load the files you have created on sd.  This indicates that you are using mismatched versions of u-boot and kernel, and u-boot is probably expecting a uImage rather than a zImage.

    I would recommend using a PetaLinux BSP for your board, which already has everything packaged correctly in one place in the build environment.  Once you get some experience with this, you can move on to the traditional open source build environment if you need to.

    Ron

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • ashahsana
    0 ashahsana over 9 years ago in reply to Former Member

    thanks RON
    I am using 2015.3 version for both u-boot and uImage.
    so that means i have to make u-boot and u-Image and no change in devicetree and try??
    and the last thing in the SDK when I am making BSP i cannot find any petalinux option. I am using ISE 14.7 version.
    thanks

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • ashahsana
    0 ashahsana over 9 years ago in reply to ashahsana

    Hello again
    There was some mistake in devicetree.dtb . Now it works perfect and i can see spidev in /dev directory.
    thanks for your reply

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2025 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • X
  • Facebook
  • linkedin
  • YouTube