Skip to contentSkip to conversation

Device tree and config updates for the Librem 5 devkit

PATCH Applied Guido Günther 3 participants 9 messages Aug 10, 2023 – Aug 12, 2023

Subsystems (4)
lore
Share & tools
lore
#0 lore raw

v2 cover Device tree and config updates for the Librem 5 devkit

The device tree updates ensure the A53 cores don't get powered off and fix a DT warning. This isn't testable with the arm64 default config unless we enable the rsi wifi modules too so do this as well.

While at that include a binding file update.

This is against next-20230809 that include David's option,gtm601 conversion.

v2:
- drop "dt-bindings: mmc: Fix reference to pwr-seq-simple" already picked up by Ulf Hansson, thanks!
- add acked-by from Conor Dooley, thanks!
- rework sdio changes as proposed by Sherry Sun

Guido Günther (4):
dt-bindings: sound: gtm601: Add description
arm64: dts: imx8mq-librem5-devkit: Mark buck2 as always on
arm64: dts: imx8mq-librem5-devkit: Drop power-supply
arm64: defconfig: Enable Redpine 91X wlan driver

 .../bindings/sound/option,gtm601.yaml         |  6 +++--
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 26 ++++++++-----------
 arch/arm64/configs/defconfig                  |  1 +
 3 files changed, 16 insertions(+), 17 deletions(-)
Signature · 1 line
2.40.1
#1 lore raw

PATCH v2 1/4 dt-bindings: sound: gtm601: Add description

This allows to us to document the channel and sampling rate requirements.

---
 Documentation/devicetree/bindings/sound/option,gtm601.yaml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
Documentation/devicetree/bindings/sound/option,gtm601.yaml +4 -2
index 69c2ccc79dc5..ff813d97fc59 100644
@@ -16,10 +16,12 @@ description: >
 properties:
   compatible:
     oneOf:
-      - items:  # 48 kHz stereo
+      - description: Broadmobi BM818 (48Khz stereo)
+        items:
           - const: broadmobi,bm818
           - const: option,gtm601
-      - const: option,gtm601  # 8 kHz mono
+      - description: GTM601 (8kHz mono)
+        const: option,gtm601
 
   '#sound-dai-cells':
     const: 0
Signature · 1 line
2.40.1
maintainer
#2 lore raw

Re: [PATCH v2 1/4] dt-bindings: sound: gtm601: Add description

Quoted 2 lines · Guido Günther

This allows to us to document the channel and sampling rate requirements.

Please do not submit new versions of already applied patches, please submit incremental updates to the existing code. Modifying existing commits creates problems for other users building on top of those commits so it's best practice to only change pubished git commits if absolutely essential.

#3 lore raw

PATCH v2 2/4 arm64: dts: imx8mq-librem5-devkit: Mark buck2 as always on

In reply to Guido Günther

Otherwise the A53 cores are shut down which doesn't end well.

---
 arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +1 -0
