From patchwork Thu Sep 24 19:24:50 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: 11798151 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 58519112C for ; Thu, 24 Sep 2020 19:26:54 +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 02C8E221EB for ; Thu, 24 Sep 2020 19:26:53 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="XvQE9/15"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="hsSQXm0O" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 02C8E221EB 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=j25h68Mz2AegngWLR8cmO3fHJ/emOaKRQaqy5tBYfrA=; b=XvQE9/15NPgHH+6IogccPFAzW ePqES0QhCuEZMc8LY8qize4a/EXQxmw7qycDwh2ZvxgcDB5oMXPCuaHZAGeVzsHPjQoNvqbbgVjFS 4T609/VsePKLrLFXNjy92i77z5+/MbbC8IojQJuP3qnqFok8kxy26F9m2o48zaRNOvCb/lj1eOjDp Ft4czX2TAt3ddl0Y28VKmr3Rr17EGnhaILndRUhOPvbGri1hcb3kb5AA0xv7IORmiWN/6K2j7l5OV Xtd15MraI3iZcKc+pLhHQt3yV4Ym1gmhKfCNFrwaJPQkO1+J/cI+k/aIvEYO6O8F1XtSNOSxhTiCb Q8G9Bg+1A==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLWt7-0000XW-Mb; Thu, 24 Sep 2020 19:26:41 +0000 Received: from mout.gmx.net ([212.227.17.22]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLWt4-0000Wi-Bo for linux-arm-kernel@lists.infradead.org; Thu, 24 Sep 2020 19:26:39 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600975562; bh=4RP05Hxu1YyFCz7+DB7beV9x6hPWq+uDXnTvDpZdY6k=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=hsSQXm0Oq6VogrOInBGGpvEucQOQbIzFwmoIikwUhl9YtvqFJWXti50juDgryWoxv mdbUNoIbQib3Zb/qBt2P6tnjB/NTqCZ73ecMj5LmyMVFeeeAb5EqT+PGljsKcHQEvc Gwcyt6wUf5OaDgrfAIoJlKlQNQQ9iF6IFn6Ew9SI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.195.151]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1Md6Mt-1kvPez1hel-00aA47; Thu, 24 Sep 2020 21:26:02 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v3 2/7] dt-bindings: mfd: Add binding for Netronix embedded controller Date: Thu, 24 Sep 2020 21:24:50 +0200 Message-Id: <20200924192455.2484005-3-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200924192455.2484005-1-j.neuschaefer@gmx.net> References: <20200924192455.2484005-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:qIN3ysCKzKV3E5U7e0Zvu94KfThse5uh01FGd94RNlLA36XGY8l Y1vNOclGmg8YGMfZO+sqyDVFSUMVMtr2YvjymT4L8q2Xk/YfkQoNim4gVLoCPVe2CXuZZS1 h4YG4QJsgnwg/wR0GoJ4PM1kFUyfAq9cy4P5UTu8eFV4SzakZ7JCPjDt3sfIayylmpAnlEl 1ptuHS16ONJ7Qqyk98g+w== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:q1gx0ANm+Fk=:Uz6o9t87EdUULbT26pkTS4 I2waJcKQPiiBL+aMyrZLnMslGbyFapvEowFE29Kbj0xBkefSUaokU0YVpDDt8Ot2yJpiH5h+0 +N+BEIAL+QpRD7/yTAk5kK3F0rs3nbHTrIPMrDUQ7mYJAUK+h9sklqLqYB7gZR0ivPDvTzqnE Uk0c4Jt5cQHsq6oCppD1stKsvUv5IQ6VZguMe41uhzfbBL83NTtKwUY6TKs+fyREVrLEvPU2B UL6bbIDrvxcn8ecJ91i63WrqT1YITn0xpqEPX8Xpg5f/S5irZXY8idtSkxgejmg50vSnXDhpw Q7YRvWa/CHE0oBhWQ/bXC4ikgYgvComa7VlPBOiyHSUcJ2LVi3RDFCTdFoqHRAvAQgLSlXeSr Dg36yzFFYnzCB7pILOfXHe4C7KWvdfQcqsryrEH7lmb96LVFGaxy1PAIzv+P2FG+xgWXE29lg y/ghHP7QZv9sUNWSJAv0Unj/rDTV1P+JHxDg3SZ2n/x3m8W+tjwUvVDN6WByYKmKq3ATaZkdX PVaztpDYMD87WK7RRpM5Ek+FfgJRW1rH55Qh75MOovC0aRG1gvttKXrNdqHWKa67rPVnzkzYW ryY5R5En9JMF1Q2yD2u49MJ6hy1Jp1rQjvr2JvjxdIQVyuqhEfXj5SV9MIPliFg85dbTDDKcO GZm2F66mRhZycfdoShPZC38S/lKZ86Hd4aLEAnnfFQyUHNr76/unKOBBQvhTO/FWbNA0Cu3iP yujRNLKPbPovjXylO57SNtWxylRPegneu66g7WHsNkK2vQ8DNaIjH6m6UkKPdUyBUNXZybP7Z tRSHcFGKkPUAP558qGOLFP0y4oTF9iYN7kB8QuEXYj50fg6eMGAhwzsIi7X0T5jQ2QSI1J3ND /kr0FdfaGTWUIBCx7lVtdMaHgu0OkldW74W4B2mAv0l4xv4EdOxFDrFoMAMwTkcmoIYRiA7x5 sFIDZjzxEz5mHQOo/0Ga2kYuv0u3/aKyp0N0reVdW7frfHIXh+LiDEowctzYT3w9/l7bhlb9F FRYAdrzngHBVxOcnRhqw3tjiJ0dVOHJQNx/Uvrj1SvLBOropC3Ib5Bl36s/wcakT1oRzcCikL bENd1KNA1xCi7axkN8JAuR23JGyAHDslFfuWho4xOcgJxZBCEBjIuxQbeRZTS2ZMhCkXiUVsC FeQPqlc49m9S4Q7LBqCxGuuUVQ8n63fb9GfEStPB9StFA09GuN32TesFa81l+ULgMrgz8/aw1 3uZsePsDv1RezN1dCSk0NmYpM+Q9/17jdJ2craw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200924_152638_615055_42C1A2B9 X-CRM114-Status: GOOD ( 18.14 ) X-Spam-Score: -0.9 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.9 points) pts rule name description ---- ---------------------- -------------------------------------------------- -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at https://www.dnswl.org/, low trust [212.227.17.22 listed in list.dnswl.org] -0.0 RCVD_IN_MSPIKE_H2 RBL: Average reputation (+2) [212.227.17.22 listed in wl.mailspike.net] 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 Message has at least one valid DKIM or DK signature -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid 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, Arnd Bergmann , Mauro Carvalho Chehab , Sam Ravnborg , Daniel Palmer , Andy Shevchenko , 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 This EC is found in e-book readers of multiple brands (e.g. Kobo, Tolino), and is typically implemented as a TI MSP430 microcontroller. It controls different functions of the system, such as power on/off, RTC, PWM for the backlight. The exact functionality provided can vary between boards. Signed-off-by: Jonathan Neuschäfer Reviewed-by: Rob Herring --- v3: - Remove binding in text form patch description again - Add additionalProperties: false - Remove interrupt-controller property from example - Merge pwm/rtc nodes into main node v2: - https://lore.kernel.org/lkml/20200905133230.1014581-3-j.neuschaefer@gmx.net/ - Add the plaintext DT binding for comparison --- .../bindings/mfd/netronix,ntxec.yaml | 76 +++++++++++++++++++ 1 file changed, 76 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml -- 2.28.0 diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml new file mode 100644 index 0000000000000..59a630025f52f --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml @@ -0,0 +1,76 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/mfd/netronix,ntxec.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Netronix Embedded Controller + +maintainers: + - Jonathan Neuschäfer + +description: | + This EC is found in e-book readers of multiple brands (e.g. Kobo, Tolino), and + is typically implemented as a TI MSP430 microcontroller. + +properties: + compatible: + const: netronix,ntxec + + reg: + items: + - description: The I2C address of the EC + + system-power-controller: + type: boolean + description: See Documentation/devicetree/bindings/power/power-controller.txt + + interrupts: + minItems: 1 + description: + The EC can signal interrupts via a GPIO line + + "#pwm-cells": + const: 2 + description: | + Number of cells in a PWM specifier. + + The following PWM channels are supported: + - 0: The PWM channel controlled by registers 0xa1-0xa7 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include + i2c { + #address-cells = <1>; + #size-cells = <0>; + + ec: embedded-controller@43 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ntxec>; + + compatible = "netronix,ntxec"; + reg = <0x43>; + system-power-controller; + interrupt-parent = <&gpio4>; + interrupts = <11 IRQ_TYPE_EDGE_FALLING>; + #pwm-cells = <2>; + }; + }; + + backlight { + compatible = "pwm-backlight"; + pwms = <&ec 0 50000>; + power-supply = <&backlight_regulator>; + }; + + backlight_regulator: regulator-dummy { + compatible = "regulator-fixed"; + regulator-name = "backlight"; + };