[openwrt/openwrt] ramips: use gpio-export for Mikrotik RouterBOARD 750Gr3 beeper

LEDE Commits lede-commits at lists.infradead.org
Wed Aug 12 20:12:26 EDT 2020


adrian pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/2d9db93397f3120591bab0cf89347eec55c168f3

commit 2d9db93397f3120591bab0cf89347eec55c168f3
Author: John Thomson <git at johnthomson.fastmail.com.au>
AuthorDate: Mon Aug 10 19:40:55 2020 +1000

    ramips: use gpio-export for Mikrotik RouterBOARD 750Gr3 beeper
    
    This beeper hardware requires a PWM driver for frequency selection.
    Since the GPIO driver does not provide that, revert the beeper
    support to a simple gpio-export.
    
    This effectively reverts the corresponding changes from
    6ba58b7b020c ("ramips: cleanup the RB750Gr3 support")
    
    Signed-off-by: John Thomson <git at johnthomson.fastmail.com.au>
    [commit title/message facelift]
    Signed-off-by: Adrian Schmutzler <freifunk at adrianschmutzler.de>
---
 .../linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts  | 12 +++++++-----
 target/linux/ramips/image/mt7621.mk                          |  2 +-
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts
index a516f337cc..f767599e98 100644
--- a/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts
+++ b/target/linux/ramips/dts/mt7621_mikrotik_routerboard-750gr3.dts
@@ -52,15 +52,17 @@
 		};
 	};
 
-	beeper {
-		compatible = "gpio-beeper";
-		gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
-	};
-
 	gpio_export {
 		compatible = "gpio-export";
 		#size-cells = <0>;
 
+		buzzer {
+			/* Beeper requires PWM for frequency selection */
+			gpio-export,name = "buzzer";
+			gpio-export,output = <0>;
+			gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+		};
+
 		usb_power {
 			gpio-export,name = "usb_power";
 			gpio-export,output = <1>;
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index c922303c54..16b74c7b3e 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -703,7 +703,7 @@ endef
 define Device/mikrotik_routerboard-750gr3
   $(Device/MikroTik)
   DEVICE_MODEL := RouterBOARD 750Gr3
-  DEVICE_PACKAGES += kmod-gpio-beeper -wpad-basic
+  DEVICE_PACKAGES += -wpad-basic
   SUPPORTED_DEVICES += mikrotik,rb750gr3
 endef
 TARGET_DEVICES += mikrotik_routerboard-750gr3



More information about the lede-commits mailing list