From patchwork Fri Sep 23 14:09:16 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12986611 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 E2854ECAAD8 for ; Fri, 23 Sep 2022 14:09:49 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230025AbiIWOJr (ORCPT ); Fri, 23 Sep 2022 10:09:47 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36814 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232086AbiIWOJm (ORCPT ); Fri, 23 Sep 2022 10:09:42 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A569F275DA for ; Fri, 23 Sep 2022 07:09:41 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id u132so256715pfc.6 for ; Fri, 23 Sep 2022 07:09:41 -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=HRlcPjXyrsRRp7E+Ji3FrSrhu8QZgSFr/20EIzcYeU1s8tw40rSwnAhl2ZggEBN8HQ RqxPrFQeJmUhgEirBrfBLRCYNRO5/O6CnWQE62MY/PKPDcpPzQB21eFHhEuNHFPmux4b nKOhips5OhtFiauSQt6/wdRH4Jab6MnW4mQpU= 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=PPChoaZ713BGe4Acx4FF/N0bCe6ptD8HnXlnICzGj+MNtLFeps1ladlqB3OpH/h+rq 43OWbOv6B8yl/zAJ0sxBiupboPyi2tVf28pzqoJWbrE/xX4y1N5Ew1N8zMCMfd/IPsD3 NML1Jo9vK9sr2LdBn/X7uKlyXAHThuHUnjvuf5cpx6fGrTYXTcCLIH/VFkMYA+LMMM9F jjz0zM/IR2u3Lj9l+KYYlpD33HNOKHdB7q4z+SwkqqyO4TYQHdt4k1qJj9QbVWDzwjpW 91E3x4llJ4rAqh/1JOlP8p8HhFpYCYwOftyn2zWIxeTpuvTBLltBFFvoO/aSSs+1XAVq MPAg== X-Gm-Message-State: ACrzQf3wQRB1JptKroeHcCnZrCjvgAJ7X1m3z9y0zJnexydet4XJb5m/ YuAAowNRBasi+knFC//XdbH8/w== X-Google-Smtp-Source: AMsMyM6BuICT3vYuiW/GXBg3BTs8KJsFzcwqP4R1JTAYjnxZeptbzyZPItHFDy71mKfr7uqrUEZQ5A== X-Received: by 2002:a63:5d48:0:b0:43a:390b:2183 with SMTP id o8-20020a635d48000000b0043a390b2183mr7748852pgm.29.1663942181159; Fri, 23 Sep 2022 07:09: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 l14-20020a17090a408e00b001fd8316db51sm1645318pjg.7.2022.09.23.07.09.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 07:09:40 -0700 (PDT) From: Judy Hsiao To: Bjorn Andersson 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, 23 Sep 2022 14:09:16 +0000 Message-Id: <20220923140918.2825043-2-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.3.998.g577e59143f-goog In-Reply-To: <20220923140918.2825043-1-judyhsiao@chromium.org> References: <20220923140918.2825043-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 23 14:09:17 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12986612 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 A39CDC6FA82 for ; Fri, 23 Sep 2022 14:09:59 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231989AbiIWOJ5 (ORCPT ); Fri, 23 Sep 2022 10:09:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36930 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232029AbiIWOJv (ORCPT ); Fri, 23 Sep 2022 10:09:51 -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 6428136DCB for ; Fri, 23 Sep 2022 07:09:50 -0700 (PDT) Received: by mail-pl1-x631.google.com with SMTP id t3so290792ply.2 for ; Fri, 23 Sep 2022 07:09:50 -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=U06hAzEw46JykwIVtPIzpMDYvAl26vQI1I8ivgPa40TGh/65Es0C35DskYxRG31wlg /wWNDUHfEpDyS7yyAkUTzPiZSQ5+O08XQh5sMxAJCYuKERZ5wEdge9a4dkmdbaqXp61o YP60uW1F6EuBJwk5BHO76wl5T4Z35MJg0Usx4= 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=Uanr7pW1lN2xwMvTj5rxCEz3GjeQDOId1q2WVpygAm2zvkmZ8tj4+MHnV7ZrM6DI3Q jaRrRhtYU34+l6Or0bHlGDUodwExws3ITGabe2FYUvOBNNyx22AkHs/tQBUe1yGwTJUD XSOEmxNmVvS97fbei5y2YFhvjEu9pmj5Orgi5vBNcK/djRch3FDfvTpcVTwmX4Uo9sT3 CZTpZ/y6lrMKb8VuHzX/VEqn5vilM4mccfz89RU1EO5CNA+sI5y20FemodlmNORsTOfU o/dx8/CJs7iaDG0Al7vQJIZHlSjUXZBa1DVFOf6WtZipFwEiefx5d8xtY339dvEKNOhk No3w== X-Gm-Message-State: ACrzQf1eNt4gM3Phe41yEHH2uJLfwei2kX1F5b7DSGyk9qfkFJQbaYny /BPOzITi87UzGfTn+Z2t04jwhA== X-Google-Smtp-Source: AMsMyM70CiterdwYx5puGOdjCWm26ncekiCeYfeMZdG6g+/Ju8mIOv+oUSp8FaLtCGSLPKdQiRnUmQ== X-Received: by 2002:a17:902:7c02:b0:178:3670:944b with SMTP id x2-20020a1709027c0200b001783670944bmr8816294pll.148.1663942189865; Fri, 23 Sep 2022 07:09:49 -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 l14-20020a17090a408e00b001fd8316db51sm1645318pjg.7.2022.09.23.07.09.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 07:09:48 -0700 (PDT) From: Judy Hsiao To: Bjorn Andersson 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, 23 Sep 2022 14:09:17 +0000 Message-Id: <20220923140918.2825043-3-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.3.998.g577e59143f-goog In-Reply-To: <20220923140918.2825043-1-judyhsiao@chromium.org> References: <20220923140918.2825043-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 23 14:09:18 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Judy Hsiao X-Patchwork-Id: 12986613 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 1647BC6FA8B for ; Fri, 23 Sep 2022 14:10:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232369AbiIWOKI (ORCPT ); Fri, 23 Sep 2022 10:10:08 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37662 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232402AbiIWOJ6 (ORCPT ); Fri, 23 Sep 2022 10:09:58 -0400 Received: from mail-pf1-x436.google.com (mail-pf1-x436.google.com [IPv6:2607:f8b0:4864:20::436]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F058F5F9A8 for ; Fri, 23 Sep 2022 07:09:54 -0700 (PDT) Received: by mail-pf1-x436.google.com with SMTP id a29so263872pfk.5 for ; Fri, 23 Sep 2022 07:09:54 -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=EAjhOdvgjArw8sNIzQ0hUGUR5C0UY0fiqJfiosuEyKMIz+iThn3vm7sx98wNmV/jxa GdQAjsSLhEsVaxKT6+c1FsvRYbY76gLPkreqY9O41/mllSkEtyxhn8HuNPmNGPZe9lTy AdJFFWbMZpy93pAnlgHBGTx9rsCKFAnjBUug8= 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=ugbsesTRH90PWJAqd8IacyyGmeazavlqHE7N9n3oIcaNowaJ8MsiuZrrCenRXJ3unn 8LWcZKjgdwr5sO+xHtORweWr2lk7++1s1TS7EVXBVykKY3tZsKH1WEGE/VoVTRzbN9VM 9KETb/x65gyhwjprswuylB8+dVZDI+1A0Z0VoXKrEA99amwY880dRPBnCH5+9wQO67G0 xcRk5br4d5APF8kPERSRL5mYdsoEpCtjYhMPPrnr0KB9HLx16rlSBF7CfLFEbGbmsj/4 yIvP/D4pYwMZ2FsHj5gQtWS0V5FyOYzlkjmVjn6YNeVvczEnVJ7Q2vqhREB9YVnxEnCk ACdg== X-Gm-Message-State: ACrzQf0yD6n0I+asBmHJzaScQIrKVegfGhbAEQfzeTmOgnhxa9fRw1Ax HZMlfifxd6aY//re/PAE4BlPKA== X-Google-Smtp-Source: AMsMyM6PLPe54eIdKclOEZNjNZ5iwV7lzwMpeVGCZ0MgnUzMuC6AN9cMLx1aHKnMYqF/oMDRjlEgAQ== X-Received: by 2002:a63:90:0:b0:439:befb:fdab with SMTP id 138-20020a630090000000b00439befbfdabmr7481048pga.341.1663942194478; Fri, 23 Sep 2022 07:09:54 -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 l14-20020a17090a408e00b001fd8316db51sm1645318pjg.7.2022.09.23.07.09.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 23 Sep 2022 07:09:53 -0700 (PDT) From: Judy Hsiao To: Bjorn Andersson 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, 23 Sep 2022 14:09:18 +0000 Message-Id: <20220923140918.2825043-4-judyhsiao@chromium.org> X-Mailer: git-send-email 2.37.3.998.g577e59143f-goog In-Reply-To: <20220923140918.2825043-1-judyhsiao@chromium.org> References: <20220923140918.2825043-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)";