From patchwork Sat Jun 20 22:39:05 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: 198755 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=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 A13F3C433E0 for ; Sat, 20 Jun 2020 22:40:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 763F220FC3 for ; Sat, 20 Jun 2020 22:40:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="awKouNNw" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728326AbgFTWkr (ORCPT ); Sat, 20 Jun 2020 18:40:47 -0400 Received: from mout.gmx.net ([212.227.15.15]:46327 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728113AbgFTWkq (ORCPT ); Sat, 20 Jun 2020 18:40:46 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592692783; bh=NZlIIwqNdtz2a/BsgVin34fzBdteKCXfPTKpkZ94mWM=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=awKouNNwZMnHe+LNy5Fvm541bwzFIrAoC2hgnZRHv/nFQLCNiAdi0yLG0jsS3KAPk aB53eq2b2qyxnDUVNATlm92w2BI3lMLGm3KHSAm8xhuTHaO3ooIs/Pg1kIyFCUa5Sa B1FMipma3UFGm++S9ENNNb81EISkSizfJTPpv+u4= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.194.186]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MkYc0-1j0qCP0n3m-00m4hJ; Sun, 21 Jun 2020 00:39:43 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Cc: Lee Jones , Rob Herring , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Thierry Reding , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?b?w7ZuaWc=?= , Alessandro Zummo , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Josua Mayer , Andreas Kemnade Subject: [RFC PATCH 01/10] DT bindings in plain text format Date: Sun, 21 Jun 2020 00:39:05 +0200 Message-Id: <20200620223915.1311485-2-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200620223915.1311485-1-j.neuschaefer@gmx.net> References: <20200620223915.1311485-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:VxdfrjWO/u5MhkFEjp5KExUHat+e9KDgtmLJLE7SRngqgjYq/nQ XlCaZO+wvW9aA+9ez71mbfpUjzFYsLA9lmNlF0ivaZt7Kw4hU0gOLdIkC8vrsjk0V0tjKeL N+H6ek0QzT0wUo/mpz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Ff1pQ9ruPduBruhZ Y/IsjKR4FyPlJME3cKfB2AJM5cuxkQZIFvSQI2iOpttC89fH7Cs4pnBV/47KuWy0wcCg+LWKa 3JI6WltFNPxyzsMkDAQG9dGhqCcBBgEJIMV8ckhjeY7fS91G6d7CI8KhmwYbaf3mDctmGmnlp bnozlZRtbdNk9Ojd7vGvpzJtPf60nWhOjCDP2HHCyLBdgyz9wkRT3b+v54Kpxs5OTOVzBc+Xo BOCpg2QYPWjOIwo3Gd8vcKdxkzLfTTxPzzHn7R/SyBPmDKnTiYZpEDgwPZYWaVwZpVsIrDwJy nrNkjPs5LKdUJMSv9 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org For reference, here are the devicetree bindings in plaintext format. (Not for merge.) Signed-off-by: Jonathan Neuschäfer --- .../bindings/mfd/netronix,ntxec.txt | 58 +++++++++++++++++++ .../bindings/pwm/netronix,ntxec-pwm.txt | 27 +++++++++ .../bindings/rtc/netronix,ntxec-rtc.txt | 17 ++++++ 3 files changed, 102 insertions(+) create mode 100644 Documentation/devicetree/bindings/mfd/netronix,ntxec.txt create mode 100644 Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.txt create mode 100644 Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.txt -- 2.27.0 diff --git a/Documentation/devicetree/bindings/mfd/netronix,ntxec.txt b/Documentation/devicetree/bindings/mfd/netronix,ntxec.txt new file mode 100644 index 0000000000000..e303932657999 --- /dev/null +++ b/Documentation/devicetree/bindings/mfd/netronix,ntxec.txt @@ -0,0 +1,58 @@ +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 = <1>; + }; + + rtc { + compatible = "netronix,ntxec-rtc"; + interrupts-extended = <&ec 15>; + interrupt-names = "alarm"; + }; + }; +}; diff --git a/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.txt b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.txt new file mode 100644 index 0000000000000..50be27f82559e --- /dev/null +++ b/Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.txt @@ -0,0 +1,27 @@ +PWM functionality in Netronix Embedded Controller + +Required properties: +- compatible: should be "netronix,ntxec-pwm" +- #pwm-cells: should be 1. + +Available PWM channels: +- 0: The PWM channel controlled by registers 0xa1-0xa7 + +Example: + + embedded-controller@43 { + compatible = "netronix,ntxec"; + ... + + ec_pwm: pwm { + compatible = "netronix,ntxec-pwm"; + #pwm-cells = <1>; + }; + }; + + ... + + backlight { + compatible = "pwm-backlight"; + pwms = <&ec_pwm 0 50000>; + }; diff --git a/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.txt b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.txt new file mode 100644 index 0000000000000..0ef9e791b6a36 --- /dev/null +++ b/Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.txt @@ -0,0 +1,17 @@ +Netronix embedded controller RTC + +Required properties: + +- compatible: should be "netronix,ntxec-rtc" + + +Example: + + embedded-controller@43 { + compatible = "netronix,ntxec"; + ... + + rtc { + compatible = "netronix,ntxec-rtc"; + }; + } From patchwork Sat Jun 20 22:42:13 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: 198752 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=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, URIBL_BLOCKED, USER_AGENT_GIT autolearn=unavailable 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 D2999C433E3 for ; Sat, 20 Jun 2020 22:43:46 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id B0FB924727 for ; Sat, 20 Jun 2020 22:43:46 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="JJlLzu+E" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728113AbgFTWni (ORCPT ); Sat, 20 Jun 2020 18:43:38 -0400 Received: from mout.gmx.net ([212.227.17.21]:45831 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728955AbgFTWng (ORCPT ); Sat, 20 Jun 2020 18:43:36 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592692947; bh=OudamScKxsSwesQWI5fhg8i4uztyIzbbtXHCU+btXqg=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=JJlLzu+EP2kHN1UTDpUwB6LsqYgcAztufiCAgWCcxVFKraKCiYMrmS+mXlItATNNc Ar2ZNr4QuMEd1/btmPM4zx9DQe1/1C/Ki4Grla16r4HglxaDLrhr3slsSc2iXWxzcg iPLI2pWnBBJ38Vv5EeauBsNsISVxdiCIdDGhLFy8= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.194.186]) by mail.gmx.com (mrgmx104 [212.227.17.168]) with ESMTPSA (Nemesis) id 1M4s51-1jlPPh33Ch-0022vZ; Sun, 21 Jun 2020 00:42:26 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Cc: Lee Jones , Rob Herring , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Thierry Reding , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?b?w7ZuaWc=?= , Alessandro Zummo , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Josua Mayer , Andreas Kemnade Subject: [RFC PATCH 02/10] dt-bindings: Add vendor prefix for Netronix, Inc. Date: Sun, 21 Jun 2020 00:42:13 +0200 Message-Id: <20200620224222.1312520-1-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 X-Provags-ID: V03:K1:yZqldghSPumPDLmSQbkIreQsfprG56cHRfGVJLO/YVdhlg8pdjP qZiYkkWMBRqMgwiDDZxJ/FCfw8bxfnQru0qx9L7azU4/GJDQAEj3hBxzxC5XMdXgaq80k6Y SHT+PXTXWZyf8p9LmwX14SH2+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+ph qT94vPkRWA1tbFbEFuiGCoBPnwL4igL1WDeXeBw93/uNzFEGV3wZ7m/RwjtjoR9zZUQFnZUYA US1nlqIwAY5Dq6mZcFv0w8eFA6mBmnO1qA/pSzihnRaemJPqBZccuknxaQJ8IaAwL3mEDR3GH vMpRDMTFujK3T8upXyiZVDnqBlgx21pKIOvv8txYkHugk9kedVQGtxKT98Wz5r0fqkz+cIwDb KXYWUc+ZoCBB5uWY1GKLQiYDQzU8VrTak0TZMvQxC2K+njpePApu/khJrp/lKWlzKaPzWZ/Ih jixY0YPWy90Yjy2NK Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Netronix, Inc. (http://www.netronixinc.com/) makes ebook reader board designs, which are for example used in Kobo and Tolino devices. An alternative prefix for Netronix would be "ntx", which is already used in code released by Netronix. It is shorter, but perhaps less clear. Signed-off-by: Jonathan Neuschäfer --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) -- 2.27.0 diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index 9aeab66be85fc..516c6b6668fba 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -704,6 +704,8 @@ patternProperties: description: Broadcom Corporation (formerly NetLogic Microsystems) "^netron-dy,.*": description: Netron DY + "^netronix,.*": + description: Netronix, Inc. "^netxeon,.*": description: Shenzhen Netxeon Technology CO., LTD "^neweast,.*": From patchwork Sat Jun 20 22:42:15 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: 198753 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=-14.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, MENTIONS_GIT_HOSTING, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 7108AC433E0 for ; Sat, 20 Jun 2020 22:43:34 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 4EF9A24728 for ; Sat, 20 Jun 2020 22:43:34 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="iNnbYG6+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728851AbgFTWnd (ORCPT ); Sat, 20 Jun 2020 18:43:33 -0400 Received: from mout.gmx.net ([212.227.17.20]:57519 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728113AbgFTWna (ORCPT ); Sat, 20 Jun 2020 18:43:30 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592692952; bh=XXu+luCqljJ0m62RlCeT8CmSkmbKkHxcSLuj0ORt69w=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=iNnbYG6+HppRyny7oSDl/zcSixkIlEXLPpZpEPGi3ysfpx7QNmQPi0qppo63xY30w ADOgFudvJBvA5CZihzB85TvnZFodxjammv1ZB6PFWOvPOTQMZ1lSDzqMxuofpZUxDl U/mgB9Y+o/ZD3COw1SsOYIx4QvYxAa4BNsvY4crw= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.194.186]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MkYbu-1j0qCE0pzS-00m7TV; Sun, 21 Jun 2020 00:42:32 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Cc: Lee Jones , Rob Herring , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Thierry Reding , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?b?w7ZuaWc=?= , Alessandro Zummo , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Josua Mayer , Andreas Kemnade Subject: [RFC PATCH 04/10] mfd: Add base driver for Netronix embedded controller Date: Sun, 21 Jun 2020 00:42:15 +0200 Message-Id: <20200620224222.1312520-3-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200620224222.1312520-1-j.neuschaefer@gmx.net> References: <20200620224222.1312520-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:1u+AFOJkIXKhSwfcftLBAxIIIFzLSLtOsHVEPr+WI+ygCv/uTZx bP173tXALlMVkmQtxXC3zSy60qVZn2N5fdYQS+pNrKw78Lbqq4x2vINFjsXeXWr3lLN4Arm HmrsGAK25Gemm3fdmo1pd6x3Za5nucsZJeUPOJwe6FlcCdYJcNknAYM0KkfuAbKRq0Wbs9l 5GvBUsY9CW+YIzgQuUS6Q== X-UI-Out-Filterresults: notjunk:1; V03:K0:Dd6v43kPPRw=:9CCX267RpV8vvnDACISpr5 uk8XWpwglolUEoOdfm4ML40ZZQF9MNh0RqPQCdos/fDZbKKFXB73EdN9rxPZQT8ErV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YmMr7fJaE9vZO9WUvjLeeorpW lPVHChtORF6mfv96pD0PZ9zA+JWd9ZOb+2bppQOUfRJdJ9/hHY7KIGCFNXKCOxbqKJOZsaNJa xBH09UDGhk/IHmdu2 Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Third-party hardware documentation is available at https://github.com/neuschaefer/linux/wiki/Netronix-MSP430-embedded-controller The EC supports interrupts, but the driver doesn't make use of them so far. Known problems: - The reboot handler is installed in such a way that it directly calls into the i2c subsystem to send the reboot command to the EC. This means that the reboot handler may sleep, which is not allowed. Signed-off-by: Jonathan Neuschäfer --- drivers/mfd/Kconfig | 7 ++ drivers/mfd/Makefile | 1 + drivers/mfd/ntxec.c | 188 ++++++++++++++++++++++++++++++++++++++ include/linux/mfd/ntxec.h | 30 ++++++ 4 files changed, 226 insertions(+) create mode 100644 drivers/mfd/ntxec.c create mode 100644 include/linux/mfd/ntxec.h -- 2.27.0 diff --git a/drivers/mfd/Kconfig b/drivers/mfd/Kconfig index a37d7d1713820..78410b928648e 100644 --- a/drivers/mfd/Kconfig +++ b/drivers/mfd/Kconfig @@ -978,6 +978,13 @@ config MFD_VIPERBOARD You need to select the mfd cell drivers separately. The drivers do not support all features the board exposes. +config MFD_NTXEC + bool "Netronix Embedded Controller" + depends on I2C && OF + help + Say yes here if you want to support the embedded controller of + certain e-book readers designed by the ODM Netronix. + config MFD_RETU tristate "Nokia Retu and Tahvo multi-function device" select MFD_CORE diff --git a/drivers/mfd/Makefile b/drivers/mfd/Makefile index 9367a92f795a6..19d9391ed6f32 100644 --- a/drivers/mfd/Makefile +++ b/drivers/mfd/Makefile @@ -218,6 +218,7 @@ obj-$(CONFIG_MFD_INTEL_MSIC) += intel_msic.o obj-$(CONFIG_MFD_INTEL_PMC_BXT) += intel_pmc_bxt.o obj-$(CONFIG_MFD_PALMAS) += palmas.o obj-$(CONFIG_MFD_VIPERBOARD) += viperboard.o +obj-$(CONFIG_MFD_NTXEC) += ntxec.o obj-$(CONFIG_MFD_RC5T583) += rc5t583.o rc5t583-irq.o obj-$(CONFIG_MFD_RK808) += rk808.o obj-$(CONFIG_MFD_RN5T618) += rn5t618.o diff --git a/drivers/mfd/ntxec.c b/drivers/mfd/ntxec.c new file mode 100644 index 0000000000000..82adea34ea746 --- /dev/null +++ b/drivers/mfd/ntxec.c @@ -0,0 +1,188 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Copyright 2020 Jonathan Neuschäfer +// +// MFD driver for the usually MSP430-based embedded controller used in certain +// Netronix ebook reader board designs + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +#define NTXEC_VERSION 0x00 +#define NTXEC_POWEROFF 0x50 +#define NTXEC_POWERKEEP 0x70 +#define NTXEC_RESET 0x90 + + +/* Register access */ + +int ntxec_read16(struct ntxec *ec, u8 addr) +{ + u8 request[1] = { addr }; + u8 response[2]; + int res; + + struct i2c_msg msgs[] = { + { + .addr = ec->client->addr, + .flags = ec->client->flags, + .len = sizeof(request), + .buf = request + }, { + .addr = ec->client->addr, + .flags = ec->client->flags | I2C_M_RD, + .len = sizeof(response), + .buf = response + } + }; + + res = i2c_transfer(ec->client->adapter, msgs, ARRAY_SIZE(msgs)); + if (res < 0) + return res; + if (res != ARRAY_SIZE(msgs)) + return -EIO; + + return get_unaligned_be16(response); +} +EXPORT_SYMBOL(ntxec_read16); + +int ntxec_write16(struct ntxec *ec, u8 addr, u16 value) +{ + u8 request[3] = { addr, }; + int res; + + put_unaligned_be16(value, request + 1); + + res = i2c_transfer_buffer_flags(ec->client, request, sizeof(request), + ec->client->flags); + if (res < 0) + return res; + + return 0; +} +EXPORT_SYMBOL(ntxec_write16); + +int ntxec_read8(struct ntxec *ec, u8 addr) +{ + int res = ntxec_read16(ec, addr); + + if (res < 0) + return res; + + return (res >> 8) & 0xff; +} +EXPORT_SYMBOL(ntxec_read8); + +int ntxec_write8(struct ntxec *ec, u8 addr, u8 value) +{ + return ntxec_write16(ec, addr, value << 8); +} +EXPORT_SYMBOL(ntxec_write8); + + +/* Reboot/poweroff handling */ + +static struct ntxec *poweroff_restart_instance; + +static void ntxec_poweroff(void) +{ + ntxec_write8(poweroff_restart_instance, NTXEC_POWEROFF, 0x01); + msleep(5000); +} + +static int ntxec_restart(struct notifier_block *nb, + unsigned long action, void *data) +{ + /* FIXME: The I2C driver sleeps, but restart handlers may not sleep */ + ntxec_write8(poweroff_restart_instance, NTXEC_RESET, 0xff); + /* TODO: delay? */ + return NOTIFY_DONE; +} + +static struct notifier_block ntxec_restart_handler = { + .notifier_call = ntxec_restart, + .priority = 128 +}; + + +/* Driver setup */ + +static int ntxec_probe(struct i2c_client *client, + const struct i2c_device_id *ids) +{ + struct ntxec *ec; + int res; + + ec = devm_kmalloc(&client->dev, sizeof(*ec), GFP_KERNEL); + if (!ec) + return -ENOMEM; + + ec->dev = &client->dev; + ec->client = client; + + /* Determine the firmware version */ + res = ntxec_read16(ec, NTXEC_VERSION); + if (res < 0) { + dev_dbg(ec->dev, "Failed to read firmware version number\n"); + return res; + } + ec->version = res; + + dev_info(ec->dev, + "Netronix embedded controller version %04x detected.\n", + ec->version); + + /* For now, we don't support the new register layout. */ + if (ntxec_has_new_layout(ec)) + return -EOPNOTSUPP; + + if (of_device_is_system_power_controller(ec->dev->of_node)) { + /* + * Set the 'powerkeep' bit. This is necessary on some boards + * in order to keep the system running. + */ + res = ntxec_write8(ec, NTXEC_POWERKEEP, 0x08); + if (res < 0) + return res; + + /* Install poweroff handler */ + WARN_ON(poweroff_restart_instance); + poweroff_restart_instance = ec; + if (pm_power_off != NULL) + /* TODO: Refactor among all poweroff drivers */ + dev_err(ec->dev, "pm_power_off already assigned\n"); + else + pm_power_off = ntxec_poweroff; + + /* Install board reset handler */ + res = register_restart_handler(&ntxec_restart_handler); + if (res < 0) + dev_err(ec->dev, + "Failed to register restart handler: %d\n", res); + } + + i2c_set_clientdata(client, ec); + + return devm_of_platform_populate(ec->dev); +} + +static const struct of_device_id of_ntxec_match_table[] = { + { .compatible = "netronix,ntxec", }, + {} +}; + +static struct i2c_driver ntxec_driver = { + .driver = { + .name = "ntxec", + .of_match_table = of_ntxec_match_table, + }, + .probe = ntxec_probe, +}; +builtin_i2c_driver(ntxec_driver); diff --git a/include/linux/mfd/ntxec.h b/include/linux/mfd/ntxec.h new file mode 100644 index 0000000000000..9f9d6f2141751 --- /dev/null +++ b/include/linux/mfd/ntxec.h @@ -0,0 +1,30 @@ +/* SPDX-License-Identifier: GPL-2.0-only */ +/* + * Copyright 2020 Jonathan Neuschäfer + * + * MFD access functions for the Netronix embedded controller. + */ + +#ifndef NTXEC_H +#define NTXEC_H + +#include + +struct ntxec { + struct device *dev; + struct i2c_client *client; + u16 version; + /* TODO: Add a mutex to protect actions consisting of multiple accesses? */ +}; + +static inline bool ntxec_has_new_layout(struct ntxec *ec) +{ + return ec->version == 0xe916; +} + +int ntxec_read16(struct ntxec *ec, u8 addr); +int ntxec_write16(struct ntxec *ec, u8 addr, u16 value); +int ntxec_read8(struct ntxec *ec, u8 addr); +int ntxec_write8(struct ntxec *ec, u8 addr, u8 value); + +#endif From patchwork Sat Jun 20 22:42:17 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: 198754 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=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 BB7CEC433E2 for ; Sat, 20 Jun 2020 22:43:24 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 94AF724727 for ; Sat, 20 Jun 2020 22:43:24 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="YxTuL3n+" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728425AbgFTWnV (ORCPT ); Sat, 20 Jun 2020 18:43:21 -0400 Received: from mout.gmx.net ([212.227.15.15]:46107 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728401AbgFTWnU (ORCPT ); Sat, 20 Jun 2020 18:43:20 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592692957; bh=SdBTcHanE6ZbSETuw4jjAPlmlGZ23qUH4Z8rV7FhLqQ=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=YxTuL3n+V481rorkdamPXRDikXiZ4sMt+CjKxF7N/98UoosFo6tpOzlGWFGEWX8LQ FrAgzp+7ELpv2f3k2RR5PgS5R1JGO7IZDTFM43JWT9mCYGGt8pEr2Gf4fw/nUtyMQ2 Q+DpRzkhb3wal/Nxdl4tv8ABsVmOslJKe86GEpyQ= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.194.186]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1Mdeb5-1jDiUW2ILp-00Zk6L; Sun, 21 Jun 2020 00:42:37 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Cc: Lee Jones , Rob Herring , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Thierry Reding , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?b?w7ZuaWc=?= , Alessandro Zummo , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Josua Mayer , Andreas Kemnade Subject: [RFC PATCH 06/10] pwm: ntxec: Add driver for PWM function in Netronix EC Date: Sun, 21 Jun 2020 00:42:17 +0200 Message-Id: <20200620224222.1312520-5-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200620224222.1312520-1-j.neuschaefer@gmx.net> References: <20200620224222.1312520-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:eUueW2vxa2QRAe4bcVFkBFTG7+5ALMF64PP7ISg/TUL89veAYiC zNUGbINCeiB6/qRtz4KAMnR3JUw7xGXKew+ZBUrBM10Q0UeTbHaaKg3U1aQSCDiw7aJ75Za BBGTWP6sb28uRrD0BeaGVgXJeGRFse0w/cyOUT9B79R1CPGIMv/z+IPZ0GlEQrMP7b2QryO ZibNSqbrHPhHazAKutaLg== X-UI-Out-Filterresults: notjunk:1; V03:K0:PnzBkUcOKAY=:V/ttZBJ1+lucSMD75nMnsM NcaH7eRcrfkSiMMtNRhBRb6dlxCaJNWhZcOHwJE4pvBxci7QR13NHaI5rVXfJKKRKipsRueQr pu+xkoqWqQQWc8MlcQlssPJHG7Lwp6w8J6FSyG3ADFOfyz9Mn2ojGY4JWyJ6yAKVRAOy5rfUf 4lqBNnCswq7wBvemfMX6tz0+N1NkFLcrm6bFGEDe06ZIhD85zKWQo2pDWEairDkxk8YTQ3ngd uXeWAeHAP6nziJ3D3URuKszcZc1YipjlrcKNybiM/LMKL6iqg8JvHCGRQNZPeGtuF0Smq8zw/ 9fn0zfYMLuu7bFTzUgHXpDQwcH+0olIbLlXTLIdZIOJEYokEyRxZdXe9uBOXx+9FUriGIzI6v 7wIC73OJU43mjtR7t9iPn0I+dVW8vFbnMllgBkqUvHA0puZhbjkkueXoJUDOvkZNWacAvpKMK 6brbCfpeI7ev3ItssXpNBpZj0HgX2pC/bmYQAdxLuvjR/qt/7l1iC/uzGcgX8vFM3xFC8+ZnG coYL7eTXJ7Y8WAn5wKSab5t/KhscnJFOslx8clj3k3Q1wjZQib1Zt7nLs981UHZQQGq+9M5Ej bJSlZiKjmcJvhc4HMb0tRsAhvqcRl7ZAEw3KuIJLlrrZGhYcGwIZt7lRfOG7dwL0Bf3DlYOkz xNFunhlzcgHK0YudeDBnlZYRW2I6ta2niX90haz+Ey2NilqYpqASSfhOoDyruBIS8R5Nk2jFo pYyscau9KBBCnfFkJ7fU45z+F99AAzH8p19xLqSJfLKwCsJvlxng3889fpOL8TVKXo0x/da8k lxoUu18wG6+D14kTz+Z1nOM0t23I+vFXkDOXPuQD80LLBO840c/djV/zHu+wU6JcMqw+KFRn0 0u65/B84cQqih5Yx8a7xOtriEWAhHpfv3ZHeI9JMTHH8M1k/NP0DL+8Km0UzXzk6JeQVW7knk jF5oAgSsPW/zIMcGLkZ9AEOFE8yT9a5TIbt3DR0psuqpGDr5PZE02aIsPJsD/7vDGTrvak8Vf tZUl7nvsY4ZTUEAFNuqt3IYNu5iW72E7hUUc0uNnWlL5roX0EbiAvzwUd4xq8xY2dXGLylqf1 ihgWpydBZJmc7tNGYNVVnq7qR/TXMrVcC/N33Cm5PT/0FSFUyAcP+iNDzoK/AHvRF8vo5KIM0 Z3i9Evmup2f6fATU3TCUE57JimLZ8AQ+egNfAs8lJZyQdojNsC4jM97SsQ1pjQyDwg4uxzE6K P28bc+lylSvUrFUxi Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org The Netronix EC provides a PWM output, which is used for the backlight on ebook readers. This patches adds a driver for the PWM output. Signed-off-by: Jonathan Neuschäfer --- drivers/pwm/Kconfig | 4 ++ drivers/pwm/Makefile | 1 + drivers/pwm/pwm-ntxec.c | 148 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 153 insertions(+) create mode 100644 drivers/pwm/pwm-ntxec.c -- 2.27.0 diff --git a/drivers/pwm/Kconfig b/drivers/pwm/Kconfig index cb8d739067d2f..147d6629e662c 100644 --- a/drivers/pwm/Kconfig +++ b/drivers/pwm/Kconfig @@ -350,6 +350,10 @@ config PWM_MXS To compile this driver as a module, choose M here: the module will be called pwm-mxs. +config PWM_NTXEC + tristate "Netronix embedded controller PWM support" + depends on MFD_NTXEC && OF + config PWM_OMAP_DMTIMER tristate "OMAP Dual-Mode Timer PWM support" depends on OF diff --git a/drivers/pwm/Makefile b/drivers/pwm/Makefile index a59c710e98c76..15507a6d9ca12 100644 --- a/drivers/pwm/Makefile +++ b/drivers/pwm/Makefile @@ -32,6 +32,7 @@ obj-$(CONFIG_PWM_MESON) += pwm-meson.o obj-$(CONFIG_PWM_MEDIATEK) += pwm-mediatek.o obj-$(CONFIG_PWM_MTK_DISP) += pwm-mtk-disp.o obj-$(CONFIG_PWM_MXS) += pwm-mxs.o +obj-$(CONFIG_PWM_NTXEC) += pwm-ntxec.o obj-$(CONFIG_PWM_OMAP_DMTIMER) += pwm-omap-dmtimer.o obj-$(CONFIG_PWM_PCA9685) += pwm-pca9685.o obj-$(CONFIG_PWM_PUV3) += pwm-puv3.o diff --git a/drivers/pwm/pwm-ntxec.c b/drivers/pwm/pwm-ntxec.c new file mode 100644 index 0000000000000..eca305d8e915b --- /dev/null +++ b/drivers/pwm/pwm-ntxec.c @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Copyright 2020 Jonathan Neuschäfer +// +// PWM driver for Netronix embedded controller. + +#include +#include +#include +#include +#include +#include + +struct ntxec_pwm { + struct device *dev; + struct ntxec *ec; + struct pwm_chip chip; +}; + +static struct ntxec_pwm *pwmchip_to_pwm(struct pwm_chip *chip) +{ + return container_of(chip, struct ntxec_pwm, chip); +} + +#define NTXEC_UNK_A 0xa1 +#define NTXEC_UNK_B 0xa2 +#define NTXEC_ENABLE 0xa3 +#define NTXEC_PERIOD_LOW 0xa4 +#define NTXEC_PERIOD_HIGH 0xa5 +#define NTXEC_DUTY_LOW 0xa6 +#define NTXEC_DUTY_HIGH 0xa7 + +/* + * The time base used in the EC is 8MHz, or 125ns. Period and duty cycle are + * measured in this unit. + */ +static int ntxec_pwm_config(struct pwm_chip *chip, struct pwm_device *pwm_dev, + int duty_ns, int period_ns) +{ + struct ntxec_pwm *pwm = pwmchip_to_pwm(chip); + uint64_t duty = duty_ns; + uint64_t period = period_ns; + int res = 0; + + do_div(period, 125); + if (period > 0xffff) { + dev_warn(pwm->dev, + "Period is not representable in 16 bits: %llu\n", period); + return -ERANGE; + } + + do_div(duty, 125); + if (duty > 0xffff) { + dev_warn(pwm->dev, "Duty cycle is not representable in 16 bits: %llu\n", + duty); + return -ERANGE; + } + + res |= ntxec_write8(pwm->ec, NTXEC_PERIOD_HIGH, period >> 8); + res |= ntxec_write8(pwm->ec, NTXEC_PERIOD_LOW, period); + res |= ntxec_write8(pwm->ec, NTXEC_DUTY_HIGH, duty >> 8); + res |= ntxec_write8(pwm->ec, NTXEC_DUTY_LOW, duty); + + return (res < 0) ? -EIO : 0; +} + +static int ntxec_pwm_enable(struct pwm_chip *chip, + struct pwm_device *pwm_dev) +{ + struct ntxec_pwm *pwm = pwmchip_to_pwm(chip); + + return ntxec_write8(pwm->ec, NTXEC_ENABLE, 1); +} + +static void ntxec_pwm_disable(struct pwm_chip *chip, + struct pwm_device *pwm_dev) +{ + struct ntxec_pwm *pwm = pwmchip_to_pwm(chip); + + ntxec_write8(pwm->ec, NTXEC_ENABLE, 0); +} + +static struct pwm_ops ntxec_pwm_ops = { + .config = ntxec_pwm_config, + .enable = ntxec_pwm_enable, + .disable = ntxec_pwm_disable, + .owner = THIS_MODULE, +}; + +static int ntxec_pwm_probe(struct platform_device *pdev) +{ + struct ntxec *ec = dev_get_drvdata(pdev->dev.parent); + struct ntxec_pwm *pwm; + struct pwm_chip *chip; + int res; + + pwm = devm_kzalloc(&pdev->dev, sizeof(*pwm), GFP_KERNEL); + if (!pwm) + return -ENOMEM; + + pwm->ec = ec; + pwm->dev = &pdev->dev; + + chip = &pwm->chip; + chip->dev = &pdev->dev; + chip->ops = &ntxec_pwm_ops; + chip->base = -1; + chip->npwm = 1; + + res = pwmchip_add(chip); + if (res < 0) + return res; + + platform_set_drvdata(pdev, pwm); + + res |= ntxec_write8(pwm->ec, NTXEC_ENABLE, 0); + res |= ntxec_write8(pwm->ec, NTXEC_UNK_A, 0xff); + res |= ntxec_write8(pwm->ec, NTXEC_UNK_B, 0xff); + + return (res < 0) ? -EIO : 0; +} + +static int ntxec_pwm_remove(struct platform_device *pdev) +{ + struct ntxec_pwm *pwm = platform_get_drvdata(pdev); + struct pwm_chip *chip = &pwm->chip; + + return pwmchip_remove(chip); +} + +static const struct of_device_id ntxec_pwm_of_match[] = { + { .compatible = "netronix,ntxec-pwm" }, + { }, +}; +MODULE_DEVICE_TABLE(of, ntxec_pwm_of_match); + +static struct platform_driver ntxec_pwm_driver = { + .driver = { + .name = "ntxec-pwm", + .of_match_table = ntxec_pwm_of_match, + }, + .probe = ntxec_pwm_probe, + .remove = ntxec_pwm_remove, +}; +module_platform_driver(ntxec_pwm_driver); + +MODULE_AUTHOR("Jonathan Neuschäfer "); +MODULE_DESCRIPTION("PWM driver for Netronix EC"); +MODULE_LICENSE("GPL"); From patchwork Sat Jun 20 22:42:19 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: 198751 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=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 84970C433E0 for ; Sat, 20 Jun 2020 22:43:54 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 6394D24728 for ; Sat, 20 Jun 2020 22:43:54 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="L0TS6ZsL" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728713AbgFTWna (ORCPT ); Sat, 20 Jun 2020 18:43:30 -0400 Received: from mout.gmx.net ([212.227.17.22]:40633 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728401AbgFTWn3 (ORCPT ); Sat, 20 Jun 2020 18:43:29 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592692962; bh=SJkG9V9Ioa9d4mEs8B+Ts1mrBz/DoBrNbjbG0YqcoW8=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=L0TS6ZsL9wzNE0nZD/qm5ZJjxYPd9mb0bHz+Wc89GxEVngTEO1oEtUnBDPVvqWDSW utlwhk8cyNqJfnConKj8VnRLNbAfPwQZqnawGcKdQqeFVaDWjUrjK7rrApjllI0D3p O3UGHr8naeDiHytOMobzDZmzy8GMBiHrY6pwXuwk= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.194.186]) by mail.gmx.com (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1N1wll-1ilEJH1IF7-012Gjq; Sun, 21 Jun 2020 00:42:42 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Cc: Lee Jones , Rob Herring , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Thierry Reding , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?b?w7ZuaWc=?= , Alessandro Zummo , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Josua Mayer , Andreas Kemnade Subject: [RFC PATCH 08/10] rtc: New driver for RTC in Netronix embedded controller Date: Sun, 21 Jun 2020 00:42:19 +0200 Message-Id: <20200620224222.1312520-7-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200620224222.1312520-1-j.neuschaefer@gmx.net> References: <20200620224222.1312520-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:ZySx5t2KwCOIhxVvsNRQk0BHTuvPhh9i+aJrLHsgVrp4vASHns/ K/Sng6XDPFxIADTuQhRqPpAiIQTxA/wGOa2PSbQbB4sTuJ0aojUJGE8Ag92fPQLXO9nJD6G QLoS+fsnoA5cMrwfz9npyau2UOADYu9551W2HpisS3/JZwVYAkM5yt+jitcvhvxSNHOoB3r YTQOJ2gOZPtscWai0xOvQ== X-UI-Out-Filterresults: notjunk:1; V03:K0:qUgUBIrzrMw=:9fm4eUEqTt5MBiuFfEhduT mWFDkntqpgEtUv2Z+wMPuN4r6bAeq4tndR38mrmzCTTwLZB0Bno3n8/u/bYcNzbzPW7js1XHK IH0+7IJFAo8/zNk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JP S6uvfUe03QAQM/EL+X7vKcQ1HWp91d21pH3T7c2goOl7w0GVtcclM4l3ke8BskRkHXeih4Yqh PA7OqZbtxvORAmFOC Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org With this driver, mainline Linux can keep its time and date in sync with the vendor kernel. Advanced functionality like alarm and automatic power-on is not yet supported. Signed-off-by: Jonathan Neuschäfer --- drivers/rtc/Kconfig | 4 ++ drivers/rtc/Makefile | 1 + drivers/rtc/rtc-ntxec.c | 115 ++++++++++++++++++++++++++++++++++++++++ 3 files changed, 120 insertions(+) create mode 100644 drivers/rtc/rtc-ntxec.c -- 2.27.0 diff --git a/drivers/rtc/Kconfig b/drivers/rtc/Kconfig index b54d87d45c89b..2310d08933f9c 100644 --- a/drivers/rtc/Kconfig +++ b/drivers/rtc/Kconfig @@ -1300,6 +1300,10 @@ config RTC_DRV_CROS_EC This driver can also be built as a module. If so, the module will be called rtc-cros-ec. +config RTC_DRV_NTXEC + tristate "Netronix embedded controller RTC driver" + depends on MFD_NTXEC + comment "on-CPU RTC drivers" config RTC_DRV_ASM9260 diff --git a/drivers/rtc/Makefile b/drivers/rtc/Makefile index 0721752c6ed4c..8653d04aefa99 100644 --- a/drivers/rtc/Makefile +++ b/drivers/rtc/Makefile @@ -111,6 +111,7 @@ obj-$(CONFIG_RTC_DRV_MT7622) += rtc-mt7622.o obj-$(CONFIG_RTC_DRV_MV) += rtc-mv.o obj-$(CONFIG_RTC_DRV_MXC) += rtc-mxc.o obj-$(CONFIG_RTC_DRV_MXC_V2) += rtc-mxc_v2.o +obj-$(CONFIG_RTC_DRV_NTXEC) += rtc-ntxec.o obj-$(CONFIG_RTC_DRV_OMAP) += rtc-omap.o obj-$(CONFIG_RTC_DRV_OPAL) += rtc-opal.o obj-$(CONFIG_RTC_DRV_PALMAS) += rtc-palmas.o diff --git a/drivers/rtc/rtc-ntxec.c b/drivers/rtc/rtc-ntxec.c new file mode 100644 index 0000000000000..44d5a5eedb597 --- /dev/null +++ b/drivers/rtc/rtc-ntxec.c @@ -0,0 +1,115 @@ +// SPDX-License-Identifier: GPL-2.0-only +// Copyright 2020 Jonathan Neuschäfer + +#include +#include +#include +#include +#include +#include + +struct ntxec_rtc { + struct device *dev; + struct ntxec *ec; +}; + +#define NTXEC_WRITE_YEAR 0x10 +#define NTXEC_WRITE_MONTH 0x11 +#define NTXEC_WRITE_DAY 0x12 +#define NTXEC_WRITE_HOUR 0x13 +#define NTXEC_WRITE_MINUTE 0x14 +#define NTXEC_WRITE_SECOND 0x15 + +#define NTXEC_READ_YM 0x20 +#define NTXEC_READ_DH 0x21 +#define NTXEC_READ_MS 0x22 + + +static int ntxec_read_time(struct device *dev, struct rtc_time *tm) +{ + struct ntxec_rtc *rtc = dev_get_drvdata(dev); + int res; + + res = ntxec_read16(rtc->ec, NTXEC_READ_YM); + if (res < 0) + return res; + + tm->tm_year = (res >> 8) + 100; + tm->tm_mon = (res & 0xff) - 1; + + res = ntxec_read16(rtc->ec, NTXEC_READ_DH); + if (res < 0) + return res; + + tm->tm_mday = res >> 8; + tm->tm_hour = res & 0xff; + + res = ntxec_read16(rtc->ec, NTXEC_READ_MS); + if (res < 0) + return res; + + tm->tm_min = res >> 8; + tm->tm_sec = res & 0xff; + + return 0; +} + +static int ntxec_set_time(struct device *dev, struct rtc_time *tm) +{ + struct ntxec_rtc *rtc = dev_get_drvdata(dev); + int res = 0; + + res |= ntxec_write8(rtc->ec, NTXEC_WRITE_YEAR, tm->tm_year - 100); + res |= ntxec_write8(rtc->ec, NTXEC_WRITE_MONTH, tm->tm_mon + 1); + res |= ntxec_write8(rtc->ec, NTXEC_WRITE_DAY, tm->tm_mday); + res |= ntxec_write8(rtc->ec, NTXEC_WRITE_HOUR, tm->tm_hour); + res |= ntxec_write8(rtc->ec, NTXEC_WRITE_MINUTE, tm->tm_min); + res |= ntxec_write8(rtc->ec, NTXEC_WRITE_SECOND, tm->tm_sec); + + return (res < 0)? -EIO : 0; +} + +static const struct rtc_class_ops ntxec_rtc_ops = { + .read_time = ntxec_read_time, + .set_time = ntxec_set_time, +}; + +static int ntxec_rtc_probe(struct platform_device *pdev) +{ + struct rtc_device *rtcdev; + struct ntxec_rtc *rtc; + + rtc = devm_kzalloc(&pdev->dev, sizeof(*rtc), GFP_KERNEL); + if (!rtc) + return -ENOMEM; + + rtc->dev = &pdev->dev; + rtc->ec = dev_get_drvdata(pdev->dev.parent); + platform_set_drvdata(pdev, rtc); + + rtcdev = devm_rtc_device_register(&pdev->dev, "ntxec-rtc", + &ntxec_rtc_ops, THIS_MODULE); + if (IS_ERR(rtcdev)) + return PTR_ERR(rtc); + + return 0; +} + +static const struct of_device_id ntxec_rtc_of_match[] = { + { .compatible = "netronix,ntxec-rtc" }, + { }, +}; +MODULE_DEVICE_TABLE(of, ntxec_rtc_of_match); + +static struct platform_driver ntxec_rtc_driver = { + .driver = { + .name = "ntxec-rtc", + .of_match_table = ntxec_rtc_of_match, + }, + .probe = ntxec_rtc_probe, +}; +module_platform_driver(ntxec_rtc_driver); + +MODULE_AUTHOR("Jonathan Neuschäfer "); +MODULE_DESCRIPTION("RTC driver for Netronix EC"); +MODULE_LICENSE("GPL"); From patchwork Sat Jun 20 22:42:20 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: 198750 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=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS, INCLUDES_PATCH, MAILING_LIST_MULTI, SIGNED_OFF_BY, SPF_HELO_NONE, SPF_PASS, 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 CC795C433DF for ; Sat, 20 Jun 2020 22:44:13 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 9D7A724731 for ; Sat, 20 Jun 2020 22:44:13 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=gmx.net header.i=@gmx.net header.b="JBv4w0m4" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729130AbgFTWoN (ORCPT ); Sat, 20 Jun 2020 18:44:13 -0400 Received: from mout.gmx.net ([212.227.15.18]:55943 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728547AbgFTWoM (ORCPT ); Sat, 20 Jun 2020 18:44:12 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592693002; bh=exgY33UX1mwRdxvLq8yooJTHfmjPedUVVmEPFY8Wxms=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=JBv4w0m4fUZXFqvaoIbr9dXZUDiQqmvQ4ioKKwtnNr8qgyBa4BG/kOiVOASuUfdz3 yBjIZxS3dzErvIBYnwpky1YCgS0l7H4HVKd+2uPAAPrXdkPTrfPN+8ON0/SukiY+PA sdnQbFWz+tk/LUoxvqth+RzEMaAVmP+9GtfVokZA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([5.146.194.186]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MmlT2-1j328S1M1O-00jnKT; Sun, 21 Jun 2020 00:43:22 +0200 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Cc: Lee Jones , Rob Herring , =?utf-8?q?Jonathan_Neusch=C3=A4fer?= , Thierry Reding , =?utf-8?q?Uwe_Kleine-K?= =?utf-8?b?w7ZuaWc=?= , Alessandro Zummo , Alexandre Belloni , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sam Ravnborg , Linus Walleij , Heiko Stuebner , Stephan Gerhold , Lubomir Rintel , Mark Brown , allen , Mauro Carvalho Chehab , "David S. Miller" , devicetree@vger.kernel.org, linux-pwm@vger.kernel.org, linux-rtc@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Heiko Stuebner , Josua Mayer , Andreas Kemnade , Rob Herring Subject: [RFC PATCH 09/10] MAINTAINERS: Add entry for Netronix embedded controller Date: Sun, 21 Jun 2020 00:42:20 +0200 Message-Id: <20200620224222.1312520-8-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.27.0 In-Reply-To: <20200620224222.1312520-1-j.neuschaefer@gmx.net> References: <20200620224222.1312520-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:a65/Uk4zRPdbL+IjcV4kAQ99Lb08INVuwG5/wNz6bYWQ+nM3Q9r W2TutNVZXIZOUC0etTK03LElim/glyhxLFYIlDNQtixa6qEIkcInbfnpQZT8T68b1EVXG3S OWV1HTw+ppWJfHlftINozC77z0hcFIPAi8An81cPnK4/3eQPKRO8Z1pjVoICXx0dx9bF6WN tcWUPjbQ5/Su6cKOt9qiw== X-UI-Out-Filterresults: notjunk:1; V03:K0:SU2qUZVZ8c0=:/3Mhge4lP4yfuQJDIZRgR0 86BKuRLH7WVPJTbL8W0owLdBkDGHeaG9UT47pAoJYP8IfeVL3vADlbKbgm+auZYEHucvgRdL9 fJFj1bp/29hGVgPQqQRRCBMlm1p5HIOTfduwrRsV8YlQOdzhXvrSqZEo8eJVjz4OygZs7Iv/6 DIUUM87Kc3wrk1pOB0rxZi7aC7fSRufRgaROttB5wGiCCnRcInBouWQEVjVFXKi4hlB7+SMr1 WKXnzEqWE7zlR4hIO+ZsEWO2GWkBWPTU8/oBDbIXEc3NQJ23PbvniHtP4U/iA1xiIzF1+TUaN y5GPteuFASACUnekidZx/icd1yhXMB3I4ND/JSEQpXptG2PUJCKmelmoaxKL9p16sStZnpd1F wgd6jzuJqEN2h9bkraoVP8uUJbWMcx/8YXLY4vIeQ4S0vWUiKZp9kqbudPBJEj9mpM2alBeK7 sNy3LNp3Ytx8wCP0I2jdZ2MylBitP0I7g1D+cLOnwweHT96RNHmDxZy/39kVd6FrS8r2PKsyp JcgZSv1f3MAnpzx4dgMB1wpSiDDtGfD0fchfdCjD9tcBhiInnd0IyVnTDFGyTIexVH9iIhH2G wREdD8OZ4r3dvpfoxtNKpBD3bXJZP8F1e8YXYI0Lnsatmai7DXd+GxmaJpokGSTSeAsOeIoxM mqb0wgkCpRb5waPJlbQ8Fy/U0xwqXB8vMLvVBAxhoCO4CbQ2pyz49doDo0Hyi38hUIFdz9V6x hksBJuOBfro5J/m7uMSsfJukLaLwEu+r/UoTkOEgXXtNj7CZZfY3Q7vHwR5gepy9sttLlzh/+ 4GjzN5wCCzT+j3aEpseGoT+0SsPohsSZVomuwXFILCuWGOy9Wd+IXo2eCayCqvmK8cRN9+lfa 5UQJgUtOpTtpbAi33x3wM3OLl7rkq93mHEszi5aBdfrMdUwgfj5pexKanUGNHMHyYyNevZIUn 2X7w8Tp3p8Mf7J5ZGAqyzTaN4fvhBeRNnT0ROTGeNentL11rZ/LuLFBGXplL1qh2F5SxymYrf RLSPnsSJfgeFExQSz2vbygeelKnnJzUNDe3UToKBr1lrCUtcRED/y7tHC5GeoZ6JBBkEVbvVx bbWlvCNUSThgpz5ROBPR37Z0ehlC51dJhQX+RZOBMlkkAVDWZVOzJ8D89/z7GsHuNFsdN5soY B10kcBiNY4+hFpQc1ZsXIMku6byA+tWotmwEO11tO6K0c1y0en7KdFhRmgxy9SD+JGec8kTpC VLzmO1z4v03UOLN2j Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Let's make sure I'll notice when there are patches for the NTXEC drivers. Signed-off-by: Jonathan Neuschäfer --- MAINTAINERS | 11 +++++++++++ 1 file changed, 11 insertions(+) -- 2.27.0 diff --git a/MAINTAINERS b/MAINTAINERS index 68f21d46614c4..d4333f7490f5d 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -11850,6 +11850,17 @@ F: include/net/netrom.h F: include/uapi/linux/netrom.h F: net/netrom/ +NETRONIX EMBEDDED CONTROLLER +M: Jonathan Neuschäfer +S: Maintained +F: Documentation/devicetree/bindings/mfd/netronix,ntxec.yaml +F: Documentation/devicetree/bindings/pwm/netronix,ntxec-pwm.yaml +F: Documentation/devicetree/bindings/rtc/netronix,ntxec-rtc.yaml +F: drivers/mfd/ntxec.c +F: drivers/pwm/pwm-ntxec.c +F: drivers/rtc/rtc-ntxec.c +F: include/linux/mfd/ntxec.h + NETRONOME ETHERNET DRIVERS M: Jakub Kicinski L: oss-drivers@netronome.com