Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp1601795ybt; Sat, 20 Jun 2020 15:45:19 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwWrALFPXdezywSWQaMX5wME7RyP3JrvWNXI7wZET8WYuRSpvPyjhcjtwP8naLmiM0LIzwV X-Received: by 2002:a17:906:7ad7:: with SMTP id k23mr9839524ejo.439.1592693119772; Sat, 20 Jun 2020 15:45:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1592693119; cv=none; d=google.com; s=arc-20160816; b=fnnGTu3zjOebeZnY5VwXX8QbQqh1k4n2ittrub8eGviMAcqPhOINZBUuXSepsAuIyg cncI/J3Rb2fEfyfhs6ajAtc/tqqbv7ISEmWSZTd3Jv1xuU+L5VbH/C/jN7hgMLYl7yVU 2rWaOPlBsx9n5CIiydXdDBGtKTr0lwyNojByqUr2dNPeXuHNObbGuTxr/SNMduR5vZgP VNeA9jDGaWEI7zS2yKAkxlGt2lNu5Gudy1iSE5jbzEx2dENfZnWDZzCuowgJmVW8a0Y7 PBbvdEijVDrD48WhqzucTsSDp+MZXskiFMKUk/Cu+acASqCmoEDAhprc+ftyLGeUHQSb P43w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=IYYyHvNEv2QRuxHtV61fRlP/PnXBjwbRHXsYKGz/Dlg=; b=IvQDMuJw9axVJkqxI+CZlS2PYQtLgowj3EEGhwme8xO+4OrooBwO4mUzmFn/hEF5bB H3GfZtJp+n9FeHxC6LNYHhbt7Khg5xfmh6f+zNqwMqMa0McRQ9PkeFv8H+UAWbA/LfCd 2Fgvrhyv+L3+saIh4h4Y6l1x1WMqIiBLYwbgO2R6bDNSu33mveMQfHWUGPF2XQb7p5um 5kWsHbEyAeDTi124ho2gXzOZa/6GmoVduIrKMKhCZ0tRZ9/QHw/jDxPtsEMkIbgRu9HZ WGiMoFkYjm+YziwHs4hyFXYGNME0jlPAY5S4uwX8HvzBkmhytAjR1bKrwfMkUYxPF84C BnQg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=kH7Ei4ie; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id cc10si6284300edb.236.2020.06.20.15.44.57; Sat, 20 Jun 2020 15:45:19 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmx.net header.s=badeba3b8450 header.b=kH7Ei4ie; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728559AbgFTWku (ORCPT + 99 others); Sat, 20 Jun 2020 18:40:50 -0400 Received: from mout.gmx.net ([212.227.15.15]:54137 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728501AbgFTWkt (ORCPT ); Sat, 20 Jun 2020 18:40:49 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1592692778; bh=RAGt25AVvKDJqw+9yrZ6l9R/dNd3yaSsWc/0KCEdEok=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=kH7Ei4ieh2JUrr/ROU7TdjAoSKb+n28ITwkBr9SAprIfWshyAfYhOJNu6oYRcAngU 40sLYvte81TXLuxXRbH3mLQM7TObUZdEM9VF4h9jg5ctm424S4ime1otN9Nh0Phs0v cAHzgEHuGLfDyaPRSYvJdUdLaF1XR7EnaHDlRpJk= 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 1N79yQ-1ioF2D3RyW-017Qzr; Sun, 21 Jun 2020 00:39:37 +0200 From: =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Cc: Lee Jones , Rob Herring , =?UTF-8?q?Jonathan=20Neusch=C3=A4fer?= , Thierry Reding , =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= , 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 00/10] Netronix embedded controller driver for Kobo and Tolino ebook readers Date: Sun, 21 Jun 2020 00:39:04 +0200 Message-Id: <20200620223915.1311485-1-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.27.0 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Provags-ID: V03:K1:dB3zkFm6Dp37mtCsRvQnO4dmzEkVo0+p+QNR4wonzzE+gE8OPo7 a/51mlxEjTz9/maj1H88yYo34qY3L1M/CIyNDHBBzdIb/9rkmSm1TdnWS2/gK3n6uLuM9xj vcykaFX5b7WmGtn4RyPj7JEtQyzIkf7LfRByhtJc1hj2ux0ztZimykMSIrlkanH0q3MZm/V L6WuFVU+gAYKtFYZFod/Q== X-Spam-Flag: NO X-UI-Out-Filterresults: notjunk:1;V03:K0:e7qQ6lwVSYM=:97UP3ASFO3a8AXrXwwpeVd KopbwNa1a1hucFz8HTDIO9Qzq/NcOH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zv /7rc6sdWkEJYcbXVpWqeXG7Uv3zdq0TRRjKZtepINKWOXz0PIsW872W67v8rWhD7I9rJePT3L C/lnyDVWj8vLZdfbXlRN0zYlukiaJYGd7X+ynCeNzWOkT52sZgaP4V8KALz4KijDNdt2EA2Ft Mnhcu4IDQHqEPh8Hi Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi, 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 the vendor kernel sources, but in order to all information in a single place, I documented the register interface of the EC on GitHub[4]. A few things still needs to be ironed out, hence the RFC tag: - The reboot/reset handler in patch 3/10 calls into I2C code, which may sleep, but reboot handlers are apparently not allowed to sleep. - I'm not sure I got the YAML DT bindings right. I have also included the plain text DT bindings for reference. Jonathan [1]: http://www.netronixinc.com/products.aspx?ID=3D1 [2]: https://github.com/neuschaefer/linux/wiki/Netronix-MSP430-embedded-co= ntroller Jonathan Neusch=C3=A4fer (10): DT bindings in plain text format dt-bindings: Add vendor prefix for Netronix, Inc. dt-bindings: mfd: Add binding for Netronix's embedded controller mfd: Add base driver for Netronix embedded controller dt-bindings: pwm: Add bindings for PWM function in Netronix EC pwm: ntxec: Add driver for PWM function in Netronix EC dt-bindings: rtc: Add bindings for Netronix embedded controller RTC 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.txt | 58 ++++++ .../bindings/mfd/netronix,ntxec.yaml | 77 +++++++ .../bindings/pwm/netronix,ntxec-pwm.txt | 27 +++ .../bindings/pwm/netronix,ntxec-pwm.yaml | 33 +++ .../bindings/rtc/netronix,ntxec-rtc.txt | 17 ++ .../bindings/rtc/netronix,ntxec-rtc.yaml | 27 +++ .../devicetree/bindings/vendor-prefixes.yaml | 2 + MAINTAINERS | 11 + arch/arm/boot/dts/imx50-kobo-aura.dts | 27 ++- drivers/mfd/Kconfig | 7 + drivers/mfd/Makefile | 1 + drivers/mfd/ntxec.c | 188 ++++++++++++++++++ drivers/pwm/Kconfig | 4 + drivers/pwm/Makefile | 1 + drivers/pwm/pwm-ntxec.c | 148 ++++++++++++++ drivers/rtc/Kconfig | 4 + drivers/rtc/Makefile | 1 + drivers/rtc/rtc-ntxec.c | 115 +++++++++++ include/linux/mfd/ntxec.h | 30 +++ 19 files changed, 777 insertions(+), 1 deletion(-) create mode 100644 Documentation/devicetree/bindings/mfd/netronix,ntxec.t= xt create mode 100644 Documentation/devicetree/bindings/mfd/netronix,ntxec.y= aml create mode 100644 Documentation/devicetree/bindings/pwm/netronix,ntxec-p= wm.txt create mode 100644 Documentation/devicetree/bindings/pwm/netronix,ntxec-p= wm.yaml create mode 100644 Documentation/devicetree/bindings/rtc/netronix,ntxec-r= tc.txt create mode 100644 Documentation/devicetree/bindings/rtc/netronix,ntxec-r= tc.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 =2D- 2.27.0