From patchwork Mon May 15 05:48:11 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Horman X-Patchwork-Id: 9726091 X-Patchwork-Delegate: horms@verge.net.au 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 8FBD860380 for ; Mon, 15 May 2017 05:48:18 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 7E92128936 for ; Mon, 15 May 2017 05:48:18 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7097C28953; Mon, 15 May 2017 05:48:18 +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=-6.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, RCVD_IN_DNSWL_HI,T_DKIM_INVALID autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id E5FCF28936 for ; Mon, 15 May 2017 05:48:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1758532AbdEOFsQ (ORCPT ); Mon, 15 May 2017 01:48:16 -0400 Received: from kirsty.vergenet.net ([202.4.237.240]:48796 "EHLO kirsty.vergenet.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1758229AbdEOFsP (ORCPT ); Mon, 15 May 2017 01:48:15 -0400 Received: from penelope.horms.nl (52D9BC73.cm-11-1c.dynamic.ziggo.nl [82.217.188.115]) by kirsty.vergenet.net (Postfix) with ESMTPA id 58C0D25B777; Mon, 15 May 2017 15:48:13 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=verge.net.au; s=mail; t=1494827293; bh=Lljm9ENtE1NNI9JYrrNtaip3SwDpA0Lc3Ut+1PsqsKA=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=m7JWm2RoUEKVALP1tGHuvqGvwi9KoKda4gz25rTsAg9FZAATGsD5Z1eK2EgIQ/77x bUGYuBfMFGV4+rjctzRTzUC7Jxh+Z0lQIuACTGp7mYYeAhreYjXQ9JtLBysPesv04M cToJpUGxQq3ZUk4aNKojQolzOtG45a+1frdBDegw= Received: by penelope.horms.nl (Postfix, from userid 7100) id 2CCADE22360; Mon, 15 May 2017 07:48:11 +0200 (CEST) Date: Mon, 15 May 2017 07:48:11 +0200 From: Simon Horman To: Laurent Pinchart Cc: Ulrich Hecht , geert@glider.be, linux-pwm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, magnus.damm@gmail.com Subject: Re: [PATCH v2 4/8] arm64: dts: r8a7796: salvator-x: Add panel backlight support Message-ID: <20170515054810.GC16545@verge.net.au> References: <1493303863-23719-1-git-send-email-ulrich.hecht+renesas@gmail.com> <1493303863-23719-5-git-send-email-ulrich.hecht+renesas@gmail.com> <1600524.FrhoU262MZ@avalon> <1843896.Iy7IFdxQto@avalon> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <1843896.Iy7IFdxQto@avalon> Organisation: Horms Solutions BV User-Agent: Mutt/1.5.23 (2014-03-12) Sender: linux-renesas-soc-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-renesas-soc@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP On Sat, May 13, 2017 at 09:56:12PM +0300, Laurent Pinchart wrote: > Hi Simon, > > I'm afraid you added nodes in the wrong places when applying the patch to > salvator-x.dtsi :-( Please see below. > > On Thursday 27 Apr 2017 17:43:56 Laurent Pinchart wrote: > > Hi Ulrich, > > > > Thank you for the patch. > > > > On Thursday 27 Apr 2017 16:37:39 Ulrich Hecht wrote: > > > The panel backlight is controlled through a GPIO and a PWM channel. > > > > > > Signed-off-by: Ulrich Hecht > > > > Reviewed-by: Laurent Pinchart > > > > > --- > > > > > > arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts | 22 ++++++++++++++++ > > > 1 file changed, 22 insertions(+) > > > > > > diff --git a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts > > > b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts index > > > 14d9e51..abda84c > > > 100644 > > > --- a/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts > > > +++ b/arch/arm64/boot/dts/renesas/r8a7796-salvator-x.dts > > > @@ -133,6 +133,11 @@ > > > function = "i2c2"; > > > }; > > > > > > + pwm1_pins: pwm { > > > + groups = "pwm1_a"; > > > + function = "pwm1"; > > > + }; > > > + > > This is alphabetically ordered here and isn't anymore in your devel branch. Thanks, I will move it from between scif_clk_pins and sdhi0_pins to between i2c2_pins and scif1_pins. > > > sdhi0_pins: sd0 { > > > groups = "sdhi0_data4", "sdhi0_ctrl"; > > > function = "sdhi0"; > > > @@ -183,6 +188,16 @@ > > > interrupt-parent = <&gpio2>; > > > interrupts = <11 IRQ_TYPE_LEVEL_LOW>; > > > }; > > > + > > > + backlight: backlight { > > > + compatible = "pwm-backlight"; > > > + pwms = <&pwm1 0 50000>; > > > + > > > + brightness-levels = <256 128 64 16 8 4 0>; > > > + default-brightness-level = <6>; > > > + > > > + enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>; > > > + }; > > The backlight node needs to be added as a child of the root node, while you've > added it to the DU node in your devel branch. Thanks. I have moved it to between audio_clkout and reg_1p8v in the root node. > > > }; > > > > > > &extal_clk { > > > @@ -235,6 +250,13 @@ > > > status = "okay"; > > > }; > > > > > > +&pwm1 { > > > + pinctrl-0 = <&pwm1_pins>; > > > + pinctrl-names = "default"; > > > + > > > + status = "okay"; > > > +}; > > > + > > This is alphabetically ordered here and isn't anymore in your devel branch. Thanks, I have moved it from between rcar_sound and scif1 to between pfc and rcar_sound. > Can you rebase your devel branch to fix this ? Sure. I have the following in my local tree which I plan to push a later today. From: Laurent Pinchart [PATCH] arm64: dts: salvator-x: Add panel backlight support The panel backlight is controlled through a GPIO and a PWM channel. Signed-off-by: Laurent Pinchart [simon: apply to salvator-x.dtsi instead of r8a7795-salvator-x.dts] Signed-off-by: Simon Horman --- arch/arm64/boot/dts/renesas/salvator-x.dtsi | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/salvator-x.dtsi b/arch/arm64/boot/dts/renesas/salvator-x.dtsi index d5eb022d247c..7240bcd75918 100644 --- a/arch/arm64/boot/dts/renesas/salvator-x.dtsi +++ b/arch/arm64/boot/dts/renesas/salvator-x.dtsi @@ -58,6 +58,16 @@ clock-frequency = <11289600>; }; + backlight: backlight { + compatible = "pwm-backlight"; + pwms = <&pwm1 0 50000>; + + brightness-levels = <256 128 64 16 8 4 0>; + default-brightness-level = <6>; + + enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>; + }; + reg_1p8v: regulator0 { compatible = "regulator-fixed"; regulator-name = "fixed-1.8V"; @@ -358,6 +368,11 @@ function = "i2c2"; }; + pwm1_pins: pwm { + groups = "pwm1_a"; + function = "pwm1"; + }; + scif1_pins: scif1 { groups = "scif1_data_a", "scif1_ctrl"; function = "scif1"; @@ -443,6 +458,13 @@ }; }; +&pwm1 { + pinctrl-0 = <&pwm1_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + &rcar_sound { pinctrl-0 = <&sound_pins &sound_clk_pins>; pinctrl-names = "default";