From patchwork Fri Dec 21 13:46:36 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Philippe Schenker X-Patchwork-Id: 10740463 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id C84F6924 for ; Fri, 21 Dec 2018 13:47:26 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id B66D6284C3 for ; Fri, 21 Dec 2018 13:47:26 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id AA1B3287A5; Fri, 21 Dec 2018 13:47:26 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,MAILING_LIST_MULTI,RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 4A6B1284C3 for ; Fri, 21 Dec 2018 13:47:26 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.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=Zj6QEyEZKE7F+i5XRPDWV5nxHdCH50yAJEo0/bG/suI=; b=TYdteU/JDh6wDA 9YRkBLnbRTQO6iDoB4DiWD3nVHu7rvgCc9smazODhI8OSSpxlGrbjmNnzSvjyZ276XqgJRWVLIdtG DjFyjHfHkp0B6Xfb/6kZtbVZWM2ab4FzMditd9gK2Haqzf7NFeKgEn1xl4AtgDorRTnSs1bwU/mwE 0T/Dn/FL6mzIPvA852KcFHP+keHh8nJh6bgKi7hEe9oCbEl0L9NHsdbcSQFZiH7vXdd2a9GnVOzxe ucq5KG1mmKJeSccEv0hKbnvp4tUX5XxE9V4WfZXChWpqmNHLMuRpKzFb+AMvedYxeW1cW7YlFk6Yw k/JM6KXLBhV65JmxZqBw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.90_1 #2 (Red Hat Linux)) id 1gaL97-00048a-1p; Fri, 21 Dec 2018 13:47:21 +0000 Received: from mxout017.mail.hostpoint.ch ([2a00:d70:0:e::317]) by bombadil.infradead.org with esmtps (Exim 4.90_1 #2 (Red Hat Linux)) id 1gaL8w-0003yD-F1 for linux-arm-kernel@lists.infradead.org; Fri, 21 Dec 2018 13:47:12 +0000 Received: from [10.0.2.46] (helo=asmtp013.mail.hostpoint.ch) by mxout017.mail.hostpoint.ch with esmtp (Exim 4.91 (FreeBSD)) (envelope-from ) id 1gaL8g-0005bs-KB; Fri, 21 Dec 2018 14:46:54 +0100 Received: from [46.140.72.82] (helo=philippe-pc.toradex.int) by asmtp013.mail.hostpoint.ch with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.91 (FreeBSD)) (envelope-from ) id 1gaL8g-000BCi-E0; Fri, 21 Dec 2018 14:46:54 +0100 X-Authenticated-Sender-Id: dev@pschenker.ch From: Philippe Schenker To: jic23@kernel.org, marcel.ziswiler@toradex.com, stefan@agner.ch Subject: [PATCH v5 7/8] ARM: dts: Add stmpe-adc DT node to Toradex iMX6 modules Date: Fri, 21 Dec 2018 14:46:36 +0100 Message-Id: <20181221134638.20600-8-dev@pschenker.ch> X-Mailer: git-send-email 2.19.2 In-Reply-To: <20181221134638.20600-1-dev@pschenker.ch> References: <20181221134638.20600-1-dev@pschenker.ch> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20181221_054710_501452_0E3E645E X-CRM114-Status: GOOD ( 10.68 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Rutland , robh@kernel.org, alexandre.torgue@st.com, devicetree@vger.kernel.org, lee.jones@linaro.org, Sascha Hauer , dmitry.torokhov@gmail.com, linux-kernel@vger.kernel.org, Rob Herring , Philippe Schenker , thierry.reding@gmail.com, linux-arm-kernel@lists.infradead.org, Pengutronix Kernel Team , Fabio Estevam , digetx@gmail.com, shawnguo@kernel.org, coquelin.stm32@gmail.com, NXP Linux Team Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+patchwork-linux-arm=patchwork.kernel.org@lists.infradead.org X-Virus-Scanned: ClamAV using ClamSMTP From: Philippe Schenker Add the stmpe-adc DT node as found on Toradex iMX6 modules Signed-off-by: Philippe Schenker Acked-by: Marcel Ziswiler --- Changes in v5: None Changes in v4: - Moved T30 devicetree settings to separate commit Changes in v3: - None Changes in v2: - Put common ADC settings in mfd arch/arm/boot/dts/imx6qdl-apalis.dtsi | 22 ++++++++++++++-------- arch/arm/boot/dts/imx6qdl-colibri.dtsi | 23 +++++++++++++++-------- 2 files changed, 29 insertions(+), 16 deletions(-) diff --git a/arch/arm/boot/dts/imx6qdl-apalis.dtsi b/arch/arm/boot/dts/imx6qdl-apalis.dtsi index 3dc99dd8dde1..8db476d8978d 100644 --- a/arch/arm/boot/dts/imx6qdl-apalis.dtsi +++ b/arch/arm/boot/dts/imx6qdl-apalis.dtsi @@ -331,11 +331,18 @@ id = <0>; blocks = <0x5>; irq-trigger = <0x1>; + /* 3.25 MHz ADC clock speed */ + st,adc-freq = <1>; + /* 12-bit ADC */ + st,mod-12b = <1>; + /* internal ADC reference */ + st,ref-sel = <0>; + /* ADC converstion time: 80 clocks */ + st,sample-time = <4>; + /* forbid to use ADC channels 3-0 (touch) */ stmpe_touchscreen { compatible = "st,stmpe-ts"; - /* 3.25 MHz ADC clock speed */ - st,adc-freq = <1>; /* 8 sample average control */ st,ave-ctrl = <3>; /* 7 length fractional part in z */ @@ -345,17 +352,16 @@ * current limit value */ st,i-drive = <1>; - /* 12-bit ADC */ - st,mod-12b = <1>; - /* internal ADC reference */ - st,ref-sel = <0>; - /* ADC converstion time: 80 clocks */ - st,sample-time = <4>; /* 1 ms panel driver settling time */ st,settling = <3>; /* 5 ms touch detect interrupt delay */ st,touch-det-delay = <5>; }; + + stmpe_adc { + compatible = "st,stmpe-adc"; + st,norequest-mask = <0x0F>; + }; }; }; diff --git a/arch/arm/boot/dts/imx6qdl-colibri.dtsi b/arch/arm/boot/dts/imx6qdl-colibri.dtsi index 87e15e7cb32b..2e303d79c7f8 100644 --- a/arch/arm/boot/dts/imx6qdl-colibri.dtsi +++ b/arch/arm/boot/dts/imx6qdl-colibri.dtsi @@ -262,11 +262,18 @@ id = <0>; blocks = <0x5>; irq-trigger = <0x1>; + /* 3.25 MHz ADC clock speed */ + st,adc-freq = <1>; + /* 12-bit ADC */ + st,mod-12b = <1>; + /* internal ADC reference */ + st,ref-sel = <0>; + /* ADC converstion time: 80 clocks */ + st,sample-time = <4>; + /* forbid to use ADC channels 3-0 (touch) */ stmpe_touchscreen { compatible = "st,stmpe-ts"; - /* 3.25 MHz ADC clock speed */ - st,adc-freq = <1>; /* 8 sample average control */ st,ave-ctrl = <3>; /* 7 length fractional part in z */ @@ -276,17 +283,17 @@ * current limit value */ st,i-drive = <1>; - /* 12-bit ADC */ - st,mod-12b = <1>; - /* internal ADC reference */ - st,ref-sel = <0>; - /* ADC converstion time: 80 clocks */ - st,sample-time = <4>; /* 1 ms panel driver settling time */ st,settling = <3>; /* 5 ms touch detect interrupt delay */ st,touch-det-delay = <5>; }; + + stmpe_adc { + compatible = "st,stmpe-adc"; + /* 3.25 MHz ADC clock speed */ + st,norequest-mask = <0x0F>; + }; }; };