[PATCH v1 0/6] arm64: dts: imx8mq-librem5: wifi updates and minor fixes

STALE1761d

Revision v1 of 2 in this series.

9 messages, 3 authors, 2021-10-05 · open the first message on its own page

[PATCH v1 0/6] arm64: dts: imx8mq-librem5: wifi updates and minor fixes

From: Martin Kepplinger <hidden>
Date: 2021-09-13 14:00:46

hi,

In order to maintain support the Librem 5 phone, this updates the
DT description. It's mainly wifi additions.

thanks a lot,

                           martin

Angus Ainslie (3):
  arm64: dts: imx8mq-librem5: delay the startup of the SDIO
  arm64: dts: imx8mq-librem5: add power sequencing for M.2 cards
  arm64: dts: imx8mq-librem5: Limit the max sdio frequency

Guido Günther (1):
  arm64: dts: imx8mq-librem5: wire up the wifi regulator

Martin Kepplinger (1):
  arm64: dts: imx8mq-librem5: add reset gpio to mantix panel description

Sebastian Krzyszkowiak (1):
  arm64: dts: imx8mq-librem5: Fix led_r and led_g pinctrl assignments

 .../boot/dts/freescale/imx8mq-librem5.dtsi    | 43 ++++++++++++++++++-
 1 file changed, 41 insertions(+), 2 deletions(-)

-- 
2.30.2

[PATCH v1 2/6] arm64: dts: imx8mq-librem5: Fix led_r and led_g pinctrl assignments

From: Martin Kepplinger <hidden>
Date: 2021-09-13 14:00:17

From: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>

Fix wrong pinctrl assignments.

Signed-off-by: Sebastian Krzyszkowiak <sebastian.krzyszkowiak@puri.sm>
Suggested-by: Eric Kuzmenko <redacted>
Signed-off-by: Martin Kepplinger <redacted>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index cb0147fe7c26..ba26c6ee98a0 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -1056,13 +1056,13 @@ &pwm2 {
 
 &pwm3 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_led_g>;
+	pinctrl-0 = <&pinctrl_led_r>;
 	status = "okay";
 };
 
 &pwm4 {
 	pinctrl-names = "default";
-	pinctrl-0 = <&pinctrl_led_r>;
+	pinctrl-0 = <&pinctrl_led_g>;
 	status = "okay";
 };
 
-- 
2.30.2

[PATCH v1 4/6] arm64: dts: imx8mq-librem5: delay the startup of the SDIO

From: Martin Kepplinger <hidden>
Date: 2021-09-13 14:00:32

From: Angus Ainslie <redacted>

The redpine wifi card takes some time to wake up. Wait for it.

