• Join
  • Sign In with my.TI Login
Texas Instruments
  • Products
  • Applications
  • Tools & Software
  • Support & Community
  • Sample & Buy
  • About TI
Sample & Purchase Cart Sample & Purchase Cart
  • Search
  • Advanced
TI E2E™ Community
  • Support Forums
  • Blogs
  • Groups
  • Videos
  • 简体中文
  • More ...
TI Home » TI E2E Community » Support Forums » Embedded Software » Linux » Linux forum » pinmux configuration
Share
Linux
  • Forum
Options
  • Subscribe via RSS

pinmux configuration

pinmux configuration

This question is answered
vasu vallabhaneni
Posted by vasu vallabhaneni
on Feb 23 2012 05:00 AM
Prodigy250 points

 

Hi

         I am using pinmux in am1808 expereminters kit.in da850.c we have  MUX_CFG(   ).i was trying to add one more column in that for enabling GP4[14], GP0[9],GP5[11].

        MUX_CFG(DA850, GPIO5_11,       11,     16,      15,     8,      false)                 
        MUX_CFG(DA850, GPIO4_14,       11,     16,      15,     8,      false)                 
        MUX_CFG(DA850, GPIO0_9,        11,     16,      15,     8,      false)          

  In the above configurations GP5[11] is working fine. how can we get the perameters in this call. can any one give small description about the perameters.

 

Thanks

Vasu Vallabhaneni

Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • Anil
    Posted by Anil
    on Feb 23 2012 06:06 AM
    Verified Answer
    Verified by MarcPyne
    Expert6655 points

    Hi Vasu,

    Look at the macro on "arch/arm/mach-davinci/mux.h" file then you can understand how those fields used.

    And ultimately all the definitions are mapping to structure number defined in davinci_da850_index enum. Then to mux_config structure fields, defined in "arch/arm/mach-davinci/include/mach/mux.h"

    Ex:  MUX_CFG(DA850, GPIO5_11,       11,     16,      15,     8,      false)  will result to

    [DA850_GPIO5_11] = { .name = "GPIO5_11", .debug = false, .mux_reg_name = "PINMUX11", .mux_reg = PINMUX(11), .mask_offset = 16, .mask = 15, .mode = 8} 

    PS: Please close earlier threads, if it answer to your questions

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

     

    GPIO PSP am1808 PINMUX
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • he he1
    Posted by he he1
    on May 09 2012 06:42 AM
    Verified Answer
    Verified by vasu vallabhaneni
    Prodigy200 points

    Hi Vasu

    I have the same problem with you. Can you get me some help or get me a piece of source code ?

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • vasu vallabhaneni
    Posted by vasu vallabhaneni
    on May 09 2012 08:36 AM
    Verified Answer
    Verified by vasu vallabhaneni
    Prodigy250 points

    Hi

    This info is already available in ti community.....the following procedure will give you exat results.

    Usually you must change the kernel to change the pinmux. Configuring the pinmux from userspace is not possible due to privilege problems. You might be able to do this from within a loadable module. Probably not as the pinmux functions and structures are not exported from the kernel. Note that some GPIOS might be used by other modules. GPIO5_11 is the same pin as EMA_A_11.

    You might be able to modify the pinmux registers directly. Tricky stuff with virtual address, privilege, lock registers and such.

    ----------------------------
    File: arch/arm/mach-davinci/da850.c
    ...
    static const struct mux_config da850_pins[] = {
    ...
        MUX_CFG(DA850, GPIO5_11,    11,    16,    15,    8,    false) //<--Add--
    #endif
    };
    ...

    ----------------------------
    File: arch/arm/mach-davinci/include/mach/mux.h
    ...
    enum davinci_da850_index {
    ...
        DA850_ECAP2_APWM2,

        DA850_GPIO5_11, //<--Add--
    };
    ...

    ----------------------------
    File: arch/arm/mach-davinci/board-da850-evm.c
    ...
    // Add these if you intend on using gpio_request(), etc. in
    // this file. Not required if you are using GPIO sysfs.
    // These are use 0 based numbering. Do no confuse with
    // the 1 based numbering in the TRM
    #define GPIO91_PIN        GPIO_TO_PIN(5, 11) //<--Add--
    ...
    static const short da850_my_gpio_pins[] = { //<--Add--
        DA850_GPIO5_11, //<--Add--
        -1 //<--Add--
    }; //<--Add--
    ...
    static __init void da850_evm_init(void)
    {
    ...
        ret = davinci_cfg_reg_list(da850_my_gpio_pins); //<--Add--
        if (ret) //<--Add--
            pr_warning("da850_evm_init: my gpio mux setup failed: %d\n", ret); //<--Add--

        /* initilaize usb module */
        da850_evm_usb_init();
    }

    Thanks

    Vasu Vallabhaneni

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • he he1
    Posted by he he1
    on May 10 2012 02:34 AM
    Prodigy200 points

    Hi Vasu

    I have solved my problem.

    Thank you very much!

    Regards

    He

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
TI E2E™ Community
  • Support Forums
  • Blogs
  • Videos
  • Groups
  • Site Support & Feedback
  • Settings
TI E2E™ Community Groups
  • TI University Program
  • Make the Switch
  • Microcontroller Projects
  • Motor Drive & Control
Other Communities
  • Deyisupport
  • Designsomething.org
  • beagleboard.org
  • TI on Element 14
  • TI on TechXchangeSM
Other Technical & Support Resources
  • WEBENCH® Design Center
  • Product Information Centers
  • Technical Documents
  • TI Design Network
  • TI Technical Articles
  • TI Training

All content and materials on this site are provided "as is". TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with regard to these materials, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property right. TI and its respective suppliers and providers of content make no representations about the suitability of these materials for any purpose and disclaim all warranties and conditions with respect to these materials. No license, either express or implied, by estoppel or otherwise, is granted by TI. Use of the information on this site may require a license from a third party, or a license from TI.

Content on this site may contain or be subject to specific guidelines or limitations on use. All postings and use of the content on this site are subject to the Terms of Use of the site; third parties using this content agree to abide by any limitations or guidelines and to comply with the Terms of Use of this site. TI, its suppliers and providers of content reserve the right to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and materials, its products, programs and services at any time or to move or discontinue any content, products, programs, or services without notice.

Follow Us Texas Instruments on Facebook Texas Instruments on Twitter Texas Instruments on LinkedIn Texas Instruments on Google+
TI Worldwide | Contact Us | my.TI Login | Site Map | Corporate Citizenship | mobile m.ti.com (Mobile Version)

TI is a global semiconductor design and manufacturing company. Innovate with 100,000+ analog ICs and
embedded processors, along with software, tools and the industry’s largest sales/support staff.

© Copyright 1995-2013 Texas Instruments Incorporated. All rights reserved.
Trademarks | Privacy Policy | Terms of Use