From patchwork Mon Apr 25 16:23:46 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 12825918 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63D1AC433EF for ; Mon, 25 Apr 2022 16:26:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=pUXZMA185cUzu2irfht9zAgQbBNmwY6Dc5UOBYL9yFY=; b=Mwy/tu8yo07vKl sVL/U3fj1U2Li1mmoOW4yeMxshNAwj4QjeZuCIEgXMSVP44PidB91WxC1JS+7Rs7KiflU9UHjE07q Ut5/IcVb6H/a7cfIrBKDsfglTndKNxbn3/0W4FdBraGxcT9sqwK/IVZEF297eRrpcEo6/gmQPDuyR xTgGTBSynrxeVSuKkKf8vxZ1a9jIkZ/nmmgodH8eONU6cMVRi0kaW32J2GctIyVNoKdnodLcB8JfP QXTIBRxuzye1Vz8RiTWZ2vFdt+KtK+J/F69elak1xCYor853F0NI4pPilhirZHxZbrrnkjHtJEaCD 7UUh315BoNzuA7bTL4nA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nj1WE-00AL2S-1z; Mon, 25 Apr 2022 16:24:58 +0000 Received: from mout.perfora.net ([74.208.4.197]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nj1Vi-00AKsK-Du for linux-arm-kernel@lists.infradead.org; Mon, 25 Apr 2022 16:24:28 +0000 Received: from toolbox.int.toradex.com ([81.221.85.15]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPSA (Nemesis) id 0LiS78-1oJBD41mWK-00chkK; Mon, 25 Apr 2022 18:24:18 +0200 From: Marcel Ziswiler To: linux-arm-kernel@lists.infradead.org Cc: Denys Drozdov , Marcel Ziswiler , Fabio Estevam , Frank Rowand , Krzysztof Kozlowski , NXP Linux Team , Pengutronix Kernel Team , Rob Herring , Russell King , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 04/14] ARM: dts: imx6ull-colibri: add touchscreen device nodes Date: Mon, 25 Apr 2022 18:23:46 +0200 Message-Id: <20220425162356.176665-5-marcel@ziswiler.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220425162356.176665-1-marcel@ziswiler.com> References: <20220425162356.176665-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:gzDQNJsaCrXEpudjP3OD3AQPAFoq3gVY87QyfXMotZQJskSh0ha gztANYOWJU63l8V0ItUQ0hvFqNeg4qycidYcv1I1DI1o39WGatQaZTO4pBMoAM8ZWPPPMw/ hsOh85kQJTQKS7o2bVrmOVDve3OCmLzbIwV6epiSPTmvbwC9gZ2yBIf8jPNu+wcvvCfIDi+ xx9P2sJiU9GF/5oJxRR4w== X-UI-Out-Filterresults: notjunk:1;V03:K0:NpRMPhujVh4=:Mepb9jV5LXuLBQTjHIqJm/ 9eJo4nfNv9kxUshE2gUlHL9ogNY2s7CStoqFmSNxEp9kazUiMPVnnXR2JA88K8YhHoO2TAhrG gU1JeptdcA3l3IYmw3/gx01NWxJBqLEeBFE2OjnplMxk9nw6eghGXzuz3Y4w0f2CgB/T+OJFn I78qnFmg02r/tdG6KfmgCfW8f1TXuax6WkHz+v2UXClpnF0TeCi/4OyRXVK2pjBiCvRakR57h 4QE7THud/xhQmEV90v5WKJAyKpNi8m51JgiPyX/1kOjwpDzfJFBj9pZOBqnyZT1hIawhL/GIU hNGXvuEsAPmeLS5muft4s9d5F1a8vTzniYiKMPQfMY06naqIbI7cKMukR2DdJj61lh1gz849t omJDt7VUPL6/n07vKHBVErFHeMXoGCZr990+nL2hlkBjHv33M6vkVvyJEjYSA3bAWBR/CKfx/ dm1eweRPWhwVB5VH/k/0NW61O2nZT83l4bSKoobztzfOu+3+taZagyVW3BHlvVNAT4Sr5evmG wB+30HBJY8Hk0GkhnG4Cj35xW0DVEpOQnrYfociM3HwjjxZTOjw/G0AEhiVbI8ncPRs0tV4Zz GUozNYQq5fgadYJ//61bZ0dLyJNrvHqAV9u7wM7f7utI/qgVnv03haxdFnA/4I8tCb/fFhWB5 iLOttBZOIxKq3no/nfMy48oLi8Ob2wfIj3rH1PuCpFzR6j6r+9ClCidVQsrCJEOHkllc= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220425_092426_591985_272853EE X-CRM114-Status: GOOD ( 12.50 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Denys Drozdov Move all Atmel nodes from the board-level into the main module-level device tree and prepare the device trees for use with Atmel MXT device tree overlays. Also, add required pinmux groups. The common scheme for pin groups in touch screen overlays is as follows: - pinctrl_atmel_conn - SODIMM 106/107 pins for INT/RST signals (default) - pinctrl_atmel_adap - SODIMM 28/30 pins for INT/RST signals. Signed-off-by: Denys Drozdov Signed-off-by: Marcel Ziswiler --- Changes in v2: - Fixed pinctrl node names as suggested by Shawn. .../arm/boot/dts/imx6ull-colibri-nonwifi.dtsi | 4 +- arch/arm/boot/dts/imx6ull-colibri-wifi.dtsi | 4 +- arch/arm/boot/dts/imx6ull-colibri.dtsi | 39 +++++++++++++------ 3 files changed, 31 insertions(+), 16 deletions(-) diff --git a/arch/arm/boot/dts/imx6ull-colibri-nonwifi.dtsi b/arch/arm/boot/dts/imx6ull-colibri-nonwifi.dtsi index 95a11b8bcbdb..5e55a6c820bc 100644 --- a/arch/arm/boot/dts/imx6ull-colibri-nonwifi.dtsi +++ b/arch/arm/boot/dts/imx6ull-colibri-nonwifi.dtsi @@ -15,10 +15,10 @@ memory@80000000 { &iomuxc { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio1 &pinctrl_gpio2 &pinctrl_gpio3 - &pinctrl_gpio4 &pinctrl_gpio5 &pinctrl_gpio6 &pinctrl_gpio7>; + &pinctrl_gpio4 &pinctrl_gpio6 &pinctrl_gpio7>; }; &iomuxc_snvs { pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_snvs_gpio1 &pinctrl_snvs_gpio2 &pinctrl_snvs_gpio3>; + pinctrl-0 = <&pinctrl_snvs_gpio1 &pinctrl_snvs_gpio3>; }; diff --git a/arch/arm/boot/dts/imx6ull-colibri-wifi.dtsi b/arch/arm/boot/dts/imx6ull-colibri-wifi.dtsi index 9f1e38282bee..6e8ddb07e11d 100644 --- a/arch/arm/boot/dts/imx6ull-colibri-wifi.dtsi +++ b/arch/arm/boot/dts/imx6ull-colibri-wifi.dtsi @@ -26,13 +26,13 @@ &cpu0 { &iomuxc { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_gpio1 &pinctrl_gpio2 &pinctrl_gpio3 - &pinctrl_gpio4 &pinctrl_gpio5 &pinctrl_gpio7>; + &pinctrl_gpio4 &pinctrl_gpio7>; }; &iomuxc_snvs { pinctrl-names = "default"; - pinctrl-0 = <&pinctrl_snvs_gpio1 &pinctrl_snvs_gpio2>; + pinctrl-0 = <&pinctrl_snvs_gpio1>; }; &usdhc2 { diff --git a/arch/arm/boot/dts/imx6ull-colibri.dtsi b/arch/arm/boot/dts/imx6ull-colibri.dtsi index e619da3b00b3..8b5cbe9132a2 100644 --- a/arch/arm/boot/dts/imx6ull-colibri.dtsi +++ b/arch/arm/boot/dts/imx6ull-colibri.dtsi @@ -124,6 +124,19 @@ &i2c1 { pinctrl-1 = <&pinctrl_i2c1_gpio>; sda-gpios = <&gpio1 29 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; scl-gpios = <&gpio1 28 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + status = "okay"; + + /* Atmel maxtouch controller */ + atmel_mxt_ts: touchscreen@4a { + compatible = "atmel,maxtouch"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_atmel_conn>; + reg = <0x4a>; + interrupt-parent = <&gpio5>; + interrupts = <4 IRQ_TYPE_EDGE_FALLING>; /* SODIMM_107, INT */ + reset-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; /* SODIMM_106, RST */ + status = "disabled"; + }; }; &i2c2 { @@ -241,6 +254,20 @@ MX6UL_PAD_GPIO1_IO09__GPIO1_IO09 0x3000 /* SODIMM 2 */ >; }; + pinctrl_atmel_adap: atmeladapgrp { + fsl,pins = < + MX6UL_PAD_NAND_DQS__GPIO4_IO16 0xb0a0 /* SODIMM 28 */ + MX6UL_PAD_ENET1_TX_EN__GPIO2_IO05 0xb0a0 /* SODIMM 30 */ + >; + }; + + pinctrl_atmel_conn: atmelconngrp { + fsl,pins = < + MX6UL_PAD_JTAG_MOD__GPIO1_IO10 0xb0a0 /* SODIMM 106 */ + MX6ULL_PAD_SNVS_TAMPER4__GPIO5_IO04 0xb0a0 /* SODIMM 107 */ + >; + }; + pinctrl_can_int: canint-grp { fsl,pins = < MX6UL_PAD_ENET1_TX_DATA1__GPIO2_IO04 0x13010 /* SODIMM 73 */ @@ -347,12 +374,6 @@ MX6UL_PAD_CSI_DATA07__GPIO4_IO28 0x10b0 /* SODIMM 65 */ >; }; - pinctrl_gpio5: gpio5-grp { /* ATMEL MXT TOUCH */ - fsl,pins = < - MX6UL_PAD_JTAG_MOD__GPIO1_IO10 0xb0a0 /* SODIMM 106 */ - >; - }; - pinctrl_gpio6: gpio6-grp { /* Wifi pins */ fsl,pins = < MX6UL_PAD_GPIO1_IO03__GPIO1_IO03 0x10b0 /* SODIMM 89 */ @@ -606,12 +627,6 @@ MX6ULL_PAD_SNVS_TAMPER8__GPIO5_IO08 0x110a0 /* SODIMM 138 */ >; }; - pinctrl_snvs_gpio2: snvs-gpio2-grp { /* ATMEL MXT TOUCH */ - fsl,pins = < - MX6ULL_PAD_SNVS_TAMPER4__GPIO5_IO04 0xb0a0 /* SODIMM 107 */ - >; - }; - pinctrl_snvs_gpio3: snvs-gpio3-grp { /* Wifi pins */ fsl,pins = < MX6ULL_PAD_BOOT_MODE1__GPIO5_IO11 0x130a0 /* SODIMM 127 */