Signed-off-by: Angus Ainslie <redacted>
Signed-off-by: Martin Kepplinger <redacted>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index b5562c8f9a3c..e5fdb50557f2 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -1213,6 +1213,7 @@ &usdhc2 {
 	pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
 	bus-width = <4>;
 	vmmc-supply = <&reg_wifi_3v3>;
+	post-power-on-delay-ms = <1000>;
 	cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
 	disable-wp;
 	cap-sdio-irq;
-- 
2.30.2

[PATCH v1 1/6] arm64: dts: imx8mq-librem5: add reset gpio to mantix panel description

From: Martin Kepplinger <hidden>
Date: 2021-09-13 14:00:44

Add the missing description for the reset gpio to the panels DT
description.

Signed-off-by: Martin Kepplinger <redacted>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 460ef0d86540..cb0147fe7c26 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -1010,6 +1010,7 @@ lcd_panel: panel@0 {
 		vddi-supply = <&reg_lcd_1v8>;
 		backlight = <&backlight_dsi>;
 		reset-gpios = <&gpio1 29 GPIO_ACTIVE_LOW>;
+		mantix,tp-rstn-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
 
 		port {
 			panel_in: endpoint {
-- 
2.30.2

[PATCH v1 3/6] arm64: dts: imx8mq-librem5: wire up the wifi regulator

From: Martin Kepplinger <hidden>
Date: 2021-09-13 14:01:11

From: Guido Günther <agx@sigxcpu.org>

Connect the wifi power regulator to the corresponding GPIO.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <redacted>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index ba26c6ee98a0..b5562c8f9a3c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -138,9 +138,15 @@ reg_vsys_3v4: regulator-vsys-3v4 {
 
 	reg_wifi_3v3: regulator-wifi-3v3 {
 		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_wifi_pwr>;
 		regulator-name = "3V3_WIFI";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
+		gpio = <&gpio3 10 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		vin-supply = <&reg_vdd_3v3>;
+		regulator-always-on;
 	};
 
 	sound {
@@ -638,6 +644,13 @@ MX8MQ_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0xc1
 		>;
 	};
 
+	pinctrl_wifi_pwr: wifipwrgrp {
+		fsl,pins = <
+			/* WIFI3V3_EN */
+			MX8MQ_IOMUXC_NAND_DATA04_GPIO3_IO10	0x83
+		>;
+	};
+
 	pinctrl_wdog: wdoggrp {
 		fsl,pins = <
 			/* nWDOG */
-- 
2.30.2

Re: [PATCH v1 3/6] arm64: dts: imx8mq-librem5: wire up the wifi regulator

From: Shawn Guo <shawnguo@kernel.org>
Date: 2021-10-04 12:01:06

On Mon, Sep 13, 2021 at 03:57:03PM +0200, Martin Kepplinger wrote:
quoted hunk
From: Guido Günther <agx@sigxcpu.org>

Connect the wifi power regulator to the corresponding GPIO.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <redacted>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index ba26c6ee98a0..b5562c8f9a3c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -138,9 +138,15 @@ reg_vsys_3v4: regulator-vsys-3v4 {
 
 	reg_wifi_3v3: regulator-wifi-3v3 {
 		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_wifi_pwr>;
 		regulator-name = "3V3_WIFI";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
+		gpio = <&gpio3 10 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		vin-supply = <&reg_vdd_3v3>;
+		regulator-always-on;
Any reason you need to have this always-on?

Shawn
quoted hunk
 	};
 
 	sound {
@@ -638,6 +644,13 @@ MX8MQ_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0xc1
 		>;
 	};
 
+	pinctrl_wifi_pwr: wifipwrgrp {
+		fsl,pins = <
+			/* WIFI3V3_EN */
+			MX8MQ_IOMUXC_NAND_DATA04_GPIO3_IO10	0x83
+		>;
+	};
+
 	pinctrl_wdog: wdoggrp {
 		fsl,pins = <
 			/* nWDOG */
-- 
2.30.2

Re: [PATCH v1 3/6] arm64: dts: imx8mq-librem5: wire up the wifi regulator

From: Guido Günther <hidden>
Date: 2021-10-05 12:18:07

Hi Shawn,
On Mon, Oct 04, 2021 at 08:00:57PM +0800, Shawn Guo wrote:
On Mon, Sep 13, 2021 at 03:57:03PM +0200, Martin Kepplinger wrote:
quoted
From: Guido Günther <agx@sigxcpu.org>

Connect the wifi power regulator to the corresponding GPIO.

Signed-off-by: Guido Günther <agx@sigxcpu.org>
Signed-off-by: Martin Kepplinger <redacted>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index ba26c6ee98a0..b5562c8f9a3c 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -138,9 +138,15 @@ reg_vsys_3v4: regulator-vsys-3v4 {
 
 	reg_wifi_3v3: regulator-wifi-3v3 {
 		compatible = "regulator-fixed";
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_wifi_pwr>;
 		regulator-name = "3V3_WIFI";
 		regulator-min-microvolt = <3300000>;
 		regulator-max-microvolt = <3300000>;
+		gpio = <&gpio3 10 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+		vin-supply = <&reg_vdd_3v3>;
+		regulator-always-on;
Any reason you need to have this always-on?
I think we can drop the `regulator-always-on` nowadays - it's wired up
correctly as `vmmc-supply` so turned on accordingly. Will drop for
the next revision.
Cheers,
 -- Guido
Shawn
quoted
 	};
 
 	sound {
@@ -638,6 +644,13 @@ MX8MQ_IOMUXC_SD2_RESET_B_USDHC2_RESET_B 0xc1
 		>;
 	};
 
+	pinctrl_wifi_pwr: wifipwrgrp {
+		fsl,pins = <
+			/* WIFI3V3_EN */
+			MX8MQ_IOMUXC_NAND_DATA04_GPIO3_IO10	0x83
+		>;
+	};
+
 	pinctrl_wdog: wdoggrp {
 		fsl,pins = <
 			/* nWDOG */
-- 
2.30.2

[PATCH v1 6/6] arm64: dts: imx8mq-librem5: Limit the max sdio frequency

From: Martin Kepplinger <hidden>
Date: 2021-09-13 14:02:16

From: Angus Ainslie <redacted>

This is needed for the 1LV Cyress WiFi module to probe correctly.
It also helps improve GNSS sensitivity.

Signed-off-by: Angus Ainslie <redacted>
Signed-off-by: Martin Kepplinger <redacted>
---
 arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi | 1 +
 1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
index 65c86fbbd6d1..a7b6ea93fbac 100644
--- a/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
+++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5.dtsi
@@ -1238,6 +1238,7 @@ &usdhc2 {
 	mmc-pwrseq = <&usdhc2_pwrseq>;
 	post-power-on-delay-ms = <1000>;
 	cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
+	max-frequency = <50000000>;
 	disable-wp;
 	cap-sdio-irq;
 	keep-power-in-suspend;
-- 
2.30.2

[PATCH v1 5/6] arm64: dts: imx8mq-librem5: add power sequencing for M.2 cards

From: Martin Kepplinger <hidden>
Date: 2021-09-13 14:02:48

From: Angus Ainslie <redacted>

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 <redacted>
Signed-off-by: Martin Kepplinger <redacted>
---
 .../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 = <&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
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help