element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • 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
MicroZed Hardware Design MicroZed PMOD Zynq PS MIO I2C controller registers unmapped
  • Forum
  • Documents
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Avnet Boards Forums requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • State Not Answered
  • Replies 7 replies
  • Subscribers 303 subscribers
  • Views 1463 views
  • Users 0 members are here
Related

MicroZed PMOD Zynq PS MIO I2C controller registers unmapped

jamestkennedy
jamestkennedy over 8 years ago

The design uses Petalinux OpenAMP primarily as a data engine using the Ethernet port to process data and deliver to the microheader. So the MicroZed is a daughter card on a custom PCB that receives the processed data.

However we are also attempting to use the PMOD to connect to an I2C and a GPIO device.

The standard driver for the Zynq PS I2C controller under PetaLinux is Cadence I2C_cadence which operates the PS I2C controller through its registers.

Well the user level /dev/i2c0 writes were not working, so I added a custom module with the i2c_cadence as the basis and connected it to the I2C0 controller in the device tree to see how the driver was failing.

What I found using debug trace is that the I2C controller registers are not connected to their specified address 0xE0004000. Somehow its addresses on the IOP are not mapped. Regardless of what is written all the R/W registers read 0, and obviously the I2C controller function was not being executed.

Other peripherals on the IOP range of addesses UART, ENET work fine.

I am using Vivado 2016.2 and Petalinux 2016.2. The I2C0 is selected on MIO 14, 15 for SCL and SDA respectively, and the device tree specifies the normal 0xE0004000 as the register address for the controller.

Has anyone encountered this and found their mistake? Or any other suggestions?

  • Sign in to reply
  • Cancel
Parents
  • zedhed
    0 zedhed over 8 years ago

    Hi James,

    If you have the option of using the PL I2C controller instead, I would recommend doing so.

    Xilinx AR61861 provides some information on why the uses the PS I2C controller is recommended to be implemented from the PL I/Os unless you have some sort of external circuitry implemented as suggested in the Xilinx Answer Record:

    https://www.xilinx.com/support/answers/61861.html

    When you implement I2C in the Zynq fabric, you can add glitch filtering there and those are a standard options for the AXI I2C IP core customization.

    If those are not options for you, it should still be possible to get PS I2C working under Linux.  What do your devicetree entries for I2C look like?

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Reply
  • zedhed
    0 zedhed over 8 years ago

    Hi James,

    If you have the option of using the PL I2C controller instead, I would recommend doing so.

    Xilinx AR61861 provides some information on why the uses the PS I2C controller is recommended to be implemented from the PL I/Os unless you have some sort of external circuitry implemented as suggested in the Xilinx Answer Record:

    https://www.xilinx.com/support/answers/61861.html

    When you implement I2C in the Zynq fabric, you can add glitch filtering there and those are a standard options for the AXI I2C IP core customization.

    If those are not options for you, it should still be possible to get PS I2C working under Linux.  What do your devicetree entries for I2C look like?

    Regards,

    -Kevin

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
Children
  • jamestkennedy
    0 jamestkennedy over 8 years ago in reply to zedhed

    Hi Kevin,


    Thanks for replying.

    Unfortunately my  work is confined to the MicroZed SOM,

    And the only PMOD as you know does not allow access wia the PL, only the PS.

    I will apprise my client that the PL using perhaps part of the microheader to a connection on the

    main custom board may be their best option. This board is still under development.

    The DTS entries were generated by petalinunx given the HDF.
     

            i2c0: i2c@e0004000 {
                compatible = "cdns,i2c-r1p10";
                status = "disabled";
                clocks = <&clkc 38>;
                interrupt-parent = <&intc>;
                interrupts = <0 25 4>;
                reg = <0xe0004000 0x1000>;
                #address-cells = <1>;
                #size-cells = <0>;
            };
     

    The driver "cdns,i2c-r1p10" times out on send.

    When I replace it with my custom module. I am able to see that the registers don't work by inserting trace.

    Thanks for you help.

     

    James

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Verify Answer
    • Cancel
  • jamestkennedy
    0 jamestkennedy over 8 years ago in reply to jamestkennedy

    &i2c0 {
        clock-frequency = <400000>;
        status = "okay";
    };

     

    in another dtsi file also generated by petalinux

    • 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