From patchwork Wed May 24 12:13:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Icenowy Zheng X-Patchwork-Id: 9745915 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 E1080601C2 for ; Wed, 24 May 2017 12:15:10 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D07782896C for ; Wed, 24 May 2017 12:15:10 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C49FD2896F; Wed, 24 May 2017 12:15:10 +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=ham 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 3CF5A2896C for ; Wed, 24 May 2017 12:15:10 +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=zgKm5xA0raAXaMLDRW9o5thPJ1F0ahW6+i9IZSPxA5Y=; b=crg1YTCBNG1U+aVWH1WVUhMLb6 4fzYCUG9pllb10AFPnrI/jWbuAwLyQ9PbLu8JB1PdAXmP3DyVYb4nH5P7op5DA2DW+f0KGRuqJWPt SMrC9cYD5lkt1KKcOU3Z38hnqBlHiHqj9wI49U+4J7lKPOmEw66STYlyIHQHw0HUHs8sL7m8whHLg oh5Ay94p1Apc7ysjooDff4K00VlxVx+qcTFAZqeHdjMPzCe0P1ZenkW0P3XtQKCxKOqQi5WPIL53s IJYHUCnyPPmdMmJjlvjwYotiMq+6dYA2PXN2KFtfxZprpO6FKyeo4oVBf1B6GCXtaEL4Hs+gzpt9O 1k2ZqnTg==; 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 1dDVC0-0005fn-Ic; Wed, 24 May 2017 12:15:08 +0000 Received: from camel.maple.relay.mailchannels.net ([23.83.214.29]) by bombadil.infradead.org with esmtps (Exim 4.87 #1 (Red Hat Linux)) id 1dDVBm-0004pj-2J for linux-arm-kernel@lists.infradead.org; Wed, 24 May 2017 12:15:06 +0000 X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from relay.mailchannels.net (localhost [127.0.0.1]) by relay.mailchannels.net (Postfix) with ESMTP id 0A7A7364155; Wed, 24 May 2017 12:14:31 +0000 (UTC) Received: from hermes.aosc.io (unknown [100.96.127.186]) (Authenticated sender: lmn-TZDUIOWCRQMW) by relay.mailchannels.net (Postfix) with ESMTPA id D1D6F3661E3; Wed, 24 May 2017 12:14:27 +0000 (UTC) X-Sender-Id: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io Received: from hermes.aosc.io (hermes.aosc.io [172.20.82.168]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384) by 0.0.0.0:2500 (trex/5.9.3); Wed, 24 May 2017 12:14:30 +0000 X-MC-Relay: Neutral X-MailChannels-SenderId: lmn-tzduiowcrqmw|x-authsender|icenowy@aosc.io X-MailChannels-Auth-Id: lmn-TZDUIOWCRQMW X-Imminent-Spot: 0ef883536f11b3e7_1495628069602_3935266421 X-MC-Loop-Signature: 1495628069602:399266013 X-MC-Ingress-Time: 1495628069601 Received: from localhost (localhost [127.0.0.1]) (Authenticated sender: icenowy@aosc.io) by hermes.aosc.io (Postfix) with ESMTPSA id 731FB4FD14; Wed, 24 May 2017 12:14:23 +0000 (UTC) From: Icenowy Zheng To: Maxime Ripard , Chen-Yu Tsai Subject: [PATCH 3/3] ARM: sun8i: v3s: add backlight device node for Lichee Pi Zero LCD Date: Wed, 24 May 2017 20:13:20 +0800 Message-Id: <20170524121320.4171-3-icenowy@aosc.io> In-Reply-To: <20170524121320.4171-1-icenowy@aosc.io> References: <20170524121320.4171-1-icenowy@aosc.io> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20170524_051454_622839_937D00A7 X-CRM114-Status: UNSURE ( 9.16 ) X-CRM114-Notice: Please train this message. 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, linux-sunxi@googlegroups.com, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Icenowy Zheng 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 The 40-pin LCD connector on Lichee Pi Zero has backlight pins, which is controlled by the PWM0 controller of the V3s SoC, and the controlling part is on the board. Add the PWM and backlight device nodes in the device tree file, but leave them disabled, as they can only be useful when the LCD is attached. The LCD device tree overlay files can enable these controllers and make use of them. Signed-off-by: Icenowy Zheng --- arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts index 387fc2aa546d..e0721bf725d1 100644 --- a/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts +++ b/arch/arm/boot/dts/sun8i-v3s-licheepi-zero.dts @@ -52,6 +52,14 @@ serial0 = &uart0; }; + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm 0 50000 0>; + brightness-levels = <0 10 20 30 40 50 60 70 80 90 100>; + default-brightness-level = <8>; + status = "disabled"; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -86,6 +94,12 @@ status = "okay"; }; +&pwm { + pinctrl-0 = <&pwm0_pins>; + pinctrl-names = "default"; + status = "disabled"; +}; + &uart0 { pinctrl-0 = <&uart0_pins_a>; pinctrl-names = "default";