From patchwork Sun Feb 21 11:07:07 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Guido_G=C3=BCnther?= X-Patchwork-Id: 12097229 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-14.2 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, UNWANTED_LANGUAGE_BODY,URIBL_BLOCKED,USER_AGENT_GIT autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 8310FC433E6 for ; Sun, 21 Feb 2021 11:08:50 +0000 (UTC) Received: from merlin.infradead.org (merlin.infradead.org [205.233.59.134]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 41FDE64EB2 for ; Sun, 21 Feb 2021 11:08:50 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 41FDE64EB2 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=sigxcpu.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe :List-Id:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:To:From: Reply-To:Cc:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wwE2udfUgUR3rIq8M8HA3scJAh7Ymg8eDkp8gXT/wNI=; b=UeXdLPhkN6/f3Rg9Dm0B9kFdXt ZSb1FUwTwaJ/5jrDYHI4Tlo32T5CEZxFQmtQDwpXe2c4YD6Od+xUzJxt/xlIAty6FrIha1JGMvcW/ nDwK2g7Qe3PT1M5T8ipJ1TiusMmOZWOSkysJBTztB9cO5OEuoK9vr6r3Yth+Ooo2wo+LIZ654M3od ooqUtkPLlawnCO0+BIKo1THEyR+wtmifEJnhdvluUM06IuuIOcKN4BnrXzpJ7dh7Guoq1ocfkwRdo KndL1bfQKu7Id6+8PU14ySdps/nSLawQDZweRQLYomomCZ5oZGER+4a/xBebkI0CRv4UnKc5P/Sdp VSwsbUAQ==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDmaF-0002If-9w; Sun, 21 Feb 2021 11:07:27 +0000 Received: from honk.sigxcpu.org ([24.134.29.49]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1lDma9-0002Fl-1H for linux-arm-kernel@lists.infradead.org; Sun, 21 Feb 2021 11:07:21 +0000 Received: from localhost (localhost [127.0.0.1]) by honk.sigxcpu.org (Postfix) with ESMTP id 0660CFB04; Sun, 21 Feb 2021 12:07:17 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at honk.sigxcpu.org Received: from honk.sigxcpu.org ([127.0.0.1]) by localhost (honk.sigxcpu.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pMBaL3QD9tAE; Sun, 21 Feb 2021 12:07:14 +0100 (CET) Received: by bogon.sigxcpu.org (Postfix, from userid 1000) id B3BA4403D9; Sun, 21 Feb 2021 12:07:11 +0100 (CET) From: =?utf-8?q?Guido_G=C3=BCnther?= To: Rob Herring , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Catalin Marinas , Will Deacon , =?utf-8?q?Guido_G=C3=BCnther?= , Martin Kepplinger , "Angus Ainslie (Purism)" , Krzysztof Kozlowski , Bjorn Andersson , Li Yang , Geert Uytterhoeven , Michael Walle , Max Krummenacher , Nishanth Menon , devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 2/6] arm64: dts: librem5-devkit: Add speaker amplifier Date: Sun, 21 Feb 2021 12:07:07 +0100 Message-Id: <53e81ef700ebc77acea774e691888ae8a0a8d4cf.1613905397.git.agx@sigxcpu.org> X-Mailer: git-send-email 2.30.0 In-Reply-To: References: MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210221_060721_284909_D6097A66 X-CRM114-Status: GOOD ( 11.32 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 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 Wire up the amplifier that drives the builtin speaker. Signed-off-by: Guido Günther --- .../dts/freescale/imx8mq-librem5-devkit.dts | 21 +++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts index 0c0b12c90363..d01bed5eb9e0 100644 --- a/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts +++ b/arch/arm64/boot/dts/freescale/imx8mq-librem5-devkit.dts @@ -165,19 +165,21 @@ wwan_codec: sound-wwan-codec { sound { compatible = "simple-audio-card"; + simple-audio-card,aux-devs = <&speaker_amp>; simple-audio-card,name = "Librem 5 Devkit"; simple-audio-card,format = "i2s"; simple-audio-card,widgets = "Microphone", "Microphone Jack", "Headphone", "Headphone Jack", - "Speaker", "Speaker Ext", + "Speaker", "Builtin Speaker", "Line", "Line In Jack"; simple-audio-card,routing = "MIC_IN", "Microphone Jack", "Microphone Jack", "Mic Bias", "LINE_IN", "Line In Jack", "Headphone Jack", "HP_OUT", - "Speaker Ext", "LINE_OUT"; + "Builtin Speaker", "Speaker Amp OUTR", + "Speaker Amp INR", "LINE_OUT"; simple-audio-card,cpu { sound-dai = <&sai2>; @@ -207,6 +209,15 @@ telephony_link_master: simple-audio-card,codec { }; }; + speaker_amp: speaker-amp { + compatible = "simple-audio-amplifier"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_spkamp>; + VCC-supply = <®_3v3_p>; + sound-name-prefix = "Speaker Amp"; + enable-gpios = <&gpio5 3 GPIO_ACTIVE_HIGH>; + }; + vibrator { compatible = "gpio-vibrator"; pinctrl-names = "default"; @@ -641,6 +652,12 @@ MX8MQ_IOMUXC_SAI5_RXFS_GPIO3_IO19 0x8 /* IMU_INT */ >; }; + pinctrl_spkamp: spkamp { + fsl,pins = < + MX8MQ_IOMUXC_SPDIF_TX_GPIO5_IO3 0x81 /* MUTE */ + >; + }; + pinctrl_pmic: pmicgrp { fsl,pins = < MX8MQ_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x80 /* PMIC intr */