From 79a4f8aa49492807341adc1e91a82887ec37952a Mon Sep 17 00:00:00 2001 From: Marcel Ziswiler Date: Sun, 12 Jul 2015 02:31:18 +0200 Subject: colibri_t30: enable display driver On popular request enable the display driver on Colibri T30. A few notes about some things encountered during porting: While analogue VGA (e.g. via the on-carrier RAMDAC) worked just fine from the beginning the EDT display flickered like crazy which turned out to be a pin muxing issue. Unfortunately the PWM pin muxing wasn't any good neither which made that display stay dark. Enjoy. (cherry picked from commit 201cc6d4e4c8213fbd103e74b0f2f2ca591edf54) --- arch/arm/dts/tegra30-colibri.dts | 64 ++++++++++++++++++++++++++++++++++++++++ configs/colibri_t30_defconfig | 6 ++++ include/configs/colibri_t30.h | 5 ++++ 3 files changed, 75 insertions(+) diff --git a/arch/arm/dts/tegra30-colibri.dts b/arch/arm/dts/tegra30-colibri.dts index 3cff2f62e6..35ce865dca 100644 --- a/arch/arm/dts/tegra30-colibri.dts +++ b/arch/arm/dts/tegra30-colibri.dts @@ -27,6 +27,33 @@ reg = <0x80000000 0x40000000>; }; + host1x@50000000 { + dc@54200000 { + rgb { + status = "okay"; + nvidia,panel = <&lcd_panel>; + display-timings { + timing@0 { + /* VESA VGA */ + clock-frequency = <25175000>; + hactive = <640>; + vactive = <480>; + hback-porch = <48>; + hfront-porch = <16>; + hsync-len = <96>; + vback-porch = <31>; + vfront-porch = <11>; + vsync-len = <2>; + }; + }; + }; + }; + }; + + pwm@7000a000 { + status = "okay"; + }; + /* * GEN1_I2C: I2C_SDA/SCL on SODIMM pin 194/196 (e.g. RTC on carrier * board) @@ -93,6 +120,18 @@ nvidia,vbus-gpio = <&gpio TEGRA_GPIO(W, 2) GPIO_ACTIVE_LOW>; }; + backlight: backlight { + compatible = "pwm-backlight"; + + brightness-levels = <255 128 64 32 16 8 4 0>; + default-brightness-level = <6>; + /* BL_ON */ + enable-gpios = <&gpio TEGRA_GPIO(V, 2) GPIO_ACTIVE_HIGH>; + power-supply = <®_3v3>; + /* PWM */ + pwms = <&pwm 0 5000000>; + }; + clocks { compatible = "simple-bus"; #address-cells = <1>; @@ -105,4 +144,29 @@ clock-frequency = <32768>; }; }; + + lcd_panel: panel { + /* + * edt,et057090dhu: EDT 5.7" LCD TFT + * edt,et070080dh6: EDT 7.0" LCD TFT + */ + compatible = "edt,et057090dhu", "simple-panel"; + + backlight = <&backlight>; + }; + + regulators { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <0>; + + reg_3v3: regulator@0 { + compatible = "regulator-fixed"; + reg = <0>; + regulator-name = "+V3.3"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-always-on; + }; + }; }; diff --git a/configs/colibri_t30_defconfig b/configs/colibri_t30_defconfig index d14f74d767..2350bb33c7 100644 --- a/configs/colibri_t30_defconfig +++ b/configs/colibri_t30_defconfig @@ -39,6 +39,9 @@ CONFIG_DFU_MMC=y CONFIG_DFU_RAM=y # CONFIG_DM_MMC_OPS is not set CONFIG_TEGRA_MMC=y +CONFIG_DM_REGULATOR=y +CONFIG_DM_REGULATOR_FIXED=y +CONFIG_PWM_TEGRA=y CONFIG_SYS_NS16550=y CONFIG_USB=y CONFIG_DM_USB=y @@ -49,5 +52,8 @@ CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_G_DNL_MANUFACTURER="Toradex" CONFIG_G_DNL_VENDOR_NUM=0x1b67 CONFIG_G_DNL_PRODUCT_NUM=0x4000 +CONFIG_DM_VIDEO=y +CONFIG_VIDEO_TEGRA20=y +CONFIG_CONSOLE_SCROLL_LINES=10 CONFIG_OF_LIBFDT_OVERLAY=y # CONFIG_EFI_LOADER is not set diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h index 2184d885e8..d93a874c3e 100644 --- a/include/configs/colibri_t30.h +++ b/include/configs/colibri_t30.h @@ -59,6 +59,11 @@ #define CONFIG_TFTP_BLOCKSIZE 16352 #define CONFIG_TFTP_TSIZE +/* LCD support */ +#define CONFIG_SYS_WHITE_ON_BLACK +#define CONFIG_CMD_BMP +#define CONFIG_LCD_LOGO + /* Miscellaneous commands */ #define CONFIG_FAT_WRITE -- cgit v1.2.3