diff mbox

[U-Boot,10/32] nitrogen6x: display: add support lvds jeida screen

Message ID 1412277413-30271-11-git-send-email-eric.nelson@boundarydevices.com
State Awaiting Upstream
Delegated to: Stefano Babic
Headers show

Commit Message

Eric Nelson Oct. 2, 2014, 7:16 p.m. UTC
From: Robert Winkler <robert.winkler@boundarydevices.com>

Add support for Boundary Devices 7" and 10.1" 1280x800 displays with
integrated FocalTech ft5x06 10-point touch controller.

Because they share the touch controller with the 1024x600 displays,
auto-detection is disabled and you must explicitly set the 'panel'
environment variable:

        U-Boot > setenv panel LDB-WXGA
        U-Boot > saveenv && reset

Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
---
 board/boundary/nitrogen6x/nitrogen6x.c | 31 +++++++++++++++++++++++++++++++
 1 file changed, 31 insertions(+)

Comments

Stefano Babic Oct. 6, 2014, 4:04 p.m. UTC | #1
On 02/10/2014 21:16, Eric Nelson wrote:
> From: Robert Winkler <robert.winkler@boundarydevices.com>
> 
> Add support for Boundary Devices 7" and 10.1" 1280x800 displays with
> integrated FocalTech ft5x06 10-point touch controller.
> 
> Because they share the touch controller with the 1024x600 displays,
> auto-detection is disabled and you must explicitly set the 'panel'
> environment variable:
> 
>         U-Boot > setenv panel LDB-WXGA
>         U-Boot > saveenv && reset
> 
> Signed-off-by: Robert Winkler <robert.winkler@boundarydevices.com>
> Signed-off-by: Eric Nelson <eric.nelson@boundarydevices.com>
> ---

As the rest of the display's series:

Applied to u-boot-imx, thanks !

Best regards,
Stefano Babic
diff mbox

Patch

diff --git a/board/boundary/nitrogen6x/nitrogen6x.c b/board/boundary/nitrogen6x/nitrogen6x.c
index 2e945a4..336a6f9 100644
--- a/board/boundary/nitrogen6x/nitrogen6x.c
+++ b/board/boundary/nitrogen6x/nitrogen6x.c
@@ -480,6 +480,17 @@  static void enable_lvds(struct display_info_t const *dev)
 	gpio_direction_output(LVDS_BACKLIGHT_GP, 1);
 }
 
+static void enable_lvds_jeida(struct display_info_t const *dev)
+{
+	struct iomuxc *iomux = (struct iomuxc *)
+				IOMUXC_BASE_ADDR;
+	u32 reg = readl(&iomux->gpr[2]);
+	reg |= IOMUXC_GPR2_DATA_WIDTH_CH0_24BIT
+	     |IOMUXC_GPR2_BIT_MAPPING_CH0_JEIDA;
+	writel(reg, &iomux->gpr[2]);
+	gpio_direction_output(LVDS_BACKLIGHT_GP, 1);
+}
+
 static void enable_rgb(struct display_info_t const *dev)
 {
 	imx_iomux_v3_setup_multiple_pads(
@@ -509,6 +520,26 @@  struct display_info_t const displays[] = {{
 		.sync           = FB_SYNC_EXT,
 		.vmode          = FB_VMODE_NONINTERLACED
 } }, {
+	.bus	= 0,
+	.addr	= 0,
+	.pixfmt	= IPU_PIX_FMT_RGB24,
+	.detect	= NULL,
+	.enable	= enable_lvds_jeida,
+	.mode	= {
+		.name           = "LDB-WXGA",
+		.refresh        = 60,
+		.xres           = 1280,
+		.yres           = 800,
+		.pixclock       = 14065,
+		.left_margin    = 40,
+		.right_margin   = 40,
+		.upper_margin   = 3,
+		.lower_margin   = 80,
+		.hsync_len      = 10,
+		.vsync_len      = 10,
+		.sync           = FB_SYNC_EXT,
+		.vmode          = FB_VMODE_NONINTERLACED
+} }, {
 	.bus	= 2,
 	.addr	= 0x4,
 	.pixfmt	= IPU_PIX_FMT_LVDS666,