From patchwork Sat Jan 9 18:02:20 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: 360243 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=-15.7 required=3.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,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=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 7CFC4C433E0 for ; Sat, 9 Jan 2021 19:08:10 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 49CA82399C for ; Sat, 9 Jan 2021 19:08:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726263AbhAITHf (ORCPT ); Sat, 9 Jan 2021 14:07:35 -0500 Received: from mout.gmx.net ([212.227.15.19]:52635 "EHLO mout.gmx.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726251AbhAITHe (ORCPT ); Sat, 9 Jan 2021 14:07:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1610219126; bh=beDFWMFQH5cVEblcA3Gd98HHThRVyNU/HW/JMjwDv+E=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=GVrMersmNZOPW3JOV9lRKY4Mf0rbxmgsdavGx7fcZxnOTDIpu9wmgncZMOacZKMrD /Oix2U8C5r+AzDeOcKMtGBsxCs8YilxRHThui6aYOWm3+3FDlXbJiBhxi1I31UjPDn Rk+/Hb2Tkthe2zvkD509S54sQjCvfEOXsG7k3bvA= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.215.57]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MEUzA-1kjP2K2Uqw-00G036; Sat, 09 Jan 2021 20:05:26 +0100 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 , Arnd Bergmann , Daniel Palmer , Andy Shevchenko Subject: [PATCH v7 7/7] ARM: dts: imx50-kobo-aura: Add Netronix embedded controller Date: Sat, 9 Jan 2021 19:02:20 +0100 Message-Id: <20210109180220.121511-8-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210109180220.121511-1-j.neuschaefer@gmx.net> References: <20210109180220.121511-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:HOscdZhtcppg+O3FCnk9a2KxpaGEBDszhkK1cm9MYgZycE754P1 pf3Dc1S8tipzSe8hh2qchdOFrj+1GporoDZ6wJAIFJEysWL/9ZhShhc93QRVkhgvt+MQcNu VBypSFDmK1n6VJzhK75zALkB2DN7lwnQit1E32fSUddaLekOdhtWEATpKAK3FRUA2luVzcQ Fz3FXszv+SrcpUWBQLaIA== X-UI-Out-Filterresults: notjunk:1; V03:K0:y+0rmWr9ruU=:5wKkfmM9TRYM4p1/NxSKzY LtiJdANiuIem7DV3QI8QmK5ysefqJdmPuilmM13PlPOOiPibZ23zE+/sbqLHaa8V36SlJlH6Q rO63muOUa+laFA1DOMw7lIYW3juLbNTPyyd7K6FHlDATGZGna6OfDIfQ3fgSc+CvoCZoqEPbb JvHPDP9Jnpi3GgfwsKwzqmwXXDObX1oc6rnr9awhGJeX26ynQ1yP75anhNPkz20OlgU5klw0A x4zPmPJ/ZPzon2+VPc59vGxVEiaUx7O5BobNBbixT3kvhfatEiBy0a8dv6OWtfa1T5uQkA4zI 2SGhvcQl25aME1j75JX9pmCLnKjE7Hdm1YHzkhntV3F4M9rCjoek81qQ4Hl8RR6peu9YWnRqs J5c9Zhxnl4IFB2jFQGYSrfLWNidNEOfzJaLtfCDifGGKf/YoSLD/PDhA4r2SDeYNdHBwZs5go u2pr46lHmpYnhDU+dvXaqYCOnIGCZH+VDBZWg23laDXyXEjADbPzQjBxLv4+vsYCNea66DUlZ L8PJOvamjiGSlCAlKeAMwSRut55t3V2rMhJXkuOXU0cXUo61bnI9+YqdlJuhyidSWnWLpBvpO UlI9Y6ivRv1Y/kpWQNOFYJlvUgOydTe86j3fTw+T5yWYOcDoAWqCjiuL7NpojIP3Vq0DoQjPl bEg5by99YVevegZM1jLPJJpk2kdEFcL5UXXRwTzgTmWYceI3dAZ2FVnBuyJej6SRopftT4rPq 91SV1l0IrS0r56js19XMOV1GKnvGZGQw/vvHl7vVNLvFEG/HEN0HIV1arCB7v4B6RKKyuWYNh iGdkrfvUsVuZ24qC55oEo22MA+CHtw1E7NqZ97bxEWflXwkatdX22piJPP/9EzSkqMECONw73 GoOz6yZ5b2cmg5Ye1zPQ== Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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-v7: - no changes v4: - https://lore.kernel.org/lkml/20201123000913.1506944-1-j.neuschaefer@gmx.net/ - Add 'grp' suffix to pinctrl node v3: - https://lore.kernel.org/lkml/20200925050818.2512375-1-j.neuschaefer@gmx.net/ - Remove interrupt-controller property from embedded-controller node - subnodes of embedded-controller node in to the main node v2: - https://lore.kernel.org/lkml/20200905144503.1067124-3-j.neuschaefer@gmx.net/ - 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