From patchwork Thu Jul 21 08:38:47 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12924897 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 EE2B6C43334 for ; Thu, 21 Jul 2022 08:39:23 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229780AbiGUIjW (ORCPT ); Thu, 21 Jul 2022 04:39:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38948 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231443AbiGUIjC (ORCPT ); Thu, 21 Jul 2022 04:39:02 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4AA0F7E827 for ; Thu, 21 Jul 2022 01:39:01 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id d7so1160222plr.9 for ; Thu, 21 Jul 2022 01:39:01 -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=cThkGCtdmiVD8HST0EzhDMQ2qjKnc0qbzKVo4jE+GUs=; b=DgaEkOmk03HqRk9UyvJefPMfG0oQHCwjpI0UOvE+/u22fReCzHt4VX0/zsk4J8nVHv +qZsGVJXK36aPiXNRqdhNcKlO57eErYYFoRgaqcEme4pO09G/GDs9Iv38VakUPbPfnIs +qrxaX4pYv6e6Hwqd4dr9KOqCldkfZ/gGjGxU= 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=cThkGCtdmiVD8HST0EzhDMQ2qjKnc0qbzKVo4jE+GUs=; b=Jxnuu9a58Dg4ANGyOb6b1Bizt5Lwrs0DPYBYRMvhLrC3H+8maNnh8qj8XLkO9CIoEJ mdPVAFg80x0HHP12J0KdCBpuSIozXiQ1mrSPAFHZg3s1ZCI+03+KHOh8Dw358D0MrJz9 X86qD/KgaJeyGrrrE82KDkz1p/JHzm2bPV3QIYh3Q9FrrE715FiWJoeWplBnZyLg6C83 btc2VT5+LSY6+AmP0XpyPbaWhREwlH5tdCaAa7ynhHcd8zLTyd+T3vPpe0V6hY5SwI1n 0Ooy3ouVOjsLWgMzvIvECrSQdo1xiTIiKITn3GvPRtVuJ3Hvew2OZauierpus6AmprtQ Anzg== X-Gm-Message-State: AJIora8ByRqB8O873G8dCOG50VU9Q7pw6S3+r7KmRYdcTAN7tmHXFUGX 9Xo/MowUBm3yDN7kSlZgQkKK0Q== X-Google-Smtp-Source: AGRyM1ujZ06QWF7zySjG8/ejcm0b83yipgO5/xc8Aw3PzzwuzGno4gbtnf8O31SWcvDoNmJ+0RX/9A== X-Received: by 2002:a17:902:d584:b0:16c:9ef3:17f8 with SMTP id k4-20020a170902d58400b0016c9ef317f8mr39360097plh.149.1658392740819; Thu, 21 Jul 2022 01:39:00 -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 l18-20020a170903121200b0016cd74e5f87sm1025943plh.240.2022.07.21.01.38.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 01:39:00 -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 v4 1/3] arm64: dts: qcom: sc7280: herobrine: Add pinconf settings for mi2s1 Date: Thu, 21 Jul 2022 08:38:47 +0000 Message-Id: <20220721083849.1571744-2-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog In-Reply-To: <20220721083849.1571744-1-judyhsiao@chromium.org> References: <20220721083849.1571744-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 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 Thu Jul 21 08:38:48 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12924898 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 E4837C433EF for ; Thu, 21 Jul 2022 08:39:31 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230367AbiGUIja (ORCPT ); Thu, 21 Jul 2022 04:39:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36180 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230451AbiGUIjI (ORCPT ); Thu, 21 Jul 2022 04:39:08 -0400 Received: from mail-pg1-x534.google.com (mail-pg1-x534.google.com [IPv6:2607:f8b0:4864:20::534]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B15F4357C3 for ; Thu, 21 Jul 2022 01:39:06 -0700 (PDT) Received: by mail-pg1-x534.google.com with SMTP id h132so1021586pgc.10 for ; Thu, 21 Jul 2022 01:39: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=eXXIpwZAECFfkkq0izZcTMvjDDE7E9zOtvkutXm7Brc=; b=aBKcuDATeqJ6S40tt4tUzTTaKgwREE6DI+zA2hAKLd9NBOsKSAs3HIwGnKI7wmSkXe U7gDEInqQ13ZeqyDEqRt5/5/gu+Z9eN64DlbcNgVOnuvZQdM7wB4im6ExToTvBkuDJuE U2wLXnb8Vw+NpbhCcCSsaA6F0OvFP3mYn08sU= 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=eXXIpwZAECFfkkq0izZcTMvjDDE7E9zOtvkutXm7Brc=; b=LOImHyLPYt7PB8+g4A3GvSEHo/t5ogEGNokhf9QtpvJ6h2yyyMS8q14Oj1Lj4D9Q9t z9N/JchbzrH9AFKjTZYRAHeEUGx8cnu1P9j47082RL8QG4pJBBEM1RTkHpduY/OcbNKw eW3noCveH40coDF6xNjfTpr3HutDVmqes8qmrmTRZS8RXyPA/zTgRS2bV+IfU/xo/C41 qrbyrZpYccIcaIL2l871Vygsuk+mFwLNvzsYElcS5DiBgJpkhERw9ldqKNyFBv4oEBKw FGV9ooW/kFGacNZ8TCCiRhbk+wjBb3lzOkY53av4mH92xewCx37bGfuh5lojWpkG1o/C Ve9Q== X-Gm-Message-State: AJIora8N8JjR7+4lcFCfyHnKopc2X0MSGGz4tV+pZVX5la1HIrO3jnfV G+V2kNFQ4SU3Qip5cHYp7x1Epg== X-Google-Smtp-Source: AGRyM1ssLVZNcBFN4a61tzoB2/ugdBRFTMu7lXsQHwakff7xRdUs64FPxnY8/cUbpY39PYz5bVjQ/g== X-Received: by 2002:a62:140e:0:b0:52b:780d:fb9d with SMTP id 14-20020a62140e000000b0052b780dfb9dmr17920385pfu.65.1658392746237; Thu, 21 Jul 2022 01:39:06 -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 l18-20020a170903121200b0016cd74e5f87sm1025943plh.240.2022.07.21.01.39.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 01:39: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 v4 2/3] arm64: dts: qcom: sc7280: Add sc7280-herobrine-audio-rt5682.dtsi Date: Thu, 21 Jul 2022 08:38:48 +0000 Message-Id: <20220721083849.1571744-3-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog In-Reply-To: <20220721083849.1571744-1-judyhsiao@chromium.org> References: <20220721083849.1571744-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 Thu Jul 21 08:38:49 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12924899 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 6C609C43334 for ; Thu, 21 Jul 2022 08:39:40 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230506AbiGUIjj (ORCPT ); Thu, 21 Jul 2022 04:39:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38168 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231972AbiGUIjO (ORCPT ); Thu, 21 Jul 2022 04:39:14 -0400 Received: from mail-pg1-x532.google.com (mail-pg1-x532.google.com [IPv6:2607:f8b0:4864:20::532]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DF60402D6 for ; Thu, 21 Jul 2022 01:39:13 -0700 (PDT) Received: by mail-pg1-x532.google.com with SMTP id r186so1058515pgr.2 for ; Thu, 21 Jul 2022 01:39:13 -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=p/BNkggYGO5wbhXNiM6UQj7ulNxqOcTRhO0RLDvuzKM=; b=jdCG6+nifZGncJSVnMdZqWcPjB8hTEnufni1x24Oe2zkcR6ptHZNYFJrjGjt5OfhID FH9IMr+HFxCZaLnyI2Bky2/JAJNvjn3uFpBEP8luR59eI4vrZNfvUXosVYBL4rsfH7CX rxiyS8JXf6tbqMladHEzyG9kguZI0+2IFtbi4= 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=p/BNkggYGO5wbhXNiM6UQj7ulNxqOcTRhO0RLDvuzKM=; b=IcRaJPkKTApQukl/R0LjSGlA7qNq8pcfdbiY2BQhPnnMSn4lW+TyZFlKXcCDoJiQKE CVcsFyTRjFkn8Y/3LmN8fxikLmL73Vu8encnsmJ4ABaXhfb0cUO+28ZQSMm5mgmUufAL CTFjFn7eh2s9wN7NNxzSEpagIt9AHubh5HN0TwoNiXrgfAIsww9d+7PMWwx4AxXolLMg qs5mkVJrCFD4dHIetIroui22c4EKDtSZ3IEC3612sHN5nWTMmBLboFXlK03Bx/myco44 44qJo/7JQxn/FLwZUHNNtNjsevTB2BhBE5ykITaKKdQKWOmk+gOujw1a1kOZXP5FNjlX G+yA== X-Gm-Message-State: AJIora/CDzlr2oMWmb1qx1FQd9QOZ2rTjq90F7hBSvMYq4tYSG1xckJR 4zCGxrsn6j7ZbbwNn6QtHR9JrQ== X-Google-Smtp-Source: AGRyM1u2dh8hcZHr6mbWIJJwSX9EOohj8nIWfo64hoGPL2tA8Bq50XE9v2BEM8Gz72vRy0bGBjk0GQ== X-Received: by 2002:a63:1759:0:b0:40d:5aba:4bb0 with SMTP id 25-20020a631759000000b0040d5aba4bb0mr37760805pgx.496.1658392753209; Thu, 21 Jul 2022 01:39:13 -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 l18-20020a170903121200b0016cd74e5f87sm1025943plh.240.2022.07.21.01.39.10 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 21 Jul 2022 01:39:12 -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 v4 3/3] arm64: dts: qcom: sc7280: Include sc7280-herobrine-audio-rt5682.dtsi in herobrine-r1 Date: Thu, 21 Jul 2022 08:38:49 +0000 Message-Id: <20220721083849.1571744-4-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.0.170.g444d1eabd0-goog In-Reply-To: <20220721083849.1571744-1-judyhsiao@chromium.org> References: <20220721083849.1571744-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 --- 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+)";