diff options
author | Eric Nelson <eric.nelson@boundarydevices.com> | 2013-07-12 15:35:43 -0700 |
---|---|---|
committer | Eric Nelson <eric.nelson@boundarydevices.com> | 2013-07-12 15:35:43 -0700 |
commit | 10117a5d96da43549e5c39c0d06b38febdca3805 (patch) | |
tree | a12ff3d954783d6c0d8fae3b512ac8df86326a02 | |
parent | 70add620efdbbc084a2f472211c29ec4ceb66371 (diff) |
nit6xlite: Add PWM3 backlight (pwm.backlight.2)
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
-rw-r--r-- | arch/arm/mach-mx6/board-mx6_nit6xlite.c | 14 | ||||
-rw-r--r-- | arch/arm/mach-mx6/pads-mx6_nit6xlite.h | 7 |
2 files changed, 17 insertions, 4 deletions
diff --git a/arch/arm/mach-mx6/board-mx6_nit6xlite.c b/arch/arm/mach-mx6/board-mx6_nit6xlite.c index 25e78ebcd7e3..ed0889e8accc 100644 --- a/arch/arm/mach-mx6/board-mx6_nit6xlite.c +++ b/arch/arm/mach-mx6/board-mx6_nit6xlite.c @@ -81,7 +81,6 @@ #define AUDIO_MUTE IMX_GPIO_NR(5, 2) /* EIM_A25 - active low */ #define DISP_I2C_EN IMX_GPIO_NR(2, 17) /* EIM_A21 - active high */ -#define DISP_BACKLIGHT_EN IMX_GPIO_NR(1, 17) /* SD1_DAT1 - active high */ #define DISP_BACKLIGHT_12V_EN IMX_GPIO_NR(4, 5) /* GPIO_19 - active high */ #define ENET_PHY_RESET IMX_GPIO_NR(1, 27) /* ENET_RXD0 - active low */ @@ -151,7 +150,6 @@ struct gpio mx6_init_gpios[] __initdata = { {.label = "audio_mute", .gpio = AUDIO_MUTE, .flags = 0}, /* GPIO5[2]: EIM_A25 - active low */ // {.label = "edid_i2c_en", .gpio = DISP_I2C_EN, .flags = 0}, /* GPIO2[17]: EIM_A21 - active high */ - {.label = "backlight_en", .gpio = DISP_BACKLIGHT_EN, .flags = 0}, /* GPIO1[17]: SD1_DAT1 - active high */ {.label = "backlight_12V_en", .gpio = DISP_BACKLIGHT_12V_EN, .flags = 0}, /* GPIO4[5]: GPIO_19 - active high */ {.label = "phy_reset", .gpio = ENET_PHY_RESET, .flags = GPIOF_HIGH}, /* GPIO1[27]: ENET_RXD0 - active low */ @@ -729,10 +727,18 @@ int mx6_bl_notify(struct device *dev, int brightness) { pr_info("%s: brightness=%d\n", __func__, brightness); gpio_set_value(DISP_BACKLIGHT_12V_EN, brightness ? 1 : 0); - gpio_set_value(DISP_BACKLIGHT_EN, brightness ? 1 : 0); return brightness; } +/* PWM3_PWMO: backlight control on RGB connector */ +static struct platform_pwm_backlight_data mx6_pwm3_backlight_data = { + .pwm_id = 2, /* pin SD1_DAT1 - PWM3 */ + .max_brightness = 256, + .dft_brightness = 256, + .pwm_period_ns = 50000, + .notify = mx6_bl_notify, +}; + /* PWM4_PWMO: backlight control on LDB connector */ static struct platform_pwm_backlight_data mx6_pwm4_backlight_data = { .pwm_id = 3, /* pin SD1_CMD - PWM4 */ @@ -890,8 +896,10 @@ static void __init mx6_board_init(void) /* release USB Hub reset */ gpio_set_value(USB_HUB_RESET, 1); + imx6q_add_mxc_pwm(2); imx6q_add_mxc_pwm(3); + imx6q_add_mxc_pwm_backlight(2, &mx6_pwm3_backlight_data); imx6q_add_mxc_pwm_backlight(3, &mx6_pwm4_backlight_data); imx6q_add_otp(); diff --git a/arch/arm/mach-mx6/pads-mx6_nit6xlite.h b/arch/arm/mach-mx6/pads-mx6_nit6xlite.h index 1eae09d538cc..0dfdeb172f02 100644 --- a/arch/arm/mach-mx6/pads-mx6_nit6xlite.h +++ b/arch/arm/mach-mx6/pads-mx6_nit6xlite.h @@ -65,7 +65,12 @@ static iomux_v3_cfg_t MX6NAME(common_pads)[] = { * 10.4 is 1024x768 */ NEW_PAD_CTRL(MX6PAD(SD1_CMD__PWM4_PWMO), WEAK), /* GPIO1[18], J9 pin 10 */ - NEW_PAD_CTRL(MX6PAD(SD1_DAT1__GPIO_1_17), WEAK), /* J9 pin 9, also pwm3 */ + + /* + * Display - RGB Backlight + * 4.3 inch is WQVGA 480x272 + */ + MX6PAD(SD1_DAT1__PWM3_PWMO), /* GPIO1[17], J9 pin 9, also pwm3 */ /* Ethernet - ENET */ MX6PAD(ENET_MDIO__ENET_MDIO), |