From patchwork Tue Dec 1 01:15:08 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: 11941795 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-13.8 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8D62BC71155 for ; Tue, 1 Dec 2020 03:18:40 +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 EF2FA20725 for ; Tue, 1 Dec 2020 03:18:39 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="cXO1jBXN"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="JIS1qeFF"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="FSlC2zyl" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org EF2FA20725 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmx.net Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.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=FOG+SRJ7ISc7U76KPdwZThNfdWuLdLo28V6CWC4UZ6o=; b=cXO1jBXNHQXbzLAZVyd4f3AcS ZQ6UhSWlGjIVrBg2QZLcEftggwHCPr+Glj3+h/PpxWAcs9VZC80SRDt5pP99D1miG5tKT+wopqA37 h8KKgRsnhbpNM0mHvqhIn9lHDJ9CR7oB7fcMGPwGuHqRq8QEBvYZ+qkWUCJ2tRUJ2dTQFmfzxzU0y K9MStv5Bsl5wkWDK2VZFRAUqNlXCbfpGGZcB0UhGzIRoesI9925F58hY8bFpPI4LkW1thDWNbgkrg UvcW6oYKFkBlmF2hLFZc73oBobGwE7FC0e8QrnOgsLz4Df/pIgZ8bZ8J4c/6K5r4x00E8p3W/4UBA b/0RppuTA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjwAG-0003wi-O1; Tue, 01 Dec 2020 03:17:16 +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 1kjwAF-0003wM-0W for linux-arm-kernel@merlin.infradead.org; Tue, 01 Dec 2020 03:17:15 +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=pWcpX19pq6ztBfy/XyhjdxDJa8SoQ/bMutaZiEWC+64=; b=JIS1qeFFbV8DxBMdFB2X/TwrKF aoPDHNld69RMNJtn/Q1T0UHrglX8jvecnd1qwj7rMDpKXJwepY4s27pZb96ChC0AvPpY4S58+z6LJ FBTaIP4a2fBu8ZPr0nDMiA64bXQ/EtrKtu2nqK7lCFV2OY42uiIu4367qx2VP/b3Zl2S/MgOY4xLD 8mNww19j2X5AiJs8TkRly/FAlWnoONmQjZzTVk7JD0/tne6WplbbcqqeChwpS2QkjL3hKI7XZtG+Z zcYf2qzK+wuoVdN4l51eiprM5iAMoY9XDZtP5KlgUWRcPl9IYwZyBZlLE+nPhJ+BjrN0V70cQuH/f ZNsXxeNA==; Received: from mout.gmx.net ([212.227.17.20]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kjwA8-0004RT-Qx for linux-arm-kernel@lists.infradead.org; Tue, 01 Dec 2020 03:17:13 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1606792583; bh=oMV1BsE+zyZdphaHIIA7I4yA5HiRt24ClTAmEH7qgi0=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=FSlC2zyl4E9+Oh6GYRbIopFfsFjQ04dd7R4VGLqCIeMzxder+iELESfFECrhgpBlo hVxPYtJK1pFtnywtp7qbxaVyMMrp8DqrJ2D5shTdOrzwgHFvBxH3h6oseY45tvn6EY EU1zhK06FhWuVl2Y2kEYv6Y4+BRZx7wjDpQ6j5Go= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.214.162]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MacOQ-1kDMUP2AYs-00c7ur; Tue, 01 Dec 2020 04:16:23 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v5 2/7] dt-bindings: mfd: Add binding for Netronix embedded controller Date: Tue, 1 Dec 2020 02:15:08 +0100 Message-Id: <20201201011513.1627028-3-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201201011513.1627028-1-j.neuschaefer@gmx.net> References: <20201201011513.1627028-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:Vz3vJigvuTH3GzmHI6h4VbmnOp32aE5QRt0GwXcvdVOzIzllyWS i8BVZm0ZfXdpS+MZsTHTJIF8KmT59/cOCJpyhN8zJJp2BnJcDy6bls40rSuAlntjAyXQi8u jUQ3RMxz2WtfSS9a/XLotrBYWsQp6Zv8uCEBMn1rGB7UyIecwwbeIGN5+Xp1EzinOPsO+GA +W7oFQX9jiIxQyb2t+3mw== X-UI-Out-Filterresults: notjunk:1;V03:K0:QQq6oDqUxps=:6T85xH+8S1ysT0AdqBKdwb nXmG6NCoxCSbF1c1dIQDo3gGyPzoiAZXMTppcsdD8eFzmnJoOuSaUrn5hYLSm3O/nfglFO69Q 6bXObsFyagScL01w/nbxYqf9gcto8myDVKxoMxaU6QAFchz746ubYR5PqsapaLQ2YRc/RpgiY LurIj3IyNEBNG0IvB3fmJ1tOD8DBsun5CZrKSAmcAvt61a+1Ji1ktJVKcBR+3By9+a1pKeWAQ UV/HX3GMDWrU1J9dJGd5wz0JVWOVx2ijOix9Bw8XJCUG538sheMEH82nX7DUT8Ul/zSdnV+8Q D4ltVBtFE54LcKULOMYeFuF6XoVxxU6RRp6ONH3mCTpyZSrVq0CdGOIdtDrTgDC7NA+ub9hO/ CsGp6QVsbBqcutezZe8usyo/0p5+aoEVLAOTJzOGEKMvhurY3Bt7+fDxJF13CxV1DlhhhzJXt n4+NWlG1XAZIejiH4VQlJ/NRsflU4YbHVIG6X6O6kAB4r8VdadrXl3GWGoHxjYbyOjJaJbEs1 gFP6PqL8KQPtAWpZCRaiXnWntjcTKCRNf26bQw7UsivGD8SLpGT9Vv2PSsJwT3XqAO5DRF4Ws 2AA+qCnoAeV9n8/egeO29BO6NXjh+HJNq/drbb9WcVgHEz5g6PcFmNoEimH4c4CRZJS6mCsKK fOUYPfa/9Py2ufiT23VxK474NWUZQgoiOU5l3/FmOBZnYVTGvWCIqU+2if2erW0dblh2yPOPT OjfoUHoBh9cC2rU0oCIokRZgaTLkWZV3XnNhhgciOkFqTp7H8g60X8C+/LaGd1OvetML7DZyL a+EKc7+e8+AMd9yLPLxLLu4Kfb9S44uEsopMVMFIGA1EQWYI/Zi8Eya0Y8r8oJRoLp+BnVKvZ Z/wyAbEJUaBLju9+NJlw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201201_031709_539777_E6466546 X-CRM114-Status: GOOD ( 16.36 ) 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, Rob Herring , 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+linux-arm-kernel=archiver.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 --- v5: - no changes v4: - Add R-b tag v3: - https://lore.kernel.org/lkml/20200924192455.2484005-3-j.neuschaefer@gmx.net/ - 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.29.2 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"; + };