[openwrt/openwrt] ipq40xx: enable PoE output on Meraki MR30H

LEDE Commits lede-commits at lists.infradead.org
Sun Jan 25 13:11:20 PST 2026


robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/561a8858f55b830e285526e96bb375d5c96f1bd9

commit 561a8858f55b830e285526e96bb375d5c96f1bd9
Author: Hal Martin <hal.martin at gmail.com>
AuthorDate: Tue Nov 4 20:31:04 2025 +0100

    ipq40xx: enable PoE output on Meraki MR30H
    
    This commit enables PoE output on port 1 of the Meraki MR30H if
    the device is powered via 802.3at PoE.
    
    No PoE output is enabled if the device is powered via 802.3af PoE,
    as there is insufficient power.
    
    Signed-off-by: Hal Martin <hal.martin at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/20645
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../linux/ipq40xx/base-files/etc/init.d/poe_switch | 22 ++++++++++++++++++++++
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-mr30h.dts  | 18 ++++++++++++++++++
 2 files changed, 40 insertions(+)

diff --git a/target/linux/ipq40xx/base-files/etc/init.d/poe_switch b/target/linux/ipq40xx/base-files/etc/init.d/poe_switch
new file mode 100755
index 0000000000..2dd99825b7
--- /dev/null
+++ b/target/linux/ipq40xx/base-files/etc/init.d/poe_switch
@@ -0,0 +1,22 @@
+#!/bin/sh /etc/rc.common
+
+START=21
+STOP=10
+
+boot() {
+	case $(board_name) in
+		meraki,mr30h)
+			if [ $(cat /sys/class/gpio/poeaf_det/value) -eq 0 ]; then
+				echo "1" > /sys/class/gpio/pse_en/value
+			fi
+		;;
+	esac
+}
+
+shutdown() {
+	case $(board_name) in
+		meraki,mr30h)
+			echo "0" > /sys/class/gpio/pse_en/value
+		;;
+	esac
+}
diff --git a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4029-mr30h.dts b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4029-mr30h.dts
index 8b21736d00..3655238eb9 100644
--- a/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4029-mr30h.dts
+++ b/target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4029-mr30h.dts
@@ -79,6 +79,24 @@
 			qcom,ess-interface-select = <TCSR_ESS_PSGMII>;
 		};
 	};
+
+        gpio_export {
+                compatible = "gpio-export";
+                #size-cells = <0>;
+
+                pse_en {
+                        gpio-export,name = "pse_en";
+                        gpio-export,output = <1>;
+                        gpios = <&tlmm 28 GPIO_ACTIVE_LOW>;
+                };
+
+                poeaf_det {
+                        gpio-export,name = "poeaf_det";
+                        gpio-export,input = <0>;
+                        gpios = <&tlmm 29 GPIO_ACTIVE_HIGH>;
+                };
+
+        };
 };
 
 &tricolor {




More information about the lede-commits mailing list