• 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 » ARM® Processors » Sitara™ ARM® » AM3x Sitara ARM Processors Forum » LCD Backlight control w/ BeagleBone and SDK
Share
Sitara™ ARM®
  • Forum
  • Announcements
Options
  • Subscribe via RSS

Forums

LCD Backlight control w/ BeagleBone and SDK

This question is answered
David38506
Posted by David38506
on Feb 23 2012 11:14 AM
Intellectual260 points

We have developed an interface board and attached a 240x320 LCD panel to the header pins of the BeagleBone.

We are currently driving the Backlight with an external voltage source but would like to used the White LED functionality of the TPS65217.

Currently, there is no driver for this device in the SDK.

Is there a work around that will allow us to use I2C to directly modify the WLEDCTRL1/2 values to control the backlight?

sdk AM335x BeagleBone linux LCD interface
Report Abuse
  • Reply
You have posted to a forum that requires a moderator to approve posts before they are publicly available.
All Replies
  • David38506
    Posted by David38506
    on Apr 13 2012 11:46 AM
    Intellectual260 points

    A couple of questions regarding the TPS65217 interface in the v5.04 SDK for the AM335x (BeagleBone).

    Previously, I was able to modify the WLEDCTRL1/2 registers using i2cset.

    After booting using the latest kernel, I can no longer do i2cget/set commands from the serial terminal.

    I get Device or Resource busy error messages for /dev/i2c-1.

    I've also written test code to try to access it from user space.

    I get the same error message when trying to assign the I2C_SLAVE attribute to chip address 0x24 on the same device using ioctl.

    I am able to modify the registers using i2c_smbus... commands at the tps65217_init in the board-am335xevm.c file at teh kernel level.

    I'd like to migrate the tps65217 direct calls to user space but that requires copying a bunch of include files to the arago linux_devkit directory, to get all the type definitions.

    Is there a better way to achieve my end goal?

     

     

    AM335x BeagleBone I2C TPS65217
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Anil
    Posted by Anil
    on Apr 15 2012 03:11 AM
    Expert6655 points

    Hi David,

    Separate driver needs to be develop for WLED using TPS65217 PMIC.

    Reference drivers under "drivers/leds/"

    Previously, I was able to modify the WLEDCTRL1/2 registers using i2cset.

    Anil: Previously means when? what you had added recently?

    I'd like to migrate the tps65217 direct calls to user space but that requires copying a bunch of include files to the arago linux_devkit directory, to get all the type definitions.

    Is there a better way to achieve my end goal?

    Anil: You can not export the kernel header files to user space (available if build as kernel module).

    Regards

    AnilKumar

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

    AM335x PSP TPS65217
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • David38506
    Posted by David38506
    on Apr 16 2012 15:20 PM
    Intellectual260 points

    Hi Anil,

     

    Thanks for shepherding this linux newbie.

    By previously, I meant SDK version v5.03.02 (prior to the tps65217_init call in the new v5.04 SDK BeagleBone initialization).

    I could access the chip directly using:

    'i2cset 1 0x24 0x07 0x09' to turn on the ISINK bit

    and

    'i2cset 1 0x24 0x08 0x??' to adjust the duty cycle of the signal to change brightness of the LCD backlight.

    I did this at the prompt in the minicom terminal.

    With v5.04, I get 'Error: Could not set address to 0x24: Device or resource busy'.

    I also get a similar error when trying to access the device in user space using:

    const char* device = "/dev/i2c-1";

    fd = open(device, O_RDWR);

    ioctl(fd, I2C_SLAVE, 0x24);

    'Error: Device or resource busy'

    Since the tps65217 is registered to i2c-1, I'm confused why I can't talk to it.

     

    Perhaps I'm approaching it wrong. What is the proper method for accessing the regulator portion of the PMIC from user space now that the driver is available?

     

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Anil
    Posted by Anil
    on Apr 17 2012 15:04 PM
    Verified Answer
    Verified by David38506
    Expert6655 points

    Hi David,

    I think v5.03.02 release don't have tps65217 regulator driver, means tps65217_init() API not included and 0x24 slave address is not used at that time. So you haven't seen any issues. In the recent updates regulator driver is added so 0x24 is used, that is the reason why you are seeing issues.

    Try disabling the cpufreq and tps65217 regulator drivers and see if you are able resolve this issue? If not, then you have to develop the wled driver to make use of PMIC calls. (refer these files include/linux/mfd/wm8350/pmic.h, drivers/leds/leds-wm8350.c)

    Regards

    AnilKumar

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

    AM335x BeagleBone PSP WLED
    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • David38506
    Posted by David38506
    on Apr 17 2012 15:10 PM
    Intellectual260 points

    Thanks Anil,

    I was going to ask for a suggestion about which LED files to mimic but stumbled on those same files that you mentioned this morning.

    I'll reply when I have it working.

    Dave

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Graham Newton
    Posted by Graham Newton
    on Jun 28 2012 09:46 AM
    Intellectual420 points

    You can override the current "owner" by using I2C_SLAVE_FORCE instead of I2C_SLAVE.  Depending on the implementation the previous owner may still try to control the I2C device but you will be at least able to read values back.

    Report Abuse
    • Reply
    You have posted to a forum that requires a moderator to approve posts before they are publicly available.
  • Konstantinos Tsimpoukas
    Posted by Konstantinos Tsimpoukas
    on Jul 06 2012 12:51 PM
    Prodigy30 points

    is there finally an answer on how we can control the wled pin of the power management for controlling the back light of an LCD?

    I am working with beaglebone,

    Thanks

    BeagleBone WLED LCD
    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