]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
ARM: dts: ixp4xx: nslu2: beeper uses PWM
authorLinus Walleij <linus.walleij@linaro.org>
Wed, 3 Jul 2024 13:23:41 +0000 (15:23 +0200)
committerArnd Bergmann <arnd@arndb.de>
Mon, 8 Jul 2024 14:31:25 +0000 (16:31 +0200)
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 <linus.walleij@linaro.org>
Link: https://lore.kernel.org/20240627-ixp4xx-dts-v1-1-cdbbe1150873@linaro.org
Link: https://lore.kernel.org/r/20240703-ixp4xx-dts-v1-1-e5149da36f6e@linaro.org
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-nslu2.dts

index 2eec5f63d3995d1af2f24bde3fffc0b248d99c4b..2f7c34c649ea2fe5a903fc2bfd6ccd5748c5bb3a 100644 (file)
                timeout-ms = <5000>;
        };
 
-       gpio-beeper {
-               compatible = "gpio-beeper";
+       gpio_pwm: pwm {
+               #pwm-cells = <3>;
+               compatible = "pwm-gpio";
                gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
        };
 
+       beeper {
+               compatible = "pwm-beeper";
+               pwms = <&gpio_pwm 0 1 0>;
+               beeper-hz = <1000>;
+       };
+
        soc {
                bus@c4000000 {
                        /* The first 16MB region at CS0 on the expansion bus */