[openwrt/openwrt] ipq40xx: ZTE MF287 series: move to gpio-export for modem-reset GPIO

LEDE Commits lede-commits at lists.infradead.org
Sun Sep 24 03:56:18 PDT 2023


hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/457a12a834ba2a9d5ab6571bf37acbe4184122a1

commit 457a12a834ba2a9d5ab6571bf37acbe4184122a1
Author: Andreas Böhler <dev at aboehler.at>
AuthorDate: Mon Sep 18 12:08:18 2023 +0200

    ipq40xx: ZTE MF287 series: move to gpio-export for modem-reset GPIO
    
    Turn the "gpio-restart" node into a "gpio-export" node for all MF287
    variants, similar to the MF287 Pro. Unfortunately, there doesn't seem to be
    a "power button blocker" GPIO for the MF287 and MF287 Plus, so a modem
    reset always triggers a system reset.
    
    Signed-off-by: Andreas Böhler <dev at aboehler.at>
    (cherry picked from commit 053f8f92d1395fa5d33b0b8f2fef44a4b926c112)
---
 .../files/arch/arm/boot/dts/qcom-ipq4018-mf287.dts        | 11 +++--------
 .../arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi      | 10 ++++++++++
 .../files/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts    | 11 +++--------
 .../files/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts     | 15 ++++-----------
 4 files changed, 20 insertions(+), 27 deletions(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287.dts
index 722f25053d..43e39bdf96 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287.dts
@@ -8,15 +8,10 @@
 / {
 	model = "ZTE MF287";
 	compatible = "zte,mf287";
+};
 
-	/*
-	 * This node is used to restart modem module to avoid anomalous
-	 * behaviours on initial communication.
-	 */
-	gpio-restart {
-		compatible = "gpio-restart";
-		gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
-	};
+&gpio_modem_reset {
+	gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
 };
 
 &key_reset {
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi
index dcb4915ae0..5227243467 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi
@@ -35,6 +35,16 @@
 		};
 	};
 
+	gpio_export {
+		compatible = "gpio-export";
+		#size-cells = <0>;
+
+		gpio_modem_reset: modem {
+			gpio-export,name = "modem-reset";
+			gpio-export,output = <0>;
+		};
+	};
+
 	keys {
 		compatible = "gpio-keys";
 
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts
index b5f386fa4b..f09a77ff59 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts
@@ -8,15 +8,10 @@
 / {
 	model = "ZTE MF287Plus";
 	compatible = "zte,mf287plus";
+};
 
-	/*
-	 * This node is used to restart modem module to avoid anomalous
-	 * behaviours on initial communication.
-	 */
-	gpio-restart {
-		compatible = "gpio-restart";
-		gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
-	};
+&gpio_modem_reset {
+	gpios = <&tlmm 5 GPIO_ACTIVE_HIGH>;
 };
 
 &key_reset {
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts
index 0af7b0426b..4fd44989c5 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts
@@ -9,17 +9,6 @@
 	model = "ZTE MF287Pro";
 	compatible = "zte,mf287pro";
 
-	gpio_export {
-		compatible = "gpio-export";
-		#size-cells = <0>;
-
-		modem {
-			gpio-export,name = "modem-reset";
-			gpio-export,output = <0>;
-			gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
-		};
-	};
-
 	regulator-usb-vbus {
 		compatible = "regulator-fixed";
 		regulator-name = "USB_VBUS";
@@ -31,6 +20,10 @@
 	};
 };
 
+&gpio_modem_reset {
+	gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>;
+};
+
 &key_reset {
 	gpios = <&tlmm 18 GPIO_ACTIVE_LOW>;
 };




More information about the lede-commits mailing list