From patchwork Thu Nov 1 20:00:45 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Kocialkowski X-Patchwork-Id: 10664505 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id B617514BD for ; Thu, 1 Nov 2018 20:03:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id A41A52C146 for ; Thu, 1 Nov 2018 20:03:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 92D012C188; Thu, 1 Nov 2018 20:03:19 +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_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE 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 185562C146 for ; Thu, 1 Nov 2018 20:03:19 +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:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: 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: List-Owner; bh=R1qDuElG8isOr4skBS0QVoEakrohBpKC6n4nvHLr9MU=; b=NlhGmSEjnZzZSX ZqCM/Uz8DS6aqk0tixRPzNkk28GIgEr0WfGl8ziAQOdz+qQtzQ0DP+cR0dxlQpQippbspE5SgXG9B fodp5CyoiPW3uk+rlLzNfjoNi2kSHZWso+WeufhuSkBUPDgaVd09103jCWGkkvPQLvIKtWZnRhy1X I4pPmrimY238UWYnrMdhMSBpZ98GBLRfvScTE/DNAL1jLO/8vlt7ctChvNFVmb/hOAsJlYhe1UuRm rinU7FjAqnOhTegV1SsQKaDbSfx4pA68LImo/VazFBXa0htxDTnk7A/0HyIPeZtKH/SYnkrok/tUi iish+JerrEFXTbUN2WKQ==; 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 1gIJBO-0005v6-Ub; Thu, 01 Nov 2018 20:03:10 +0000 Received: from leonov.paulk.fr ([185.233.101.22]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gIJB9-0005R8-8W for linux-arm-kernel@lists.infradead.org; Thu, 01 Nov 2018 20:03:09 +0000 Received: from gagarine.paulk.fr (gagarine [192.168.1.127]) by leonov.paulk.fr (Postfix) with ESMTPS id B6995BFC95 for ; Thu, 1 Nov 2018 21:02:43 +0100 (CET) Received: by gagarine.paulk.fr (Postfix, from userid 114) id 5750AC1087; Thu, 1 Nov 2018 21:02:43 +0100 (CET) Received: from localhost.localdomain (collins [192.168.1.129]) by gagarine.paulk.fr (Postfix) with ESMTP id 6FE77C105C; Thu, 1 Nov 2018 21:00:35 +0100 (CET) From: Paul Kocialkowski To: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: [PATCH NOT FOR MERGE v2 7/7] ARM: dts: sun7i-a20-bananapi: Add bindings for the LeMaker 3.5" LCD Date: Thu, 1 Nov 2018 21:00:45 +0100 Message-Id: <20181101200045.6078-8-contact@paulk.fr> X-Mailer: git-send-email 2.19.1 In-Reply-To: <20181101200045.6078-1-contact@paulk.fr> References: <20181101200045.6078-1-contact@paulk.fr> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181101_130256_532542_9C2FA987 X-CRM114-Status: GOOD ( 15.48 ) 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: Mark Rutland , David Airlie , linux-sunxi@googlegroups.com, Rob Herring , Paul Kocialkowski , Maxime Ripard , Chen-Yu Tsai , Thierry Reding 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 This adds the backlight panel, power, pwm and tcon0 device-tree bindings required for supporting the 3.5" LCD from LeMaker on the BananaPi M1. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun7i-a20-bananapi.dts | 89 ++++++++++++++++++++++++ 1 file changed, 89 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi.dts b/arch/arm/boot/dts/sun7i-a20-bananapi.dts index 70dfc4ac0bb5..dd2f8bc41fae 100644 --- a/arch/arm/boot/dts/sun7i-a20-bananapi.dts +++ b/arch/arm/boot/dts/sun7i-a20-bananapi.dts @@ -48,6 +48,7 @@ #include #include +#include / { model = "LeMaker Banana Pi"; @@ -63,6 +64,75 @@ stdout-path = "serial0:115200n8"; }; + + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 50000 0>; + brightness-levels = < 0 1 1 1 1 2 2 2 + 2 3 3 3 3 4 4 4 + 5 5 5 6 6 6 7 7 + 8 8 8 9 9 9 10 10 + 10 11 11 12 12 12 13 13 + 14 14 14 15 15 16 16 17 + 17 17 18 18 19 19 20 20 + 21 21 21 22 22 23 23 24 + 24 25 25 26 26 27 27 28 + 28 29 30 30 31 31 32 32 + 33 33 34 35 35 36 36 37 + 38 38 39 39 40 41 41 42 + 43 43 44 44 45 46 47 47 + 48 49 49 50 51 51 52 53 + 54 54 55 56 57 57 58 59 + 60 61 61 62 63 64 65 65 + 66 67 68 69 70 71 71 72 + 73 74 75 76 77 78 79 80 + 81 82 83 84 85 86 87 88 + 89 90 91 92 93 94 95 96 + 97 98 99 101 102 103 104 105 + 106 108 109 110 111 112 114 115 + 116 117 119 120 121 123 124 125 + 127 128 129 131 132 133 135 136 + 138 139 141 142 144 145 147 148 + 150 151 153 154 156 157 159 161 + 162 164 166 167 169 171 173 174 + 176 178 180 181 183 185 187 189 + 191 192 194 196 198 200 202 204 + 206 208 210 212 214 216 219 221 + 223 225 227 229 232 234 236 238 + 241 242 244 246 248 250 253 255>; + default-brightness-level = <128>; + enable-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ + }; + + panel: panel { + compatible = "lemaker,bl035"; + #address-cells = <1>; + #size-cells = <0>; + power-supply = <&panel_power>; + backlight = <&backlight>; + + port@0 { + reg = <0>; + #address-cells = <1>; + #size-cells = <0>; + + panel_input: endpoint@0 { + reg = <0>; + remote-endpoint = <&tcon0_out_panel>; + }; + }; + }; + + panel_power: panel_power { + compatible = "regulator-fixed"; + regulator-name = "panel-power"; + regulator-min-microvolt = <10400000>; + regulator-max-microvolt = <10400000>; + gpio = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */ + enable-active-high; + regulator-boot-on; + }; + hdmi-connector { compatible = "hdmi-connector"; type = "a"; @@ -275,6 +345,12 @@ }; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_pins_a>; + status = "okay"; +}; + #include "axp209.dtsi" ®_dcdc2 { @@ -322,6 +398,19 @@ status = "okay"; }; +&tcon0 { + pinctrl-names = "default"; + pinctrl-0 = <&lcd0_rgb888_pins>; + status = "okay"; +}; + +&tcon0_out { + tcon0_out_panel: endpoint@0 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>;