From patchwork Fri May 18 18:02:14 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 10411775 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 0AF8D6031B for ; Fri, 18 May 2018 18:02:46 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EAFCE28A6D for ; Fri, 18 May 2018 18:02:45 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DFC3528A71; Fri, 18 May 2018 18:02:45 +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=-2.9 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, DKIM_VALID, FREEMAIL_FROM, MAILING_LIST_MULTI autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 5400828A6E for ; Fri, 18 May 2018 18:02:45 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Message-Id:Date: Subject:To:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To: References:List-Owner; bh=sBULiZKKfJlXdxL4pdw5DJNEFLhK9GUCoug0/OPmLsE=; b=i6M RuPQO24WesNFweae/JYApHlVOGOH+OUJPWJqH9PkYdzuKxRBz1kKldECMzO5QT5ZfFMLabGG0JmL5 IyxAcjrKTcTzgkUB5myGX/+A8f3zeuUyZiwP+lzpeALdp/o/nwPy2T4mRddSSm7y+ett5PjpUUmlY U3vPFYm0fJXAl0H5yoXu/OpZM6TXaI5MEzuFpwhU7vp+L1Vc16vNyKQLOHerwVMly3FLjhtZEVo8A 1+U7rKg6RlzBQHDRQI005uthv9FuVdDgCypzTP98OxDvZ+QSgFkxMXlIH9yLGSQcxfPZJRqQsRn5l KnHDHgMrAGnafVnPPhs7T5Tv98wrF7g==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJjiB-0001bQ-Uk; Fri, 18 May 2018 18:02:39 +0000 Received: from mail-io0-f196.google.com ([209.85.223.196]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJji3-0001T5-Ct for linux-arm-kernel@lists.infradead.org; Fri, 18 May 2018 18:02:38 +0000 Received: by mail-io0-f196.google.com with SMTP id p124-v6so7187827iod.1 for ; Fri, 18 May 2018 11:02:21 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=wia7i74aAzzS1ik/IeVdVu1pu5F9kjYU0UNvrTMLTps=; b=WXTrwnSPO+vfJcE/ev2AsooGteWAh2cz2PnMQWEhll1KbpwOdIuMb+eENKWv7YcR5E AhORDOdesM57AsMSJ5OEfCfy75k74HOYfFVMkYNx+933K/RaHjmKk2/8/10GROHSyRAM IBFB+9gAjCdzFQGL6cV5Prmc5YBC1BPNzu6pK2Hg3ed+MWqaM2RIKQPnHI9Gr09NClJC Rci9WJA+VFXpnAkUOC7amTYwgxZ0L2yJIDIDdurP4J2KDT499lWzPLch2KYTQf2o+Rta 90MNTdPZeKsHC1SAyw+H93bN4X9hnMsF9eES20n1/yD0HbdV/GHTCDN/gaAV/5HjBYvT 0jig== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=wia7i74aAzzS1ik/IeVdVu1pu5F9kjYU0UNvrTMLTps=; b=E6oHQrOWZxfZwxR3cShxoU3E1EVK0nb9CozxBZ8NGDhK0xUzPWE3bPmJJREW0ECXzd pyxWDkm7EdOYoOVUWdfqANszeFvd8vmragpIxzWiJAp79AhDeBSMQvJq2+np/V8ieM29 BD72SkhI/aO24mQmJGl/7lb3btac8BEBV9PKdA8lz/B7GOto9iV0dV6UH9TTYn25irtM /FP4fK2OS7IfgmtofZOm4CTzQbSZVKFe31M6qKQX8KsiSI9pvhdsnPtsYO3knJSSbNDg jCCx2gIjh/AGmDtrI2/TOIIm1rByI//Wed7XGjhC9dIiJAVqznyGriboSQoQP4RaAkvG QxQA== X-Gm-Message-State: ALKqPwea1KkyihsyOazknj1qqp9XwiDjqfRvMfNc4GSi9mPokknPPBMC UyaMTIjwfv0u/N6gKmQE3SNcmA== X-Google-Smtp-Source: AB8JxZppGOGFJrxl7iurAM2m+NFd+Z1c+MaNNopvbKfQJM9FN4Nb+g5X+FyPgOvLp8kbMxuYoq+MkA== X-Received: by 2002:a6b:5010:: with SMTP id e16-v6mr11408009iob.274.1526666539764; Fri, 18 May 2018 11:02:19 -0700 (PDT) Received: from localhost.localdomain (c-73-65-120-235.hsd1.mn.comcast.net. [73.65.120.235]) by smtp.gmail.com with ESMTPSA id v20-v6sm4628801iog.59.2018.05.18.11.02.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 18 May 2018 11:02:18 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Subject: [PATCH V6] ARM: dts: da850-evm: Enable LCD and Backlight Date: Fri, 18 May 2018 13:02:14 -0500 Message-Id: <20180518180214.9487-1-aford173@gmail.com> X-Mailer: git-send-email 2.17.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20180518_110231_524119_099FFA40 X-CRM114-Status: GOOD ( 17.34 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Adam Ford , devicetree@vger.kernel.org, nsekhar@ti.com, khilman@kernel.org MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP When using the board files the LCD works, but not with the DT. This adds enables the original da850-evm to work with the same LCD in device tree mode. The EVM has a gpio for the regulator and a PWM for dimming the backlight. The LCD and the vpif display pins are mutually exclusive, so if using the LCD, do not load the vpif driver. Signed-off-by: Adam Ford --- V6: Fix some whitespace and comment formatting. Rename backlight_reg to backlight_lcd V5: Resync against v4.18/dt V4: Move the backlight to PWM, so the driver can control the regulator allowing the regulator to power down and enabling the ability to change the brightness of the backlight V3: Fix errant GPIO, label GPIO pins, and rename the regulator to be more explict to backlight which better matches the schematic. Updated the description to explain that it cannot be used at the same time as the vpif driver. V2: Add regulator and GPIO enable pins. Remove PWM backlight and replace with GPIO diff --git a/arch/arm/boot/dts/da850-evm.dts b/arch/arm/boot/dts/da850-evm.dts index 0e82bb988fde..3e760e23d88c 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -27,6 +27,60 @@ spi0 = &spi1; }; + backlight: backlight-pwm { + pinctrl-names = "default"; + pinctrl-0 = <&ecap2_pins>; + power-supply = <&backlight_reg>; + compatible = "pwm-backlight"; + pwms = <&ecap2 0 50000 0>; + brightness-levels = <0 10 20 30 40 50 60 70 80 90 99>; + default-brightness-level = <7>; + }; + + panel { + compatible = "ti,tilcdc,panel"; + pinctrl-names = "default"; + pinctrl-0 = <&lcd_pins>; + /* + * The vpif and the LCD are mutually exclusive. + * To enable VPIF, change the status below to 'disabled' then + * then change the status of the vpif below to 'okay' + */ + status = "okay"; + enable-gpios = <&gpio 40 GPIO_ACTIVE_HIGH>; /* lcd_panel_pwr */ + + panel-info { + ac-bias = <255>; + ac-bias-intrpt = <0>; + dma-burst-sz = <16>; + bpp = <16>; + fdd = <0x80>; + sync-edge = <0>; + sync-ctrl = <1>; + raster-order = <0>; + fifo-th = <0>; + }; + + display-timings { + native-mode = <&timing0>; + timing0: 480x272 { + clock-frequency = <9000000>; + hactive = <480>; + vactive = <272>; + hfront-porch = <3>; + hback-porch = <2>; + hsync-len = <42>; + vback-porch = <3>; + vfront-porch = <4>; + vsync-len = <11>; + hsync-active = <0>; + vsync-active = <0>; + de-active = <1>; + pixelclk-active = <1>; + }; + }; + }; + vbat: fixedregulator0 { compatible = "regulator-fixed"; regulator-name = "vbat"; @@ -35,6 +89,15 @@ regulator-boot-on; }; + backlight_lcd: backlight-regulator { + compatible = "regulator-fixed"; + regulator-name = "lcd_backlight_pwr"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + gpio = <&gpio 47 GPIO_ACTIVE_HIGH>; /* lcd_backlight_pwr */ + enable-active-high; + }; + sound { compatible = "simple-audio-card"; simple-audio-card,name = "DA850/OMAP-L138 EVM"; @@ -63,6 +126,10 @@ }; }; +&ecap2 { + status = "okay"; +}; + &pmx_core { status = "okay"; @@ -109,6 +176,10 @@ status = "okay"; }; +&lcdc { + status = "okay"; +}; + &i2c0 { status = "okay"; clock-frequency = <100000>; @@ -336,5 +407,10 @@ &vpif { pinctrl-names = "default"; pinctrl-0 = <&vpif_capture_pins>, <&vpif_display_pins>; - status = "okay"; + /* + * The vpif and the LCD are mutually exclusive. + * To enable VPIF, disable the ti,tilcdc,panel then + * changed the status below to 'okay' + */ + status = "disabled"; };