From patchwork Fri May 6 13:24:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 12841132 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 D370EC433EF for ; Fri, 6 May 2022 13:27:45 +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=utJdvblv8/OXJ22iidBrIcPIk8mw8pyKYog61xpmD/g=; b=v2eN7hTww0JQpv 7nzzxlhJyC7+rA16WZVwSTu5K1NmymMCyOMo8FyXE6hY+7trfq98QMSg+f1ra2l8F8/qQqVRLjbkK 5uIWawasJ+sGdK/Be7vwWFHodUd0r5QR0rCPDW5NbiwmWcmBTNvcmigwFNukgqvz615bXPPVsPM/O kEa6JSqmX+GM4SfyJApp9ZhHqR6njSND0fZ43IJLAIkQB5wZkIVsS5xJvcVtyj9ZNoV0XPZmtUsds KnZp9gOsE5M0h1HMGfFxjIr1G8AeE8mNdkL1FHq9H1FELwgYxPN9sF/hzW2bQsQVg4fvqcgKdKsHs TxR8uYG+B/IPJUVi/Jrg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nmxyf-003Rcv-GH; Fri, 06 May 2022 13:26:37 +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 1nmxx1-003Qfv-Dy for linux-arm-kernel@lists.infradead.org; Fri, 06 May 2022 13:24:57 +0000 Received: from toolbox.int.toradex.com ([81.221.85.15]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MgdCj-1nQEYk2nAt-00Nvbo; Fri, 06 May 2022 15:24:38 +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 v3 04/13] ARM: dts: imx6ull-colibri: add touchscreen device nodes Date: Fri, 6 May 2022 15:24:07 +0200 Message-Id: <20220506132416.273965-5-marcel@ziswiler.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20220506132416.273965-1-marcel@ziswiler.com> References: <20220506132416.273965-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:kTzP2dKjh7P3AChHYjD9MUXLo2VnKd4yHU8l0rV658RSKhGVuYv zlNvvphj3mHFa3BjpmhDKLHsQUpe0A+ALVKog17BvM9CsEjL08GLcLmjLn7WFRL27CfC1Fu hwGs04rcAbJqoFmGX8TOGaIqPXJjj6QOzD7edgXsRSyJustVxRcJ9cUyrlfux6nyKd+9W+R xAItNje5JE9SXdZvcFxsw== X-UI-Out-Filterresults: notjunk:1;V03:K0:a6/ScGZMOdo=:UhP+R4Q0LOeH5GT+KBdRFY W4AxU8ZDW7SATWcN/7KDNOTbZNrJglijwhQweMtS2njDIjJ4a65BYc7XBQrhWzfGUByOVPOSt kRWVUJxrPMUwWd1LBjSNdfRlF23wdTnVx1MJa2sxX5qntuSRE9nTjrbM17bOouk7XEajFp82w KJTVAfJIdx8gKr6+AXPxr2tFajUFeFKd99JGyDP4wzVu6rbqaAvy7M/S35ZHs3dtN3rI8PN89 KgaHKx1v3ZN5SrwAtU3RUJQQWV79Yoqp+HERTz0fL1YKWxmjuT4iK80kst0FNnDfYgwk2oTKH dfrA5Hbr2UCxJGtA43V2KnNt5KhdTxgvEl9PSpWJi70FqvUuv6nLnf/0j4G730IGio8QMaEIo hcMyj6679B9Fo+kYAukDqa3V187tj2a7qUgCJsUredaD/79ANSFyuHBKxoRHkkpz+1gugZr0c MYsi51nPBjcs8diPyZUVFayka1o5yD1Vhb4E08YUx+RKiDAhgBjn9YgBSawS/UASZ/p0nR1Jr G2GjrK8f70iWKVr5OWGJHv5AFs1VBfs/8f7BMTsw1GKlnEyOGu1tKHi4HpG3g57bdFHzxVnoP SySOjjKEW1ZR1ZvnC8Dino0pNABzn15TWvdbuVW7B85OUEbeLfATT2jggOcWg2NHRuvy5tFUK L36M2kWNEOvj14uka/fEzlp/+w+chAEEeWOJNtEp8LFzoGacI4VJP4KZ+bMXsJIoKirw= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220506_062455_643831_F1F6B40C X-CRM114-Status: GOOD ( 12.64 ) 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 v3: - Fixed reset GPIO polarity in-line with the following upstream commit: feedaacdadfc ("Input: atmel_mxt_ts - fix up inverted RESET handler") - Fixed comment using more common SODIMM followed by number naming. 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 7cd912df5d19..c89b209be316 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_LOW>; /* 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 */