index b3549eae6278..be9ef5c271df 100644
@@ -324,6 +324,7 @@ buck2_reg: BUCK2 {
 				regulator-ramp-delay = <1250>;
 				rohm,dvs-run-voltage = <1000000>;
 				rohm,dvs-idle-voltage = <900000>;
+				regulator-always-on;
 			};
 
 			buck3_reg: BUCK3 {
Signature · 1 line
2.40.1
#5 lore raw

PATCH v2 3/4 arm64: dts: imx8mq-librem5-devkit: Drop power-supply

In reply to Guido Günther

It's not a valid binding. Instead move the sdio_rst line to the power sequence and use w_disable1 as the vmmc-supply bringing it more in line with other SDIO M2 cards.

Resolves following warning:

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dtb: mmc@30b50000: Unevaluated properties are not allowed ('power-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/mmc/fsl-imx-esdhc.yaml#

---
 .../dts/freescale/imx8mq-librem5-devkit.dts   | 25 ++++++++-----------
 1 file changed, 10 insertions(+), 15 deletions(-)
arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +10 -15
index be9ef5c271df..8055a2c23035 100644
@@ -139,18 +139,6 @@ reg_pwr_en: regulator-pwr-en {
 		regulator-always-on;
 	};
 
-	reg_usdhc2_vmmc: regulator-usdhc2-vmmc {
-		compatible = "regulator-fixed";
-		pinctrl-names = "default";
-		pinctrl-0 = <&pinctrl_usdhc2_pwr>;
-		regulator-name = "VSD_3V3";
-		regulator-min-microvolt = <3300000>;
-		regulator-max-microvolt = <3300000>;
-		gpio = <&gpio2 19 GPIO_ACTIVE_HIGH>;
-		enable-active-high;
-		regulator-always-on;
-	};
-
 	wwan_codec: sound-wwan-codec {
 		compatible = "option,gtm601";
 		#sound-dai-cells = <0>;
@@ -242,6 +230,13 @@ wifi_pwr_en: regulator-wifi-en {
 		enable-active-high;
 		regulator-always-on;
 	};
+
+	wifi_pwr_seq: pwrseq {
+		pinctrl-names = "default";
+		pinctrl-0 = <&pinctrl_usdhc2_rst>;
+		compatible = "mmc-pwrseq-simple";
+		reset-gpios = <&gpio2 19 GPIO_ACTIVE_LOW>;
+	};
 };
 
 &A53_0 {
@@ -808,7 +803,7 @@ MX8MQ_IOMUXC_SD1_RESET_B_USDHC1_RESET_B		0xc1
 		>;
 	};
 
-	pinctrl_usdhc2_pwr: usdhc2pwrgrp {
+	pinctrl_usdhc2_rst: usdhc2rstgrp {
 		fsl,pins = <
 			MX8MQ_IOMUXC_SD2_RESET_B_GPIO2_IO19	0x41
 		>;
@@ -1031,8 +1026,8 @@ &usdhc2 {
 	pinctrl-1 = <&pinctrl_usdhc2_100mhz>;
 	pinctrl-2 = <&pinctrl_usdhc2_200mhz>;
 	bus-width = <4>;
-	vmmc-supply = <&reg_usdhc2_vmmc>;
-	power-supply = <&wifi_pwr_en>;
+	vmmc-supply = <&wifi_pwr_en>;
+	mmc-pwrseq = <&wifi_pwr_seq>;
 	broken-cd;
 	disable-wp;
 	cap-sdio-irq;
Signature · 1 line
2.40.1
Applied
#6 lore raw

Re: [PATCH v2 3/4] arm64: dts: imx8mq-librem5-devkit: Drop power-supply

Quoted 11 lines · Guido Günther

It's not a valid binding. Instead move the sdio_rst line to the power sequence and use w_disable1 as the vmmc-supply bringing it more in line with other SDIO M2 cards.

Resolves following warning:

arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dtb: mmc@30b50000: Unevaluated properties are not allowed ('power-supply' was unexpected)
from schema $id: http://devicetree.org/schemas/mmc/fsl-imx-esdhc.yaml#

Applied, thanks!

#7 lore raw

PATCH v2 4/4 arm64: defconfig: Enable Redpine 91X wlan driver

In reply to Guido Günther

The Librem 5 and it's devkit have it connected via SDIO.

---
 arch/arm64/configs/defconfig | 1 +
 1 file changed, 1 insertion(+)
arch/arm64/configs/defconfig +1 -0
index bf13d5c46578..21ab69a3cf4b 100644
@@ -414,6 +414,7 @@ CONFIG_MWIFIEX=m
 CONFIG_MWIFIEX_SDIO=m
 CONFIG_MWIFIEX_PCIE=m
 CONFIG_MT7921E=m
+CONFIG_RSI_91X=m
 CONFIG_WL18XX=m
 CONFIG_WLCORE_SDIO=m
 CONFIG_WWAN=m
Signature · 1 line
2.40.1
Applied
#8 lore raw

Re: [PATCH v2 4/4] arm64: defconfig: Enable Redpine 91X wlan driver

Quoted 3 lines · Guido Günther

The Librem 5 and it's devkit have it connected via SDIO.

Applied, thanks!