Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3814690rwb; Fri, 30 Sep 2022 08:40:30 -0700 (PDT) X-Google-Smtp-Source: AMsMyM7hjeUcQftcTtVdXnGTibmLcF2e8VAXJ2A6fJ7XrEkbuGFNBvjQW/nWSr1j6pnsjvy/gyJf X-Received: by 2002:a05:6402:40c2:b0:44f:963d:1ab4 with SMTP id z2-20020a05640240c200b0044f963d1ab4mr8410015edb.319.1664552430127; Fri, 30 Sep 2022 08:40:30 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664552430; cv=none; d=google.com; s=arc-20160816; b=OGMyklAYRE34x1bO2vrTZSQbBWAcvMjellH1/yKLtnFOHoWupFPVvgW5T3qgE/mSDH 22yy5lrztUREC8dyetdba6EQgHBMcERpaYwMnzmP3oCMCT3NgCFTqdRPIhJyD6XsuJZq BjvvZk5HaTCypXSoJwT9L+r2OHc6rZ+MQeoF+lG5po/dsFKYoieYApzUfoDVN4p6EQgh 8TgUE/0znyQzIGjwaJfHZMvV8WKHX2wQfgEM48pm4VA0dnEsK4CmstAvHNbVMo8d6Bsq EhfS65iQbjjPIY8cxiBY0g5ByTJfrXWsJli1HcXSa4f/+TePY/UBChj7P2JiZ7HEjw6J gbRg== 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=JHh+MG4OU/+wjbCiWOKQq0gX7ZmA4UN476SmJdYV9kg=; b=edwbGuJ2IlMZkswRnMX0rsbOW5I/n2uwHABsMWqGMqRRmg61Ri7U8n/rRenxQQEQq/ Mr0iBQj1kURzeAP1OWgQQ6hJAzIbomt1jG0wmfrcHsebvhrOJwCJUg26dv9NMCHo7xqC VzNBLkLMb5/zAc/nUjyrmpDRsjSm5ePYcDRKOI9LJ7gj6CO7Rsox1FHZA92xljQ0dy7/ +QQZbHCayS72yHlBRVA5LYPKSepJ3TqMhmXgX6nx84HSonLp8lBM5L2c1XIVW1GtnnP0 rc8w5wKlNj8lPpY70xqzu5sM2cmy0sI2VqO7jXt7KYYV6wj/pUj/yL+Mwg+YXWzrJdvu iU0A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@chromium.org header.s=google header.b=YMAk24HU; 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 g22-20020a1709065d1600b00787daa35949si2053132ejt.723.2022.09.30.08.40.04; Fri, 30 Sep 2022 08:40:30 -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=YMAk24HU; 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 S231256AbiI3P1g (ORCPT + 99 others); Fri, 30 Sep 2022 11:27:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231646AbiI3P1Z (ORCPT ); Fri, 30 Sep 2022 11:27:25 -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 98350182752 for ; Fri, 30 Sep 2022 08:27:24 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id e11-20020a17090a77cb00b00205edbfd646so9425147pjs.1 for ; Fri, 30 Sep 2022 08:27:24 -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=YMAk24HUwNDxL3bDEN2dhyiKOJkUb+QU/ozy8e8WuG8m7jPZmIDYzmZoXIpD3/Uo4W pU2fqD7yefm417C9jv6Hk4Jr5v02ZEfL0kQ2FGgsF9RUJO83N1YYTW+EvLbYPF39Eg1s Enkg+F4vL4NQDfD3blZle+Pp4azJL79HTDgvA= 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=CguO31ZKCFeGy0/t2aE4oCPVz6oFgKdqg1CoNGHrtMfzabUr/oA2wfu+7LMJk29Qsp xeWRnXBl7H7zfB26myXk2H1BJJVO+riCEabGM+ElNb5UJrRWGwq1L10aoiaSAcp3Rpk+ j051qpkZu5Djayr3diRrH4SEv2/fwJpn8trS6bmpYYFVkHI+8ChwUatfaFBlzad+qi7O 5MAN2zbQYIc2jD+t+yVqAFc/Gae3rtpqjLFrbhN3JqQ8rBzjT+Ufuv851dxqEDjR006Q km1z+f9i2o3mtDgyb4qFWqtqlPjl+tqK1zLNNQfBedbIR0pWS0HOVNKHcvK50WlV0xJE 308Q== X-Gm-Message-State: ACrzQf1f8uhXHbz5A7LuaBSrxX2iGA33QfS3ASW8ZNRPDvP/+7/mJrgY Ggyla785YjMua6cIqs148pgxSw== X-Received: by 2002:a17:902:d3c6:b0:178:37e0:2e72 with SMTP id w6-20020a170902d3c600b0017837e02e72mr9452877plb.28.1664551644141; Fri, 30 Sep 2022 08:27:24 -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 o9-20020a170902d4c900b0016dbdf7b97bsm2006133plg.266.2022.09.30.08.27.21 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 08:27:23 -0700 (PDT) From: Judy Hsiao To: bjorn.andersson@linaro.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:26:12 +0000 Message-Id: <20220930152613.2018360-3-judyhsiao@chromium.org> X-Mailer: git-send-email 2.38.0.rc1.362.ged0d419d3c-goog In-Reply-To: <20220930152613.2018360-1-judyhsiao@chromium.org> References: <20220930152613.2018360-1-judyhsiao@chromium.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-2.2 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=ham 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 | 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; +}; -- 2.37.3.998.g577e59143f-goog