From patchwork Thu Dec 14 13:10:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 178721 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:3b04:b0:fb:cd0c:d3e with SMTP id c4csp8531093dys; Thu, 14 Dec 2023 05:11:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IFx3dN8yKEK6VeMSY77tnIxQE0EkG0ktulogy4iRkC+f6kE4EvgHwHcPtsWYRmpbWGWS1Ai X-Received: by 2002:a05:6359:5c1e:b0:170:39fa:9c2b with SMTP id pu30-20020a0563595c1e00b0017039fa9c2bmr8402140rwb.50.1702559474042; Thu, 14 Dec 2023 05:11:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1702559474; cv=none; d=google.com; s=arc-20160816; b=uTtGOfWtqr5KS/jdCYZLKY0e+ZZpVwop+E78o6xvFlvJ8XdYUw/uC1OLavAQvpXEMI QBod1ytJvXXY8iWSCE166SNBTQy/eiOU6/NGlrG34EasiDj79L3TJjddJLQPnt6WldC5 h+elz/Enfdg/YMHG2HGCV4Ih+Jx6+nWhxUyTZ2tzZveMmk21oWcoyZuLsDYWzn4DhS3w rEPLWhTdLIHg5+XGWcY3llXjC3J1LseEFid3ZG11BIOwVogUhOX+8yUGTMkePQYP1Kbr /2pClo+2+nMBwlRTBtEEqW2zI3NqgmyYljyf9MAYZtSTYvM9x8X9uEyWXzFCqjQv928C fASA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=Zv75S7w86iylwPFGSxZB3llZQ1CBvgYvd4ByAnD/noo=; fh=96pD4U/3jwiXNBKr99B7ExNsML7+eNzP1ZTtrx5fl3A=; b=TAELqW6ARpVHyGHH+qktKkwSdjSvwgFW1nPkh/lXZh/HAqf2nIoBcJoE6yz1VUuEn7 M2yljvfQqs+2aT3uHxXBKTaOwT5KGdaauuPWirrUs4i9gZht3disQFXD31eC/USq4qeE ScjPHPQ2kUFVdA2d5bXdgcNIjXnDbRRe3jSeZYrQvMxGSRo+eYidu180zfRqITIYMlnw u/Xfj5LeVoa/PEsSd/7D0ECOQfRc0U1l0wGzNDHesi2WWC42oWplBnNh4PVJTnkMrT99 eu9rCsKuIvn3TCZAu0p/9oJLVdnBP9/h2KSOzrqk0a39vLjXfq56/w0axmdlPFquBcG4 uwEQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ooozgHBC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id c8-20020a63d508000000b005c65f924f6csi11005269pgg.319.2023.12.14.05.11.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 05:11:13 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=ooozgHBC; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 0548F82EC57E; Thu, 14 Dec 2023 05:11:11 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1573257AbjLNNKc (ORCPT + 99 others); Thu, 14 Dec 2023 08:10:32 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57536 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1573249AbjLNNKV (ORCPT ); Thu, 14 Dec 2023 08:10:21 -0500 Received: from mail-lf1-x136.google.com (mail-lf1-x136.google.com [IPv6:2a00:1450:4864:20::136]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 88D5098 for ; Thu, 14 Dec 2023 05:10:27 -0800 (PST) Received: by mail-lf1-x136.google.com with SMTP id 2adb3069b0e04-50dfac6c0beso6245687e87.2 for ; Thu, 14 Dec 2023 05:10:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1702559425; x=1703164225; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=Zv75S7w86iylwPFGSxZB3llZQ1CBvgYvd4ByAnD/noo=; b=ooozgHBCLPG7b5uiAjlgreD4y/TbzVDVOKHh6n2gOPqt9yoiLZxSU0GIm80wcrnpfN v785ozc2D54bEgNo4Ad3sBsqjQ3EW/GnbVau6U5WwWTXOseky6e+vAqW26HVMxnJDTHi RN6HZ534+trJnwlOIq1MKKc3hCpX4zSo6AwPb8d7LFh3RsQYDn37MRONFemyf1ngeFrp L7+Z4O4t3MvKjpu+kRLJ3od+1oGOwxapTwIabu61wfhdbC57pOFtjTGP6fFRg8eTSYXr fq85FADEuKH5fQbhigx+qUFS7CsgAD1ILNfzv/2sb6tqIuvwP37P/tG8Jhu3ZUxU+0HV l+cg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702559425; x=1703164225; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=Zv75S7w86iylwPFGSxZB3llZQ1CBvgYvd4ByAnD/noo=; b=Ghz/i8LEybHINwpt63lJJMfFDog8eu1L3Hq5CKndU0RBCVqR1w75ZoegIhS7VCM1Uy 36Il4PXJO7n4hA91jPNCqJJQYlG6KC8003bHJZrakBV9MBlcym/9AP6XuUpiX/pSzc01 D2HLSYFvi9uzliSuzkGo7BAhjTOO7pOfIF9p+DMjzu1mZJMqNqwoM7PCwUo5erM0yyVs 2HbdZkUKwxXBqRZ1QIAZTu8zNPqbMlfmkbiB5qC42LpdD8rFUXv6G151pgmT/zHj6PCJ NhoJDOIGZNcIsKKh7D+ibzsmVsbTv/VTb7Ckv43FCu36yqEfUUAUPZZKcRjFikKo8xoF zv3Q== X-Gm-Message-State: AOJu0YyAghEl+Kio8/442sSZhWf1pr2isFjeAi9a2thlYgY00vbzR99t WdMPOjX69NgFdUXxOZBaYICsZA== X-Received: by 2002:a19:5211:0:b0:50d:1679:5a50 with SMTP id m17-20020a195211000000b0050d16795a50mr4560724lfb.40.1702559425766; Thu, 14 Dec 2023 05:10:25 -0800 (PST) Received: from krzk-bin.. ([178.197.218.27]) by smtp.gmail.com with ESMTPSA id vq2-20020a170907a4c200b00a22faee6649sm2547776ejc.117.2023.12.14.05.10.24 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Dec 2023 05:10:25 -0800 (PST) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Abel Vesa Subject: [PATCH 4/4] arm64: dts: qcom: x1e80100-crd: add WSA8845 speakers Date: Thu, 14 Dec 2023 14:10:16 +0100 Message-Id: <20231214131016.30502-5-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231214131016.30502-1-krzysztof.kozlowski@linaro.org> References: <20231214131016.30502-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 14 Dec 2023 05:11:11 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1785263003153618038 X-GMAIL-MSGID: 1785263003153618038 Add nodes for four WSA8845 speakers. Unlike previous boards like SM8550-QRD, this board has four speakers spread over two Soundwire buses instead of two speakers on one bus. Each pair of speakers shares the reset GPIO thus pinctrl property is only in one of them. Cc: Abel Vesa Signed-off-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/qcom/x1e80100-crd.dts | 76 +++++++++++++++++++++++ 1 file changed, 76 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts index aa5c4199bd2c..8b4e5577048a 100644 --- a/arch/arm64/boot/dts/qcom/x1e80100-crd.dts +++ b/arch/arm64/boot/dts/qcom/x1e80100-crd.dts @@ -543,6 +543,24 @@ touchscreen@10 { }; }; +&lpass_tlmm { + spkr_01_sd_n_active: spkr-01-sd-n-active-state { + pins = "gpio12"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + output-low; + }; + + spkr_23_sd_n_active: spkr-23-sd-n-active-state { + pins = "gpio13"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + output-low; + }; +}; + &mdss { status = "okay"; }; @@ -633,6 +651,35 @@ &remoteproc_cdsp { status = "okay"; }; +&swr0 { + status = "okay"; + + /* WSA8845, Left Woofer */ + left_woofer: speaker@0,0 { + compatible = "sdw20217020400"; + reg = <0 0>; + pinctrl-0 = <&spkr_01_sd_n_active>; + pinctrl-names = "default"; + powerdown-gpios = <&lpass_tlmm 12 GPIO_ACTIVE_LOW>; + #sound-dai-cells = <0>; + sound-name-prefix = "WooferLeft"; + vdd-1p8-supply = <&vreg_l15b_1p8>; + vdd-io-supply = <&vreg_l12b_1p2>; + }; + + /* WSA8845, Left Tweeter */ + left_tweeter: speaker@0,1 { + compatible = "sdw20217020400"; + reg = <0 1>; + /* pinctrl in left_woofer node because of sharing the GPIO*/ + powerdown-gpios = <&lpass_tlmm 12 GPIO_ACTIVE_LOW>; + #sound-dai-cells = <0>; + sound-name-prefix = "TwitterLeft"; + vdd-1p8-supply = <&vreg_l15b_1p8>; + vdd-io-supply = <&vreg_l12b_1p2>; + }; +}; + &swr1 { status = "okay"; @@ -655,6 +702,35 @@ wcd_tx: codec@0,3 { }; }; +&swr3 { + status = "okay"; + + /* WSA8845, Right Woofer */ + right_woofer: speaker@0,0 { + compatible = "sdw20217020400"; + reg = <0 0>; + pinctrl-0 = <&spkr_23_sd_n_active>; + pinctrl-names = "default"; + powerdown-gpios = <&lpass_tlmm 13 GPIO_ACTIVE_LOW>; + #sound-dai-cells = <0>; + sound-name-prefix = "WooferRight"; + vdd-1p8-supply = <&vreg_l15b_1p8>; + vdd-io-supply = <&vreg_l12b_1p2>; + }; + + /* WSA8845, Right Tweeter */ + right_tweeter: speaker@0,1 { + compatible = "sdw20217020400"; + reg = <0 1>; + /* pinctrl in right_woofer node because of sharing the GPIO*/ + powerdown-gpios = <&lpass_tlmm 13 GPIO_ACTIVE_LOW>; + #sound-dai-cells = <0>; + sound-name-prefix = "TwitterRight"; + vdd-1p8-supply = <&vreg_l15b_1p8>; + vdd-io-supply = <&vreg_l12b_1p2>; + }; +}; + &tlmm { gpio-reserved-ranges = <34 2>, /* Unused */ <44 4>, /* SPI (TPM) */