From 18461d56ae5414e0f18767372546bdf211382267 Mon Sep 17 00:00:00 2001 From: Stefan Eichenberger Date: Wed, 26 Apr 2023 13:23:27 +0200 Subject: arm64: dts: colibri-imx8x: use clock and regulator instead of gpio hogs Replace gpio-hogs by using the hsio clock to enable the PCIe reference clock for Wifi and vcie-supply to power on the Wifi module. With this change the gpios will not be touched when Wifi is disabled. Upstream-Status: Pending Mainline for i.MX 8X does not support PCIe yet, this patch cannot be upstreamed as of now. Signed-off-by: Stefan Eichenberger --- arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi | 29 ++++++++++++++---------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi b/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi index 81f9cdaa7acd..53aa9c003c71 100644 --- a/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8x-colibri.dtsi @@ -179,6 +179,18 @@ sound-dai = <&sai0>; }; }; + + reg_module_wifi: regulator-module-wifi { + compatible = "regulator-fixed"; + enable-active-high; + gpio = <&gpio_expander_43 6 GPIO_ACTIVE_HIGH>; + regulator-name = "Wi-Fi_PDn"; + startup-delay-us = <100>; + + regulator-state-mem { + regulator-off-in-suspend; + }; + }; }; /* Colibri Analogue Inputs */ @@ -366,18 +378,6 @@ "USB_BYPASS_N", "Wi-Fi_PDn", "Wi-Fi_WKUP_BT"; - - pcie-clk-on-hog { - gpio-hog; - gpios = <3 GPIO_ACTIVE_HIGH>; - output-high; - }; - - wifi-power-on-hog { - gpio-hog; - gpios = <6 GPIO_ACTIVE_HIGH>; - output-high; - }; }; }; @@ -768,6 +768,10 @@ }; }; +&hsio_refb_clk { + enable-gpios = <&gpio_expander_43 3 GPIO_ACTIVE_HIGH>; +}; + /* On-module PCIe for Wi-Fi */ &pcieb { compatible = "fsl,imx8qxp-pcie", "snps,dw-pcie"; @@ -776,6 +780,7 @@ ext_osc = <1>; fsl,max-link-speed = <1>; reset-gpio = <&lsio_gpio4 0 GPIO_ACTIVE_LOW>; + vpcie-supply = <®_module_wifi>; status = "okay"; }; -- cgit v1.2.3