Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp1625910pxa; Sun, 23 Aug 2020 10:01:09 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxIM8wUQVevZ+Vw43YeRwtCE/kzntck+hgGhkSBSGcv1E1TqZxhlThve/yFJxUNZPexZxE1 X-Received: by 2002:a17:906:e2d6:: with SMTP id gr22mr2113723ejb.455.1598202069674; Sun, 23 Aug 2020 10:01:09 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1598202069; cv=none; d=google.com; s=arc-20160816; b=NQBaXX1sQeo+7EwaSD2x9q0rSPRuAKI+QWU1fmtrkh92hwc+7xNxISL5SfO1dnTSVO W2myRFhZQeNsQVYefznT3UQ8Ino55yMNIhqwn1b6rrshA6U65+YLlPBK6CPPlvztC2Bj A+YbGHE8mha2b+kvJfRpEcIugom/aGyUzVJLlGpydkjztN+KNDdYf4xc+OV8UkTr/wso tf65lvkU6ZLlO/EP5qUaOI+n20sXdE9ZSXoxlVlocJDyFccWrCFwwvevYoX7BLqZ++5m 6hDcUi3oTOQBx55fZsBe/ywu/Y2gi5G3fNxZWtR37Uml5LfVkDC/UbQiWNSKrDVCSVRU tPkw== 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 :references:in-reply-to:message-id:subject:cc:to:from:date :dkim-signature; bh=YGI9CUlHRdCGssJcQqqFI32/JdSs/OG4pNXNnIVDjlM=; b=FtooHwCNSXGk5gVb6JQlB6TVLexx2yl8d5HS5sCJzGHMjhY5EJbs98nqN4f70xFzj7 GERhKbuiJDNbMPIqaM/av8xjwqAuN0uEcMdZVilySHPOco9VXoA72bAC3lPmantC1KIb uWEvftT/IxeLaG1QVvrvK4ixmCz76APqA/lH9zN1ZaarL4dzCmy3phPJOPOYDIKwhIbH nm8AtCsCftsReewh0XX6+Sz3vlfbuwXRhNnuskMw5pcu4K8xg2uPDF6jxPd+896Bq+AS 1SAgbZ2HoFCy/4WauBTbyWeqqfIL+k1oXGoUFC2HKowCUZ2VXy5LrHnr4siItak/c0EX YeKA== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@kemnade.info header.s=20180802 header.b=Va45Xos9; 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 a9si1059209ejg.26.2020.08.23.10.00.46; Sun, 23 Aug 2020 10:01:09 -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=fail header.i=@kemnade.info header.s=20180802 header.b=Va45Xos9; 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 S1726792AbgHWQi2 (ORCPT + 99 others); Sun, 23 Aug 2020 12:38:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725887AbgHWQi1 (ORCPT ); Sun, 23 Aug 2020 12:38:27 -0400 Received: from mail.andi.de1.cc (mail.andi.de1.cc [IPv6:2a01:238:4321:8900:456f:ecd6:43e:202c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 92800C061573; Sun, 23 Aug 2020 09:38:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=kemnade.info; s=20180802; h=Content-Transfer-Encoding:Content-Type: MIME-Version:References:In-Reply-To:Message-ID:Subject:Cc:To:From:Date:Sender :Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help: List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=YGI9CUlHRdCGssJcQqqFI32/JdSs/OG4pNXNnIVDjlM=; b=Va45Xos9+GWduEXlVaM2nPXmrT kNIIyeulu4SvMYVxkIDYzUGJYtXKC2XFEZzwYhiUjyxUTgBetHfBBOs1bNb1hQX1iMsY9508jeof3 uuvT50KEIZ5SnJ5kzshTU8mIljOvsZsa8+StULVXDSVkQ1DN23Chpw1WxkOZpjFah/vQ=; Received: from pd9e2f105.dip0.t-ipconnect.de ([217.226.241.5] helo=aktux) by mail.andi.de1.cc with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1k9t0R-0004GD-O8; Sun, 23 Aug 2020 18:38:07 +0200 Date: Sun, 23 Aug 2020 18:38:06 +0200 From: Andreas Kemnade To: Shawn Guo Cc: robh+dt@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, linux-imx@nxp.com, Anson.Huang@nxp.com, marcel.ziswiler@toradex.com, sebastien.szymanski@armadeus.com, michael@walle.cc, rjones@gateworks.com, leoyang.li@nxp.com, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, j.neuschaefer@gmx.net, letux-kernel@openphoenux.org Subject: Re: [PATCH RFC 2/2] ARM: dts: imx: add devicetree for Tolino Shine 2 HD Message-ID: <20200823183806.4a5c4134@aktux> In-Reply-To: <20200823014226.GG30094@dragon> References: <20200815193336.21598-1-andreas@kemnade.info> <20200815193336.21598-3-andreas@kemnade.info> <20200823014226.GG30094@dragon> X-Mailer: Claws Mail 3.17.3 (GTK+ 2.24.32; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-Spam-Score: -1.0 (-) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 23 Aug 2020 09:42:31 +0800 Shawn Guo wrote: > On Sat, Aug 15, 2020 at 09:33:36PM +0200, Andreas Kemnade wrote: > > This adds a devicetree for the Tolino Shine 2 HD Ebook reader. It is based > > on boards marked with "37NB-E60QF0+4A2". It is equipped with an i.MX6SL > > SoC. > > > > Expected to work: > > - Buttons > > - Wifi > > - Touchscreen > > - LED > > - uSD > > - USB > > - RTC > > > > Not working due to missing drivers: > > - Backlight (requires NTXEC driver) > > - EPD > > > > Not working due to unknown reasons: > > - deep sleep (echo standby >/sys/power/state works), > > wakeup fails when imx_gpc_pre_suspend(true) was called. > > > > Signed-off-by: Andreas Kemnade > > --- > > Reason for RFC: The suspend trouble might be caused by bad devicetree. > > But as the devicetree is already useful I decided to submit it. > > > > arch/arm/boot/dts/Makefile | 1 + > > arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts | 582 +++++++++++++++++++ > > 2 files changed, 583 insertions(+) > > create mode 100644 arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts > > > > diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile > > index e6a1cac0bfc7..c65fa3852246 100644 > > --- a/arch/arm/boot/dts/Makefile > > +++ b/arch/arm/boot/dts/Makefile > > @@ -581,6 +581,7 @@ dtb-$(CONFIG_SOC_IMX6Q) += \ > > imx6qp-zii-rdu2.dtb > > dtb-$(CONFIG_SOC_IMX6SL) += \ > > imx6sl-evk.dtb \ > > + imx6sl-tolino-shine2hd.dtb \ > > imx6sl-tolino-shine3.dtb \ > > imx6sl-warp.dtb > > dtb-$(CONFIG_SOC_IMX6SLL) += \ > > diff --git a/arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts b/arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts > > new file mode 100644 > > index 000000000000..7b28e19a1d98 > > --- /dev/null > > +++ b/arch/arm/boot/dts/imx6sl-tolino-shine2hd.dts > > @@ -0,0 +1,582 @@ > > +// SPDX-License-Identifier: (GPL-2.0) > > +/* > > + * Device tree for the Tolino Shine 2 HD ebook reader > > + * > > + * Name on mainboard is: 37NB-E60QF0+4A2 > > + * Serials start with: E60QF2 > > + * > > + * Copyright 2020 Andreas Kemnade > > + */ > > + > > +/dts-v1/; > > + > > +#include > > +#include > > +#include "imx6sl.dtsi" > > + > > +/ { > > + model = "Tolino Shine 2 HD"; > > + compatible = "kobo,tolino-shine2hd", "fsl,imx6sl"; > > + > > + chosen { > > + stdout-path = &uart1; > > + }; > > + > > + gpio_keys: gpio-keys { > > + compatible = "gpio-keys"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&pinctrl_gpio_keys>; > > + > > + cover { > > + label = "Cover"; > > + gpios = <&gpio5 12 GPIO_ACTIVE_LOW>; > > + linux,code = ; > > + linux,input-type = ; > > + wakeup-source; > > + }; > > + > > + fl { > > + label = "Frontlight"; > > + gpios = <&gpio3 26 GPIO_ACTIVE_LOW>; > > + linux,code = ; > > + }; > > + > > + home { > > + label = "Home"; > > + gpios = <&gpio3 25 GPIO_ACTIVE_LOW>; > > + linux,code = ; > > + }; > > + > > + power { > > + label = "Power"; > > + gpios = <&gpio5 8 GPIO_ACTIVE_LOW>; > > + linux,code = ; > > + wakeup-source; > > + }; > > + }; > > + > > + leds: leds { > > + compatible = "gpio-leds"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&pinctrl_led>; > > + > > + on { > > + label = "tolinoshine2hd:white:on"; > > + gpios = <&gpio5 13 GPIO_ACTIVE_LOW>; > > + linux,default-trigger = "timer"; > > + }; > > + }; > > + > > + memory@80000000 { > > + device_type = "memory"; > > + reg = <0x80000000 0x20000000>; > > + }; > > + > > + reg_wifi: regulator-wifi { > > + compatible = "regulator-fixed"; > > + pinctrl-names = "default"; > > + pinctrl-0 = <&pinctrl_wifi_power>; > > + regulator-name = "SD3_SPWR"; > > + regulator-min-microvolt = <3000000>; > > + regulator-max-microvolt = <3000000>; > > + gpio = <&gpio4 29 GPIO_ACTIVE_HIGH>; > > Missing enable-active-high? > no. I should rather use GPIO_ACTIVE_LOW to avoid that confusion. corresponding code in vendor kernel is the function _ntx_wifi_power_ctrl() Regards, Andreas