From patchwork Sat Sep 5 13:32:22 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: 11759111 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 3A81B618 for ; Sat, 5 Sep 2020 13:34:50 +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 7CC992072D for ; Sat, 5 Sep 2020 13:34:49 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="rcxhAWxy"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="dKmlOkci" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7CC992072D 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=Ma/OWbWJM9U6M/CkI8K2lUbnCSanEVTgCMHDUtEpSas=; b=rcxhAWxyrey8MWACRlAJLI8yt UseAqvQTFPjiVsyGnBFOOo1C2h44FIgvHGIFE0O2iU23J8n9GJR7LKf6R/2d4VY/CtCo3kjrWDHRu o8AblObNrS95vqtOK7G/bhSXroXoH32iufjiw+O1GxItsaWmMRxlcWn+sfVuNRMcL82udiO8nsXx9 4wqQ8yNP60IxAaytaCyVHlcemi3LAIj5rQlMY4tS3wV4VfFO0Tb1ummqPr39NeKtrfiYvhKpsmDn5 u+Hl4yQiWw4D3xg2hlVEApEOcSmtIamS4CChp3Y4da3CF5pc4Tx2VI9rPSI6xyUOeKurwxWOXWrTs hWOU5XTRg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kEYL1-0006Cl-FU; Sat, 05 Sep 2020 13:34:39 +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 1kEYKz-0006C3-9T for linux-arm-kernel@lists.infradead.org; Sat, 05 Sep 2020 13:34:38 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1599312831; bh=dUozDayDb3rFWMmvDYXmPqx3PtWjU/j5UWsQB+GibEk=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=dKmlOkci75mW5whWMWqHXkc7HzP21sXxTAwPH9lCJ2HOB2zShwVgnEz2YhZhvRAHv 1SAYqEeAsxMZ4h/uouL90pLNPtbfEb4QynsxhJ3PagmiF634JkfHkuh/44xyavmpMv V6gsxA8eYEdfzUueOCVbROPIu21Y2uXCwO6oYpTc= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.195.151]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MsHnm-1kXjrp1uaw-00toAA; Sat, 05 Sep 2020 15:33:51 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v2 02/10] dt-bindings: mfd: Add binding for Netronix's embedded controller Date: Sat, 5 Sep 2020 15:32:22 +0200 Message-Id: <20200905133230.1014581-3-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200905133230.1014581-1-j.neuschaefer@gmx.net> References: <20200905133230.1014581-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:KsJzyKCQwvS5BlRV0/850L0IdR6x4/dBrHBq7mSHZliTz8m15VR aOCXTl1oQJda9EIus66MyDVy9PVrf1df1zrgqUz4Zt/YXICmKRkNMGBR84B7sDEgDl3+yba WkmNDtiG8VAfYfRitvk0Sy/ovX8cTu8e+ETW3EFKXNE/zZXMgz5druzR5fVPayywYP3zLdG 6HHrIm1Ttfw/jGrYFXLYA== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:71DsHEi3L3I=:T10erDS9EyZBaX8oDbQspC NnhLkb2BRMKd2VGqsu6pvf0KwC8U0EB4I/CLxB0+dBRXqhL6VdBKSiixDvh9ilJKLUEFIloyf lLNP7y+rKRIzPV1b0vsbLZ24nICXSvLQEHPgRYqtS0WC+G5fOsFeXfbmOEMP6iLPGsTH+DLYN /P6ISkyF/mR+OFr8E2iu1KTxrwkOLY0SKHmDwYbn1KDAEKewiAOa6QRBliIPLPuUfOLRO3nb7 CMx9HDsm2qYBTFwFNAXPft4SFJJEwY9mPQOC2clmdotuzhTvkDj0qqkSYr7b5igVZ1vGhKGZa ZfR1FlrKToOoSM4+GKdZgZdw41xvHhNegdUfHYNKL/58hKf5+qqr3f//iitYkGNV7jt5u4d7s 55eNY0S5Dl5B4BAJ9H3jgntd47FWvzbgTW+HMjAkrVLKzhnQlsplyTahpHP7SACM+OBjDomif q2RMYQWUMMkWRXKi5Jc6q2/KfUIlRvduoL/l3oR0G7D+RP8DmHSLujzrEtd+zbsUSVQIAHSxo IqLl3OnNEJdSelMuyAQCZHuZxJT46EOBsQSNzsqnK3GzbVX9zFYM4PuwTseaRyl9ekBsVIQoH VuHQrByq7A5x0DoDhE0y57pjMFR9DPFNFeTr8GZYtX6N8KD0wWzFg7foz3qsBStmOTlQIzBxS b0Gh4hj9YYyEFVj47XsAny0O5atLVzYv81ICQLM8OlGQ0ummRI/XjzO4ziD8aR/jzfg9+/TSa pFoG49va7jen2OTqA3EFVTUQQxuoK9reubfYy7wGD8pEjS77TOnE+/vOMk6UDLqexqZS4y5XQ EsTKGyg7/OByN2itgH0KiLS56RBqDDNjjs2UBgv1hW0GGQ7zrJ4GNCXaD3tn/ejgVfCrppFEY XnTGMXRdBn0cisd6nNk87J7B0HjPoj2AOwB5sJ5b9DV6/5nftONQfU2lhMI/pKO7gzjDe/TK2 HupgCbDeKR2lJJEJLpjDPMZXcJivy2D/ODfbSnY0GrqkW0DeS80pjS+u6VQaCpU6QULA8xkxB ErDc2fEfKVoj5Sb0ab+Mz4qVwAxifJPH11aZE4JfE78Y/f6AY15y1+qCwr7qyMeW5K4ckut3l oSPtih6LwglvqwwnDSQ706lXum2bZ2nYADUro47ZvI7hAWs7rmm7BewYCHymrrB82MYWMAVIq PISxogXIVtjPC+WZ190wbn3+CS6vYeWf4IXVoS3OveYqkYJJYmCfe0Od5FUAHswMq1WTdbQ8u zkmSLVDrSBiE6P2Xsl5NALOXNr0yzhAN4HcoAlQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200905_093437_547019_6AFA4C5E X-CRM114-Status: GOOD ( 17.08 ) 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 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [j.neuschaefer[at]gmx.net] -0.0 SPF_PASS SPF: sender matches SPF record -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 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain 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 , 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 --- v2: - Add the plaintext DT binding for comparison For reference, here is the binding in text form: Netronix Embedded Controller This EC is found in e-book readers of multiple brands (e.g. Kobo, Tolino), and is typically implemented as a TI MSP430 microcontroller. Required properties: - compatible: should be "netronix,ntxec" - reg: The I2C address of the EC Optional properties: - system-power-controller: See Documentation/devicetree/bindings/power/power-controller.txt - interrupts or interrupts-extended - interrupt-controller - #interrupt-cells: Should be 1 Optional subnodes: Sub-nodes are identified by their compatible string. compatible string | description --------------------------------|-------------------------------------- netronix,ntxec-pwm | PWM (used for backlight) netronix,ntxec-rtc | real time clock Example: &i2c3 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c3>; status = "okay"; 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>; interrupt-controller; #interrupt-cells = <1>; pwm { compatible = "netronix,ntxec-pwm"; #pwm-cells = <2>; }; rtc { compatible = "netronix,ntxec-rtc"; interrupts-extended = <&ec 15>; interrupt-names = "alarm"; }; }; }; --- .../bindings/mfd/netronix,ntxec.yaml | 57 +++++++++++++++++++ 1 file changed, 57 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..596df460f98eb --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml @@ -0,0 +1,57 @@ +# 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 + +required: + - compatible + - reg + +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>; + interrupt-controller; + #interrupt-cells = <1>; + }; + };