element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Achievement Levels
    • Benefits of Membership
    • Feedback and Support
    • Members Area
    • Personal Blogs
    • What's New on element14
  • Learn
    Learn
    • eBooks
    • Learning Center
    • Learning Groups
    • STEM Academy
    • Webinars, Training and Events
  • Technologies
    Technologies
    • 3D Printing
    • Experts & Guidance
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Arduino Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Project Groups
    • Raspberry Pi Projects
  • Products
    Products
    • Arduino
    • Avnet Boards Community
    • Dev Tools
    • Manufacturers
    • Product Groups
    • Raspberry Pi
    • RoadTests & Reviews
  • Store
    Store
    • Visit Your Store
    • Or 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
Freescale i.MX6 Development Platforms
  • Products
  • Dev Tools
  • Single-Board Computers
  • Freescale i.MX6 Development Platforms
  • More
  • Cancel
Freescale i.MX6 Development Platforms
Forum bus speed of /dev/i2c-2 on imx6q
  • Blog
  • Forum
  • Documents
  • Files
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Freescale i.MX6 Development Platforms requires membership for participation - click to join
Actions
  • Share
  • More
  • Cancel
Forum Thread Details
  • Replies 5 replies
  • Subscribers 4 subscribers
  • Views 1568 views
  • Users 0 members are here
  • i2c
  • bus
  • speed
  • sabre_lite
Related

bus speed of /dev/i2c-2 on imx6q

Former Member
Former Member over 10 years ago

Hello everyone,

I am unaware as to who sets clock speed on the i2c bus and specifically on the /dev/i2c-2 which is exposed on the board so as to drive external equipment.

I am looking into the linux-boundary kernel files in yocto (dylan) build dir, but I cannot figure out where that is set.

To be honest I don't even know if i'll find that info there, but it seems like the right place to start (after googling about it of course).

 

So who determined the speed (standard mode, fast mode, etc) for the external i2c? if it is a driver , which one should I be looking for?

 

The reason is I am trying to drive some TMC222 low-power stepper motor control ICs, but they do not respond.

Note I have successfully connected a number of other i2c ICs (among others the pca9505x).

 

An answer is not necessary. Any pointers as to how to go about it , so I can learn about this is more than welcome.

Thank you for your help.

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

    look for IMX_I2C_BIT_RATE in drivers/i2c/busses/i2c-imx.c

     

    how it's set depends a lot on the driver is written and on how new/old the kernel is, for example look at arch/arm/mach-davinci/board-da830-evm.c and you'll find

     

    static struct davinci_i2c_platform_data da830_evm_i2c_0_pdata = {

            .bus_freq       = 100,  /* kHz */

            .bus_delay      = 0,    /* usec */

    };

     

    so the speed is set in platform code and the driver takes it from there.

     

    on a newer kernel you may be using devicetree and the i2c speed would be set there rather than platform code. example on BeagleBone Black

    in arch/arm/boot/dts/am335x-bone.dts

     

    &i2c1 {

           status = "okay";

           clock-frequency = <400000>;

     

    other drivers may even have a module parameter you can set when you load the module.

     

    In summary, there are many different ways it can be done image

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

    hello ,

    can you describe pls, how / what is the mechanism  modify it when using module parameter when loading the module.

    thank you

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

    hello ,

    can you describe pls, how / what is the mechanism  modify it when using module parameter when loading the module.

    thank you

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • Cancel
Children
No Data
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 © 2023 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