diff options
author | Linus Walleij <[email protected]> | 2024-07-03 15:23:41 +0200 |
---|---|---|
committer | Arnd Bergmann <[email protected]> | 2024-07-08 16:31:25 +0200 |
commit | 8b5d415c4f9cc5a147c791d0300ee0b0cd8deae0 (patch) | |
tree | cb95ee31b3cc2326ae4f54ad157ef6f41ba872c4 | |
parent | 9289b97a672dca3236f2bf8fb5e40f7e78b056d6 (diff) |
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]>
-rw-r--r-- | arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-nslu2.dts | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-nslu2.dts b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-nslu2.dts index 2eec5f63d399..2f7c34c649ea 100644 --- a/arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-nslu2.dts +++ b/arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-nslu2.dts @@ -90,11 +90,18 @@ 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 */ |