Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1602086ybt; Sat, 20 Jun 2020 15:45:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxPqJkb1155/7UywveybEcr3H968vGybQ6YrNZMkLShkjsYfM7PIEQbk7BfGht9sdV3WSDE X-Received: by 2002:a17:906:1f0d:: with SMTP id w13mr10081595ejj.0.1592693152121; Sat, 20 Jun 2020 15:45:52 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592693152; cv=none; d=google.com; s=arc-20160816; b=a7LywobLck0q7bSZMD4WT2uq/HMOXxAywbxwBLHk2hYFhgbBqsIWhM17JkJLgG5mK9 bcKLotOa5143uaUSn7kmkd3LiN1T7TLfkqTVlOngylaTwVzz0+CIZnoBQSDh2ivnB/K5 ksTOvdhpVla3xnLQZB4+I8gteuBTBr2MfVW52sDyxEFxvJRw/7rZ8yRtgPQ9bT2Pz7dc OGg0qegcc5bYfxuAYssjur51Z0W4N55tjWoY3yLRzgdZoPGkwz87wQTVQ1eOmPUzrFyz rBgUGAQy+YEEps9wp9ESXOzW3DPKR+Yr25NbJZkyXI72AI9Z4pT2HeUDRspGoX5/Lv6C uivw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=06KPuJThpazmn2WcMq8nuwdfCe3hdYtpq4G7d9Z0/lw=; b=qQyjtdCWL7msxnFNwssm1WQK3QwGyfNWxvaMgMesqsf42xFEoq8ivQrOAp8CdDnu51 zjb39YT1Yin2wfksOC0mjtWUDcRdNVnFgB5XDT7YYYl4R2PdXewKqOHrac8tC/4Pv6bt 5THupfKRZ8qG5/tMOwMwYbXDhGk2kUHws++2jL9XVJ8K/F0m2qs6pVtIOlgOXVfjW3WB VvKq8YDgwSAT7u72m+frnLWhIqG0WGVZOWNnxZVUckabpbfl/v99DSZIixlka/2GLaSp D4tpInC6Fwv23H9mVkQeQ/TFUj/qaHYFhZ1zVHFYuDIbqa9B5j8x1AMforVeSaEf3qhD xIDA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=J+FgROFF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id n15si6563917ejd.527.2020.06.20.15.45.30; Sat, 20 Jun 2020 15:45:52 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=J+FgROFF; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729097AbgFTWnm (ORCPT + 99 others); Sat, 20 Jun 2020 18:43:42 -0400 Received: from mout.gmx.net ([212.227.15.19]:36951 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728892AbgFTWnf (ORCPT ); Sat, 20 Jun 2020 18:43:35 -0400 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=20Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Cc: Lee Jones , Rob Herring , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , Alessandro Zummo , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Josua Mayer , Andreas Kemnade 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:cHtrETJXmtzDsxaAmeos/P2xE+50CNmj6sgaAzFuUOlSUWq/6Ys cqIg7vWmvwXLCa21o6GeBXwf7oIpciGmMqEZBvyiohhFZM1XVsvYPlRTVOpG6EouIIfpHjN oRsfkw7/ClzqOiL+Ze+SJxfetrwj8+i5loPqfXmdK6ge0n7fr6C0p4UdWe8JtrynlkTEetf o6hOJXw2ktAxvqog9HAtw== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk: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K6WurPDfcgGo7nc0XLaWxFV23mCGRplOl0wIVexTiT7P5ZX+0/H2CBUg1iNb/gUgsUz/OvYr NHO8JLR/iMAhn7YqXEib1JicjAFSXpl7DZCkiwZlBCf0qq3sZ9SQZ65/6ZdcYN44uMkx2/tSr JUicJiTDBAVIjZFgVdM/hOgF2/wViONZSXF3ZCMfWDTBXZHst1/sSne2cl0mqYQKVr5KeVl9W 4L+uoGkI98FY33KXZ Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.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-4= 2: Warning (pwms_property): /example-0/backlight:pwms: cell 2 is not a phandle reference Documentation/devicetree/bindings/mfd/netronix,ntxec.example.dts:49.17-4= 2: Warning (pwms_property): /example-0/backlight:pwms: Could not get phandle node for (cell 2) Signed-off-by: Jonathan Neusch=C3=A4fer =2D-- .../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-p= wm.yaml diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/D= ocumentation/devicetree/bindings/mfd/netronix,ntxec.yaml index 596df460f98eb..6562c41c5a9a9 100644 =2D-- 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 =3D <11 IRQ_TYPE_EDGE_FALLING>; interrupt-controller; #interrupt-cells =3D <1>; + + ec_pwm: pwm { + compatible =3D "netronix,ntxec-pwm"; + #pwm-cells =3D <1>; + }; }; }; + + backlight { + compatible =3D "pwm-backlight"; + pwms =3D <&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 =2D-- /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=C3=A4fer + +description: | + See also Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml + + The Netronix EC contains PWM functionality, which is usually used to dr= ive + 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" =2D- 2.27.0