Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S967103AbdIZCD4 (ORCPT ); Mon, 25 Sep 2017 22:03:56 -0400 Received: from mailgw01.mediatek.com ([210.61.82.183]:59654 "EHLO mailgw01.mediatek.com" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1754240AbdIZCDQ (ORCPT ); Mon, 25 Sep 2017 22:03:16 -0400 X-UUID: fd21896d2b8f41b2983a16567318bb81-20170926 From: Ryder Lee To: Matthias Brugger CC: , , , , Erin Lo , YT Shen , Ryder Lee 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 Content-Type: text/plain X-MTK: N Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 3398 Lines: 115 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) -- 1.9.1