Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp3065166imw; Mon, 18 Jul 2022 01:05:50 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vsdv4tP2zS4GTcCV7knNznZze/PtOx02OG1fAoBHifdPZbePLUZqGaLa/bTWgsqnKch9YT X-Received: by 2002:a17:902:c405:b0:16c:3cd:db84 with SMTP id k5-20020a170902c40500b0016c03cddb84mr27225361plk.6.1658131550202; Mon, 18 Jul 2022 01:05:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658131550; cv=none; d=google.com; s=arc-20160816; b=BaY1XmXzp2MwQ0ulphE1Viy4hvV3AozsL1O+IOUv/KUcYIkDx8Gj0jSYyar0fQ2oh5 2xB54Uc5d5abfjo4eI4RRXQt8trqot2VRyKF5EpqfeFwLxCVIK2AZp3gOn02jOl4jhC4 v3CQidS+9ZN/dqKTnlrfhgL5rPFogbkvV/8aDINbpfiTbgTRIL7QzfFvDqW0gdB/zId/ zo5dDBW/2wfHDP07vDdYCAp623SrPZmcO+QsYpjnJd2N7rCnVBkKxruoUw+33Ar0YlC1 7ZHnhX4tItklHACjmuYlQpsq+VSFg8yqB3CcHWTNOI0O0RoA9XQ2XqTvBcKqm4fJBfyW HT6A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=PxsYLrfp2FK7auckPeW+jGKSw7ldbvzvBjkNgHgKs/s=; b=czehLi4lntzK92sHN6cafZ6b1GqrzOZ7CArsDP0l3JwJYJbYaZcozTvBWkyMXrtAlp CwUZks0HpR86m9Ug3CxHiuPNuwmpt4ihDsQ4a3HtoOsGNIB5f2m5WJOYxYMfEij6M+AW py9Xp/E2rPGN+c16iqaAOSlFtKBeG7eFv6hhtE1xuL2vvuod8W1ElGA0XvY3fgBlO/L2 TAJe9UrKmve2Bxf6cNumevNKtGd0MxAGDg6SSSsKf5Qpo2/ElqshEhecq9oQVS5dbvBZ d8lPc+LAMHfTdwnTcLCI3Od1AFuEZohyW3G0lRtLmrEbZrmzqH/gdsMj1iA4qBLtZ8er Wnkg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="BaBRg/kF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id z4-20020a63ac44000000b00403fbc91684si1486309pgn.101.2022.07.18.01.05.02; Mon, 18 Jul 2022 01:05:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b="BaBRg/kF"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=chromium.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233496AbiGRIDR (ORCPT + 99 others); Mon, 18 Jul 2022 04:03:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47696 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233477AbiGRIDP (ORCPT ); Mon, 18 Jul 2022 04:03:15 -0400 Received: from mail-pg1-x530.google.com (mail-pg1-x530.google.com [IPv6:2607:f8b0:4864:20::530]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ED33D186F5 for ; Mon, 18 Jul 2022 01:03:14 -0700 (PDT) Received: by mail-pg1-x530.google.com with SMTP id e132so9894251pgc.5 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=R6IwhHa1Muk9wtqfdJ0T2lD7rWwtpRi3tJtdmLVEdLQ6fRAIhozoPIa6tA5uBacPfm AX8lbRSA0GwDY88Edb+NIFVP21mwEeybq4IzQlcMUzQp6F39cDE9b634lrOIXtCDb1Y4 OzmVEZMCIn5KCNcJv7AyRAiw0e77xnFdcwNsyDCKtbEdzcT6oNhvBzTBZhBuLNS4YNix qMvPTLaozwDjsOYgctZWWJBLT+pOWdwM6mit6ZvkBlIGz3N21vh3+2qD89vJVa2gDp4l 6PyLztdZe8l9wwDPqTQmwx3uEmvVC8jdB8WbJfL75aywB39jXSZqCUVdTO77pGi20juq qcng== X-Gm-Message-State: AJIora+tUCSsgsYJDng7Q/947cLVa4cdl8l2fVN98zJixrUY7gp//JgB KIMLfm3e3z9XV5v0H3higruZRg== 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 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@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; +}; -- 2.37.0.170.g444d1eabd0-goog