From patchwork Sun Jan 24 21:41:27 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: 12042675 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,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 63E49C433DB for ; Sun, 24 Jan 2021 22:45:22 +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 1999222CA2 for ; Sun, 24 Jan 2021 22:45:22 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 1999222CA2 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=95UjD0B1KZ/Pn2XqeOkETcFN/uovRem+agBfSETv7x0=; b=aRZ9bt+Y2SuTeSLXaG9+ZGbcE BzOIdAmyCtQnsUDgcUEnwfC79VT5ChbajwZUpqYbe/OT7YBbKjE4rZi5v4KXEZR6OPYHRVJHFVKf5 l6OOS53xyh4i9pmS4+Cb9jiUpjsVWsWPVqEUVYCetDgFdbKylDzR/fBi7FNouQGDwQEfupP87HVh/ rA3gTPe9FdjQmDEBtTahqBITbl9KzB9rj4Mgjgdjg3yj7gyJyE65fqI28S1W+fqDAjerniwJR2/VM npYexrmrT8opH3SYxWZXybXC1LTndfsYzOfsjcVWZi3XNNXjuElffHvwkmEBgpdD66UgOKb+0yB+W ONhPrxtgA==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1l3o6x-0003em-Bj; Sun, 24 Jan 2021 22:43:59 +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 1l3o6u-0003dy-89 for linux-arm-kernel@lists.infradead.org; Sun, 24 Jan 2021 22:43:57 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1611528196; bh=sg3yBbp50vfrYLkKAlXRA+RR1vEiKn1pGAikI0/PYIU=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=SmZraJ6POwAcOMCHuw+hHwm2dKtjPP8/eHrBwgbng3FZZbl0KMNN5VIHQ/vEO/AJW pTSrlPTf8brOAqkBDbIExGEcGKblMGccjeb/Ww1AHClPT9vmyXrZKLdQlvkybhbwn4 Fm4GMHkuqc84F6ggdn3LWA7KnDS2oxdGWBeyRB5Q= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.215.209]) by mail.gmx.net (mrgmx105 [212.227.17.168]) with ESMTPSA (Nemesis) id 1MdNcG-1lcrrw0y2K-00ZO2Q; Sun, 24 Jan 2021 23:43:16 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v9 7/7] ARM: dts: imx50-kobo-aura: Add Netronix embedded controller Date: Sun, 24 Jan 2021 22:41:27 +0100 Message-Id: <20210124214127.3631530-8-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210124214127.3631530-1-j.neuschaefer@gmx.net> References: <20210124214127.3631530-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:0Sy4IOcIVDcvHo+UWdq+IOx1Cv41T9tOawPNDQyq0hxHhOWhB00 +DdNuhs4FPEOKxVGKz+ki5FPiKl4K/EZaDmAF/n9psmSmYjX9vwRmNf338yTmLdoeJetDOj kj4cOfyGGnvQZ+W762oMkfx8/cjgrc1DjPz9NqCeTHmvNqrMrAkfj5gweHQGdHpoPrOy3an pJhaBFQd/fuzw97036VPg== X-UI-Out-Filterresults: notjunk:1;V03:K0:gNgS/8uAUow=:xyhyjNnOaXX0RGp7ZKeEzB U+goVGK2xu2XcM2RfXhLVRQ0Iu3SLWsFJKuTiZRJR1P1hovwVWc4gzlt4e5CoOqWMa2NRILMA rwiVZ608I0pmcNw+7bN9DMY5fQPOlowVoSXzsuheDew/JpYuLXTGcyGugxNyArYBRy9GAo6br WHqHwfBWTVb2209DJ37KPE6bFNcoLAWTV9rWrK1sqzRlWuSz82mA7BzIX1KR8z/0e5WXwM9Jx m+tTZgMDIMI4bz1j1iG/RJYMJRLDu0S2iTM3OGlY2Jgr7U/dpyWnwhbY8KcNy8EHe0cjAvGn1 pbuo2FJ5t7bHvwfvNJg8VYO926OktfQNh+oS1N86ryRtFATr1vpbRaepFw1aByHxQBn6hobun 7xAoHqrP/P9wK/9mp3yn/2fH0lYFTsQ2GI0i3RDxyvvKpkOCqu+80d4d3WWgmtOKYI2EZwK6b MZ5sHGNKd7MruJJ8bHw/F2KflMm0XEG1WuFhSwrhpFHddZSz3UakOu1Y6Az9r4p1zGDwG1z4z HYKwpuqacW5o1klizXZeLY7glrQh8pabdNk4z5xfqLGyu+x8lAs46r5ymG2uRAqD7M3ngaRuU Ltmx421O3QsXMhhUX85TJKxigVBMpENqyNnT0tCXyJ8WnBTvGnFouAn2IAt/suvE2oQk+2irQ yLUiXE/MsQItUayTdKP12F+6T7JNfIE+fnLlvdan6XlFm9T6x2Dzktn0QKUh8dVtNJ2TLZwjM c6Ewk4aWOAvNvY1wEx1RCPDgGboC4AVvIWwuEZ0PwkZELl0Rf9B4orXJbIbcB8BiolIsisi1I rXZagP3muLh0Sm0WX54goXqGRvLDDWPcBccmgIFT/+Yg+j/BT1upowy9L62nwYcN2XOxrC/rn Wyt9JYHsrKi2LIvgitrw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210124_174356_758634_6595AEC7 X-CRM114-Status: GOOD ( 16.88 ) 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 Enable the Netronix EC on the Kobo Aura ebook reader. Several features are still missing: - Frontlight/backlight. The vendor kernel drives the frontlight LED using the PWM output of the EC and an additional boost pin that increases the brightness. - Battery monitoring - Interrupts for RTC alarm and low-battery events Signed-off-by: Jonathan Neuschäfer --- v5-v9: - no changes v4: - https://lore.kernel.org/lkml/20201123000913.1506944-1-j.neuschaefer@gmx.net/ - Add 'grp' suffix to pinctrl node v3: - Remove interrupt-controller property from embedded-controller node - subnodes of embedded-controller node in to the main node v2: - Fix pwm-cells property (should be 2, not 1) --- arch/arm/boot/dts/imx50-kobo-aura.dts | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) -- 2.29.2 diff --git a/arch/arm/boot/dts/imx50-kobo-aura.dts b/arch/arm/boot/dts/imx50-kobo-aura.dts index 97cfd970fe742..82ce8c43be867 100644 --- a/arch/arm/boot/dts/imx50-kobo-aura.dts +++ b/arch/arm/boot/dts/imx50-kobo-aura.dts @@ -143,10 +143,24 @@ &i2c3 { pinctrl-0 = <&pinctrl_i2c3>; status = "okay"; - /* TODO: embedded controller at 0x43 */ + embedded-controller@43 { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_ec>; + compatible = "netronix,ntxec"; + reg = <0x43>; + system-power-controller; + interrupts-extended = <&gpio4 11 IRQ_TYPE_EDGE_FALLING>; + #pwm-cells = <2>; + }; }; &iomuxc { + pinctrl_ec: ecgrp { + fsl,pins = < + MX50_PAD_CSPI_SS0__GPIO4_11 0x0 /* INT */ + >; + }; + pinctrl_gpiokeys: gpiokeysgrp { fsl,pins = < MX50_PAD_CSPI_MISO__GPIO4_10 0x0