Received: by 2002:a05:6a11:4021:0:0:0:0 with SMTP id ky33csp150596pxb; Mon, 13 Sep 2021 15:35:25 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwYRpge6AD2FmKtW/uFTD8fZvgr/RZt1tqcLT/jM2yYdDs6wWk+QbTfCGPoGZW+UnIwhu02 X-Received: by 2002:a05:6e02:4a3:: with SMTP id e3mr9156581ils.229.1631572525676; Mon, 13 Sep 2021 15:35:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1631572525; cv=none; d=google.com; s=arc-20160816; b=AIybuIB5pk/qm5Xn3HaPn5/Tx7Lazgx2tQkXz/i1Ox403gDU/yfBBA0f47LN3Ut1m/ IMwd6zY5RK3O44tzmZR5fA1AVHxQrLtC5PnVIf/3pWFb+IEw1nS56FoXadW/rBFSRG6W 3vTkaqs55a6upagzYvZJGvxAbDcAzJDpa7fdEGf0J+DC34eC18Ge+frg+65OkzYSWd4E sM7q0xPSdxnsle3N4X9FAtdl7ilzmfJVYoLYiI4Ul2HE8/4+GPwqg7Ke1ohvUHXDFaDP uXtHT87BnrHdh0G7zfRscXeyuh8uB0UuMAbArFC8Vd8eDDPAu5LNnBXuMjtBvkDxrz4T WSWw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:references:in-reply-to :message-id:date:subject:cc:to:from; bh=MhfXRlqOqJdPwjaC6QPShINZqpxgXsAaMFPxLqE7n7s=; b=C1nHXhl0m8+ooVJXPxs81A/Zz8WNXB3uQ3SOh7mLQ1KD8s2RQgYcgIUovpU59Vu1J+ yAXpfmm2OI6ycBQ97n9e+ummL/XJzaGdi7CqVCvpbxYj5certuBfpUBMMh8SJbWO5+fp m4meoav6UwejvJ1OJgOwcJK9dkLufUh8/xEEO6n+466nXTcX/Dqq/zPCZjVaP5asfdEC hw8EME1vT07IwVizFeuIK0PRP5EtBs+9jeSEUgcWaFqsjNuJPDB4+QxSFFl+m9qHnSEg h2l1xURzhQS/QkPZtAdMEO3xe/n1MS/FhLYL2PsvTANE1aT9v80c5LB7r+r9MJYd+bb6 uReg== ARC-Authentication-Results: i=1; mx.google.com; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b9si8565798jat.4.2021.09.13.15.35.14; Mon, 13 Sep 2021 15:35:25 -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; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=puri.sm Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S245434AbhIMOEA (ORCPT + 99 others); Mon, 13 Sep 2021 10:04:00 -0400 Received: from comms.puri.sm ([159.203.221.185]:39980 "EHLO comms.puri.sm" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1343735AbhIMOBQ (ORCPT ); Mon, 13 Sep 2021 10:01:16 -0400 Received: from localhost (localhost [127.0.0.1]) by comms.puri.sm (Postfix) with ESMTP id E0720E129E; Mon, 13 Sep 2021 06:57:39 -0700 (PDT) Received: from comms.puri.sm ([127.0.0.1]) by localhost (comms.puri.sm [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id looLM0Jr5CNu; Mon, 13 Sep 2021 06:57:39 -0700 (PDT) From: Martin Kepplinger To: robh@kernel.org, shawnguo@kernel.org, kernel@pengutronix.de, festevam@gmail.com Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, kernel@puri.sm, Angus Ainslie , Martin Kepplinger Subject: [PATCH v1 5/6] arm64: dts: imx8mq-librem5: add power sequencing for M.2 cards Date: Mon, 13 Sep 2021 15:57:05 +0200 Message-Id: <20210913135706.309685-6-martin.kepplinger@puri.sm> In-Reply-To: <20210913135706.309685-1-martin.kepplinger@puri.sm> References: <20210913135706.309685-1-martin.kepplinger@puri.sm> Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Angus Ainslie Some wifi cards need reset asserted until after the power supplies have been enabled. So wire up the W_DISABLE signal for the SDIO port (WIFI_REG_ON net) and the BT_REG_ON net to use it for power sequencing. Signed-off-by: Angus Ainslie Signed-off-by: Martin Kepplinger --- .../boot/dts/freescale/imx8mq-librem5.dtsi | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi index e5fdb50557f2..65c86fbbd6d1 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi @@ -199,6 +199,14 @@ simple-audio-card,codec { }; }; + usdhc2_pwrseq: pwrseq { + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_bt>, <&pinctrl_wifi_disable>; + compatible = "mmc-pwrseq-simple"; + reset-gpios = <&gpio3 25 GPIO_ACTIVE_HIGH>, + <&gpio4 29 GPIO_ACTIVE_HIGH>; + }; + bm818_codec: sound-wwan-codec { compatible = "broadmobi,bm818", "option,gtm601"; #sound-dai-cells = <0>; @@ -313,6 +321,13 @@ MX8MQ_IOMUXC_NAND_DQS_GPIO3_IO14 0x83 >; }; + pinctrl_bt: btgrp { + fsl,pins = < + /* BT_REG_ON */ + MX8MQ_IOMUXC_SAI5_MCLK_GPIO3_IO25 0x83 + >; + }; + pinctrl_charger_in: chargeringrp { fsl,pins = < /* CHRG_INT */ @@ -644,6 +659,13 @@ MX8MQ_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0xc1 >; }; + pinctrl_wifi_disable: wifidisablegrp { + fsl,pins = < + /* WIFI_REG_ON */ + MX8MQ_IOMUXC_SAI3_RXC_GPIO4_IO29 0x83 + >; + }; + pinctrl_wifi_pwr: wifipwrgrp { fsl,pins = < /* WIFI3V3_EN */ @@ -1213,6 +1235,7 @@ &usdhc2 { pinctrl-2 = <&pinctrl_usdhc2_200mhz>; bus-width = <4>; vmmc-supply = <®_wifi_3v3>; + mmc-pwrseq = <&usdhc2_pwrseq>; post-power-on-delay-ms = <1000>; cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>; disable-wp; -- 2.30.2