From patchwork Fri May 12 16:04:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 681337 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 535C8C77B75 for ; Fri, 12 May 2023 16:05:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241955AbjELQFF (ORCPT ); Fri, 12 May 2023 12:05:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43242 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241932AbjELQFE (ORCPT ); Fri, 12 May 2023 12:05:04 -0400 Received: from mail-ej1-x62e.google.com (mail-ej1-x62e.google.com [IPv6:2a00:1450:4864:20::62e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4F1C74C12 for ; Fri, 12 May 2023 09:05:02 -0700 (PDT) Received: by mail-ej1-x62e.google.com with SMTP id a640c23a62f3a-965fc25f009so1565036866b.3 for ; Fri, 12 May 2023 09:05:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683907501; x=1686499501; 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=w0PYOudo3P+JObhGAcVuidrG1Rb2PsNeOuDCShvwBdM=; b=JUtVKq5Krnb6A19hxU2smnPX5rjDEKnJ2/NB8aUU71UHi87917K++0BW7h9vg33KHx HXf1iNcnXkFMyGeh7lSc0+swaiXQmZWJsVN/xboyeusLosYnwYfuymqKsTwZ8pZifGtC SjwVGBqhsfDE5pOzBrgZu61BCA/dp7iTAq/R1qREfuIINlWxIVa3xQpJrjW6jkAbHuaR p5/HnujJf9cYjh5X8qAf4JU29L4UcwNWnSMKl1fOqSQXaEV+j7Wg2Vhk20Dx078mZqlo 2sA8Ghl7JoGP/q8ZhNa2ilJ8BFWLH0X24+LU3+7vbgDITnZTlqJl2Mnu5qiFCSCGzBYQ hylw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683907501; x=1686499501; 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=w0PYOudo3P+JObhGAcVuidrG1Rb2PsNeOuDCShvwBdM=; b=OxtSDtH39WfOPLIJVAQDjIWuYfYTFdN3qWRA/qREnw5F4td0QPZJzJn/lwHVoSHuR8 02wSMrnmP8lQnBk3YNRK0CoyUFwfoGPnTWYbUpfs0bYlXcPoHOQoWf+fm/FFVTpKjhlo 0F8c1IlnP4CIhVUpQYcemo4Xk1paLZK0ipZqcdU9fo6CSK6vD3PZklNuL8RGRhp2P+PT Vd0VgSPqPxWAMkJC5qwPPf7A4skae9C5fU3jrjPnfjA0ruJGLKJPW2aW+vlHZUhBfWc0 kEnitn8sc21HpPQME4virKzWsHZ/wSXBkFeKeFGJe7ymQ6USvUjVxaF9z0u0KGrUCAeI 9e9w== X-Gm-Message-State: AC+VfDzMfZQeaiDGsCXzrO7YNEFjyzch57TRwl9hklDkgYiVtM3nWuJO 4Y51rN3Ei7lpp0VbA1JkE11oJA== X-Google-Smtp-Source: ACHHUZ4nQh48nD9diogVXknvtWR0ykPVeneEFht9Gt2ECiN4OYr+m21HACXFlFlkcpqL3sIuO5PivQ== X-Received: by 2002:a17:907:1b24:b0:94e:5c28:1c19 with SMTP id mp36-20020a1709071b2400b0094e5c281c19mr24930056ejc.5.1683907500702; Fri, 12 May 2023 09:05:00 -0700 (PDT) Received: from krzk-bin.. ([2a02:810d:15c0:828:7ede:fc7b:2328:3883]) by smtp.gmail.com with ESMTPSA id d5-20020a50fe85000000b004fbf6b35a56sm4224935edt.76.2023.05.12.09.04.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 09:04:59 -0700 (PDT) From: Krzysztof Kozlowski To: Andy Gross , Bjorn Andersson , Konrad Dybcio , Rob Herring , Krzysztof Kozlowski , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Krzysztof Kozlowski , Patrick Lai , Srinivas Kandagatla Subject: [PATCH 2/2] arm64: dts: qcom: sm8550-mtp: add WCD9385 audio-codec Date: Fri, 12 May 2023 18:04:52 +0200 Message-Id: <20230512160452.206585-2-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230512160452.206585-1-krzysztof.kozlowski@linaro.org> References: <20230512160452.206585-1-krzysztof.kozlowski@linaro.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Add Qualcomm Aqstic WCD9385 audio codec on two Soundwire interfaces: RX and TX. Signed-off-by: Krzysztof Kozlowski --- Not tested and not really verified against schematics (no access). MTP added based on downstream DTS. Cc: Patrick Lai Cc: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts index af0381acac25..905a5d3aa400 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts @@ -23,6 +23,32 @@ aliases { serial0 = &uart7; }; + wcd938x: audio-codec { + compatible = "qcom,wcd9385-codec"; + + pinctrl-names = "default"; + pinctrl-0 = <&wcd_default>; + + qcom,micbias1-microvolt = <1800000>; + qcom,micbias2-microvolt = <1800000>; + qcom,micbias3-microvolt = <1800000>; + qcom,micbias4-microvolt = <1800000>; + qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>; + qcom,mbhc-headset-vthreshold-microvolt = <1700000>; + qcom,mbhc-headphone-vthreshold-microvolt = <50000>; + qcom,rx-device = <&wcd_rx>; + qcom,tx-device = <&wcd_tx>; + + reset-gpios = <&tlmm 108 GPIO_ACTIVE_LOW>; + + vdd-buck-supply = <&vreg_l15b_1p8>; + vdd-rxtx-supply = <&vreg_l15b_1p8>; + vdd-io-supply = <&vreg_l15b_1p8>; + vdd-mic-bias-supply = <&vreg_bob1>; + + #sound-dai-cells = <1>; + }; + chosen { stdout-path = "serial0:115200n8"; }; @@ -535,6 +561,28 @@ &sleep_clk { clock-frequency = <32000>; }; +&swr1 { + status = "okay"; + + /* WCD9385 RX */ + wcd_rx: codec@0,4 { + compatible = "sdw20217010d00"; + reg = <0 4>; + qcom,rx-port-mapping = <1 2 3 4 5>; + }; +}; + +&swr2 { + status = "okay"; + + /* WCD9385 TX */ + wcd_tx: codec@0,3 { + compatible = "sdw20217010d00"; + reg = <0 3>; + qcom,tx-port-mapping = <1 1 2 3>; + }; +}; + &tlmm { gpio-reserved-ranges = <32 8>; @@ -565,6 +613,14 @@ sde_te_suspend: sde-te-suspend-state { drive-strength = <2>; bias-pull-down; }; + + wcd_default: wcd-reset-n-active-state { + pins = "gpio108"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + output-low; + }; }; &uart7 {