From patchwork Sat Feb 11 17:44:05 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Priit Laes X-Patchwork-Id: 9568061 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 68BDD601C3 for ; Sat, 11 Feb 2017 17:55:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4CCB4284F2 for ; Sat, 11 Feb 2017 17:55:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3C1AC28538; Sat, 11 Feb 2017 17:55:02 +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=-1.9 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID 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 DBCA8284F2 for ; Sat, 11 Feb 2017 17:55:01 +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: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=MgfUkf1StsCSFEvO+8xnZ0FcJoUP326MIhFeopjjwFE=; b=s1Won75BSy8NJJJTEa3AWtZCeU sdAHwS1Nufandv9F282edFndN9fhGO3wEC8EW+JBQsIIDoZxOYSU6iar23W0KhN28rSupzmu5jIHk q7bryt9fD1RY0cNtxCtAnvNBvXK2FZRa40tRQ5yxLEyXkrD251z/+VaXK8uyUHKoNV4RUJjY+jCD5 yT6NN4vJ0ECSkJxf1Qi5nc9zyExYjtSnMOXv78qHCeXwExGENSSsEX8fonmegEzGSMBZVmUQNqh0G H017tT2eXWle8d6o8hHA5BJoCqf8wYpfhckRShSGG9KFQYrq1VDh4QMAcv7Ejb0zXbu8ldkcVk07l TLeNYPPw==; 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 1ccbsz-00043U-Gi; Sat, 11 Feb 2017 17:55:01 +0000 Received: from plaes.org ([188.166.43.21]) by bombadil.infradead.org with esmtp (Exim 4.87 #1 (Red Hat Linux)) id 1ccbsv-00042q-1q for linux-arm-kernel@lists.infradead.org; Sat, 11 Feb 2017 17:55:00 +0000 Received: from localhost (71-43-196-88.dyn.estpak.ee [88.196.43.71]) by plaes.org (Postfix) with ESMTPSA id C5AD040A7E; Sat, 11 Feb 2017 17:44:24 +0000 (UTC) From: Priit Laes To: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Jonathan Liu , Thierry Reding , Russell King , Chen-Yu Tsai , Mark Rutland , Rob Herring , David Airlie , Maxime Ripard Subject: [PATCH 8/8] ARM: dts: sun4i: gemei-g9: Add LVDS display support Date: Sat, 11 Feb 2017 19:44:05 +0200 Message-Id: <20170211174405.28395-9-plaes@plaes.org> X-Mailer: git-send-email 2.9.3 In-Reply-To: <20170211174405.28395-1-plaes@plaes.org> References: <20170211174405.28395-1-plaes@plaes.org> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170211_095457_422200_BA0E2C8A X-CRM114-Status: GOOD ( 10.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: Quentin Schulz , linux-sunxi@googlegroups.com, Priit Laes 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 Signed-off-by: Priit Laes --- arch/arm/boot/dts/sun4i-a10-gemei-g9.dts | 95 +++++++++++++++++++++++++++++--- 1 file changed, 86 insertions(+), 9 deletions(-) diff --git a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts index 9616cde..c19f906 100644 --- a/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts +++ b/arch/arm/boot/dts/sun4i-a10-gemei-g9.dts @@ -1,5 +1,5 @@ /* - * Copyright 2015 Priit Laes + * Copyright 2015-2017 Priit Laes * * Priit Laes * @@ -48,28 +48,69 @@ #include #include #include +#include / { model = "Gemei G9 Tablet"; compatible = "gemei,g9", "allwinner,sun4i-a10"; + /* + * TODO: + * 2x cameras via CSI + * AXP battery management + * NAND + * OTG + * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48 + * HDMI output + */ + aliases { serial0 = &uart0; }; + backlight: backlight { + compatible = "pwm-backlight"; + pinctrl-names = "default"; + pinctrl-0 = <&lcd_backlight_pin>; + /* TODO: Figure out proper parameters */ + pwms = <&pwm 0 50000 PWM_POLARITY_INVERTED>; + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; + enable-gpios = <&pio 7 7 GPIO_ACTIVE_HIGH>; /* PH7 */ + default-brightness-level = <8>; + }; + chosen { stdout-path = "serial0:115200n8"; }; + + panel: panel { + compatible = "lg,lp097x02-slq2"; + pinctrl-names = "default"; + pinctrl-0 = <&lcd_enable_pin &lcd_lvds0_pins>; + enable-gpios = <&pio 7 8 GPIO_ACTIVE_HIGH>; /* PH8 */ + #address-cells = <1>; + #size-cells = <0>; + + port { + #address-cells = <1>; + #size-cells = <0>; + + panel_input: endpoint { + remote-endpoint = <&tcon0_out_panel>; + }; + }; + }; + + display-engine { + compatible = "allwinner,sun5i-a13-display-engine"; + allwinner,pipelines = <&fe0>; + }; +}; + +&be0 { + status = "okay"; }; -/* - * TODO: - * 2x cameras via CSI - * AXP battery management - * NAND - * OTG - * Touchscreen - gt801_2plus1 @ i2c adapter 2 @ 0x48 - */ &codec { /* PH15 controls power to external amplifier (ft2012q) */ pinctrl-names = "default"; @@ -90,6 +131,10 @@ status = "okay"; }; +&fe0 { + status = "okay"; +}; + &i2c0 { pinctrl-names = "default"; pinctrl-0 = <&i2c0_pins_a>; @@ -159,6 +204,27 @@ pins = "PH15"; function = "gpio_out"; }; + + lcd_backlight_pin: lcd_backlight_pin@0 { + pins = "PH7"; + function = "gpio_out"; + }; + + lcd_enable_pin: lcd_enable_pin@0 { + pins = "PH8"; + function = "gpio_out"; + }; + + lcd_lvds0_pins: lcd_lvds0_pins@0 { + pins = "PD0", "PD1", "PD2", "PD3", "PD4", "PD5", "PD6", "PD7", "PD8", "PD9"; + function = "lvds0"; + }; +}; + +&pwm { + pinctrl-names = "default"; + pinctrl-0 = <&pwm0_pins_a>; + status = "okay"; }; ®_dcdc2 { @@ -194,6 +260,17 @@ status = "okay"; }; +&tcon0 { + mode = "lvds"; + status = "okay"; +}; + +&tcon0_out { + tcon0_out_panel: endpoint@1 { + reg = <0>; + remote-endpoint = <&panel_input>; + }; +}; &uart0 { pinctrl-names = "default";