From patchwork Tue Apr 29 23:52:41 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tony Lindgren X-Patchwork-Id: 4089761 Return-Path: X-Original-To: patchwork-linux-fbdev@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 0A24D9F3FF for ; Tue, 29 Apr 2014 23:53:03 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 15C3B201CE for ; Tue, 29 Apr 2014 23:53:02 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 0339120200 for ; Tue, 29 Apr 2014 23:53:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754111AbaD2Xw5 (ORCPT ); Tue, 29 Apr 2014 19:52:57 -0400 Received: from mho-02-ewr.mailhop.org ([204.13.248.72]:38234 "EHLO mho-02-ewr.mailhop.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754461AbaD2Xww (ORCPT ); Tue, 29 Apr 2014 19:52:52 -0400 Received: from 99-127-230-128.lightspeed.sntcca.sbcglobal.net ([99.127.230.128] helo=muffinssi.muru.com) by mho-02-ewr.mailhop.org with esmtpsa (TLSv1:AES128-SHA:128) (Exim 4.72) (envelope-from ) id 1WfHpT-0008nQ-4X; Tue, 29 Apr 2014 23:52:51 +0000 X-Mail-Handler: Dyn Standard SMTP by Dyn X-Originating-IP: 99.127.230.128 X-Report-Abuse-To: abuse@dyndns.com (see http://www.dyndns.com/services/sendlabs/outbound_abuse.html for abuse reporting information) X-MHO-User: U2FsdGVkX1/JCvDEbXBpcKnGH/fjSuQv From: Tony Lindgren To: linux-arm-kernel@lists.infradead.org, linux-fbdev@vger.kernel.org, devicetree@vger.kernel.org, linux-omap@vger.kernel.org Cc: tomi.valkeinen@ti.com Subject: [PATCH 3/4] OMAPDSS: panel-sharp-ls037v7dw01: add device tree support Date: Tue, 29 Apr 2014 16:52:41 -0700 Message-Id: <1398815562-24113-4-git-send-email-tony@atomide.com> X-Mailer: git-send-email 1.8.1.1 In-Reply-To: <1398815562-24113-1-git-send-email-tony@atomide.com> References: <1398815562-24113-1-git-send-email-tony@atomide.com> Sender: linux-fbdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, 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 We can pass the GPIO configuration for ls037v7dw01 in a standard gpios property. Signed-off-by: Tony Lindgren --- .../bindings/panel/sharp,ls037v7dw01.txt | 53 ++++++++++++++ .../omap2/displays-new/panel-sharp-ls037v7dw01.c | 84 ++++++++++++++++++++-- 2 files changed, 133 insertions(+), 4 deletions(-) create mode 100644 Documentation/devicetree/bindings/panel/sharp,ls037v7dw01.txt diff --git a/Documentation/devicetree/bindings/panel/sharp,ls037v7dw01.txt b/Documentation/devicetree/bindings/panel/sharp,ls037v7dw01.txt new file mode 100644 index 0000000..7f6f5e1 --- /dev/null +++ b/Documentation/devicetree/bindings/panel/sharp,ls037v7dw01.txt @@ -0,0 +1,53 @@ +SHARP LS037V7DW01 TFT-LCD panel + +Required properties: +- compatible: should be "sharp,ls037v7dw01" + +Optional properties: +- reset-gpios: a GPIO spec for the optional reset pin +- enable-gpios: a GPIO array for the optional configuration GPIOs + ordered MO, LR, UD, INI as specified in the LS037V7DW01.pdf file. + +This binding is compatible with the simple-panel binding, which is specified +in simple-panel.txt in this directory. + +This panel can have zero to five GPIOs to configure +to change configuration between QVGA and VGA mode +and the scan direction. As these pins can be also +configured with external pulls, all the GPIOs are +considered optional with holes in the array. + +Example when connected to a omap2+ based device: + + lcd0: display { + compatible = "sharp,ls037v7dw01"; + power-supply = <&lcd_3v3>; + reset-gpios = <&gpio5 27 GPIO_ACTIVE_HIGH>; /* gpio155, lcd RESB */ + enable-gpios = <&gpio5 26 GPIO_ACTIVE_HIGH /* gpio154, lcd MO */ + &gpio1 2 GPIO_ACTIVE_HIGH /* gpio2, lcd LR */ + &gpio1 3 GPIO_ACTIVE_HIGH /* gpio3, lcd UD */ + &gpio5 24 GPIO_ACTIVE_HIGH>; /* gpio152, lcd INI */ + + panel-timing { + clock-frequency = <19200000>; + hback-porch = <28>; + hactive = <480>; + hfront-porch = <1>; + hsync-len = <2>; + vback-porch = <1>; + vactive = <640>; + vfront-porch = <1>; + vsync-len = <1>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <1>; + pixelclk-active = <1>; + }; + + port { + lcd_in: endpoint { + remote-endpoint = <&dpi_out>; + }; + }; + }; + diff --git a/drivers/video/fbdev/omap2/displays-new/panel-sharp-ls037v7dw01.c b/drivers/video/fbdev/omap2/displays-new/panel-sharp-ls037v7dw01.c index de8473a..3a04fb0 100644 --- a/drivers/video/fbdev/omap2/displays-new/panel-sharp-ls037v7dw01.c +++ b/drivers/video/fbdev/omap2/displays-new/panel-sharp-ls037v7dw01.c @@ -12,15 +12,19 @@ #include #include #include +#include +#include #include #include - +#include +#include