From patchwork Thu Sep 24 19:24:48 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: 11798149 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 E8599112C for ; Thu, 24 Sep 2020 19:26:43 +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 758E222208 for ; Thu, 24 Sep 2020 19:26:43 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="DqAvq5VX"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="Jgg90dao"; dkim=fail reason="signature verification failed" (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="Htfk9GXZ" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 758E222208 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: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:In-Reply-To:References:List-Owner; bh=RPqhy9LOZ+zFGplPwoHNMah3dbIVp1Z7R71rnbZ6iTE=; b=DqAvq5VXmHr6welF10EdA4i2YB cATOIeOCwWUM6zNrrhz6UChWJF+AeLhMI3zjfgWnJCnF1jtNBtDwYmekVoTFIMpoTh05KPtk/VfYq Yi9xmCtX0DTjCg0zw2xEtFVdTR90hjS4Idj3LiI1qXLPpLQxPJc+OX7Of8Iz5g0H++s5GIwty+ryV UsanySmDgzxmFHKUlEErmhI76DZEXBDfFVGp1x0XWP001yXh1fPdRvnCVa+8NjwaoZEuYGTvdiRgV qmG84waWTuCqcS4nKD9oTDiCl7f8WFaIU99Z1WlcfqhMUZENK64lNNBeX/rEXYHPW7qecfuqeRYZq Y5//h3WA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLWsn-0000VH-3n; Thu, 24 Sep 2020 19:26:21 +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 1kLWsk-0000V8-To for linux-arm-kernel@merlin.infradead.org; Thu, 24 Sep 2020 19:26:19 +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:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To:Content-ID: Content-Description:In-Reply-To:References; bh=tpFCET7OxGXS3G0ijq8vEgwFV1vEVAScMYBT3Ch6S7s=; b=Jgg90dao5yHFdfNXdPJF3M+cu2 u9u5uWdjV5oLs9EhH14agz/PDEzA5et0ukGe0rZtwJhJeOQWq1V+9AfPNiqH6M8IpkqOPtv5N9a5s ZguZDYsvmbwsDlEq+54QjI3qcsNzHLIOvDPxfT6tg5Nmk1RUXT+uu4WY/v92C4WmZ97anOCzJCwz2 8fX80TWj/ZJKPGPr/rW6fYcDfQO2bsfWrWkEEH/CI3sNP4GESXfdSjUXynwGroDd9wXAcRqp8Gw4Z fjA4aiyznQhcROCX/iSBYv7/0CggNuk8ejhlHc2GJAf/6QLKHbPRK3IAIg7DWttmgUKmz6hRtLeno 5StCMixA==; Received: from mout.gmx.net ([212.227.17.22]) by casper.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kLWse-00079W-Bp for linux-arm-kernel@lists.infradead.org; Thu, 24 Sep 2020 19:26:17 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1600975511; bh=xvKpT2sSHqHPJQ8jydYdVwKtyMXMEaIf3CKJyHKFaRw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=Htfk9GXZjY7fVSEmBQn04kVLARb4ZcqvPGBxFmbX+YStHjRUmygQfBQDrt7TtbX5r epSKEZquIUummXF/eNdL+eiUDR+6+PQloJcd2MpSqtL8oOz+5bKDQ/H/YWs0GT+8MA nNleSZ/jngF2Zwj0IVqKwWxWQmuEeH+khudWRMZ0= 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 1MBm1U-1k9POE2uxI-00CBUJ; Thu, 24 Sep 2020 21:25:10 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v3 0/7] Netronix embedded controller driver for Kobo and Tolino ebook readers Date: Thu, 24 Sep 2020 21:24:48 +0200 Message-Id: <20200924192455.2484005-1-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:IhDg/ovkn5AdYA7QuoVxKZ58LTbWLOf0Gah9TeIWVC5P5Vq7OX+ rTcniKqkXxZ3MF+cRtLPxh7uQhf3icDZtGW60DLHKALB6ONkAGSL3t7gVs0IjaFJvuZfoZF /mb10k0XVoKRCKwfHifoifIta0u+xcYK/opArVe6QFKfFVz4g5ytFEAXaLQKd1FC1r3joOC as9tTuGSa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h9JdkJaDGxJN4c0qia0o1vonYgcapUi0BdKnMxaUXfw6mJzRj/pwJt5b BHsKD6BmIk4SDnt2f2jvbaKn5oT6WCGXWAe8i5e/I9P5OVgfs/oQwQ/DAwoVu6AS2aQLyAoTX 8Pb77K0cl3QgPB8F0IXOopTFZMOtRHEKLLoOrrPzNKh7evFuKEu+lM5Xo65S1RWAurQCVk2SO JZ+wI6VbSeFjOH/mVV0KmGvA+Sk131MbcT2FcfsiiYoyvpMYDGsnYDb9QiHfWBiKpRwszNyv/ XuS4k+pgyWb4PYuP1JEqUSZpOCBb6499edkk2CA== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200924_202612_608558_3D24E906 X-CRM114-Status: GOOD ( 19.17 ) X-Spam-Score: -2.8 (--) X-Spam-Report: SpamAssassin version 3.4.4 on casper.infradead.org summary: Content analysis details: (-2.8 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] -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_PASS SPF: sender matches SPF record 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.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 patchset adds basic support for the embedded controller found on older ebook reader boards designed by/with the ODM Netronix Inc.[1] and sold by Kobo or Tolino, for example the Kobo Aura and the Tolino Shine. These drivers are based on information contained in the vendor kernel sources, but in order to all information in a single place, I documented the register interface of the EC on GitHub[2]. [1]: http://www.netronixinc.com/products.aspx?ID=1 [2]: https://github.com/neuschaefer/linux/wiki/Netronix-MSP430-embedded-controller v3: - A few code cleanups - A few devicetree related cleanups - PWM and RTC functionality were moved from subnodes in the devicetree to the main node. This also means that the subdrivers no longer need DT compatible strings, but are instead loaded via the mfd_cell mechanism. - The drivers are now published under GPLv2-or-later rather than GPLv2-only. v2: - https://lore.kernel.org/lkml/20200905133230.1014581-1-j.neuschaefer@gmx.net/ - Moved txt DT bindings to patch descriptions and removed patch 1/10 "DT bindings in plain text format" - New patch 7/10 "rtc: Introduce RTC_TIMESTAMP_END_2255" - Rebased on 5.9-rc3 - Various other changes which are documented in each patch v1: - https://lore.kernel.org/lkml/20200620223915.1311485-1-j.neuschaefer@gmx.net/ Jonathan Neuschäfer (7): dt-bindings: Add vendor prefix for Netronix, Inc. dt-bindings: mfd: Add binding for Netronix embedded controller mfd: Add base driver for Netronix embedded controller pwm: ntxec: Add driver for PWM function in Netronix EC rtc: New driver for RTC in Netronix embedded controller MAINTAINERS: Add entry for Netronix embedded controller ARM: dts: imx50-kobo-aura: Add Netronix embedded controller .../bindings/mfd/netronix,ntxec.yaml | 76 +++++++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 9 + arch/arm/boot/dts/imx50-kobo-aura.dts | 17 +- drivers/mfd/Kconfig | 10 + drivers/mfd/Makefile | 1 + drivers/mfd/ntxec.c | 206 ++++++++++++++++++ drivers/pwm/Kconfig | 8 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-ntxec.c | 161 ++++++++++++++ drivers/rtc/Kconfig | 8 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-ntxec.c | 132 +++++++++++ include/linux/mfd/ntxec.h | 31 +++ 14 files changed, 662 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml create mode 100644 drivers/mfd/ntxec.c create mode 100644 drivers/pwm/pwm-ntxec.c create mode 100644 drivers/rtc/rtc-ntxec.c create mode 100644 include/linux/mfd/ntxec.h --- 2.28.0