diff options
author | Akshay Bhat <akshay.bhat@timesys.com> | 2016-04-12 18:13:59 -0400 |
---|---|---|
committer | Stefano Babic <sbabic@denx.de> | 2016-04-19 16:05:51 +0200 |
commit | 54971ac6de20b8834882efb69dc6ad5c1d4a9915 (patch) | |
tree | dfdc80dee546d27e632cb120d7352ee1945700da /board | |
parent | 494d43ec35ff3d27926ed9d668e0df4b7e6ae6d3 (diff) |
board: ge: bx50v3: Use pwm for display backlight
Setup the LCD backlight brightness control pin to use PWM
Signed-off-by: Akshay Bhat <akshay.bhat@timesys.com>
Cc: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'board')
-rw-r--r-- | board/ge/bx50v3/bx50v3.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/board/ge/bx50v3/bx50v3.c b/board/ge/bx50v3/bx50v3.c index 3acd4fa2d8..dcf51dd7d0 100644 --- a/board/ge/bx50v3/bx50v3.c +++ b/board/ge/bx50v3/bx50v3.c @@ -25,6 +25,7 @@ #include <asm/io.h> #include <asm/arch/sys_proto.h> #include <i2c.h> +#include <pwm.h> DECLARE_GLOBAL_DATA_PTR; #define NC_PAD_CTRL (PAD_CTL_PUS_100K_UP | \ @@ -328,6 +329,8 @@ static iomux_v3_cfg_t const backlight_pads[] = { /* Backlight enable for LVDS display */ MX6_PAD_GPIO_0__GPIO1_IO00 | MUX_PAD_CTRL(NO_PAD_CTRL), #define LVDS_BACKLIGHT_GP IMX_GPIO_NR(1, 0) + /* backlight PWM brightness control */ + MX6_PAD_SD1_DAT3__PWM1_OUT | MUX_PAD_CTRL(NO_PAD_CTRL), }; static void do_enable_hdmi(struct display_info_t const *dev) @@ -595,9 +598,17 @@ int board_late_init(void) * as per specifications from CHI MEI */ mdelay(250); + /* enable backlight PWM 1 */ + pwm_init(0, 0, 0); + + /* duty cycle 5000000ns, period: 5000000ns */ + pwm_config(0, 5000000, 5000000); + /* Backlight Power */ gpio_direction_output(LVDS_BACKLIGHT_GP, 1); + pwm_enable(0); + return 0; } |