From patchwork Tue Sep 26 02:03:00 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryder Lee X-Patchwork-Id: 9970939 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 A10F5602BD for ; Tue, 26 Sep 2017 02:18:19 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 9029721F61 for ; Tue, 26 Sep 2017 02:18:19 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 854CC28D09; Tue, 26 Sep 2017 02:18: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=-4.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [65.50.211.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 20EBF21F61 for ; Tue, 26 Sep 2017 02:18: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=DKlltvLj1QaZLBo+hbQCX4jl5C6ncZ9x8y86H80u6Pg=; b=dL0WUi/z5Dywl1 siDqwJ85rJ7anWdti2Sp+BlMNn5jk0MfUt2wyUHASuBpsng75BakLCJcn4oCcDRGE/H5u+krBCUTt 756gbjPmLnSzoeYxOQH2tMYPyy3XrZJgA8kV0P4I+iuvJdxnzhfIV8FhzTIBFyC8MLxV+pz+dmk1h mZ1w9GUjSQxCCH27HjCiiV5jEAybc5FTGL5YeXLLipMtgAfpOXGVB+9aYULGEqcjiTg3qEw4uMI/W jtpcCV0qXmt9EvoImUR1tdUVRC8dM65C00tjicXZDIoxEHiPRhlu0vgnBdKQnqhDba3Q3sDVYSfBp BNkxVebNKcI9cPUUWVEA==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1dwfRv-0007Es-AH; Tue, 26 Sep 2017 02:18:15 +0000 Received: from [210.61.82.183] (helo=mailgw01.mediatek.com) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dwfDo-0007Kl-0K; Tue, 26 Sep 2017 02:03:45 +0000 X-UUID: fd21896d2b8f41b2983a16567318bb81-20170926 Received: from mtkcas06.mediatek.inc [(172.21.101.30)] by mailgw01.mediatek.com (envelope-from ) (mhqrelay.mediatek.com ESMTP with TLS) with ESMTP id 2044864717; Tue, 26 Sep 2017 10:03:10 +0800 Received: from mtkcas08.mediatek.inc (172.21.101.126) by mtkmbs01n1.mediatek.inc (172.21.101.68) with Microsoft SMTP Server (TLS) id 15.0.1210.3; Tue, 26 Sep 2017 10:03:02 +0800 Received: from mtkslt306.mediatek.inc (10.21.14.136) by mtkcas08.mediatek.inc (172.21.101.73) with Microsoft SMTP Server id 15.0.1210.3 via Frontend Transport; Tue, 26 Sep 2017 10:03:14 +0800 From: Ryder Lee To: Matthias Brugger Subject: [PATCH v2 09/10] arm: dts: mt7623: enable bananapi-r2 display function Date: Tue, 26 Sep 2017 10:03:00 +0800 Message-ID: X-Mailer: git-send-email 1.9.1 In-Reply-To: References: MIME-Version: 1.0 X-MTK: N X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170925_190340_733966_43BAD27D X-CRM114-Status: GOOD ( 10.67 ) 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: devicetree@vger.kernel.org, Ryder Lee , Erin Lo , linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org, YT Shen , linux-arm-kernel@lists.infradead.org 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 patch adds missing MIPI pin macros in mt7623-pinfunc.h and enables pwm backlight support for bananapi-r2. Signed-off-by: Ryder Lee Acked-by: Linus Walleij --- arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts | 41 +++++++++++++++++++++++++-- include/dt-bindings/pinctrl/mt7623-pinfunc.h | 12 ++++++++ 2 files changed, 51 insertions(+), 2 deletions(-) diff --git a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts index 688a863..267a05a 100644 --- a/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts +++ b/arch/arm/boot/dts/mt7623n-bananapi-bpi-r2.dts @@ -17,6 +17,17 @@ serial2 = &uart2; }; + backlight_lcd: backlight_lcd { + compatible = "pwm-backlight"; + pwms = <&bls 0 100000>; + brightness-levels = < + 0 16 32 48 64 80 96 112 + 128 144 160 176 192 208 224 240 + 255 + >; + default-brightness-level = <9>; + }; + chosen { stdout-path = "serial2:115200n8"; }; @@ -86,6 +97,12 @@ }; }; +&bls { + status = "okay"; + pinctrl-names = "default"; + pinctrl-0 = <&bls_pins_a>; +}; + &cir { pinctrl-names = "default"; pinctrl-0 = <&cir_pins_a>; @@ -210,6 +227,12 @@ }; &pio { + bls_pins_a: bls@0 { + pins_cmd_dat { + pinmux = ; + }; + }; + cir_pins_a:cir@0 { pins_cir { pinmux = ; @@ -273,6 +296,21 @@ }; }; + mipi_dsi_pin: mipi_dsi_pin { + pins_cmd_dat { + pinmux = , + , + , + , + , + , + , + , + , + ; + }; + }; + mmc0_pins_default: mmc0default { pins_cmd_dat { pinmux = , @@ -378,8 +416,7 @@ pwm_pins_a: pwm@0 { pins_pwm { - pinmux = , - , + pinmux = , , , ; diff --git a/include/dt-bindings/pinctrl/mt7623-pinfunc.h b/include/dt-bindings/pinctrl/mt7623-pinfunc.h index 436a87b..72bed67 100644 --- a/include/dt-bindings/pinctrl/mt7623-pinfunc.h +++ b/include/dt-bindings/pinctrl/mt7623-pinfunc.h @@ -272,6 +272,18 @@ #define MT7623_PIN_84_DSI_TE_FUNC_GPIO84 (MTK_PIN_NO(84) | 0) #define MT7623_PIN_84_DSI_TE_FUNC_DSI_TE (MTK_PIN_NO(84) | 1) +#define MT7623_PIN_91_MIPI_TDN3_FUNC_GPIO91 (MTK_PIN_NO(91) | 0) +#define MT7623_PIN_91_MIPI_TDN3_FUNC_TDN3 (MTK_PIN_NO(91) | 1) + +#define MT7623_PIN_92_MIPI_TDP3_FUNC_GPIO92 (MTK_PIN_NO(92) | 0) +#define MT7623_PIN_92_MIPI_TDP3_FUNC_TDP3 (MTK_PIN_NO(92) | 1) + +#define MT7623_PIN_93_MIPI_TDN2_FUNC_GPIO93 (MTK_PIN_NO(93) | 0) +#define MT7623_PIN_93_MIPI_TDN2_FUNC_TDN2 (MTK_PIN_NO(93) | 1) + +#define MT7623_PIN_94_MIPI_TDP2_FUNC_GPIO94 (MTK_PIN_NO(94) | 0) +#define MT7623_PIN_94_MIPI_TDP2_FUNC_TDP2 (MTK_PIN_NO(94) | 1) + #define MT7623_PIN_95_MIPI_TCN_FUNC_GPIO95 (MTK_PIN_NO(95) | 0) #define MT7623_PIN_95_MIPI_TCN_FUNC_TCN (MTK_PIN_NO(95) | 1)