]> git.ipfire.org Git - thirdparty/openwrt.git/commitdiff
ipq40xx: enable PoE output on Meraki MR30H 20645/head
authorHal Martin <hal.martin@gmail.com>
Tue, 4 Nov 2025 19:31:04 +0000 (20:31 +0100)
committerRobert Marko <robimarko@gmail.com>
Sun, 25 Jan 2026 21:11:17 +0000 (22:11 +0100)
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@gmail.com>
Link: https://github.com/openwrt/openwrt/pull/20645
Signed-off-by: Robert Marko <robimarko@gmail.com>
target/linux/ipq40xx/base-files/etc/init.d/poe_switch [new file with mode: 0755]
target/linux/ipq40xx/files-6.12/arch/arm/boot/dts/qcom/qcom-ipq4029-mr30h.dts

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 (executable)
index 0000000..2dd9982
--- /dev/null
@@ -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
+}
index 8b21736d00ce46275449013057317fe360bfcb60..3655238eb91d46a39501b5fe7cacb997ad6d5b43 100644 (file)
                        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 {