Received: by 10.192.165.156 with SMTP id m28csp492001imm; Thu, 19 Apr 2018 02:34:27 -0700 (PDT) X-Google-Smtp-Source: AIpwx49ChOT4vRlGZGUa1usj4Io7G+PwY0jMJRLwWAl2F50aT/eXk/3jEUCKuZnmdl1N0/xbBbk/ X-Received: by 2002:a17:902:748b:: with SMTP id h11-v6mr5575097pll.45.1524130467262; Thu, 19 Apr 2018 02:34:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524130467; cv=none; d=google.com; s=arc-20160816; b=stQm7ehFRiAYsQkfm8trqN8b95kaQzJP3sFoLWJ8XNxdOD1llmEBofo0pSX7EPMYO0 gbLXeuZwj5h8fqPXuuFyiIT29SpFvM47z25FN3suqQZzk5+KJ7oDfPq8WfjNxftQCT1n ylQ1+2Ydcfuc5G++6udum3L14s9SsoV6UP1DYnpLvLleboUlEmqdRNzWUPiBCaDZhsrv 0yWkdXl9xEWQ5emqN5Ko0WjIYqQlILVbSw6UfUHUOuCQY/Ao9BxmeuZxrijh32duqq36 xx3ZKYjYirPeqUogPohC5QehQc0hkk9RvnkLQk3v2JE8H/7IelD4UGl/x58TOaYIevF6 bsNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=7GT/J9Kts5QaHJn6NcaYXdKThVg0rsDzr+xE6/67+qE=; b=U3cBfk5rBxCumN7Q75Xsr4QEgkItEo7vFHWV9ZE1Q+ibqPoA63hbOuqBsKZi9m6T04 yrL0akFhRbioi18aJFJNm5Nuumyye5nu+jMORQV1JQmoms/tB/ATmpFhrIk8MtEjHRlC VKaxCC9FshZj+DkuzTB40j5YccJ9vFJXu5ZBWhRk90GEY8yr0BYcBuyRLE+O8upBfQnI /MIyzLKLokGK95KKW8SxntWbWEMbYcAzqPXq4rzgKPRfvWhwl6QDK3zPrqR67Zx5zdiz EnlN9w5+V8ytHSeeNTGo6iHPOf0B5C3wwFdS4OyPDezyPxEiZrt6Ot8qWETPlhyIgES+ 7l/Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 7-v6si3112564pll.132.2018.04.19.02.34.13; Thu, 19 Apr 2018 02:34:27 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752890AbeDSJcj (ORCPT + 99 others); Thu, 19 Apr 2018 05:32:39 -0400 Received: from mirror2.csie.ntu.edu.tw ([140.112.30.76]:35756 "EHLO wens.csie.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752788AbeDSJch (ORCPT ); Thu, 19 Apr 2018 05:32:37 -0400 Received: by wens.csie.org (Postfix, from userid 1000) id AD5025FDF6; Thu, 19 Apr 2018 17:32:29 +0800 (CST) From: Chen-Yu Tsai To: Maxime Ripard , David Airlie , Thierry Reding , Rob Herring , Mark Rutland Cc: Chen-Yu Tsai , dri-devel@lists.freedesktop.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Jonathan Liu Subject: [PATCH 6/6] [DO NOT MERGE] ARM: dts: sun7i: bananapi-m1-plus: Enable Bananapi 7" 800x480 RGB LCD panel Date: Thu, 19 Apr 2018 17:32:25 +0800 Message-Id: <20180419093225.614-7-wens@csie.org> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180419093225.614-1-wens@csie.org> References: <20180419093225.614-1-wens@csie.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The BPI-M1+ has an FPC connector for connecting an RGB (parallel) or LVDS LCD panel. One of the compatible panels is a 7" 800x480 RGB panel from Bananapi. The backlight can be controlled by driving a PWM signal from the SoC at different duty cycles. The LCD enable pin does not seem to do anything, but it is nevertheless included for completeness. There is also a FT5306 capacitive touchscreen controller. This should not be confused with the other 7" LCD that is LVDS based and has a resolution of 1024x600. This patch enables all of the above for the BPI-M1+. Signed-off-by: Chen-Yu Tsai --- .../boot/dts/sun7i-a20-bananapi-m1-plus.dts | 61 +++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts index 763cb03033c4..58a923bfa6ef 100644 --- a/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts +++ b/arch/arm/boot/dts/sun7i-a20-bananapi-m1-plus.dts @@ -47,6 +47,7 @@ #include "sunxi-common-regulators.dtsi" #include #include +#include / { model = "Banana Pi BPI-M1-Plus"; @@ -71,6 +72,34 @@ }; }; + lcd_backlight: lcd-backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 20000 PWM_POLARITY_INVERTED>; /* 50 kHz */ + enable-gpios = <&pio 7 9 GPIO_ACTIVE_HIGH>; /* PH9 */ + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; + default-brightness-level = <8>; + }; + + lcd_panel: lcd-panel { + compatible = "bananapi,s070wv20-ct16", "simple-panel"; + /* This doesn't do anything for this particular panel */ + enable-gpios = <&pio 7 12 GPIO_ACTIVE_HIGH>; /* PH12 */ + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + backlight = <&lcd_backlight>; + #address-cells = <1>; + #size-cells = <0>; + + lcd_panel_input: endpoint@0 { + reg = <0>; + remote-endpoint = <&tcon0_out_lcd>; + }; + }; + }; + leds { compatible = "gpio-leds"; pinctrl-names = "default"; @@ -173,6 +202,20 @@ status = "okay"; }; +&i2c3 { + pinctrl-names = "default"; + pinctrl-0 = <&i2c3_pins_a>; + status = "okay"; + + touchscreen@38 { + compatible = "edt,edt-ft5306", "edt,edt-ft5x06"; + reg = <0x38>; + interrupt-parent = <&pio>; + interrupts = <7 7 IRQ_TYPE_EDGE_FALLING>; /* PH7 */ + reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */ + }; +}; + &ir0 { pinctrl-names = "default"; pinctrl-0 = <&ir0_rx_pins_a>; @@ -249,6 +292,12 @@ }; }; +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_pins_a>; + status = "okay"; +}; + ®_dcdc2 { regulator-always-on; regulator-min-microvolt = <1000000>; @@ -278,6 +327,18 @@ status = "okay"; }; +&tcon0 { + pinctrl-names = "default"; + pinctrl-0 = <&lcd0_rgb888_pins>; +}; + +&tcon0_out { + tcon0_out_lcd: endpoint@0 { + reg = <0>; + remote-endpoint = <&lcd_panel_input>; + }; +}; + &uart0 { pinctrl-names = "default"; pinctrl-0 = <&uart0_pins_a>; -- 2.17.0