summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Ziswiler <marcel.ziswiler@toradex.com>2015-04-27 16:11:32 +0200
committerMarcel Ziswiler <marcel.ziswiler@toradex.com>2015-04-27 16:11:32 +0200
commitb8fd3a6dc54188208249b4e5c7d6c05fcafd5900 (patch)
treee09d0338c5817c374cc422628e20a748ed8cff36
parent7dcf1584f72dc1533db33f233ee9548735eb69e6 (diff)
colibri_t20: add LCD display support
Add LCD display support defaulting to VESA VGA resolution. Different resolutions configurable via device-tree.
-rw-r--r--arch/arm/dts/tegra20-colibri.dts29
-rw-r--r--board/toradex/colibri_t20/colibri_t20.c18
-rw-r--r--include/configs/colibri_t20.h10
3 files changed, 57 insertions, 0 deletions
diff --git a/arch/arm/dts/tegra20-colibri.dts b/arch/arm/dts/tegra20-colibri.dts
index 257ca276f9..ae40bad9ff 100644
--- a/arch/arm/dts/tegra20-colibri.dts
+++ b/arch/arm/dts/tegra20-colibri.dts
@@ -17,6 +17,17 @@
sdhci0 = "/sdhci@c8000600";
};
+ host1x {
+ status = "okay";
+ dc@54200000 {
+ status = "okay";
+ rgb {
+ status = "okay";
+ nvidia,panel = <&lcd_panel>;
+ };
+ };
+ };
+
usb@c5000000 {
dr_mode = "otg";
};
@@ -46,4 +57,22 @@
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 2 0>;
+ nvidia,backlight-enable-gpios = <&gpio TEGRA_GPIO(T, 4) GPIO_ACTIVE_HIGH>;
+ nvidia,panel-timings = <0 0 0 0>;
+ };
};
diff --git a/board/toradex/colibri_t20/colibri_t20.c b/board/toradex/colibri_t20/colibri_t20.c
index 8ae9ccf538..cf57650cbd 100644
--- a/board/toradex/colibri_t20/colibri_t20.c
+++ b/board/toradex/colibri_t20/colibri_t20.c
@@ -63,3 +63,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
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index c17f245a17..eac403e0dd 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -44,6 +44,16 @@
#define CONFIG_CMD_NET
#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