From patchwork Wed Feb 1 16:04:29 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Breno Matheus Lima X-Patchwork-Id: 9550875 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 0001B60236 for ; Thu, 2 Feb 2017 00:56:33 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE1FA20242 for ; Thu, 2 Feb 2017 00:56:33 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id D2C8426E49; Thu, 2 Feb 2017 00:56:33 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-4.1 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, HTML_MESSAGE, RCVD_IN_DNSWL_MED, T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 2E50320242 for ; Thu, 2 Feb 2017 00:56:33 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 6198F6E908; Thu, 2 Feb 2017 00:55:31 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-ua0-x243.google.com (mail-ua0-x243.google.com [IPv6:2607:f8b0:400c:c08::243]) by gabe.freedesktop.org (Postfix) with ESMTPS id 904A16E829 for ; Wed, 1 Feb 2017 16:04:31 +0000 (UTC) Received: by mail-ua0-x243.google.com with SMTP id i68so36088700uad.1 for ; Wed, 01 Feb 2017 08:04:31 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to:cc; bh=yopwK1oHm89M0X2Y1/Hnzkn6aI6G7A9j/asNeqD3g9E=; b=UyLsY0pIU1Uds1s+GrrQGhyLLaXBa46BchkaMak82wcV6VWfPD0oc7TPWQ+qCtcau9 SElLtpRA7M51VMlSdS8lLFp16wsGd/x/63zlOX4yfM/fKo7atAVm5ttu9fJAjrb9BNjq BiLOn7eSZJ0axRWy8K0Cxwo6ufnnI/coLyDGrStT6sGn/c/odztRrs0FmjjAHFVNoswG 5xQj/hEay7u/sAmF+QXfqiikI1c3Pmr2vhQPyct1eYS4wzdxiJrrX3Tnb/HEjCBPAnOc mlBIXcUYjTGmyhpIg9CxiHCGuJTZWLuY0uaBVu/Wdq+Z8U+IBnc2TpVQwoLJ5y2J9Uqo zuUA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to:cc; bh=yopwK1oHm89M0X2Y1/Hnzkn6aI6G7A9j/asNeqD3g9E=; b=Ex+4vD8qweYAVAcVtVZbIbCFvqYD7ezaGdLBWqmRCKLzIVevuSgV0PelByTRSp2WI7 2RphxDANv75yUizJyVOyTKS0PT9+nRfy+wMLghk8OEWgocYmeILfBQBSiBZAH0mzmu4F WFOWmjBwElrPuvV03bLLsui+LQqPe3LocNjc2vPLJ89tSqxuKp/Rg4m1yNq+Q25bKzvL 8pt0+3kpsLLmpFhFJVwD26pHHXUIKxEmaOtKRbn1CwbUvuIVpEbN83I3VJRdVdxAAixY 8diQyOrWDowtoLB5wNEL4CHdrV4iYwjeXubM8C8tSGfN5afUBr0VCqTC7b4RRXlA7qVD RYhA== X-Gm-Message-State: AIkVDXJjUrO5yi9q5XQdl3OurFPN9KnM+SHA2X7+6qYYDnhZS41wKaXu7e7FsDLF97StYKFWPMVUPW3xufGM0A== X-Received: by 10.176.81.124 with SMTP id f57mr1391791uaa.18.1485965070429; Wed, 01 Feb 2017 08:04:30 -0800 (PST) MIME-Version: 1.0 Received: by 10.103.51.81 with HTTP; Wed, 1 Feb 2017 08:04:29 -0800 (PST) From: Breno Matheus Lima Date: Wed, 1 Feb 2017 14:04:29 -0200 Message-ID: Subject: drm: panel-simple: Problems to use Seiko 43WVF1G panel and DRM_MXS driver on the i.MX6SX SabreSD. To: thierry.reding@gmail.com, Marek Vasut X-Mailman-Approved-At: Thu, 02 Feb 2017 00:55:19 +0000 Cc: Fabio Estevam , Breno Matheus Lima , dri-devel@lists.freedesktop.org X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP Hi, I'm trying to use the Seiko 43WVF1G panel (Datasheet link: http://www.glyn.de/data/glyn/media/doc/43wvf1g-0.pdf) and the DRM_MXS driver on the i.MX6SX SabreSD. Applying the patch below removes the old timing configuration on the dtsi and adds it to the panel-simple.c I can get the display working, but the image is out of place. Another point to note is that it's necessary to set the reg_lcd_3v3 to regulator-always-on otherwise the gpio3 27 does not get enabled. The main two problems that I'm having at the moment are: - Gpio3 27 is not being set by the driver, function panel_simple_prepare(struct drm_panel *panel) is not being called. - The image is displaced even when using the same timing values in the datasheet. I would like to know if I'm doing something wrong on my dtsi, or if something is missing on the panel-simple.c. I would appreciate any help. Thanks! }, { --- 2.7.4 -- Breno Matheus Lima diff --git a/arch/arm/boot/dts/imx6sx-sdb.dtsi b/arch/arm/boot/dts/imx6sx-sdb.dtsi index da81552..13fcce9 100644 --- a/arch/arm/boot/dts/imx6sx-sdb.dtsi +++ b/arch/arm/boot/dts/imx6sx-sdb.dtsi @@ -24,7 +24,7 @@ reg = <0x80000000 0x40000000>; }; - backlight { + backlight_display: backlight-display { compatible = "pwm-backlight"; pwms = <&pwm3 0 5000000>; brightness-levels = <0 4 8 16 32 64 128 255>; @@ -104,6 +104,7 @@ regulator-name = "lcd-3v3"; gpio = <&gpio3 27 0>; enable-active-high; + regulator-always-on; }; reg_peri_3v3: regulator@5 { @@ -146,6 +147,19 @@ mux-int-port = <2>; mux-ext-port = <6>; }; + + panel { + compatible = "seiko,43wvf1g", "simple-panel"; + backlight = <&backlight_display>; + + power-supply = <®_lcd_3v3>; + + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; + }; }; &audmux { @@ -215,33 +229,14 @@ &lcdif1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_lcd>; - lcd-supply = <®_lcd_3v3>; - display = <&display0>; status = "okay"; - display0: display0 { - bits-per-pixel = <16>; - bus-width = <24>; - - display-timings { - native-mode = <&timing0>; - timing0: timing0 { - clock-frequency = <33500000>; - hactive = <800>; - vactive = <480>; - hback-porch = <89>; - hfront-porch = <164>; - vback-porch = <23>; - vfront-porch = <10>; - hsync-len = <10>; - vsync-len = <10>; - hsync-active = <0>; - vsync-active = <0>; - de-active = <1>; - pixelclk-active = <0>; - }; + port{ + display_out: endpoint { + remote-endpoint = <&panel_in>; }; }; + }; &pwm3 { diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 06aaf79..8faefee 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -863,6 +863,31 @@ static const struct panel_desc hannstar_hsd070pww1 = { .bus_format = MEDIA_BUS_FMT_RGB666_1X7X3_SPWG, }; +static const struct display_timing seiko_43wvf1g_timing = { + .pixelclock = { 33500000, 33500000, 33500000 }, + .hactive = { 800, 800, 800 }, + .hfront_porch = { 164, 164, 164 }, + .hback_porch = { 89, 89, 89 }, + .hsync_len = { 10, 10, 10 }, + .vactive = { 480, 480, 480 }, + .vfront_porch = { 10, 10, 10 }, + .vback_porch = { 23, 23, 23 }, + .vsync_len = { 10, 10, 10 }, + .flags = DISPLAY_FLAGS_DE_HIGH | DISPLAY_FLAGS_PIXDATA_NEGEDGE | + DISPLAY_FLAGS_HSYNC_LOW | DISPLAY_FLAGS_VSYNC_LOW, +}; + +static const struct panel_desc seiko_43wvf1g = { + .timings = &seiko_43wvf1g_timing, + .num_timings = 1, + .bpc = 8, + .size = { + .width = 93, + .height = 57, + }, + .bus_format = MEDIA_BUS_FMT_RGB888_1X24, +}; + static const struct display_timing hannstar_hsd100pxn1_timing = { .pixelclock = { 55000000, 65000000, 75000000 }, .hactive = { 1024, 1024, 1024 }, @@ -1853,6 +1878,9 @@ static const struct of_device_id platform_of_match[] = { .compatible = "samsung,ltn140at29-301", .data = &samsung_ltn140at29_301, }, { + .compatible = "seiko,43wvf1g", + .data = &seiko_43wvf1g, + }, { .compatible = "sharp,lq101k1ly04", .data = &sharp_lq101k1ly04,