From patchwork Fri Sep 30 15:26:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12995663 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 15443C4332F for ; Fri, 30 Sep 2022 15:27:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231403AbiI3P1C (ORCPT ); Fri, 30 Sep 2022 11:27:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60178 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231616AbiI3P0j (ORCPT ); Fri, 30 Sep 2022 11:26:39 -0400 Received: from mail-pl1-x62d.google.com (mail-pl1-x62d.google.com [IPv6:2607:f8b0:4864:20::62d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 371E817CCDE for ; Fri, 30 Sep 2022 08:26:37 -0700 (PDT) Received: by mail-pl1-x62d.google.com with SMTP id f23so4267218plr.6 for ; Fri, 30 Sep 2022 08:26:37 -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=ZxqNeg9qYIg+s4/UlajiiC5HVdIkGrA2Kg81oKMQ+/o=; b=lixgqKiaVh8FgIvf+wBRcxXTpxgOT34Fs//W1EgmcnS07zDGAOwB7oU6gpSpABj1nr ktxYNGLj8xK9TlF/S6G0q1RiU0Xk3d7tVUNs+9HDcOcl+LXE0P9aHlQTXyJengHl5coj umBNRt1+k6zU481Spm5y3Sd28+hHPFtWzg1GE= 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=ZxqNeg9qYIg+s4/UlajiiC5HVdIkGrA2Kg81oKMQ+/o=; b=MoAyWeChRJ/23y6OruZ/dmj+DYJZ4RfpJZJ+01cuHdC5lNXBIWEFk3tY03g9vWwfWZ ZKZM/sbXOdHgIW6b+Wg+12qNTXwH2vXsHmWJQanjLxtySBHttks+qtOHTWKgEz+atSJL Bblzv8r3VQfqbJcfeozrYpJmiZbgaKI7I+E4sNqaIs7h3EbmS9pNC7FKrWBM8W1ww1Qm K4emfTDlWj4C+jJC9VMHxV1QPd8b/EnUqlp3l3kX2Vwhi60FGjr5SATJF+jfpoB0pCVs /iR5dEgOhsuPbIoc9jcUa9TDJoXSMHZVdp1VaVs3+AHJ/n2Cf2p42QCQuFKzcmm9RRRk MDww== X-Gm-Message-State: ACrzQf0aQU3jWjSfSR8s6KfRKoU/jRjCN26rY9LA19+nISJYe+bny8fZ Qmcq+L6ksvzzZVFD7kgYdgfyKg== X-Google-Smtp-Source: AMsMyM6cqtLD4mHnlGb/6labWolHwlzyKQJy45yY1kVU2WbrVm26A92l3jcoySwYvWCxxvbH0zIRiA== X-Received: by 2002:a17:90b:4acf:b0:202:65e3:da5a with SMTP id mh15-20020a17090b4acf00b0020265e3da5amr22515279pjb.174.1664551596651; Fri, 30 Sep 2022 08:26:36 -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.26.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 08:26:36 -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 1/3] arm64: dts: qcom: sc7280: herobrine: Add pinconf settings for mi2s1 Date: Fri, 30 Sep 2022 15:26:11 +0000 Message-Id: <20220930152613.2018360-2-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 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 --- .../arm64/boot/dts/qcom/sc7280-herobrine.dtsi | 30 +++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi index c11e37160f34..83a42a77121c 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine.dtsi @@ -639,6 +639,36 @@ &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; +}; + +&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 Fri Sep 30 15:26:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12995664 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 8C0ECC4332F for ; Fri, 30 Sep 2022 15:28:05 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230152AbiI3P1e (ORCPT ); Fri, 30 Sep 2022 11:27:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231660AbiI3P10 (ORCPT ); Fri, 30 Sep 2022 11:27:26 -0400 Received: from mail-pl1-x631.google.com (mail-pl1-x631.google.com [IPv6:2607:f8b0:4864:20::631]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 99AA9182759 for ; Fri, 30 Sep 2022 08:27:24 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id c24so4274138plo.3 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=Q9FDwtydccdRP95HP4kp2UZeflU1RWT/iieybeE8ckcBej4fbHgrJnsx5+/LPt14HX ebyoPmw+znmE1e3WVx7qxrfgg4XBGz4qyR1Xlz1zxXBuMD+4017eNUHQB9KR8wRMeP1N BHLZ9rvuezp2S/nl1cYs07TYpcbwq7d5CGHUJ/Ngag5oevHSDjvpW4lSuJHXdQDlYP+K 2DihazIdg5ogMrCfv8bDNiNxv7Wq5nYiFA7dh0TSPPlP4LbCiD93fB+OM/XnxS46j+HA 2g4wv+dI8i46CCkeV/OBLUSRs8l6DLSeH2+2BAqduEGOyrKgu27T9ZgyBy0gq8IecKE6 WM9g== X-Gm-Message-State: ACrzQf2HOV7JRZyv4aQHi1fBAhgKiBccbkQKjGxRsENvzudi0Se2Rmws A9v+H8fju97Z+1c/nmo2/NrhDA== X-Google-Smtp-Source: AMsMyM7OIId8/h7z8OZQSkUBPgMd27urLwUNGJTOim1jBxhYL6adp0bUtqhq+TeRjDMUSxukM41YSA== 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 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 Fri Sep 30 15:26:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12995665 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 45C64C433F5 for ; Fri, 30 Sep 2022 15:28:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231454AbiI3P2G (ORCPT ); Fri, 30 Sep 2022 11:28:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231673AbiI3P1q (ORCPT ); Fri, 30 Sep 2022 11:27:46 -0400 Received: from mail-pf1-x430.google.com (mail-pf1-x430.google.com [IPv6:2607:f8b0:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id ABBF7184834 for ; Fri, 30 Sep 2022 08:27:42 -0700 (PDT) Received: by mail-pf1-x430.google.com with SMTP id 9so4522667pfz.12 for ; Fri, 30 Sep 2022 08:27:42 -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=LPYKbguZc/KYKDAy5XVdCd4nJdkVt/SEkrsrImBpX8M=; b=QO/TF1TNKtb4QyPMMPtineoZsKRrwcEslkNxYHDy7pmXsMR2gufPagDwtI84c9fL+4 UYMyG5FENa6TS5E6+dij/qpwLBIp4H9XmD7+VQ+thOf3qblqwTZ4VKe5NmpthWyfAkVa ddCUujWy4ojYU3Zu8diFNEBv6P9ZP1pDzw7gE= 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=LPYKbguZc/KYKDAy5XVdCd4nJdkVt/SEkrsrImBpX8M=; b=V8p6audIlyqhkZpN5ShgIG8PZy7eGDwWT33I/hswGg7EjjhkDuD22oITfeGDUHv5mo lK8HglIaAUzEqgpZM4IkQ6Zp25w9J4aBu9BPAmxaIGY75rrPZU7Y/Yd2OW5qTfa6reMt ehLIhaxZUkzfqgdIOzpbhubpf+DDpADyLBuhzxpWTpKlY0Z4QkorAi75apgLIF0CN0aq iRQIPfJv/rTqqU2d1l3BstvYG/QShQPhK0L3GqZSqfEkNu3U7y6Q+US7/vSLxInDcjr6 1Ry/64O7s2q3uaGMmFhTJvnq01JS/RtKqCCnHrfxP+FpQamBxj3x0DIEZUR9TObF3IUr Z/bw== X-Gm-Message-State: ACrzQf3eO+lAlxIL8lqJZSO/i42l9c8wSOoaihmem6OmuoB12OAsGWXU ayo5uhgyeJl1pAo+Vl9FWdZtqA== X-Google-Smtp-Source: AMsMyM68rZnXqbxGTRkqoJ+2ZphomMhvwQl/2z1iRnCzfodcoDCed/fQt4XFChNiRPcA1UFo7Aj4kg== X-Received: by 2002:a65:58c8:0:b0:438:aecf:5cc8 with SMTP id e8-20020a6558c8000000b00438aecf5cc8mr8012063pgu.18.1664551661335; Fri, 30 Sep 2022 08:27:41 -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.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 30 Sep 2022 08:27:40 -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 3/3] arm64: dts: qcom: sc7280: Include sc7280-herobrine-audio-rt5682.dtsi in herobrine-r1 and villager-r0 Date: Fri, 30 Sep 2022 15:26:13 +0000 Message-Id: <20220930152613.2018360-4-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 Precedence: bulk List-ID: X-Mailing-List: linux-arm-msm@vger.kernel.org Include sc7280-herobrine-audio-rt5682.dtsi in herobrine-r1 and villager-r0 as they use 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 + arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts | 1 + 2 files changed, 2 insertions(+) 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 c1a671968725..c569d7a5edb7 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-herobrine-r1.dts @@ -9,6 +9,7 @@ #include "sc7280-herobrine.dtsi" #include "sc7280-herobrine-lte-sku.dtsi" +#include "sc7280-herobrine-audio-rt5682.dtsi" / { model = "Google Herobrine (rev1+)"; diff --git a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts index 73e24cc55a09..31a57ae5af57 100644 --- a/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts +++ b/arch/arm64/boot/dts/qcom/sc7280-herobrine-villager-r0.dts @@ -9,6 +9,7 @@ #include "sc7280-herobrine-villager.dtsi" #include "sc7280-herobrine-lte-sku.dtsi" +#include "sc7280-herobrine-audio-rt5682.dtsi" / { model = "Google Villager (rev0)";