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
Add the missing description for the reset gpio to the panels DT
description.
Signed-off-by: Martin Kepplinger <[email protected]>
---
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 = <®_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
From: Guido Günther <[email protected]>
Connect the wifi power regulator to the corresponding GPIO.
Signed-off-by: Guido Günther <[email protected]>
Signed-off-by: Martin Kepplinger <[email protected]>
---
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 = <®_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
From: Sebastian Krzyszkowiak <[email protected]>
Fix wrong pinctrl assignments.
Signed-off-by: Sebastian Krzyszkowiak <[email protected]>
Suggested-by: Eric Kuzmenko <[email protected]>
Signed-off-by: Martin Kepplinger <[email protected]>
---
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
From: Angus Ainslie <[email protected]>
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 <[email protected]>
Signed-off-by: Martin Kepplinger <[email protected]>
---
.../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
From: Angus Ainslie <[email protected]>
The redpine wifi card takes some time to wake up. Wait for it.
Signed-off-by: Angus Ainslie <[email protected]>
Signed-off-by: Martin Kepplinger <[email protected]>
---
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 = <®_wifi_3v3>;
+ post-power-on-delay-ms = <1000>;
cd-gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
disable-wp;
cap-sdio-irq;
--
2.30.2
On Mon, Sep 13, 2021 at 03:57:03PM +0200, Martin Kepplinger wrote:
> From: Guido G?nther <[email protected]>
>
> Connect the wifi power regulator to the corresponding GPIO.
>
> Signed-off-by: Guido G?nther <[email protected]>
> Signed-off-by: Martin Kepplinger <[email protected]>
> ---
> 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 = <®_vdd_3v3>;
> + regulator-always-on;
Any reason you need to have this always-on?
Shawn
> };
>
> 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
>
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:
> > From: Guido G?nther <[email protected]>
> >
> > Connect the wifi power regulator to the corresponding GPIO.
> >
> > Signed-off-by: Guido G?nther <[email protected]>
> > Signed-off-by: Martin Kepplinger <[email protected]>
> > ---
> > 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 = <®_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
>
> > };
> >
> > 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
> >
>