From patchwork Fri May 12 16:04:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Krzysztof Kozlowski X-Patchwork-Id: 682614 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 433E2C77B7F for ; Fri, 12 May 2023 16:05:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241935AbjELQFC (ORCPT ); Fri, 12 May 2023 12:05:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:43196 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S241708AbjELQFB (ORCPT ); Fri, 12 May 2023 12:05:01 -0400 Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D927010CE for ; Fri, 12 May 2023 09:04:59 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id 4fb4d7f45d1cf-50bc075d6b2so18582704a12.0 for ; Fri, 12 May 2023 09:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1683907498; x=1686499498; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=aTITtva9ESnDWPsfvxoiIyGYO4jGWyqhVk7CK7KuwE0=; b=Ng6V89v7bBqoSRsfmCWvon9AUTLZHk4wNVGxXsFgRD+mJL4BQcjTMvFYSCpqU4okTL avOT6qcoaDtdu94YYp+0vhMO8ynK8cBdHdAw5XN4y16xVP0zXzhNe0p1WfyTducF7qR3 ysPl0aqOXA9Fswk9vjjxF+ExqLzMWTkv+8zEqaf9CIpW5QQ+2RtOstJy1phyA8EzEGPv 7G5jQtSykd8q8/IuoLHM3KFIjxTzImYzYKbMOE1Kw+mD4tv+1Ov0WKzZov56g6V8W9WW iVKLdJhfn0ETFWSRUISYXjuANY9Qg0FL+NpbEEKqg0uWhy05dHwJILqfzzWwV4dicFXh ezdw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1683907498; x=1686499498; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=aTITtva9ESnDWPsfvxoiIyGYO4jGWyqhVk7CK7KuwE0=; b=VV0CB0mPJLdeUg+rxHOqA5kACM4vF/hhY9IJEkp4mNtBW2CMTbBRB7tY7bc+knyAtI EnuXWu0Fk1l8TYIauaFbroaND+Ph0ktHkNC13ocfjJMrjTmg4JYrlQDp4FEffxoDHFab YJDvWAhfIVpmm8WtQR1ges8zEyJ69GZ4nld/IXuOQMhgzheWuE9hDPhEGsMP30NXOraY mWEtGdMmzVR+4AApjEIzju+dPfhWrcfzc/c2YdmSJOkSOpvZje6AD3vjlxeAkwoZWyVC wOlrFLOgn+luh4L9MoIkg98EQyn03Sb6cNAeP50IyXKBTikrBQ5LgUg5zXFncEyWU6VC SH7A== X-Gm-Message-State: AC+VfDxJsVHr07LpYW5CU7pv7r9xvE1fbrtcJ+oEPpFWed4RIGQPcrtl E44NhrUSHsUZzPGMPaeGKKrPrw== X-Google-Smtp-Source: ACHHUZ4l6y4L1Co/q9xMiAqUbhWQLBl5/9kwT6gnhMbGxPJrO0k2itQKwxGbquiPqzWGqLtq9JoTiQ== X-Received: by 2002:aa7:d64d:0:b0:50c:3dc:2262 with SMTP id v13-20020aa7d64d000000b0050c03dc2262mr18851543edr.39.1683907498385; Fri, 12 May 2023 09:04:58 -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.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 12 May 2023 09:04:55 -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 1/2] arm64: dts: qcom: sm8550-qrd: add WCD9385 audio-codec Date: Fri, 12 May 2023 18:04:51 +0200 Message-Id: <20230512160452.206585-1-krzysztof.kozlowski@linaro.org> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Add Qualcomm Aqstic WCD9385 audio codec on two Soundwire interfaces: RX and TX. Signed-off-by: Krzysztof Kozlowski --- Cc: Patrick Lai Cc: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sm8550-qrd.dts | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts b/arch/arm64/boot/dts/qcom/sm8550-qrd.dts index d5a645ee2a61..ccc58e6b45bd 100644 --- a/arch/arm64/boot/dts/qcom/sm8550-qrd.dts +++ b/arch/arm64/boot/dts/qcom/sm8550-qrd.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"; }; @@ -385,8 +411,38 @@ &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>; + + wcd_default: wcd-reset-n-active-state { + pins = "gpio108"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + output-low; + }; }; &uart7 {