Skip to content

Instantly share code, notes, and snippets.

@Borromini
Last active May 13, 2021 20:30
Show Gist options
  • Save Borromini/4f2fad6d51779a62301dccec00c8c3c8 to your computer and use it in GitHub Desktop.
Save Borromini/4f2fad6d51779a62301dccec00c8c3c8 to your computer and use it in GitHub Desktop.
From aa240909b9c14977c75600559d2b4d7d182ad995 Mon Sep 17 00:00:00 2001
From: Sander Vanheule <sander@svanheule.net>
Date: Thu, 13 May 2021 09:05:16 +0200
Subject: [PATCH] ramips: replace PoE gpio-export by regulator
A PoE passthrough as present on the TP-Link EAP235-Wall can also be seen
as a regulator with a fixed voltage output. Replace the gpio-export node
by a fixed-regulator node.
Signed-off-by: Sander Vanheule <sander@svanheule.net>
---
.../ramips/dts/mt7621_tplink_eap235-wall-v1.dts | 15 ++++++++-------
1 file changed, 9 insertions(+), 7 deletions(-)
diff --git a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
index 17308eb605b8..b6f8a2b7ca1e 100644
--- a/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
+++ b/target/linux/ramips/dts/mt7621_tplink_eap235-wall-v1.dts
@@ -45,14 +45,16 @@
};
};
- gpio-export {
- compatible = "gpio-export";
+ poe_passthrough {
+ compatible = "regulator-fixed";
- poe_passthrough {
- gpio-export,name = "poe-passthrough";
- gpio-export,output = <0>;
- gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
- };
+ regulator-name = "poe-passthrough";
+ regulator-min-microvolt = <54000000>;
+ regulator-max-microvolt = <54000000>;
+ regulator-always-on;
+
+ gpio = <&gpio 7 GPIO_ACTIVE_HIGH>;
+ enable-active-high;
};
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment