From patchwork Wed Jul 20 03:52: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: 12923476 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 8AC62CCA483 for ; Wed, 20 Jul 2022 03:53:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238424AbiGTDxI (ORCPT ); Tue, 19 Jul 2022 23:53:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48352 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238223AbiGTDxH (ORCPT ); Tue, 19 Jul 2022 23:53:07 -0400 Received: from mail-pj1-x1031.google.com (mail-pj1-x1031.google.com [IPv6:2607:f8b0:4864:20::1031]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AB2B16D556 for ; Tue, 19 Jul 2022 20:53:06 -0700 (PDT) Received: by mail-pj1-x1031.google.com with SMTP id gn24so2232932pjb.3 for ; Tue, 19 Jul 2022 20:53:06 -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=WyZzcrrFobayqjPnvh8BotCX2m5olW/PKmd+632dba4=; b=LInOYZaUyeCRyCFEavBzRarqCtNovHIZB4aOhDf9QepQxyGbV2OmPzMlndkV8qCj2r Yz6i7xsoZaoZD0Gi63JSi/OXm9+uROIyuGb4uEfaRMHOjLUveUtFCIodBVaQCPZ/frby eUl4g0Rq1SSWWWqqYqBc/k7ZvfKWqSRchkCKM= 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=WyZzcrrFobayqjPnvh8BotCX2m5olW/PKmd+632dba4=; b=jJHzc5vIvSnPErDv52WTRwVjdVwp7ngm3bNErhXX8vl/9MNE4toQc/UtEvJ3j2HjRh 2YOLjrL8AI4XeRAqCMBLTFV72haWo/6wFAzEFQsNqjiTaamprFS+xTtcAOdHoyV4Hv6j snYRWYe82trOPT3W4KyBItdRYjPcDu3+jI7aS1fhdTkTskVCoIZ94ue1RcTv9ZfjPZHu i2vo+X08JpsTl9/mXbwS6TQvvBWEMa1ZOPU83BUQLcd6id/1zEX3otqz458EHSmpm4zT 3kW0Hr3EwI4FrULKeRFYTjW3bXbLPgBOrCq3vy2KGcyGT2srQFlXEymUdmaVhdPX6elm q5Rg== X-Gm-Message-State: AJIora+68RpzVWEKEIt7UJSsLnue53FIkQVW2DE3Etv+Xbn8D+ACCMGG M64rHiKNK+9o5expFgvvLHtO2Q== X-Google-Smtp-Source: AGRyM1tt04eOtQvrg1dj/QNOyHA5z+GMm9J0cZfrEjzJNw3Pl7RAdggONE7Ila6Hnujd08g2ROgmcw== X-Received: by 2002:a17:90b:1914:b0:1f0:23f8:1d3e with SMTP id mp20-20020a17090b191400b001f023f81d3emr3105977pjb.60.1658289186239; Tue, 19 Jul 2022 20:53:06 -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 t11-20020a170902d14b00b0016648412514sm12378346plt.188.2022.07.19.20.53.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 20:53:05 -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 v3 1/3] arm64: dts: qcom: sc7280: herobrine: Add pinconf settings for mi2s1 Date: Wed, 20 Jul 2022 03:52:52 +0000 Message-Id: <20220720035254.1411959-2-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog In-Reply-To: <20220720035254.1411959-1-judyhsiao@chromium.org> References: <20220720035254.1411959-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 Change-Id: Id22b5c055d81547d27e385bdd167083248d6cae5 --- 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 57bacca6c5e1..67874749f1a8 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 Wed Jul 20 03:52:53 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12923477 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 953F8C433EF for ; Wed, 20 Jul 2022 03:53:18 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238163AbiGTDxN (ORCPT ); Tue, 19 Jul 2022 23:53:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238532AbiGTDxL (ORCPT ); Tue, 19 Jul 2022 23:53:11 -0400 Received: from mail-pg1-x52d.google.com (mail-pg1-x52d.google.com [IPv6:2607:f8b0:4864:20::52d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 83B836D556 for ; Tue, 19 Jul 2022 20:53:10 -0700 (PDT) Received: by mail-pg1-x52d.google.com with SMTP id bf13so15268060pgb.11 for ; Tue, 19 Jul 2022 20:53: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=+FVoMrQ6ois4pqjY2NfvYd4Y43R1rLn8yPUTWqPBDhU=; b=J3E9tNKbFmfsF1rRDAbB1OQuG/o4WFnJN5KkP9ZD1b+Dc8xaIE3xg2K1p2x+RAK62c WH97AOI9SeQrir7Y4M1/WqzPqbEcwDXu4A5GvDnot84J0wVGjxQ7EiOIy7D+4Um+Tlo9 uBsUxxl5BaSEJE11hjXq5fFgwFAtczvULmYw0= 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=+FVoMrQ6ois4pqjY2NfvYd4Y43R1rLn8yPUTWqPBDhU=; b=lHrojn+8YmWzfyAOyhUfVH+FCxwkUgueOY+dpC50XIZGLPPl2aY14S+DaZxPhga1u6 WqJ96eZFM/moKq9SjTUlRSZlq4WYb+mKdtznT2XPeI5wrh/2AiMvw7WP2xSfZTGLx5lb DdX+Hd8UIRyAWALn/rYOwYxGWsE6tiKPX+Hf29jwVqseJarf6KvsyG03XAnKYZe5mE5Y u2yqZ5NogNBdrnFVydTP9eEaMyiIFj2iI1dtZPpH28j0MfX5wz/fTr+ec7NKhAW19s6M SPXbchB0HQuXY1XvarYacY7vXgqCU/ZDac7VeLIkuzFwCxM9IHkIeM6erlyoUGnZT+kd TCfg== X-Gm-Message-State: AJIora9rXrF/sDAQ8tjQ0hnZA266aS0Olty37paduBEgNvhqgJvZI52I e3IbB+jPTFmy4zDtYNJ0C7Xlzg== X-Google-Smtp-Source: AGRyM1uax/XnTUyB6QHoF+OgeTI1E0dxY1CDBfUj26Gj3mWQ+6JCgyzrYVMhb4vzj9sO4W9qnWqWTw== X-Received: by 2002:a63:b05:0:b0:41a:58f:f2ba with SMTP id 5-20020a630b05000000b0041a058ff2bamr15661125pgl.543.1658289190041; Tue, 19 Jul 2022 20:53: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 t11-20020a170902d14b00b0016648412514sm12378346plt.188.2022.07.19.20.53.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 20:53: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 v3 2/3] arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi Date: Wed, 20 Jul 2022 03:52:53 +0000 Message-Id: <20220720035254.1411959-3-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog In-Reply-To: <20220720035254.1411959-1-judyhsiao@chromium.org> References: <20220720035254.1411959-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 Change-Id: I233ddf2c5671b6634bebcf3706569a3460e8299c --- .../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 Wed Jul 20 03:52:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12923478 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 3160BC433EF for ; Wed, 20 Jul 2022 03:53:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238643AbiGTDxT (ORCPT ); Tue, 19 Jul 2022 23:53:19 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48494 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238594AbiGTDxR (ORCPT ); Tue, 19 Jul 2022 23:53:17 -0400 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B1DFA6D566 for ; Tue, 19 Jul 2022 20:53:16 -0700 (PDT) Received: by mail-pl1-x629.google.com with SMTP id f11so13827152plr.4 for ; Tue, 19 Jul 2022 20:53:16 -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=u6f/TW2lK+Z6PHiB8sDnRQTHwsczaRjv5MXneVlIaMQ=; b=juPVXMrbS2z9kh47D+ilwcQvWmxqKyFy59QnQEXlFPHErQANIDdmkJ94pEKszs7LVH 11McA5QwlW5m2hXr13BzNjONzrdE6PdeJoZHz08lYGEFnuPta0iNv4spyN1rUKMhtAAY jZqJLx2jvAnjyUN6gl+G3WS+7B6zdt5+gyU5s= 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=u6f/TW2lK+Z6PHiB8sDnRQTHwsczaRjv5MXneVlIaMQ=; b=sHGyi4OJ5U2WfbrQoB8U84yP+YIsltTYzbVwr/fU1Jf5mVFiuPPsjCRcQcLNLPMGso BSi7AHafWptiHEKyTpyOwNqOhU8E9p7D6f0aZNdc8xgBPQ4aekhpEwGtnQ7TZ/Y3LQFX xs2/GfecXY/gdTZyiH6wwln5CKQWpDF3EmKaezLbM3dq8bI0EbuQEoDDFFqXrwScBnke f766byniaHMtvZXvGN6qTHUIqzKDsmtc/q4jgqd1w7zbLWoffst8Eg9sS9+L8/N9JEvn 9Q29Qei/1DqaYnvJiidZWjeCRfqQvB1ecTn8F9y6LqJ1q/F1BA7mZyaOLy8ZjuiAqyWj 2E7g== X-Gm-Message-State: AJIora/7N8SJAyJdIPX6jNqQVxQUWVTXGXYAw9NpwpjckTyN94Ne+zeM vElRqAInaS1MrRRNM+7ZugF7vg== X-Google-Smtp-Source: AGRyM1vgdgXehQ06PxCM+weN+8/HaGoYpCkfAjzpKaTH6W4CMVSaGfq/8M0BZ3ghFgv3Wzj1zbzX/Q== X-Received: by 2002:a17:902:b08a:b0:16c:68b6:311 with SMTP id p10-20020a170902b08a00b0016c68b60311mr34874711plr.166.1658289196255; Tue, 19 Jul 2022 20:53:16 -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 t11-20020a170902d14b00b0016648412514sm12378346plt.188.2022.07.19.20.53.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 19 Jul 2022 20:53:15 -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 v3 3/3] arm64: dts: qcom: sc7280: include sc7280-herobrine-audio-rt5682.dtsi in herobrine-r1 Date: Wed, 20 Jul 2022 03:52:54 +0000 Message-Id: <20220720035254.1411959-4-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog In-Reply-To: <20220720035254.1411959-1-judyhsiao@chromium.org> References: <20220720035254.1411959-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 Change-Id: I53e237add854fadd51a748a7ca13e4cc88440306 --- 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+)";