Skip to content

Commit 8b5d415

Browse files
linuswarndb
authored andcommitted
ARM: dts: ixp4xx: nslu2: beeper uses PWM
The beeper in the NSLU2 is just a GPIO connected to a speaker, so we need to use PWM on the GPIO to get any kind of sound out. Tested with some random beeps by enabling INPUT_EVDEV and running beep.c with e.g. beep 400 for a 400 Hz tone. Signed-off-by: Linus Walleij <[email protected]> Link: https://lore.kernel.org/[email protected] Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Arnd Bergmann <[email protected]>
1 parent 9289b97 commit 8b5d415

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-nslu2.dts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -90,11 +90,18 @@
9090
timeout-ms = <5000>;
9191
};
9292

93-
gpio-beeper {
94-
compatible = "gpio-beeper";
93+
gpio_pwm: pwm {
94+
#pwm-cells = <3>;
95+
compatible = "pwm-gpio";
9596
gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
9697
};
9798

99+
beeper {
100+
compatible = "pwm-beeper";
101+
pwms = <&gpio_pwm 0 1 0>;
102+
beeper-hz = <1000>;
103+
};
104+
98105
soc {
99106
bus@c4000000 {
100107
/* The first 16MB region at CS0 on the expansion bus */

0 commit comments

Comments
 (0)