From patchwork Sat Jan 16 19:48:21 2021 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: 12025019 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.7 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 A15FBC433DB for ; Sat, 16 Jan 2021 20:04: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 5D7302078B for ; Sat, 16 Jan 2021 20:04:29 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5D7302078B 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=pS8Wkhi2IDdmKmsSzy/umJJPJUM5x19QISCRSW7TbzU=; b=Gn1JD6///00D2cNVb8zogWf14 oEGfgOsddpPpvdWyLxeLvdpIWCfeHwCYxYaYE1cL4GtJfz/e02Z7zraaHR5MzYAwKhFCj6TMfpmrT bz9YS8N13+JNSjfqND8dgp4gKil1BzIrlRgdycWt2GH9yF6e5+NeN3IleFHUDQHa0osq0vzk8FcTJ xOq46C/p1YBDZx2/RZJSjmdEtcl40mhbwE27AvSA/rLNpAGtviutJvY+DaJuS+mdUAE1mOGpgUdGa kIVp+Wvemajfnv3NIb9VNZViLjerSpCJF3TfAM5dVUoR9V7Cc4hPPXSQnwPrOu7Anva+L84rcn4OX 8SMZZrWzg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l0rmM-0001sn-JX; Sat, 16 Jan 2021 20:02:34 +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 1l0rmH-0001sH-Ev for linux-arm-kernel@lists.infradead.org; Sat, 16 Jan 2021 20:02:30 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610827339; bh=qu0Nv0k8UIi/GWgWvwmLRmyI5GZIM8QL8R88849zarE=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=Mjdc0p6devemZE0NU4r9xg3jpnKSXechRofesiUv7DFyb+A7h1zvlwkhzkm2UWqJq EaPnXJe/82gr5l/B5u9u3STaY8ktMrKE/ieTFWAFTn11SiXzNVnOx7932mo0zoBOjJ e7lvQaFNxyHiwpaNa7nlmlWiAVAzRrWRTqeRUAFw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.215.209]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MStCY-1lTz5S2vq2-00UJe0; Sat, 16 Jan 2021 20:53:36 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v8 2/7] dt-bindings: mfd: Add binding for Netronix embedded controller Date: Sat, 16 Jan 2021 20:48:21 +0100 Message-Id: <20210116194826.3866540-3-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210116194826.3866540-1-j.neuschaefer@gmx.net> References: <20210116194826.3866540-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:9HvTZzmITnHdkKjxY+6LjIGBOUZXAFxxNbfTkOacLyWIUqGwcNi nejIXml6JblxkoT4lz8IWr5m1+oJ5Av92Ql7/iolimuoFJyabY2Tlb8H/2s+bffl7Ei1C3O 11M6UIJVcHHAcCxftzndk3B58K9EwDoDEZ0vVEv9Pkf72BVDyMSkVkLd1aBfjCfCVNAhYYf VX4tVoNPRlGvTOmMJCIgw== X-UI-Out-Filterresults: notjunk:1;V03:K0:41X/LMvvQJw=:zfJzEA6dvsjG3H2XiplRUX rQ4Z7wEfF1AGaMBRtAA2NR0I4ixqO7Cmjbz/8tlLiHbkQieRRAwcNENTSBYS75ugVnwNhjIY8 9I4Zys3SCMmZ1YR7tap0pOWm8zgFxClPeNDb8JO8Tjh/kI03RCgfMjfCgcu9ibikIlAznw7gv 8Uje9djCh/HzWbVdrO7VRpnfBgmn3VxSOtjA1bv3QVN6ruxWv9IJBM7bjcFQOtDPfVWNfzVGp +cnkrJXwnioDVugP1zM85P/O4NnXxbNCEskjkUWQdblfDG1oZ4SD3zfyvaQs2pMJiwwsd5Pyo liIeuWAqBETf5mnBoV3wxrzhVeQijyywaamO7O4vm2D/dpQCpMiIQj4reSEBekFKNdBKwDP7E sE/gVzQfoRzsVKisW3oVtt0p1gAZzzY5wwBO5ZyKviP9oK5hr/TeWhXiTqImkNqvpD96i3FGY tkAFhjcDolbwXMuAO2DPo64Z9xdqyixd6oiAnXUvfC6pqHHb+c9e0HleYy21x00GgmUvpULLq LMyEIC8qPHEkrtg48DsEZYg5Fk41IiAe+Iki45JeKydZMx94hQqNhWa/UpJmOBSjc5y1jVv9w lZb2IyNUhGwR364Wg4ieDaBJj6LGR3X3Y0/yxZhAN6OZt4kABn2MxhB/uB+NvlmkYcGE+teWp M6/i3bsEqaN8rsAvpeYPIHiz1nRTuiNQoCPHBmP+7EflLCT00gaccHrDTmSh/WJaulCavsfUW K+rC0xFIuY5LiQF82XLQq0EjjB3H8Doi6Et7xYX2qvXqPsCy1174UVtHEJiqjPfYNyX7nJpGl Pd7L+6Cjr1Ooy0pytA6WMwiMkRONPySVq2Ifbf07SvhRElZS13ZwC6lEnDIS340NBbvmYTsUY rNVcJ0QYADDnhlF+/Ccg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210116_150229_814347_338019D4 X-CRM114-Status: GOOD ( 17.02 ) 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+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-v8: - 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"; + };