From patchwork Tue Dec 8 01:10:00 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: 11957409 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.7 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,URIBL_BLOCKED,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 9D664C433FE for ; Tue, 8 Dec 2020 02:13:05 +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 5351823A55 for ; Tue, 8 Dec 2020 02:13:05 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 5351823A55 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=f8WdVe6uHIagX4XJFkZWIAdRoHblIXMVlkIXUCyYiJI=; b=VPs+MWNXeor8aNCAo9fg1jv+x YSPOKBKjtEX7tqDn5QPeBUvgoLaklZoQLMflLQDiyTZVVSzYsTIF7kQs+CzLJgxxQrhLK2BxPV/Al vocWgyOdU47SQ6XnHp1aG++rz83iEysjCe3ZhUcUBbOBrFR1D2kV3d3NTfzkTmoerP2K8jsYnrr80 q8LjsGfb7waQTPPaMvZF4W4UaHUe2YX/T+ISrJdrBDyuG1w6QBcjnkNZ7PX7UzjWefnUCZ7IO//kO tDFvN8tnDYpHMLjZG3OQh28C37CtjfBxjUumwEYlXY+FVkqlElwoOSzDef2BuE/8TCijsGeL3we8f OBAlXiBkg==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmSTp-0000ZE-NB; Tue, 08 Dec 2020 02:11:53 +0000 Received: from mout.gmx.net ([212.227.15.19]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1kmSTa-0000UD-5y for linux-arm-kernel@lists.infradead.org; Tue, 08 Dec 2020 02:11:40 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1607393466; bh=OLRgMJVF5Woco/wE8srh876TdhfxC/CBxXp95Aag1Sw=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date:In-Reply-To:References; b=h/s6ucfcAiEWLKJPFuyYLAH+iY+em/PysCegmqP6m2AINFu0aMUUEKCME+fUsNw5k VjYQNKg34hGOlNNHDj/7rbnV/6Sis+eOrz1hCOcLAUSYJL8gWUJA+0PQde4/7Aw+Fg tdlO3IOh5oabvupfmWZbUWololiuP7hZDUineTMo= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from longitude ([37.201.214.162]) by mail.gmx.com (mrgmx005 [212.227.17.190]) with ESMTPSA (Nemesis) id 1M8ykW-1kpEQ02tHi-0063xc; Tue, 08 Dec 2020 03:11:06 +0100 From: =?utf-8?q?Jonathan_Neusch=C3=A4fer?= To: linux-kernel@vger.kernel.org Subject: [PATCH v6 7/7] ARM: dts: imx50-kobo-aura: Add Netronix embedded controller Date: Tue, 8 Dec 2020 02:10:00 +0100 Message-Id: <20201208011000.3060239-8-j.neuschaefer@gmx.net> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20201208011000.3060239-1-j.neuschaefer@gmx.net> References: <20201208011000.3060239-1-j.neuschaefer@gmx.net> MIME-Version: 1.0 X-Provags-ID: V03:K1:Hj42vB6Qt5VgXLNmP/8JQZYM4kptpRvcy4iGsqOpkwfovVUgks6 WcaKaf0DX/ow8DkZUB7XehG1fE2N1KGjZoaNLe6LvPjKwp9JCNe+ebRuXSZtP0nWOldLFnA 1D9Bt1b6hLvKp8hUCIBj3DZkUzaTPXCqH1v0YnN7muafylxCdv8fvrXf5IKfuo4ipvKZPMD CMDvtIqLqP6anv0KcmnTA== X-UI-Out-Filterresults: notjunk:1;V03:K0:7bZdBAIBoh8=:eSr3n2acQWh9DMJwYzNd6D 50QVJYXuhBdvO/d+HEEQuzBiICRC5g8c4BY/U/8+SMOL2+2y+cvYcdwxGbKa3uBvugL0u+MmG xL0NBLlyBCbFxEyQWnaDuX7QsCW82E1VPX3q21ki1oxDXBDAGRdJzHncVKUoqFDk6bapwwvu1 DoXMMYHsr02c0/pdL0PpAkRv/gKkDImR9BilZiEeN1rVMOeuH4LtGquod0ketLqtg4nuKXnU4 lU6L+DJiSRsPH/5sQppSieoh32+WYuxK0tGfcJuowZdXlsWIHH+RMWyx5zcoVGjqdbqpASpXL 2jLvdqsg3CYWrq6sJpIyM0VJpF7HI+N1sctwVl8Bg05X2TrDEVfklERrBt6TY1E0moqEfE3a/ 5wEvrktwFuGJvOYEH2T0UMNUIhpa3R0W+/RPY5G9c8r6hlv6ZMjhHXjUeS9dMyORAnnz0elgc IKha9ovKfK6YOB0GP+KfD6NNxzObLSmc/iMNDiwHxQwZ1tAvTYHyy8m/hDh3KwxxGYxDGlmIh 26FPx5opCvVjTYTUd2BeGwReouFMwJI7JGRik6eIEkKyD2eaw+XKrqKgsZ/8pA+YYpj3h1CDM FHh2ot19hF/CT4RQrL+I/6T6uM7kUGhPJMT81dDm5ugjqMHZk3m0e1GERkx21ikXNLC9+RkMV 3VeDCqL6INycdeE5MhZyTzLoypEjA0P77ElBL0PxFwrsU2MJ0v45ckt1U//IagUwHe69351JK IpbQgtVxcHqt6PVwZBw/XWU+Y9qrDGMocaGdWbFMjWwT9mdfGA+KffbJ1p7M/fF1/XU8TkWZR vmcabzcPtSAmRQMQaOyDFeznBfKcSiq0YKggzg9VKvSurGaD8g3fWP3NzNgvW5pUcQYxATjMD xuuMxEprrDhto9TiiOsg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20201207_211138_522536_CF5938EA X-CRM114-Status: GOOD ( 16.50 ) 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, v6: - no changes v4: - 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