diff options
author | Sungwook Kim <sungwookk@nvidia.com> | 2014-03-25 04:26:16 -0700 |
---|---|---|
committer | Jon Mayo <jmayo@nvidia.com> | 2014-04-11 11:12:04 -0700 |
commit | 78c99f5bf9e53ff75e04ff19b30c12dfcc60c1fa (patch) | |
tree | be73a71c8b839de5e3deec84fe9fd208e73466f0 | |
parent | f8b38e58c22e27866f54b1cdc66e03b540c711fa (diff) |
arm: tegra: eDP/miniDP support
To support an eDP panel or an external DP monitor for the VCM3.0-T124
platform
- target platform is P1859 + VCM3.0-T124 + E1860 stacked.
- use miniDP connector J9 on E1860 B00 board.
- to support an external DP monitor, a HW rework is required for the
E1860 B00 board, so the monitor can recognize the cable connection.
The kernel config option TEGRA_DP controls the tegra dp driver
required to support an internal eDP panel or an external DP monitor.
It can be selected by "Device Drivers" -> "Graphics support" ->
"Enable eDP panel" in the make menuconfig.
Notes:
The eDP panel shows vertical strips on booting. May need to put the
eDP panel to an inactive mode at boot.
bug 1409738
Change-Id: I4da2db0614f6bea8cf0ea714913a8b806b485e7a
Signed-off-by: Sungwook Kim <sungwookk@nvidia.com>
Reviewed-on: http://git-master/r/386806
Reviewed-by: Automatic_Commit_Validation_User
Reviewed-by: Animesh Kishore <ankishore@nvidia.com>
Reviewed-by: Venkat Moganty <vmoganty@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Jon Mayo <jmayo@nvidia.com>
-rw-r--r-- | arch/arm/mach-tegra/Makefile | 1 | ||||
-rw-r--r-- | arch/arm/mach-tegra/board-vcm30_t124-panel.c | 54 |
2 files changed, 51 insertions, 4 deletions
diff --git a/arch/arm/mach-tegra/Makefile b/arch/arm/mach-tegra/Makefile index 044aa03c08aa..d918c2f7a9f8 100644 --- a/arch/arm/mach-tegra/Makefile +++ b/arch/arm/mach-tegra/Makefile @@ -278,6 +278,7 @@ obj-${CONFIG_MACH_VCM30_T124} += board-vcm30_t124.o obj-${CONFIG_MACH_VCM30_T124} += board-vcm30_t124-sdhci.o obj-${CONFIG_MACH_VCM30_T124} += board-vcm30_t124-power.o obj-${CONFIG_MACH_VCM30_T124} += board-vcm30_t124-panel.o +obj-${CONFIG_MACH_VCM30_T124} += panel-a-edp-1080p-14-0.o obj-${CONFIG_MACH_VCM30_T124} += therm-monitor.o obj-${CONFIG_TEGRA_BB_XMM_POWER} += baseband-xmm-power.o diff --git a/arch/arm/mach-tegra/board-vcm30_t124-panel.c b/arch/arm/mach-tegra/board-vcm30_t124-panel.c index 42db5c9e8542..f73fdc2475ba 100644 --- a/arch/arm/mach-tegra/board-vcm30_t124-panel.c +++ b/arch/arm/mach-tegra/board-vcm30_t124-panel.c @@ -60,8 +60,7 @@ struct platform_device * __init vcm30_t124_host1x_init(void) } #ifndef CONFIG_TEGRA_HDMI_PRIMARY -/* XXX: EDP is not functionally tested yet */ -static struct resource vcm30_t124_disp1_resources[] = { +static struct resource vcm30_t124_disp1_dp_resources[] = { { .name = "irq", .start = INT_DISPLAY_GENERAL, @@ -111,8 +110,11 @@ static struct tegra_fb_data vcm30_t124_disp1_fb_data = { .bits_per_pixel = 32, }; +static struct tegra_dc_sd_settings sd_settings; + static struct tegra_dc_out vcm30_t124_disp1_out = { .type = TEGRA_DC_OUT_DP, + .sd_settings = &sd_settings, /* eDP max pixel rate to T124 POR */ .max_pixclock = KHZ2PICOS(540000), /* 540MPix/S 3840x2160@60 */ @@ -131,8 +133,8 @@ static struct tegra_dc_platform_data vcm30_t124_disp1_pdata = { static struct platform_device vcm30_t124_disp1_device = { .name = "tegradc", .id = 0, - .resource = vcm30_t124_disp1_resources, - .num_resources = ARRAY_SIZE(vcm30_t124_disp1_resources), + .resource = vcm30_t124_disp1_dp_resources, + .num_resources = ARRAY_SIZE(vcm30_t124_disp1_dp_resources), .dev = { .platform_data = &vcm30_t124_disp1_pdata, }, @@ -343,6 +345,44 @@ static struct platform_device vcm30_t124_nvmap_device = { }, }; + +static void __init vcm30_t124_panel_select(void) +{ + struct tegra_panel *panel = NULL; + + /* for eDP */ + panel = &edp_a_1080p_14_0; + vcm30_t124_disp1_out.type = TEGRA_DC_OUT_DP; + vcm30_t124_disp1_device.resource = vcm30_t124_disp1_dp_resources; + vcm30_t124_disp1_device.num_resources = + ARRAY_SIZE(vcm30_t124_disp1_dp_resources); + + if (panel) { + if (panel->init_sd_settings) + panel->init_sd_settings(&sd_settings); + + if (panel->init_dc_out) + panel->init_dc_out(&vcm30_t124_disp1_out); + + if (panel->init_fb_data) + panel->init_fb_data(&vcm30_t124_disp1_fb_data); + + if (panel->init_cmu_data) + panel->init_cmu_data(&vcm30_t124_disp1_pdata); + + if (panel->set_disp_device) + panel->set_disp_device(&vcm30_t124_disp1_device); + + if (panel->register_bl_dev) + panel->register_bl_dev(); + + if (panel->register_i2c_bridge) + panel->register_i2c_bridge(); + } + +} + + int __init vcm30_t124_panel_init(void) { int err = 0; @@ -351,7 +391,13 @@ int __init vcm30_t124_panel_init(void) #ifdef CONFIG_TEGRA_NVMAP struct dma_declare_info vpr_dma_info; struct dma_declare_info generic_dma_info; +#endif +#ifndef CONFIG_TEGRA_HDMI_PRIMARY + vcm30_t124_panel_select(); +#endif + +#ifdef CONFIG_TEGRA_NVMAP vcm30_t124_carveouts[1].base = tegra_carveout_start; vcm30_t124_carveouts[1].size = tegra_carveout_size; vcm30_t124_carveouts[2].dma_dev = &tegra_generic_dev; |