phone-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Martin Kepplinger <martin.kepplinger@puri.sm>
To: martin.kepplinger@puri.sm
Cc: devicetree@vger.kernel.org, festevam@gmail.com,
	kernel@pengutronix.de, kernel@puri.sm,
	linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org,
	robh@kernel.org, shawnguo@kernel.org,
	Angus Ainslie <angus@akkea.ca>
Subject: [PATCH v2 5/7] arm64: dts: imx8mq-librem5: add power sequencing for M.2 cards
Date: Tue,  5 Oct 2021 15:49:00 +0200	[thread overview]
Message-ID: <20211005134902.2138731-6-martin.kepplinger@puri.sm> (raw)
In-Reply-To: <20211005134902.2138731-1-martin.kepplinger@puri.sm>

From: Angus Ainslie <angus@akkea.ca>

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 <angus@akkea.ca>
Signed-off-by: Martin Kepplinger <martin.kepplinger@puri.sm>
---
 .../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 7a09312f31c4..396eb4434229 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -198,6 +198,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>;
@@ -312,6 +320,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 */
@@ -643,6 +658,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 */
@@ -1212,6 +1234,7 @@ &usdhc2 {
 	pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
 	bus-width = <4>;
 	vmmc-supply = <&reg_wifi_3v3>;
+	mmc-pwrseq = <&usdhc2_pwrseq>;
 	post-power-on-delay-ms = <1000>;
 	cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
 	disable-wp;
-- 
2.30.2


  parent reply	other threads:[~2021-10-05 13:50 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-10-05 13:48 [PATCH v2 0/7] arm64: dts: imx8mq-librem5: wifi updates and minor fixes Martin Kepplinger
2021-10-05 13:48 ` [PATCH v2 1/7] arm64: dts: imx8mq-librem5: add reset gpio to mantix panel description Martin Kepplinger
2021-10-05 13:48 ` [PATCH v2 2/7] arm64: dts: imx8mq-librem5: Fix led_r and led_g pinctrl assignments Martin Kepplinger
2021-10-05 13:48 ` [PATCH v2 3/7] arm64: dts: imx8mq-librem5: wire up the wifi regulator Martin Kepplinger
2021-10-05 13:48 ` [PATCH v2 4/7] arm64: dts: imx8mq-librem5: delay the startup of the SDIO Martin Kepplinger
2021-10-05 13:49 ` Martin Kepplinger [this message]
2021-10-05 13:49 ` [PATCH v2 6/7] arm64: dts: imx8mq-librem5: Limit the max sdio frequency Martin Kepplinger
2021-10-05 13:49 ` [PATCH v2 7/7] arm64: dts: imx8mq-librem5: set debounce interval of volume buttons to 50ms Martin Kepplinger
2021-10-15  1:46   ` Shawn Guo
2021-10-15  7:18     ` Martin Kepplinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20211005134902.2138731-6-martin.kepplinger@puri.sm \
    --to=martin.kepplinger@puri.sm \
    --cc=angus@akkea.ca \
    --cc=devicetree@vger.kernel.org \
    --cc=festevam@gmail.com \
    --cc=kernel@pengutronix.de \
    --cc=kernel@puri.sm \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=phone-devel@vger.kernel.org \
    --cc=robh@kernel.org \
    --cc=shawnguo@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).