From patchwork Fri Sep 30 15:36:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12995682 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 E6F7CC4332F for ; Fri, 30 Sep 2022 15:36:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230240AbiI3Pg7 (ORCPT ); Fri, 30 Sep 2022 11:36:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57222 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231487AbiI3Pg5 (ORCPT ); Fri, 30 Sep 2022 11:36:57 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id BAE6E1A0D21 for ; Fri, 30 Sep 2022 08:36:56 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id c198so4549801pfc.13 for ; Fri, 30 Sep 2022 08:36:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=ZxqNeg9qYIg+s4/UlajiiC5HVdIkGrA2Kg81oKMQ+/o=; b=ksNJeksNLwIY/rpd0fWUf+Te+/bxcrN2bGCTzVlMyb9TRGW7RUmlnW1iEfp/ckw4+8 QvHwtMC8jkc3hPnu2xaan5dRgwCXJ+tk4Ea75d+59X7D1J1SSPh0WeZCP3OJkcPoFmSW gX/Srdo/WYMBb7jFFe0ZJI+sTRQU390yexSqw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=ZxqNeg9qYIg+s4/UlajiiC5HVdIkGrA2Kg81oKMQ+/o=; b=Lg9gV4EaRPvgYV8O8oI8ihueIIUTM/O7nApdX74zpgg0h62pQRmdfUxivLY6iwNxb4 QXOy2gLCcQafbwvfcch6x0t4z6nCs84OKFikaOT6hHrt/ahfO9P1zmJ078EFN6IQD4A8 wjLQsW/UMo5HWWBbP9wwQKFyphRaKhV44x3WESf1JSbk9x2cLCuI1S3qKqvRvfluF4Pn SoJ84hP4A5cPWz4GYjFrmScYjcgaeJpkhEav1iMGKTHn+qwXMZMxrBDE9sHSH1grWV1x etUTHDSnITxq4NH6/ZsNySxO9M4qJMJq1kNu2AZwVzNd1OK3Cw+2BrSg8xh/UDSYcOmy hMbw== X-Gm-Message-State: ACrzQf35PpuuITDiJBZMRCRdC4nn10ct6+t0kLddgcUTlkX55AeAPeMb eicSE+RSTbJ3j6+2s/plfgk2SQ== X-Google-Smtp-Source: AMsMyM5eTepICctmAmSn5g9cc4mggiq9B3ai+b4KcYpc4PM9p2a6gM05xb08V4IprjyxdJqwyiyhJw== X-Received: by 2002:a63:24d:0:b0:439:3804:d0ff with SMTP id 74-20020a63024d000000b004393804d0ffmr8091351pgc.414.1664552216064; Fri, 30 Sep 2022 08:36:56 -0700 (PDT) Received: from judyhsiao0523.c.googlers.com.com (21.160.199.104.bc.googleusercontent.com. [104.199.160.21]) by smtp.gmail.com with ESMTPSA id s13-20020a170902ea0d00b0016d72804664sm2025155plg.205.2022.09.30.08.36.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 08:36:55 -0700 (PDT) From: Judy Hsiao To: andersson@kernel.org Cc: Andy Gross , Rob Herring , Srini Kandagatla , dianders@chromium.org, mka@chromium.org, cychiang@google.com, judyhsiao@google.com, swboyd@chromium.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Judy Hsiao Subject: [PATCH v5 1/3] arm64: dts: qcom: sc7280: herobrine: Add pinconf settings for mi2s1 Date: Fri, 30 Sep 2022 15:36:41 +0000 Message-Id: <20220930153643.2018907-2-judyhsiao@chromium.org> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-goog In-Reply-To: <20220930153643.2018907-1-judyhsiao@chromium.org> References: <20220930153643.2018907-1-judyhsiao@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org 1. Add drive strength property for mi2s1 on sc7280 based platforms. 2. Disable the pull-up for mi2s1 lines. Signed-off-by: Judy Hsiao Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- .../arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi index c11e37160f34..83a42a77121c 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi @@ -639,6 +639,36 @@ &dp_hot_plug_det { bias-disable; }; +&mi2s1_data0 { + drive-strength = <6>; + bias-disable; +}; + +&mi2s1_sclk { + drive-strength = <6>; + bias-disable; +}; + +&mi2s1_ws { + drive-strength = <6>; + bias-disable; +}; + +&mi2s1_data0 { + drive-strength = <6>; + bias-disable; +}; + +&mi2s1_sclk { + drive-strength = <6>; + bias-disable; +}; + +&mi2s1_ws { + drive-strength = <6>; + bias-disable; +}; + &pcie1_clkreq_n { bias-pull-up; drive-strength = <2>; From patchwork Fri Sep 30 15:36:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12995683 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 9A944C433F5 for ; Fri, 30 Sep 2022 15:37:14 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231592AbiI3PhN (ORCPT ); Fri, 30 Sep 2022 11:37:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57392 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231623AbiI3PhJ (ORCPT ); Fri, 30 Sep 2022 11:37:09 -0400 Received: from mail-pg1-x533.google.com (mail-pg1-x533.google.com [IPv6:2607:f8b0:4864:20::533]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 68BCE1A1080 for ; Fri, 30 Sep 2022 08:37:07 -0700 (PDT) Received: by mail-pg1-x533.google.com with SMTP id e129so4467997pgc.9 for ; Fri, 30 Sep 2022 08:37:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=JHh+MG4OU/+wjbCiWOKQq0gX7ZmA4UN476SmJdYV9kg=; b=AqEWNyRRJ8zAZyVB4WTwuL54Ue4AJ6qC7q3VmMAchIzDuHLFWsLbGkSZHdWg3rDd93 l6as77BhPDwxCUV4z7DCjpos+l9s3SCKsh6Jve6sxkPFeCUMI10xExTk7+osJ6JowVot 6p1LeHdvXv86KbXHkTgMmA4OHbi0hE5jlF1F8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=JHh+MG4OU/+wjbCiWOKQq0gX7ZmA4UN476SmJdYV9kg=; b=bFfBGaxYVQAYExmoty67Ji226l2BP8i1OZDdHUBctAlomeK530znJPXQjRxHBcfwt7 UcZ1FnQ+fZpCb/EUvOaSYjAHRP29euUPA9ghumgwGEIa4wPZhx2ps7FTfkYo8+79F5TA i06kKKCAo85nCJU5PLoYci+Q/kjv0710xGEOEI3V8h6GSSScbF2H/Z9azLyd403P1LLQ ZY20KJDACsW00BZp8T35U2piVPtiexqi7JmaZyIZrL2JtftBWB+PhYpriMlowvoNwPnv +ox/tTaHY2sZ7UrM4XX/raxzTbqaumk9yhxuZb3iTCzXQUPPnnPoDGeN6ccXz/vQq8FM zB6w== X-Gm-Message-State: ACrzQf02NBqBYgR2OtBt0R21CH9KYHY0QzasrW7hL0aSs8VGlu+nnnJS iVsrRrFAwfKyzid9MXIfA2pQJQ== X-Google-Smtp-Source: AMsMyM7yty99NK9WhS4hbzjggq6Oxx/bwl4htrPKe8na+7T785E7yRYHOofm3EoBOZkSg+ZQ4IEuMA== X-Received: by 2002:a63:ed07:0:b0:442:87:3a38 with SMTP id d7-20020a63ed07000000b0044200873a38mr2980570pgi.216.1664552225256; Fri, 30 Sep 2022 08:37:05 -0700 (PDT) Received: from judyhsiao0523.c.googlers.com.com (21.160.199.104.bc.googleusercontent.com. [104.199.160.21]) by smtp.gmail.com with ESMTPSA id s13-20020a170902ea0d00b0016d72804664sm2025155plg.205.2022.09.30.08.37.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 08:37:04 -0700 (PDT) From: Judy Hsiao To: andersson@kernel.org Cc: Andy Gross , Rob Herring , Srini Kandagatla , dianders@chromium.org, mka@chromium.org, cychiang@google.com, judyhsiao@google.com, swboyd@chromium.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Judy Hsiao Subject: [PATCH v5 2/3] arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi Date: Fri, 30 Sep 2022 15:36:42 +0000 Message-Id: <20220930153643.2018907-3-judyhsiao@chromium.org> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-goog In-Reply-To: <20220930153643.2018907-1-judyhsiao@chromium.org> References: <20220930153643.2018907-1-judyhsiao@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Audio dtsi for sc7280 boards that using rt5682 headset codec: 1. Add dt nodes for sound card which use I2S playback and record through rt5682s and I2S playback through max98357a. 2. Enable lpass cpu node and add pin control and dai-links. Signed-off-by: Judy Hsiao Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- .../qcom/sc7280-herobrine-audio-rt5682.dtsi | 122 ++++++++++++++++++ 1 file changed, 122 insertions(+) create mode 100644 arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi new file mode 100644 index 000000000000..2dbdeeb29ece --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi @@ -0,0 +1,122 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * + * This file defines the common audio settings for the child boards + * using rt5682 codec. + * + * Copyright 2022 Google LLC. + */ + +/ { + /* BOARD-SPECIFIC TOP LEVEL NODES */ + sound: sound { + compatible = "google,sc7280-herobrine"; + model = "sc7280-rt5682-max98360a-1mic"; + + status = "okay"; + audio-routing = + "Headphone Jack", "HPOL", + "Headphone Jack", "HPOR"; + + #address-cells = <1>; + #size-cells = <0>; + + dai-link@0 { + link-name = "MAX98360"; + reg = <0>; + + cpu { + sound-dai = <&lpass_cpu MI2S_SECONDARY>; + }; + + codec { + sound-dai = <&max98360a>; + }; + }; + + dai-link@1 { + link-name = "ALC5682"; + reg = <1>; + + cpu { + sound-dai = <&lpass_cpu MI2S_PRIMARY>; + }; + + codec { + sound-dai = <&alc5682 0 /* aif1 */>; + }; + }; + }; +}; + +hp_i2c: &i2c2 { + status = "okay"; + clock-frequency = <400000>; + + alc5682: codec@1a { + compatible = "realtek,rt5682s"; + reg = <0x1a>; + pinctrl-names = "default"; + pinctrl-0 = <&hp_irq>; + + #sound-dai-cells = <1>; + + interrupt-parent = <&tlmm>; + interrupts = <101 IRQ_TYPE_EDGE_BOTH>; + + AVDD-supply = <&pp1800_alc5682>; + MICVDD-supply = <&pp3300_codec>; + + realtek,dmic1-data-pin = <1>; + realtek,dmic1-clk-pin = <2>; + realtek,jd-src = <1>; + realtek,dmic-clk-rate-hz = <2048000>; + }; +}; + +&lpass_cpu { + status = "okay"; + + pinctrl-names = "default"; + pinctrl-0 = <&mi2s0_data0>, <&mi2s0_data1>, <&mi2s0_mclk>, <&mi2s0_sclk>, <&mi2s0_ws>, + <&mi2s1_data0>, <&mi2s1_sclk>, <&mi2s1_ws>; + + #address-cells = <1>; + #size-cells = <0>; + + dai-link@0 { + reg = ; + qcom,playback-sd-lines = <1>; + qcom,capture-sd-lines = <0>; + }; + + dai-link@1 { + reg = ; + qcom,playback-sd-lines = <0>; + }; +}; + +&mi2s0_data0 { + drive-strength = <6>; + bias-disable; +}; + +&mi2s0_data1 { + drive-strength = <6>; + bias-disable; +}; + +&mi2s0_mclk { + drive-strength = <6>; + bias-disable; +}; + +&mi2s0_sclk { + drive-strength = <6>; + bias-disable; +}; + +&mi2s0_ws { + drive-strength = <6>; + bias-disable; +}; From patchwork Fri Sep 30 15:36:43 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12995684 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 3AA7AC433FE for ; Fri, 30 Sep 2022 15:37:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231639AbiI3PhV (ORCPT ); Fri, 30 Sep 2022 11:37:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57426 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231635AbiI3PhP (ORCPT ); Fri, 30 Sep 2022 11:37:15 -0400 Received: from mail-pg1-x536.google.com (mail-pg1-x536.google.com [IPv6:2607:f8b0:4864:20::536]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8EA9D1A1080 for ; Fri, 30 Sep 2022 08:37:12 -0700 (PDT) Received: by mail-pg1-x536.google.com with SMTP id 3so4500863pga.1 for ; Fri, 30 Sep 2022 08:37:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date; bh=LPYKbguZc/KYKDAy5XVdCd4nJdkVt/SEkrsrImBpX8M=; b=Zd63G6ZoUfHEDbwl6sw1tUXxxGRU0nsMethkFkh2p6u11xvZK5YcA30HkTDpWSdI1j AzlRC8NZcnJzHUtN99ukkaiwGXLlbc8TJRM+cHxlAa6pqU+sPGwNWI4jO58hmUXdLrVI 1C2vzo6IJReqnM8mMd+EBoGgesWJ9toi5HNhM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; 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; bh=LPYKbguZc/KYKDAy5XVdCd4nJdkVt/SEkrsrImBpX8M=; b=BPDFSq9olSCeHozrJmByQyYbTT1K3e6/5m/oQ5RrnbGj5DoRq9r5AIbGtcKeCFfe50 Sp9XbVSGRog39y68f5NZpzeth4OF0wElmMsl0Ok9t8oiFJRxs9e1pkgJjSICL4m1RomX yuZx4THQUzH1kLPX/M8JVEQI9P8bP02NT2OTb3KRQggHJxdp8tJZjPQMrwiujWzRQKK7 AGjXLaoJa24KWSy7HRDtmt3M5oyclY25co4BeJ6ptNSKQwCPvnycd0vN8RAUHhJ2uZM4 Nv9uT1lwnpQXrZI+uYnJADM0FeqTiYXmeQ7fLeEx+bhAE9MQveJz/n2FdnY5I1EXR+jJ QO2A== X-Gm-Message-State: ACrzQf00+xofUiQnB7xZNS+1R0jk4WozzGIL7yDBf6PVsJPopZ37heyT t2T8OmGrxdsNhvOy39DbFO1H4X1IrgMsvQ== X-Google-Smtp-Source: AMsMyM6xqal4/XOJLMBHQ9YrEG3UfneC0sz6YuMsdGK7ZXSUAgOfMfhQ9Ij8VoFNM1z75MU8PkTV+Q== X-Received: by 2002:a63:5a63:0:b0:42f:e143:80d4 with SMTP id k35-20020a635a63000000b0042fe14380d4mr8215769pgm.456.1664552231662; Fri, 30 Sep 2022 08:37:11 -0700 (PDT) Received: from judyhsiao0523.c.googlers.com.com (21.160.199.104.bc.googleusercontent.com. [104.199.160.21]) by smtp.gmail.com with ESMTPSA id s13-20020a170902ea0d00b0016d72804664sm2025155plg.205.2022.09.30.08.37.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 08:37:11 -0700 (PDT) From: Judy Hsiao To: andersson@kernel.org Cc: Andy Gross , Rob Herring , Srini Kandagatla , dianders@chromium.org, mka@chromium.org, cychiang@google.com, judyhsiao@google.com, swboyd@chromium.org, linux-arm-kernel@lists.infradead.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Judy Hsiao Subject: [PATCH v5 3/3] arm64: dts: qcom: sc7280: Include sc7280-herobrine-audio-rt5682.dtsi in herobrine-r1 and villager-r0 Date: Fri, 30 Sep 2022 15:36:43 +0000 Message-Id: <20220930153643.2018907-4-judyhsiao@chromium.org> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-goog In-Reply-To: <20220930153643.2018907-1-judyhsiao@chromium.org> References: <20220930153643.2018907-1-judyhsiao@chromium.org> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Include sc7280-herobrine-audio-rt5682.dtsi in herobrine-r1 and villager-r0 as they use rt5682 codec. Signed-off-by: Judy Hsiao Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson --- arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts | 1 + arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts | 1 + 2 files changed, 2 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts b/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts index c1a671968725..c569d7a5edb7 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts @@ -9,6 +9,7 @@ #include "sc7280-herobrine.dtsi" #include "sc7280-herobrine-lte-sku.dtsi" +#include "sc7280-herobrine-audio-rt5682.dtsi" / { model = "Google Herobrine (rev1+)"; diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts index 73e24cc55a09..31a57ae5af57 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts @@ -9,6 +9,7 @@ #include "sc7280-herobrine-villager.dtsi" #include "sc7280-herobrine-lte-sku.dtsi" +#include "sc7280-herobrine-audio-rt5682.dtsi" / { model = "Google Villager (rev0)";