From patchwork Fri May 18 00:49:10 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adam Ford X-Patchwork-Id: 10407967 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 68438602CB for ; Fri, 18 May 2018 00:49:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 46ED028755 for ; Fri, 18 May 2018 00:49:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 39679287C9; Fri, 18 May 2018 00:49:53 +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 CB9F228755 for ; Fri, 18 May 2018 00:49:52 +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=vuVIPBnvXBUEyKAyokg2FzKXQfBIxtUJwG1iWLkaFxE=; b=YON dhhjr4KIKqeyXBmBJ300UsTvP5ECuIuI0McJ4G0sCHu3qrcAiczTUBSeBKuNLBQ/MuFyqPC3SWxSF MW+IYy2BKxATeDq3qUWECaEkXCDD9BU6f2J0szRCJDjwVn0ioao1iWQ2CgXFjRdlk1y8Dzs2GRTBa ICGd0OjEhjRYbmSP4a6sWIK24cdH7SnZI7+4xIEt0VkcKdBwh5Oe8ADaXdNAKvXGfVnfBff/Aou2K N9pJlPmBsKJdNfeTA4BCBWx0aqev6LzSeADTvN9AC/9WC+lTWlduupV05pW4kbHSqXq1DSa1Cly85 ag9BMsJmhB2QxT/wlDrSYdeEwxKU1CQ==; 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 1fJTaZ-0006Qy-Kh; Fri, 18 May 2018 00:49:43 +0000 Received: from mail-io0-x241.google.com ([2607:f8b0:4001:c06::241]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1fJTaU-0006Ok-US for linux-arm-kernel@lists.infradead.org; Fri, 18 May 2018 00:49:40 +0000 Received: by mail-io0-x241.google.com with SMTP id a10-v6so4246808ioc.9 for ; Thu, 17 May 2018 17:49:26 -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=RwhuiM4QakMl3M1lR9/mxA2FwXvF4uydLCclrC5kk7Y=; b=ahqqnXmHvOTC5jd7VgeqRbi84nPE5sdpexynaHCi7TY38AECIX9XoXlv7ViXp8PdM5 LMsdIdT/Oc8bPSt1MtSw2GMrfXTJfWwh90u88EPNej1VXxHG20IVAL3/wsS4WohQHUpB 0b3pcwrJrOfS1abIox/5StVoR26eHamXP+mgPmd67qOR1lzX4vAo6sbsplTQxXusW627 fmEl03kagct+szZN/UkiVmOqMBVEFvNWn3z3vtg8tzxcB61KODgbwNQni+8hWaugYWoY 0aHktcQc49fIqz6BrRhWLML2vPkK7yrGmoBFEmziFvHg58m+MNfnnMTIUyuSivIUw6E3 ttjQ== 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=RwhuiM4QakMl3M1lR9/mxA2FwXvF4uydLCclrC5kk7Y=; b=nnIBzcoJaDfJoRre3zowNuVIT+xAEQvP8kF3g/nn7TQye9NfYX6Dn1XppQKz2UfAlM j/1h9S0k3wTkZYoj8DkeWHI6oN+x776Lok5TvmP6++pad1orp2zqppvpJugsvyQTiQQf 4QUBRUoEEPoNjy7k7Zq37RjwoHzrXpBmYk6kqse1kZJpNLmKKfgMkkECQxawbNSlgO8b HhwJDwhAjWs+VZDr3H6r6qr2/EyE7nycffwRYSatgx+ZV/uqMrrvGblJHKSPn8twQyBS fvU7HUm11nTKXJemM11NZJNyl06gqlNQe/zpNFbeY7hGCcEGveBPwcz8aRJdH+P+ghYL 4Zag== X-Gm-Message-State: ALKqPwd0b4GDI1mdeDTozK2fkqL+kX1zX8xakirEpxs0+4aPKn0/xUJp 9Imetrf4HmFoaI8FYXpxAawZmA== X-Google-Smtp-Source: AB8JxZqwFH6Vz8nnNQ+z5aYeLp6XT406bbRJ0ai1L6FDxjz+RxaUfC2ltbUnowk1bUhROAtLswUa3A== X-Received: by 2002:a6b:8cce:: with SMTP id o197-v6mr8098713iod.114.1526604564875; Thu, 17 May 2018 17:49:24 -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 x21-v6sm3740487iod.7.2018.05.17.17.49.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 17 May 2018 17:49:24 -0700 (PDT) From: Adam Ford To: linux-arm-kernel@lists.infradead.org Subject: [PATCH V4] ARM: dts: da850-evm: Enable LCD and Backlight Date: Thu, 17 May 2018 19:49:10 -0500 Message-Id: <20180518004910.28335-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-20180517_174939_003801_9F788564 X-CRM114-Status: GOOD ( 14.56 ) 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, adam.ford@logicpd.com 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 --- 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 f6a5497d9c97..7be31372bbc2 100644 --- a/arch/arm/boot/dts/da850-evm.dts +++ b/arch/arm/boot/dts/da850-evm.dts @@ -27,9 +27,14 @@ spi0 = &spi1; }; - backlight { - compatible = "gpio-backlight"; - gpios = <&gpio 7 GPIO_ACTIVE_HIGH>; /* lcd_pwm0 */ + 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 { @@ -88,7 +93,6 @@ regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; gpio = <&gpio 47 GPIO_ACTIVE_HIGH>; /* lcd_backlight_pwr */ - regulator-always-on; enable-active-high; }; @@ -120,6 +124,10 @@ }; }; +&ecap2 { + status = "okay"; +}; + &pmx_core { status = "okay";