From patchwork Thu Jun 27 20:34:22 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13715012 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 46B82C3064D for ; Thu, 27 Jun 2024 20:34:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:Message-Id: Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=p3Tp11hDkODtFIu/ysu+2m6QUIOyKTbIwZc9BcAwx6c=; b=ux3FvujBG/hMrrxYIeGhouo1gZ SDDihk4MpwVMU48ccdnM2rwQg9UGNh702RQtCuL4BsVfAJS6ZMtYGZC0CeJR8+/cIN4jZwVgw3Bwd 3J2VgoZaFDVKDeWgYmb0Dn8dOOXBDaTO2dj3Rn68iaLpNAyfGCjYcFu+fybCb48BMHnX+432++1Sq rxOqvO0rOL7TLONhGQP0jIThkDOSuy7JaK4dEzafYtqcdgWV6M/TfGIWdFmHpgxSMCXrqxmgUdo8C pffs7XodVZZmusxsUVweVpUVhAkOfv+vjpsWMhrKgJEH0GLN6wHrvWBw+ttLkMO+oPTaMUFPLXffR qqx0QBWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMvpD-0000000BdWb-1zk2; Thu, 27 Jun 2024 20:34:35 +0000 Received: from mail-ej1-x630.google.com ([2a00:1450:4864:20::630]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMvp4-0000000BdV5-43Ji for linux-arm-kernel@lists.infradead.org; Thu, 27 Jun 2024 20:34:28 +0000 Received: by mail-ej1-x630.google.com with SMTP id a640c23a62f3a-a7194ce90afso737311166b.2 for ; Thu, 27 Jun 2024 13:34:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1719520463; x=1720125263; darn=lists.infradead.org; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:from:to:cc:subject:date:message-id:reply-to; bh=p3Tp11hDkODtFIu/ysu+2m6QUIOyKTbIwZc9BcAwx6c=; b=oNSVOI1NZsmSXnYARKMGjcONwGWkFm9VA+gtRPymk/ZkORE2Yq4NWd9SaAJl7Z9k6K uKYqSA1vGlBGbv3bkIMNoc+IWLk9QruwWC7XYHVtqsBwE1PDS6fCpTNcejP8T6zRQrhP fIvnGH/omOJTzxkp/vN4Lsf7OV5aF6Xy2MXwpeIikwsR8UrJQuLzH3OKLhSeMMr0AeE8 rA2H2YeQDewnpC7hTaLoAzQLxmfCzjDCdX03sfkFb3bvvbW4rK83pCDAJepnFJvnCw1s OD89+Zc19V9Cx4/B/eBCV7EAxaA5alIBY+M3ODs24aHO2XhvTDW/t99IeBt7N37VnC/w MvxA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1719520463; x=1720125263; h=cc:to:message-id:content-transfer-encoding:mime-version:subject :date:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=p3Tp11hDkODtFIu/ysu+2m6QUIOyKTbIwZc9BcAwx6c=; b=gN291GnmLzR8PniyqVwsdzPhvpOfjwnv2a82cxUp6OHPX2zAGxh216qURXyxURZGVl mFqLAdNz6JtsAGTw1QvGc/IWb0P6wXstTktOEsN/jTRcr5Bq4napidXZD3k/3Yiz5bQ1 NcicZ+lLk+x2KiNYlN0CmLJR1eBYgqDAfyTMiDKQC6TFJRsP3WxV6vqgFiTF2cRKSp8N tXmiy2O9U7uFRvx2nmcr7Gygu6fD85ImxQo3eAZ2P4P3iGBxhtyJl0CpaaMbobRFPQ+R BqSOlI5yFYlcDnNPkQdAyPIhgsDPs/llqJg9j/KzOGURmTFvafUxhJaYcOkaP63g+j75 GMhw== X-Gm-Message-State: AOJu0YyGJjFCO/xAFmzmLjeiYMKqjx47dKoqGvdlnrvUabI8TDhuDRHs uvJdcOF+3wz63iq4UrUfu8j5Zbpc3uaNvTuyecprgedWbCMo7S5sEc3TUhh3kSc= X-Google-Smtp-Source: AGHT+IFmEVbvTkJYUB7J0QmXSW0wNb4VTzTwQBn76Byti3cnigCv8kzwfnXiQSOhz/F2TG5HhtGLlA== X-Received: by 2002:a17:906:398:b0:a6f:6ade:175f with SMTP id a640c23a62f3a-a715f9cba14mr850746366b.60.1719520462819; Thu, 27 Jun 2024 13:34:22 -0700 (PDT) Received: from lino.lan ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-a72aaf6039asm9622766b.54.2024.06.27.13.34.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 27 Jun 2024 13:34:22 -0700 (PDT) From: Linus Walleij Date: Thu, 27 Jun 2024 22:34:22 +0200 Subject: [PATCH] ARM: dts: ixp4xx: nslu2: beeper uses PWM MIME-Version: 1.0 Message-Id: <20240627-ixp4xx-dts-v1-1-cdbbe1150873@linaro.org> X-B4-Tracking: v=1; b=H4sIAM3MfWYC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDIxMDMyNz3cyKApOKCt2UkmJds5REyxSDpDTD5EQTJaCGgqLUtMwKsGHRsbW 1ALhr30hcAAAA To: Linus Walleij , Imre Kaloz Cc: linux-arm-kernel@lists.infradead.org, Linus Walleij X-Mailer: b4 0.14.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240627_133427_044636_1C924675 X-CRM114-Status: GOOD ( 11.69 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org 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 --- 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, 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 */