From patchwork Sat Jun 20 22:42:16 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?J=2E_Neusch=C3=A4fer?= X-Patchwork-Id: 11617733 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 4F85F912 for ; Mon, 22 Jun 2020 13:31:29 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id E653920732 for ; Mon, 22 Jun 2020 13:31:28 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="vzHVNNh1"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="RWTCu2Ky"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="J+FgROFF" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org E653920732 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version: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=DEv/xVXnJcGXRxu4my7MNPQ0PWZ3lkjxBV3lOHg3WpM=; b=vzHVNNh1WqBXfFz7DQjs98abU qhNpCDd9ZuDpI1xp0+VgP5gpqKHjLoGvI1r6eLwTAYiKJ+/NGMVOiNcbvAQ0RQZn8dzuxK2Hrl8Ws JGurScg827qgl/VFZuZfPUyAO+W8woO0behOAwcFYrvrdWBmDeA/nOIz7FKgTIkkSUG/YzLUe1FsH 91TjLxBPnseID7fPMXN3Fg4KIQQO9O3FkL7rl5Wd3qUDZxotYffR1+qpbuRk75yuBLgV3ikv2VfQd O2f/tKULh4TAq/vnlFdK0wKHR5ur5l//7hLGkkbxINeRhCqJNI7vzsHXFCvAsxadV2wZls6r24I7C 4sxcUA9aw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnMUC-00013y-6c; Mon, 22 Jun 2020 13:27:45 +0000 Received: from casper.infradead.org ([2001:8b0:10b:1236::1]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jnLwd-0004WA-No for linux-arm-kernel@merlin.infradead.org; Mon, 22 Jun 2020 12:53:04 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=casper.20170209; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender :Reply-To:Content-ID:Content-Description; bh=06KPuJThpazmn2WcMq8nuwdfCe3hdYtpq4G7d9Z0/lw=; b=RWTCu2KyvIhQvQX6+nInFDveYo jZUu6Fs5f3lKCWb2R8Phjpc+7LSC9HwHkWWteCF79UGgXOxvrnvTgXYPNcfEtmafrNVP85S9WZElw nLt8utVrN3nuM2SsHRWoxiInVEfX/DX99WTQivx7sqhnW48C/d1FuxEZWrox7g9A+PCdYX6XLkQQR GyStAr3ctJkOsQaj5fSc3Cqvoyovdhvy2Vqvca5u/xt49c1jRE9VzdQdA3sXd903sJGYIy89Y3oda S0xT8iO5Ovyy71xfWlB8O6Fgt9GgestG73iMkrY1VqxL7wotCoWtD3Xo+pDrPrfBzw/V1av0afZMM wvZMtYxw==; Received: from mout.gmx.net ([212.227.15.19]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jmmCt-0008G9-Tg for linux-arm-kernel@lists.infradead.org; Sat, 20 Jun 2020 22:43:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592692955; bh=ndIbgrYQmb2subu3Oe9fLJNTph0wDs4Jgr3O6ddsGCs=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=J+FgROFFQ3bRtxN3HX8GAAM80SYvrFVum3jbjkMuDoZv82bbzd7p4v2lwUObmvi9U RKKkU7ABlhhOf3ucQr/YoDYi2VelWwIOv4bta+W+0QX2BbXRhXfTtTs9zySXTLu11L 7T1AUf5LhLDeDqYz6VADvdNbwPyJo8wPvWSJhok8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.194.186]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mzhj9-1j0ZJq0foH-00vh75; Sun, 21 Jun 2020 00:42:35 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [RFC PATCH 05/10] dt-bindings: pwm: Add bindings for PWM function in Netronix EC Date: Sun, 21 Jun 2020 00:42:16 +0200 Message-Id: <20200620224222.1312520-4-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200620224222.1312520-1-j.neuschaefer@gmx.net> References: <20200620224222.1312520-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:cHtrETJXmtzDsxaAmeos/P2xE+50CNmj6sgaAzFuUOlSUWq/6Ys cqIg7vWmvwXLCa21o6GeBXwf7oIpciGmMqEZBvyiohhFZM1XVsvYPlRTVOpG6EouIIfpHjN oR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y/1LMvLLPS3RZnSBbBgeyqEUOKmMbV1QwweQvoxrDoyxrHMi7Gy f0CXDruLnA9KezIt5srHTBpDD/s8cnyqpoIMkRwLzNo6vntAGe4flze443K5S0lvoeTaE/Lhg FK6WurPDfcgGo7nc0XLaWxFV23mCGRplOl0wIVexTiT7P5ZX+0/H2CBUg1iNb/gUgsUz/OvYr NHO8JLR/iMAhn7YqXEib1JicjAFSXpl7DZCkiwZlBCf0qq3sZ9SQZ65/6ZdcYN44uMkx2/tSr JUicJiTDBAVIjZFgVdM/hOgF2/wViONZSXF3ZCMfWDTBXZHst1/sSne2cl0mqYQKVr5KeVl9W 4L+uoGkI98FY33KXZ X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200620_234328_311095_EAF8726D X-CRM114-Status: GOOD ( 16.36 ) X-Spam-Score: -2.8 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.15.19 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.15.19 listed in wl.mailspike.net] -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [j.neuschaefer[at]gmx.net] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Alexandre Belloni , Heiko Stuebner , linux-pwm@vger.kernel.org, Linus Walleij , Thierry Reding , Fabio Estevam , linux-rtc@vger.kernel.org, Mauro Carvalho Chehab , Sam Ravnborg , Andreas Kemnade , NXP Linux Team , =?utf-8?q?Uwe_Kleine-K=C3=B6nig?= , devicetree@vger.kernel.org, Stephan Gerhold , allen , Sascha Hauer , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Lubomir Rintel , Rob Herring , Lee Jones , linux-arm-kernel@lists.infradead.org, Alessandro Zummo , Mark Brown , Pengutronix Kernel Team , Heiko Stuebner , Josua Mayer , Shawn Guo , "David S. Miller" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org The Netronix embedded controller as found in Kobo Aura and Tolino Shine supports one PWM channel, which is used to control the frontlight brightness on these devices. Known problems: - `make dt_binding_check` shows the following warnings: Documentation/devicetree/bindings/mfd/netronix,ntxec.example.dts:49.17-42: Warning (pwms_property): /example-0/backlight:pwms: cell 2 is not a phandle reference Documentation/devicetree/bindings/mfd/netronix,ntxec.example.dts:49.17-42: Warning (pwms_property): /example-0/backlight:pwms: Could not get phandle node for (cell 2) Signed-off-by: Jonathan Neuschäfer --- .../bindings/mfd/netronix,ntxec.yaml | 13 ++++++++ .../bindings/pwm/netronix,ntxec-pwm.yaml | 33 +++++++++++++++++++ 2 files changed, 46 insertions(+) create mode 100644 Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml -- 2.27.0 diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml index 596df460f98eb..6562c41c5a9a9 100644 --- a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml +++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml @@ -31,6 +31,9 @@ properties: description: The EC can signal interrupts via a GPIO line + pwm: + $ref: ../pwm/netronix,ntxec-pwm.yaml + required: - compatible - reg @@ -53,5 +56,15 @@ examples: interrupts = <11 IRQ_TYPE_EDGE_FALLING>; interrupt-controller; #interrupt-cells = <1>; + + ec_pwm: pwm { + compatible = "netronix,ntxec-pwm"; + #pwm-cells = <1>; + }; }; }; + + backlight { + compatible = "pwm-backlight"; + pwms = <&ec_pwm 0 50000>; + }; diff --git a/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml new file mode 100644 index 0000000000000..1dc1b1aba081c --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml @@ -0,0 +1,33 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/pwm/netronix,ntxec-pwm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: PWM functionality in Netronix embedded controller + +maintainers: + - Jonathan Neuschäfer + +description: | + See also Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml + + The Netronix EC contains PWM functionality, which is usually used to drive + the backlight LED. + + The following PWM channels are supported: + - 0: The PWM channel controlled by registers 0xa1-0xa7 + +allOf: + - $ref: pwm.yaml# + +properties: + compatible: + const: netronix,ntxec-pwm + + "#pwm-cells": + const: 1 + +required: + - compatible + - "#pwm-cells"