From patchwork Mon Jul 18 08:02:50 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12920965 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 C04EEC433EF for ; Mon, 18 Jul 2022 08:03:12 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233448AbiGRIDM (ORCPT ); Mon, 18 Jul 2022 04:03:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47640 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233431AbiGRIDL (ORCPT ); Mon, 18 Jul 2022 04:03:11 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C0230186EB for ; Mon, 18 Jul 2022 01:03:10 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id o31-20020a17090a0a2200b001ef7bd037bbso11909338pjo.0 for ; Mon, 18 Jul 2022 01:03:10 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=20A8d3QKuqR55DqSEaCOxZca1dq4+G/QxQSgtWMnIuY=; b=dF8tz5UKfYMyW4FP8lANsjwINYJruISKQD229AJrJvla8/z2uzkBddsXd6MrrabocB D3neIwaTAIJUK7KyNM96/DDMuCobhbfHI1VPJLIC9X9Ugl1Y6aqzz5fQtNqNvw1SaSXE tdq3hYhsWdqHjXNCvYF4GjgacVf+ZSk3MbqK0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=20A8d3QKuqR55DqSEaCOxZca1dq4+G/QxQSgtWMnIuY=; b=2648WGOR8iUKFMnIZriCOUbZBph6Omh3cuoU2s/Wi+LE+b1ZWF0WsdoOXcE8H0p7xL 6AqX2PawMS8Of4jP/iKMcFvJDkoKr7xa3ReRc39Jy83tC1m9Whh1ZqpkuYHqhWRsnWVG U7hDTaGYSJ93Gy55VgS8iVAZdjz5Oyh8L5z3tJ5DrQ3GyYODuuQn2mGRa9eVTRFu9zqV 8QnRE/iVOSq5xfiy4XzFHxZ+BqkQLGV0AfHQZVDcleAB7J3wr7PbrTzoeuGTY5Lipd91 oCGjj4u8oho7TvIKbQB7ld2vuMSJrTlYqr9i8gP5kDIbcSLAD+ZKcsMfJg/CfRi8t99x CVkA== X-Gm-Message-State: AJIora8ExVNE9JQravTCDLE8Yb5rs6kFdyHhf1aQGPQqqvfkVpqaJkj5 E3hK0Fa0G2HY7fJBdxCOV0y35Q== X-Google-Smtp-Source: AGRyM1t+/pisY8sC/UfSbD+X53uqi2JVe7JkhqJ3g74tT1ZCkP7hnoDtIv57xgtagMBE/PpZIFSvfA== X-Received: by 2002:a17:902:db02:b0:16c:5568:d740 with SMTP id m2-20020a170902db0200b0016c5568d740mr27301256plx.100.1658131390297; Mon, 18 Jul 2022 01:03:10 -0700 (PDT) Received: from judyhsiao0523.c.googlers.com.com (0.223.81.34.bc.googleusercontent.com. [34.81.223.0]) by smtp.gmail.com with ESMTPSA id 1-20020a170902c10100b0015e8d4eb2cdsm8672616pli.279.2022.07.18.01.03.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 01:03:09 -0700 (PDT) From: Judy Hsiao To: Andy Gross Cc: Bjorn Andersson , 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 v2 1/3] arm64: dts: qcom: sc7280: herobrine: Add pinconf settings for mi2s1 Date: Mon, 18 Jul 2022 08:02:50 +0000 Message-Id: <20220718080252.789585-2-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog In-Reply-To: <20220718080252.789585-1-judyhsiao@chromium.org> References: <20220718080252.789585-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 --- arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi index 0a220e7421d9..74c451bf0d00 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi @@ -632,6 +632,21 @@ &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; +}; + &pcie1_clkreq_n { bias-pull-up; drive-strength = <2>; From patchwork Mon Jul 18 08:02:51 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12920966 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 41836C433EF for ; Mon, 18 Jul 2022 08:03:17 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233480AbiGRIDQ (ORCPT ); Mon, 18 Jul 2022 04:03:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47694 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233436AbiGRIDP (ORCPT ); Mon, 18 Jul 2022 04:03:15 -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 ED28C186EB for ; Mon, 18 Jul 2022 01:03:14 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id c3so9024932pfb.13 for ; Mon, 18 Jul 2022 01:03:14 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=PxsYLrfp2FK7auckPeW+jGKSw7ldbvzvBjkNgHgKs/s=; b=BaBRg/kFytOp2Bh7yJPpH4qHfkTu9c13XEL5kDsCJ2YCIcPleytQ+UN/aUDNwR4Ri1 319Pg8NpdPBbiEP4kJszm3TTw5tuRsGlQztwqWtsLZDm17ddouPz9+Gf3gOaNR4ly1NS /lXDw5gPz7IxIZm1zNU8xynzzpFi8DL5wO7E0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=PxsYLrfp2FK7auckPeW+jGKSw7ldbvzvBjkNgHgKs/s=; b=BhYWdrq2/Tcq1wqZMCltmds37rDYFstgsoyNM4k/uISJKog0+88gAsARRFan+bFGzz ClDcavHEUVotK1iKmk2ZWldtQeLoeGexBAtVlXYC1NhHHT8TPy468wZ6Auf0O5bp62rr /MDeVzZFhOAXIbMLNGXtVkmGaoMry2+2YCQD0gtV+9jkPVJ814U7aQLZgSwloE4l6YhZ pAKFDJWqfxHQ9j1vUlKPLoaIBkI4YRseumhh9TbN/FdFho2HoCwECT3EpfMgY55zbA4U pRA+swHwSg5pGPssj+A9hyDPuPmvdSrt3ileKu/cmfYfn0mZv1HLlUhZA2+jCrNaN00o ebPA== X-Gm-Message-State: AJIora80yKdcwQOfD+vC2lmF/wUxT2u6Jt37wsHt9BwA9C7zFi7MOnmo vbeFvnDq1ZZspc3l22lxAMJn1w== X-Google-Smtp-Source: AGRyM1smYaT6h1skyujnbKoW3hJMw+Mzp7/5zMpYrb9osf1QNEF7rVBaOF4jSZ1PuZaBbsQ21bSJ/Q== X-Received: by 2002:a63:5906:0:b0:415:d2a2:f938 with SMTP id n6-20020a635906000000b00415d2a2f938mr23139543pgb.244.1658131394111; Mon, 18 Jul 2022 01:03:14 -0700 (PDT) Received: from judyhsiao0523.c.googlers.com.com (0.223.81.34.bc.googleusercontent.com. [34.81.223.0]) by smtp.gmail.com with ESMTPSA id 1-20020a170902c10100b0015e8d4eb2cdsm8672616pli.279.2022.07.18.01.03.11 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 01:03:13 -0700 (PDT) From: Judy Hsiao To: Andy Gross Cc: Bjorn Andersson , 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 v2 2/3] arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi Date: Mon, 18 Jul 2022 08:02:51 +0000 Message-Id: <20220718080252.789585-3-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog In-Reply-To: <20220718080252.789585-1-judyhsiao@chromium.org> References: <20220718080252.789585-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 | 121 ++++++++++++++++++ 1 file changed, 121 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..ec8f2e555a14 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-audio-rt5682.dtsi @@ -0,0 +1,121 @@ +// 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 Mon Jul 18 08:02:52 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12920967 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 7D04ECCA479 for ; Mon, 18 Jul 2022 08:03:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233510AbiGRIDW (ORCPT ); Mon, 18 Jul 2022 04:03:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47838 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233521AbiGRIDV (ORCPT ); Mon, 18 Jul 2022 04:03:21 -0400 Received: from mail-pl1-x636.google.com (mail-pl1-x636.google.com [IPv6:2607:f8b0:4864:20::636]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 6F65018B07 for ; Mon, 18 Jul 2022 01:03:18 -0700 (PDT) Received: by mail-pl1-x636.google.com with SMTP id k19so8331262pll.5 for ; Mon, 18 Jul 2022 01:03:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=8eXnG3wY3Xs6Rd1HwmYWWE1kb1ckVUQe9YNUa6RvcG0=; b=lkfuPqMUlgWCuV21AdYUfHwdaPI93j0efeL3XGhWlTWBMhNt83C2lfiECgcfmU6t3p 5x3MpB0F74UzVQ6KuPeUu18jVnF6vi86qtKTUby2NXsSe0yZSVqFLhHdacNIPLeNOmDD QXgqatH1F9nqFbyi8xPdWNZsbomFdVWo2ofyg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=8eXnG3wY3Xs6Rd1HwmYWWE1kb1ckVUQe9YNUa6RvcG0=; b=BiymBnOuIvExCKwQPMQQpJc+28NFSvOLIGP5m8ubGbvD+kNBh0eWoyVQy83hF//mF/ ZNl3vmNML5LlgTt9kMVYFDeTPLJU6RvNladK7IwyqZxgH1Spzl1FUS3Phs11CtZtipDL zJR3yCAKXY/BnzMvfByXb4JJHQehQdyWOBCCEPLCxPX5Uuj2Thu8GFEjnJICsNcnQFYY WeVPbC3/FAP1eHAG+gwoieN9LrKoHLgJAXeP0CN0Fve1K7DzoDsiZXUrNV091o3TOG11 HETHpR8rOn88gimfeojLs3bB6WtAnsIRuk6SlKubXf3NC78QJE/2VU7AtoFZUpRDgs3n 4ixw== X-Gm-Message-State: AJIora/uEP4baITVA2s32AvfyAaH/X4DNG2MHqJDGiSPjLG92f2GXdF+ 8jt0jFB/gxESybS4LL988AjK5w== X-Google-Smtp-Source: AGRyM1ui64BOJbooTruIT0aUeyw1XRI8hfYfWDsDWHLVYVPgsfYSyY90TNOlve/6KKtftXbK9TJSKg== X-Received: by 2002:a17:90b:3793:b0:1ef:905b:7464 with SMTP id mz19-20020a17090b379300b001ef905b7464mr31856186pjb.46.1658131397816; Mon, 18 Jul 2022 01:03:17 -0700 (PDT) Received: from judyhsiao0523.c.googlers.com.com (0.223.81.34.bc.googleusercontent.com. [34.81.223.0]) by smtp.gmail.com with ESMTPSA id 1-20020a170902c10100b0015e8d4eb2cdsm8672616pli.279.2022.07.18.01.03.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jul 2022 01:03:17 -0700 (PDT) From: Judy Hsiao To: Andy Gross Cc: Bjorn Andersson , 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 v2 3/3] arm64: dts: qcom: sc7280: include sc7280-herobrine-audio-rt5682.dtsi in herobrine-r1 Date: Mon, 18 Jul 2022 08:02:52 +0000 Message-Id: <20220718080252.789585-4-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog In-Reply-To: <20220718080252.789585-1-judyhsiao@chromium.org> References: <20220718080252.789585-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 as it uses rt5682 codec. Signed-off-by: Judy Hsiao Reviewed-by: Matthias Kaehlcke Reviewed-by: Douglas Anderson Reported-by: kernel test robot --- arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts | 1 + 1 file changed, 1 insertion(+) 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 c1647a85a371..98280436813d 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts @@ -8,6 +8,7 @@ /dts-v1/; #include "sc7280-herobrine.dtsi" +#include "sc7280-herobrine-audio-rt5682.dtsi" / { model = "Google Herobrine (rev1+)";