From patchwork Thu Apr 27 14:37:41 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ulrich Hecht X-Patchwork-Id: 9702961 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 E1D196032C for ; Thu, 27 Apr 2017 14:38:05 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CC4D328636 for ; Thu, 27 Apr 2017 14:38:05 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id C11F528655; Thu, 27 Apr 2017 14:38:05 +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.3 required=2.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_HI, RCVD_IN_SORBS_SPAM, 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 6E97F28636 for ; Thu, 27 Apr 2017 14:38:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S938493AbdD0OiE (ORCPT ); Thu, 27 Apr 2017 10:38:04 -0400 Received: from mail-wm0-f68.google.com ([74.125.82.68]:33739 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S938488AbdD0OiD (ORCPT ); Thu, 27 Apr 2017 10:38:03 -0400 Received: by mail-wm0-f68.google.com with SMTP id y10so5031295wmh.0; Thu, 27 Apr 2017 07:38:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=MbSXGI1mS3gpEoylPdasn/z7Qp9c5DNjIJsU7ADD7a8=; b=LUELmM0MiLL2aVGtD5ccHKwUqtOFzuZbTMFHUGwiHmj7Xnl47ls/i61jgTpK2K2OAc w2I1GB0tJPAA+e02TnoujdnD/Jfjr4bAd1Lcg2/UHRLT4MTox+/1yHpQU40QK4aoxjIU VxbB0UAg8DiXDN6QHLVIZMx8/YHyiQA2b0ePEH54IYJgWdZ6VWHi0nUAQSwlkIXVW0oo T9qjqgU4Q1TokQaMv/SeL9FBnIglGmdzeq93O+IkKZ4MxxK3NSvAPGExG0OW3j8YSUdq C9gLgkwALGAnx2KH5KwSFj9iJ9sYx9rmvjQaiRsT4iKDNAFw2IzSbdCw8js98Bs/D2QG Y1fA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=MbSXGI1mS3gpEoylPdasn/z7Qp9c5DNjIJsU7ADD7a8=; b=onhCmqGqX+mb0hpDbWbG1O+UB7wx0+VMRdCj+qn9Op9VFeyGvHX4XAnp/q7k+qn1IO F6dx4h+FztFldvC5/wAbwcIwM9DpKEAlP60cgaAeVV2eUWqfCUnjNeIebwdfA/Aacqam 7+KdyWuNpkrCgPAZejhZsIs7cZdwF+1GzpTyzxsyVg7LY5XbRkv8vsne0P/TedI72PWB oLnh8Yjtm9rdPBvBTzlzcVZFDpnb5XTzzyKO2iXmHGeN4L/jSiwz0OTSh1TpSnVZ0LPl DnpH/Lj2pY6qIwkAVPjb3d92Bd2vmFw1Oob+eTA49hyrbzJ3bqiDBh37PHP+a5HbHXLG Boww== X-Gm-Message-State: AN3rC/5uAlFfM15k19fsLAWXFpqdnwNF70CYNO2MJM1d/j6HLaGVPEsp xYFgL9TVqkTDUaISxDc= X-Received: by 10.80.195.24 with SMTP id a24mr5047713edb.44.1493303881705; Thu, 27 Apr 2017 07:38:01 -0700 (PDT) Received: from groucho.site (ipbcc0294b.dynamic.kabel-deutschland.de. [188.192.41.75]) by smtp.gmail.com with ESMTPSA id x18sm1295067eda.39.2017.04.27.07.38.00 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Thu, 27 Apr 2017 07:38:01 -0700 (PDT) From: Ulrich Hecht To: geert@glider.be, horms@verge.net.au Cc: linux-pwm@vger.kernel.org, linux-renesas-soc@vger.kernel.org, magnus.damm@gmail.com, laurent.pinchart@ideasonboard.com, Laurent Pinchart Subject: [PATCH v2 6/8] arm64: dts: r8a7795: salvator-x: Add panel backlight support Date: Thu, 27 Apr 2017 16:37:41 +0200 Message-Id: <1493303863-23719-7-git-send-email-ulrich.hecht+renesas@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1493303863-23719-1-git-send-email-ulrich.hecht+renesas@gmail.com> References: <1493303863-23719-1-git-send-email-ulrich.hecht+renesas@gmail.com> 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 From: Laurent Pinchart The panel backlight is controlled through a GPIO and a PWM channel. Signed-off-by: Laurent Pinchart Reviewed-by: Laurent Pinchart --- arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts index bf4674e..8558b27 100644 --- a/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts +++ b/arch/arm64/boot/dts/renesas/r8a7795-salvator-x.dts @@ -280,6 +280,16 @@ }; }; }; + + 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>; + }; }; &du { @@ -366,6 +376,11 @@ function = "du"; }; + pwm1_pins: pwm { + groups = "pwm1_a"; + function = "pwm1"; + }; + sdhi0_pins: sd0 { groups = "sdhi0_data4", "sdhi0_ctrl"; function = "sdhi0"; @@ -441,6 +456,13 @@ }; }; +&pwm1 { + pinctrl-0 = <&pwm1_pins>; + pinctrl-names = "default"; + + status = "okay"; +}; + &scif1 { pinctrl-0 = <&scif1_pins>; pinctrl-names = "default";