colibri_t20: add lcd display support
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>
Wed, 5 Aug 2015 22:47:02 +0000 (00:47 +0200)
committerTom Warren <twarren@nvidia.com>
Thu, 13 Aug 2015 20:06:02 +0000 (13:06 -0700)
Add LCD display support defaulting to VESA VGA resolution. Different
resolutions configurable via device tree.

Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Acked-by: Stephen Warren <swarren@nvidia.com>
Signed-off-by: Tom Warren <twarren@nvidia.com>
arch/arm/dts/tegra20-colibri.dts
board/toradex/colibri_t20/colibri_t20.c
include/configs/colibri_t20.h

index 257ca276f920374371b0a6f7c6aa708bb51c9798..bf14c6b960d37ba7c1d6b84e67925970c999d9a8 100644 (file)
                sdhci0 = "/sdhci@c8000600";
        };
 
+       host1x {
+               status = "okay";
+               dc@54200000 {
+                       status = "okay";
+                       rgb {
+                               status = "okay";
+                               nvidia,panel = <&lcd_panel>;
+                       };
+               };
+       };
+
        usb@c5000000 {
                dr_mode = "otg";
        };
                cd-gpios = <&gpio TEGRA_GPIO(C, 7) GPIO_ACTIVE_LOW>;
                bus-width = <4>;
        };
+
+       lcd_panel: panel {
+               clock = <25175000>;
+               xres = <640>;
+               yres = <480>;
+               left-margin = <48>;     /* horizontal back porch */
+               right-margin = <16>;    /* horizontal front porch */
+               hsync-len = <96>;
+               lower-margin = <11>;    /* vertical front porch */
+               upper-margin = <31>;    /* vertical back porch */
+               vsync-len = <2>;
+               hsync-active-high;
+               vsync-active-high;
+               nvidia,bits-per-pixel = <16>;
+               nvidia,pwm = <&pwm 0 0>;
+               nvidia,backlight-enable-gpios = <&gpio TEGRA_GPIO(T, 4) GPIO_ACTIVE_HIGH>;
+               nvidia,panel-timings = <0 0 0 0>;
+       };
 };
index 7210a8a34ecbbd50cacb5c0b69fd8f57f722acce..81d344ca0469704a77a25d22e640f3c944ef2760 100644 (file)
@@ -75,3 +75,21 @@ void pin_mux_usb(void)
        pinmux_tristate_disable(PMUX_PINGRP_SPIG);
 }
 #endif
+
+#ifdef CONFIG_VIDEO_TEGRA
+/*
+ * Routine: pin_mux_display
+ * Description: setup the pin muxes/tristate values for the LCD interface)
+ */
+void pin_mux_display(void)
+{
+       /*
+        * Manually untristate BL_ON (PT4 - SODIMM 71) as specified through
+        * device-tree
+        */
+       pinmux_tristate_disable(PMUX_PINGRP_DTA);
+
+       pinmux_set_func(PMUX_PINGRP_SDC, PMUX_FUNC_PWM);
+       pinmux_tristate_disable(PMUX_PINGRP_SDC);
+}
+#endif
index d5be60a3aeae02a17b85fa675dd3d71d9cdcc0d1..54ca8c992cb725e55025565d8e4d5629a0c75a54 100644 (file)
 /* General networking support */
 #define CONFIG_CMD_DHCP
 
+/* LCD support */
+#define CONFIG_LCD
+#define CONFIG_PWM_TEGRA
+#define CONFIG_VIDEO_TEGRA
+#define LCD_BPP                                LCD_COLOR16
+#define CONFIG_SYS_WHITE_ON_BLACK
+#define CONFIG_CONSOLE_SCROLL_LINES    10
+#define CONFIG_CMD_BMP
+#define CONFIG_LCD_LOGO
+
 /* NAND support */
 #define CONFIG_CMD_NAND
 #define CONFIG_TEGRA_NAND