diff mbox series

ARM: dts: ixp4xx: nslu2: beeper uses PWM

Message ID 20240703-ixp4xx-dts-v1-1-e5149da36f6e@linaro.org (mailing list archive)
State Accepted
Commit 8b5d415c4f9cc5a147c791d0300ee0b0cd8deae0
Headers show
Series ARM: dts: ixp4xx: nslu2: beeper uses PWM | expand

Commit Message

Linus Walleij July 3, 2024, 1:23 p.m. UTC
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
---
---
SoC maintainers: please apply this patch directly for
DTS changes.
---
 arch/arm/boot/dts/intel/ixp/intel-ixp42x-linksys-nslu2.dts | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)


---
base-commit: 1613e604df0cd359cf2a7fbd9be7a0bcfacfabd0
change-id: 20240627-ixp4xx-dts-6da9d0bf1ca4

Best regards,

Comments

patchwork-bot+linux-soc@kernel.org July 8, 2024, 3:11 p.m. UTC | #1
Hello:

This patch was applied to soc/soc.git (for-next)
by Arnd Bergmann <arnd@arndb.de>:

On Wed, 03 Jul 2024 15:23:41 +0200 you wrote:
> 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.
> 
> [...]

Here is the summary with links:
  - ARM: dts: ixp4xx: nslu2: beeper uses PWM
    https://git.kernel.org/soc/soc/c/8b5d415c4f9c

You are awesome, thank you!
diff mbox series

Patch

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 @@  gpio-poweroff {
 		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 */