From patchwork Wed Jan 22 19:04:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Fritz X-Patchwork-Id: 3525121 Return-Path: X-Original-To: patchwork-linux-arm@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 7F4CF9F1C3 for ; Wed, 22 Jan 2014 19:48:49 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 9BF3220176 for ; Wed, 22 Jan 2014 19:48:48 +0000 (UTC) Received: from casper.infradead.org (casper.infradead.org [85.118.1.10]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7F0FC200E9 for ; Wed, 22 Jan 2014 19:48:47 +0000 (UTC) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W637c-0000wd-4f; Wed, 22 Jan 2014 19:05:56 +0000 Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.80.1 #2 (Red Hat Linux)) id 1W637T-0000Nu-AO; Wed, 22 Jan 2014 19:05:47 +0000 Received: from mail-lb0-x22d.google.com ([2a00:1450:4010:c04::22d]) by merlin.infradead.org with esmtps (Exim 4.80.1 #2 (Red Hat Linux)) id 1W636s-0000DU-Gf for linux-arm-kernel@lists.infradead.org; Wed, 22 Jan 2014 19:05:15 +0000 Received: by mail-lb0-f173.google.com with SMTP id y6so674381lbh.32 for ; Wed, 22 Jan 2014 11:04:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=0qDxdP6gQAaLtS3vgH4DvShpKJpdrTcrBd+KiHtuUN0=; b=oSw212i5YyL6m9+7+MdvSdY75Pb6yu8z4voOFbToDKUW/zUbJGG+lct6HbfDOnhQ6+ qpYys1wd6OftN9dBG4KmxfRQiCAyPGSs5q595janhAufbf+W3MBqYuod/vA+MzwgKZpR BvSmw/P3TzEq8NMx7GloP/6qtSOyETH+t0toqGRhxg1UgxGXGpxSt5jVeE6mVxFNrfPM /sZlgw8Tp6NzmUehGM8K7lfJX5N7tNcJWZpFzK01VC17CrSmfLeFXluO1AdHEC8JsUKo J0oifnAPaBterM8vJZ1gZEbU8RwY13C0i5qfkKEfVqq0Wxb23BIp+za9bts0864Rnra/ 5tBg== X-Received: by 10.152.87.142 with SMTP id ay14mr2143735lab.7.1390417488280; Wed, 22 Jan 2014 11:04:48 -0800 (PST) Received: from mars.ipredator.se ([46.246.44.225]) by mx.google.com with ESMTPSA id np10sm8512422lbb.7.2014.01.22.11.04.45 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Wed, 22 Jan 2014 11:04:47 -0800 (PST) From: Christoph Fritz To: Nishanth Menon , Javier Martinez Canillas , Ulf Hansson , Mark Rutland , Ian Campbell , Tony Lindgren , Tomi Valkeinen , Archit Taneja , bcousson@baylibre.com, "Hans J. Koch" , Daniel Mack Subject: [PATCH v2 3/5] ARM: OMAP2+: add legacy display for omap3 DBB056 Date: Wed, 22 Jan 2014 20:04:18 +0100 Message-Id: <1390417460-3134-4-git-send-email-chf.fritz@googlemail.com> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1390417460-3134-1-git-send-email-chf.fritz@googlemail.com> References: <1390417460-3134-1-git-send-email-chf.fritz@googlemail.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20140122_140510_795687_6A9E4756 X-CRM114-Status: GOOD ( 15.49 ) X-Spam-Score: -2.0 (--) Cc: devicetree@vger.kernel.org, linux-omap@vger.kernel.org, linux-arm-kernel@lists.infradead.org X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Spam-Status: No, score=-4.7 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, RP_MATCHES_RCVD, T_DKIM_INVALID, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Full device tree support for omapdss is not yet accomplished. Until then, init display by legacy platform code. Signed-off-by: Christoph Fritz --- arch/arm/mach-omap2/dss-common.c | 49 ++++++++++++++++++++++++++++++++++++ arch/arm/mach-omap2/dss-common.h | 1 + arch/arm/mach-omap2/pdata-quirks.c | 7 +++++- 3 files changed, 56 insertions(+), 1 deletion(-) diff --git a/arch/arm/mach-omap2/dss-common.c b/arch/arm/mach-omap2/dss-common.c index dadccc9..b8b4e39 100644 --- a/arch/arm/mach-omap2/dss-common.c +++ b/arch/arm/mach-omap2/dss-common.c @@ -257,3 +257,52 @@ void __init omap3_igep2_display_init_of(void) platform_device_register(&omap3_igep2_tfp410_device); platform_device_register(&omap3_igep2_dvi_connector_device); } + +/* OMAP3 dbb056 data */ + +#define DBB056_DISPLAY_ENABLE_GPIO 156 + +static const struct display_timing dbb056_lcd_videomode = { + .pixelclock = { 0, 19200000, 0 }, + + .hactive = { 0, 640, 0 }, + .hfront_porch = { 0, 104, 0 }, + .hback_porch = { 0, 8, 0 }, + .hsync_len = { 0, 8, 0 }, + + .vactive = { 0, 480, 0 }, + .vfront_porch = { 0, 104, 0 }, + .vback_porch = { 0, 8, 0 }, + .vsync_len = { 0, 8, 0 }, + + .flags = DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW | + DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE, +}; + +static struct panel_dpi_platform_data dbb056_lcd_pdata = { + .name = "lcd", + .source = "dpi.0", + + .data_lines = 18, + + .display_timing = &dbb056_lcd_videomode, + + .enable_gpio = DBB056_DISPLAY_ENABLE_GPIO, + .backlight_gpio = -1, +}; + +static struct platform_device dbb056_lcd_device = { + .name = "panel-dpi", + .id = 0, + .dev.platform_data = &dbb056_lcd_pdata, +}; + +static struct omap_dss_board_info omap_dbb056_dss_data = { + .default_display_name = "lcd", +}; + +void __init omap3_dbb056_display_init_of(void) +{ + platform_device_register(&dbb056_lcd_device); + omap_display_init(&omap_dbb056_dss_data); +} diff --git a/arch/arm/mach-omap2/dss-common.h b/arch/arm/mach-omap2/dss-common.h index a9becf0..a125b55 100644 --- a/arch/arm/mach-omap2/dss-common.h +++ b/arch/arm/mach-omap2/dss-common.h @@ -9,5 +9,6 @@ void __init omap4_panda_display_init_of(void); void __init omap_4430sdp_display_init_of(void); void __init omap3_igep2_display_init_of(void); +void __init omap3_dbb056_display_init_of(void); #endif diff --git a/arch/arm/mach-omap2/pdata-quirks.c b/arch/arm/mach-omap2/pdata-quirks.c index 3d5b24d..a58590f 100644 --- a/arch/arm/mach-omap2/pdata-quirks.c +++ b/arch/arm/mach-omap2/pdata-quirks.c @@ -169,6 +169,10 @@ static void __init am3517_evm_legacy_init(void) omap_ctrl_writel(v, AM35XX_CONTROL_IP_SW_RESET); omap_ctrl_readl(AM35XX_CONTROL_IP_SW_RESET); /* OCP barrier */ } +static void __init omap3_dbb056_legacy_init(void) +{ + omap3_dbb056_display_init_of(); +} #endif /* CONFIG_ARCH_OMAP3 */ #ifdef CONFIG_ARCH_OMAP4 @@ -259,10 +263,11 @@ struct of_dev_auxdata omap_auxdata_lookup[] __initdata = { static struct pdata_init pdata_quirks[] __initdata = { #ifdef CONFIG_ARCH_OMAP3 { "compulab,omap3-sbc-t3730", omap3_sbc_t3730_legacy_init, }, + { "incostartec,omap3-lilly-dbb056", omap3_dbb056_legacy_init, }, + { "isee,omap3-igep0020", omap3_igep0020_legacy_init, }, { "nokia,omap3-n900", hsmmc2_internal_input_clk, }, { "nokia,omap3-n9", hsmmc2_internal_input_clk, }, { "nokia,omap3-n950", hsmmc2_internal_input_clk, }, - { "isee,omap3-igep0020", omap3_igep0020_legacy_init, }, { "ti,omap3-evm-37xx", omap3_evm_legacy_init, }, { "ti,omap3-zoom3", omap3_zoom_legacy_init, }, { "ti,am3517-evm", am3517_evm_legacy_init, },