From patchwork Wed Sep 22 13:00:53 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Matthias Schiffer X-Patchwork-Id: 12510645 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=-18.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 A7072C433F5 for ; Wed, 22 Sep 2021 13:13:01 +0000 (UTC) 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 mail.kernel.org (Postfix) with ESMTPS id 6FDC261100 for ; Wed, 22 Sep 2021 13:13:01 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 6FDC261100 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=ew.tq-group.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.infradead.org 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:MIME-Version:List-Subscribe:List-Help: List-Post:List-Archive:List-Unsubscribe:List-Id: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=idCtflVSuWquOT2LOnYyKv/GQcTzx0XIjCMMRfXZb/o=; b=VvokqjWrRnWZmo 5WyeZ5bPbbaKOlDaJ4JjH9tDcMU1ZAgdxDTmuRNXo6Je576wRejEvgBGwNGraZv6yx/8kNsm5Swqn 4dfKMYS5ZpfCFhwEsgoJGnLg4PyE6ObgVKTQ8oPuwrFFG1mv+367r0nHHE5oXPzs/qJKp23AFd7ot SH8Jq8BWMT/jxTySJEzfTnH3YyKy3+qPwKQsfZcl2YnGUcRL9QkfdhuV+JP8IU9ajhJU4hk+29sBz vVEM7Xf5AAMRiijMyfHM4Pvnj4xPHG9F7Yvb/hvJ666VxJJVmZS580M1GGCBfSAulFwRmdwwKRwTx OiISZ4dvNlXUlIWzl5Cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT20l-008YF2-LC; Wed, 22 Sep 2021 13:10:08 +0000 Received: from mx1.tq-group.com ([93.104.207.81]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mT1t7-008V5K-O7 for linux-arm-kernel@lists.infradead.org; Wed, 22 Sep 2021 13:02:16 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1632315733; x=1663851733; h=from:to:cc:subject:date:message-id; bh=fgR1P7fMypMDV82haLdAlKXE1MzNIjyTj4mRCbMNxWc=; b=HrBDdIp05tiNh/Vxua6xQVDNIO9IugscCTKZx04hkWiGuKOPyJQNMSXZ CiQguN3zh+foL4nmQJ6nT7aSwZNZsJtsa7OzOzZDYTHgywC66bCuZrfk+ 6i0OwaVPyKOchezWbrGhtidwonVDLQMPiF9uRiMIdG4SzvF6FEBjsY+Jh xClBCD4GgZMCv234XzVfA2SAujNrMYi6w8HtNt2bJZqNHEOv8uaC6tXG7 FbQLJpmvOkTXdtR41+vOYn+lcgz/0EfYFpLVgFhffvhY/sjmtw6BemqIJ enhsqHFWYwoah6GHXHR5axMuNhpWk1gvqqfHwJIQK0pIIkvsDCM9swLwU g==; X-IronPort-AV: E=Sophos;i="5.85,314,1624312800"; d="scan'208";a="19650010" Received: from unknown (HELO tq-pgp-pr1.tq-net.de) ([192.168.6.15]) by mx1-pgp.tq-group.com with ESMTP; 22 Sep 2021 15:01:39 +0200 Received: from mx1.tq-group.com ([192.168.6.7]) by tq-pgp-pr1.tq-net.de (PGP Universal service); Wed, 22 Sep 2021 15:01:40 +0200 X-PGP-Universal: processed; by tq-pgp-pr1.tq-net.de on Wed, 22 Sep 2021 15:01:40 +0200 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=tq-group.com; i=@tq-group.com; q=dns/txt; s=key1; t=1632315700; x=1663851700; h=from:to:cc:subject:date:message-id; bh=fgR1P7fMypMDV82haLdAlKXE1MzNIjyTj4mRCbMNxWc=; b=k4BwJ4k+aEXJGrO3OYzJsI27FQIzyE19zQtV4IeRHcZiYaNXx8OfQIT5 1LynqcPzqgWsI9kSJ6TYikO5TC1tlCVGy3NzApa6xkgbbfIB8FVmPdgBh Bc0tFgmo62QTdHT93WWADInwVe8gkxZDMgq2EHezVCEhMK1B84yo7gCq+ rwgjRbR2fY4253bAMFHLEF181zR/i4FC1feGZWKrHWWMNM0JLUSZk06tz K/4vVakds80y0GugTzrwI8JEAX5lmkZt3a1CHFcZKONhtmzq+eedpn75m k7YKRq++oM7pix06eVG3ClwIvae0HfuptD1JwuIcowgZuLhZx/gVhpgNK g==; X-IronPort-AV: E=Sophos;i="5.85,314,1624312800"; d="scan'208";a="19649855" Received: from vtuxmail01.tq-net.de ([10.115.0.20]) by mx1.tq-group.com with ESMTP; 22 Sep 2021 15:01:02 +0200 Received: from schifferm-ubuntu4.tq-net.de (schifferm-ubuntu4.tq-net.de [10.121.48.12]) by vtuxmail01.tq-net.de (Postfix) with ESMTPA id CACFA280075; Wed, 22 Sep 2021 15:01:01 +0200 (CEST) From: Matthias Schiffer To: Shawn Guo , Sascha Hauer Cc: Rob Herring , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Matthias Schiffer Subject: [PATCH v2 2/3] ARM: dts: imx7-tqma7: add SPI-NOR flash Date: Wed, 22 Sep 2021 15:00:53 +0200 Message-Id: <11e30a17b8798800207b773b7793003d70d30420.1632314390.git.matthias.schiffer@ew.tq-group.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <941f977a8f98a26a4f14fd2c8caf5374a67e9345.1632314390.git.matthias.schiffer@ew.tq-group.com> References: <941f977a8f98a26a4f14fd2c8caf5374a67e9345.1632314390.git.matthias.schiffer@ew.tq-group.com> In-Reply-To: <941f977a8f98a26a4f14fd2c8caf5374a67e9345.1632314390.git.matthias.schiffer@ew.tq-group.com> References: <941f977a8f98a26a4f14fd2c8caf5374a67e9345.1632314390.git.matthias.schiffer@ew.tq-group.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210922_060214_314871_1A5098E0 X-CRM114-Status: GOOD ( 14.85 ) 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: , MIME-Version: 1.0 Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The SPI-NOR flash on the SoM was missing from the device tree. The TQMa7 as a designated QSPI_RESET# pin, however depending on the hardware configuration the pin may be unconnected, or be used for a different purpose. With this in mind, we mux the pin as a pullup and define an input hog for it, but keep it a separate pin group, so that it is easy for dependent Device Trees to modify the configuration. Signed-off-by: Matthias Schiffer --- v2: - Add input hog for reset pin and move to separate pin group, explain in commit message. - Update flash node for modern "partitions" specification arch/arm/boot/dts/imx7-tqma7.dtsi | 43 +++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/arch/arm/boot/dts/imx7-tqma7.dtsi b/arch/arm/boot/dts/imx7-tqma7.dtsi index 065e1668e280..fe42b0a46831 100644 --- a/arch/arm/boot/dts/imx7-tqma7.dtsi +++ b/arch/arm/boot/dts/imx7-tqma7.dtsi @@ -19,6 +19,16 @@ cpu-supply = <&sw1a_reg>; }; +&gpio2 { + /* Configured as pullup by QSPI pin group */ + qspi-reset-hog { + gpio-hog; + gpios = <4 GPIO_ACTIVE_LOW>; + input; + line-name = "qspi-reset"; + }; +}; + &i2c1 { pinctrl-names = "default"; pinctrl-0 = <&pinctrl_i2c1>; @@ -160,6 +170,25 @@ >; }; + pinctrl_qspi: qspigrp { + fsl,pins = < + MX7D_PAD_EPDC_DATA00__QSPI_A_DATA0 0x5A + MX7D_PAD_EPDC_DATA01__QSPI_A_DATA1 0x5A + MX7D_PAD_EPDC_DATA02__QSPI_A_DATA2 0x5A + MX7D_PAD_EPDC_DATA03__QSPI_A_DATA3 0x5A + MX7D_PAD_EPDC_DATA05__QSPI_A_SCLK 0x11 + MX7D_PAD_EPDC_DATA06__QSPI_A_SS0_B 0x54 + MX7D_PAD_EPDC_DATA07__QSPI_A_SS1_B 0x54 + >; + }; + + pinctrl_qspi_reset: qspi_resetgrp { + fsl,pins = < + /* #QSPI_RESET */ + MX7D_PAD_EPDC_DATA04__GPIO2_IO4 0x52 + >; + }; + pinctrl_usdhc3: usdhc3grp { fsl,pins = < MX7D_PAD_SD3_CMD__SD3_CMD 0x59 @@ -217,6 +246,20 @@ }; }; +&qspi { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_qspi &pinctrl_qspi_reset>; + status = "okay"; + + flash0: flash@0 { + compatible = "jedec,spi-nor"; + reg = <0>; + spi-max-frequency = <29000000>; + spi-rx-bus-width = <4>; + spi-tx-bus-width = <4>; + }; +}; + &sdma { status = "okay"; };