From patchwork Tue Nov 15 17:02:40 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 20475 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2841286wru; Tue, 15 Nov 2022 09:06:07 -0800 (PST) X-Google-Smtp-Source: AA0mqf5vF4AHplNHIuJT44EnNKC/4zc3FVqmaaoUaJjPjl8EmvHDbgCjExN0/8Bx7LI2XFk1xwQp X-Received: by 2002:a17:906:3e46:b0:78e:1046:c52a with SMTP id t6-20020a1709063e4600b0078e1046c52amr14767852eji.713.1668531967142; Tue, 15 Nov 2022 09:06:07 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668531967; cv=none; d=google.com; s=arc-20160816; b=NVvsfU9ix/AwaNhQvFf5qDAZ2CL5pLG63DEP8PLfs27N7oGPfBin2USEFfmfR8BVlt 1Ztg9UfZ0CB9grPVdfndz6JC2M4kxji0zIlZw2CvLN2iFZLnI7ZaoEt6zKrMGL9xTYLf McKBvZQgA+4LtpvhZ5zkGq39JkmPXyzYnjM8SQnbKndz0WefBAtsQkRXnqB97HeqWftt pp6g4j4GquA+ont1AptEZHvxvOoMonMS8jiA81XNBWa36a+Sqc4K1vpQ1RSvb7SKBNx9 0+x3Vs1gx2MiibWY0dvi/91eKAqfWrbXzpH+0pA9Xn2kaR/HRJ81udO3Yg9yzP2wMnf8 +kEA== 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=7vOAdIUmGMxdUp1gtYvPxRf9ED25yi+MPvUy63Nj+0E=; b=bsX4ZmFNZlU6bIOgfYeJl+8s4bulqUCHcxmoTZ9NAKFLRkIY1bXxCiPoul8hBCUwZA dye8hnP5X2SIoUNN50WEehmvPe3F81wID9ORUsOzqNGImZdPKK8HXxTZvJZ8JzodTFRC n+/vwcinnb4+3m71WUYXOSp8JXTDTF3KGdTt5sMCM7Mk9mmPD9Uh1SVDKXqSFdSr3yHa 4XOlgAKrM/yzVdMwkTNRpWr5+53rmjhCbJlhFZF5NFN5NTwMcwW38nyU7YlF89YV1zne 1FC8WqqtULfiKAoc4IVdW7OftmvlRpZ8pX0yHO+jDBNrBKdYQR+eMgSV+xN6DRIBMEtU EwWA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=pgmyXclG; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id sh9-20020a1709076e8900b007ad8bd5b636si8111705ejc.377.2022.11.15.09.05.34; Tue, 15 Nov 2022 09:06:07 -0800 (PST) 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=@linaro.org header.s=google header.b=pgmyXclG; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231288AbiKORDZ (ORCPT + 99 others); Tue, 15 Nov 2022 12:03:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40528 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230442AbiKORDJ (ORCPT ); Tue, 15 Nov 2022 12:03:09 -0500 Received: from mail-wr1-x435.google.com (mail-wr1-x435.google.com [IPv6:2a00:1450:4864:20::435]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 549182EF35 for ; Tue, 15 Nov 2022 09:02:59 -0800 (PST) Received: by mail-wr1-x435.google.com with SMTP id v1so25325622wrt.11 for ; Tue, 15 Nov 2022 09:02:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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 :message-id:reply-to; bh=7vOAdIUmGMxdUp1gtYvPxRf9ED25yi+MPvUy63Nj+0E=; b=pgmyXclGCmGSPtny7bNgUDi7gOL7+zcjbvh8fwSS1Yn/LTgFHuhqdZGs1Wtoc5E4Nn XPsQfu7ctqpTZiTYH3Am2kLdRLZ2+E3FaXEEpAUqWOklEkulx1q7XScBj+Cm0VT85o8Y xxIjHMz8+uAQTv+Oz9U8bV+4mFsHdHgoR3Y2oMyFOPooUh3sRDX40v2KsqNEFM9Rqwx3 HLFFOh6tsM+MgbQohHKIIYAFOCGvBQLx4OUijNL6A+c17KEzJhKM2B1pPEyvgTn0B0tG 8tfiC+4N/MHJawsjkdPRqBF4MZnxMvR2nvcRUR+8IrDkwGl718GLc7Zo5r7qOTC0Uldr gq4w== 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:message-id:reply-to; bh=7vOAdIUmGMxdUp1gtYvPxRf9ED25yi+MPvUy63Nj+0E=; b=jg9cbOzRJHYEpPQkbPV+amRl0wwT9PW4IV5IR3KYGzeltSnuEA0tCIM89QqF9DrEDb ZupMY0xx2O5wJgNbGwcEA3Lfsjicu4sdhQWl0Jujqu3VDUqvY8MnPb5DtMQUpANrKtef PokCdYSl2WmJPYRpeu1XWlfDbGx8G7rZYTyoDxCGsk+RAISemJM3xjWkrBsp8zXHL5Lb /IesWcjiLrMhM3I/1hxVF7E1nPwxOwuCqzpAyqbpR3S6/IjEIIX2FErVPk2OQiZ78X1W b6v0zmwkqet+n/7azlNA4ETkgZD5SLKthbmJF1Vnw/xrfByiPDXr6lA5Btg4IZhKWK0Z avxQ== X-Gm-Message-State: ANoB5plkGrWXY/MB3YT/nmH0NMQdCLa+brQoa6KNHL50gdNf4uZfj+CM KjF+2L1mjSF4UVw9lIuJ3To8lA== X-Received: by 2002:adf:f606:0:b0:236:8a0:2d76 with SMTP id t6-20020adff606000000b0023608a02d76mr11305223wrp.28.1668531777805; Tue, 15 Nov 2022 09:02:57 -0800 (PST) Received: from localhost.localdomain ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v21-20020a05600c215500b003c6c3fb3cf6sm15747090wml.18.2022.11.15.09.02.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 09:02:57 -0800 (PST) From: Srinivas Kandagatla To: agross@kernel.org, andersson@kernel.org Cc: konrad.dybcio@somainline.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node Date: Tue, 15 Nov 2022 17:02:40 +0000 Message-Id: <20221115170242.150246-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221115170242.150246-1-srinivas.kandagatla@linaro.org> References: <20221115170242.150246-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749582576254792631?= X-GMAIL-MSGID: =?utf-8?q?1749582576254792631?= Add GPR node along with APM(Audio Process Manager) and PRM(Proxy resource Manager) audio services. Signed-off-by: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 40 ++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index c32bcded2aef..e3cdd8bccb0c 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -12,6 +12,7 @@ #include #include #include +#include / { interrupt-parent = <&intc>; @@ -1152,6 +1153,45 @@ IPCC_MPROC_SIGNAL_GLINK_QMP label = "lpass"; qcom,remote-pid = <2>; + + gpr { + compatible = "qcom,gpr"; + qcom,glink-channels = "adsp_apps"; + qcom,domain = ; + #address-cells = <1>; + #size-cells = <0>; + qcom,intents = <512 20>; + + q6apm: q6apm { + reg = ; + compatible = "qcom,q6apm"; + #sound-dai-cells = <0>; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + q6apmdai: dais { + compatible = "qcom,q6apm-dais"; + #sound-dai-cells = <1>; + iommus = <&apps_smmu 0x0c01 0x0>; + }; + + q6apmbedai: bedais { + compatible = "qcom,q6apm-lpass-dais"; + #sound-dai-cells = <1>; + }; + }; + + q6prm: q6prm { + reg = ; + compatible = "qcom,q6prm"; + #clock-cells = <2>; + qcom,protection-domain = "avs/audio", "msm/adsp/audio_pd"; + q6prmcc: cc { + compatible = "qcom,q6prm-lpass-clocks"; + #clock-cells = <2>; + }; + }; + + }; + }; }; From patchwork Tue Nov 15 17:02:41 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 20477 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2842648wru; Tue, 15 Nov 2022 09:08:21 -0800 (PST) X-Google-Smtp-Source: AA0mqf5sSeqTaaL1GwiMJICoKtZRUbYIUZoAxHMcEeOGCdCAd150vj/7M7CYEX32SfpIJ91ddWjh X-Received: by 2002:a17:907:98d2:b0:7ad:e52c:12eb with SMTP id kd18-20020a17090798d200b007ade52c12ebmr14462957ejc.524.1668532101286; Tue, 15 Nov 2022 09:08:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668532101; cv=none; d=google.com; s=arc-20160816; b=bYSxEzW9tlsB5eanqUMhj1JVfW4pxpIAJQT8TogGfBg8t/HYLGBN5a9qicGJrQYdW6 /thDd47tB8KtaMtrn5/CQJQv/a7BRbwplKBMNlk5ADUhUJ1Dca7bQpUQqU9WuoeczPMz jCW9cGB0Vo1FylDAhzlmMD0gw/oa5EP39cMc4A4m99rIzfoABN1dLSXPpOtye379J33p WVinDvGXOBQ7V+VGbzWwC4q/XRoFtWz8PyzZt11vJB4BGpy1wCeRy8O0usuu1TxckRld AC2iswVVgoPnffho/Dussodd6GVE2LMC3zOWXWv0O9HsYWNFr2Y6CSGs766Bpen19jdw GkWQ== 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=Sjo1DjnUkFFsgK5UipBBJf3Yoi/Km0K0ypahb5ZKpzw=; b=XZSaHvaVTq+e9NnOQ7DAE4vjtaG//8UdE79RWQzuwO11tw5F35Flqk+hy45x6JIFMS aTMfEiGPkxbHgefz4Te8RQj0uZYKUK4o1Qw6ju+3TksHcb59lDy8N/YCz49innznp/tZ TXS7wUhatr+V2bemLSFpCrx6OA6c25dm35dijwkYq1UWfXdaKfcCIUES9m1u7FYL+IMw j0/+04yNIoo5i3y0lXRkPmmYybX2t9qeutzJ1MLdRuvdAzBkYTMtQ3FUlVZxFYtMe5tq IE60Y/HsJ3QBKpYrHPzDKc08sBrSjBZvYPNAPXw5Bg1ymc0FGcR0JPrKC9N7Mt6slW4h Pqig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=uQ1HRRok; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c1-20020a0564021f8100b00452697eda4csi11848111edc.58.2022.11.15.09.07.55; Tue, 15 Nov 2022 09:08:21 -0800 (PST) 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=@linaro.org header.s=google header.b=uQ1HRRok; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231415AbiKORDg (ORCPT + 99 others); Tue, 15 Nov 2022 12:03:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40604 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231161AbiKORDL (ORCPT ); Tue, 15 Nov 2022 12:03:11 -0500 Received: from mail-wm1-x331.google.com (mail-wm1-x331.google.com [IPv6:2a00:1450:4864:20::331]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DB7D82CCAD for ; Tue, 15 Nov 2022 09:03:07 -0800 (PST) Received: by mail-wm1-x331.google.com with SMTP id t4so10085812wmj.5 for ; Tue, 15 Nov 2022 09:03:07 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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 :message-id:reply-to; bh=Sjo1DjnUkFFsgK5UipBBJf3Yoi/Km0K0ypahb5ZKpzw=; b=uQ1HRRokvTDu40XmWgA9W2/HeE50eur3E1qIVvfiOXpITRMbEUDpGrMmdqeysv4ki3 C5m4unTah40SGr1zz5yRL9it+JyIUNLztCzE84Aj6Oyeg3a/r6kj57PZshAqHpgaykzO hrSIO1Dfffas6W52p3PIXMIX4Cy7s8m60oO89ZTZ8nWJgJ2cfnXRQ+icj40gXCJ9KBtw fviX5eAA3XxJAtih42yQXFhd1/XMxUBPkwmpgN3B2BIx+HHEIk/RnYtKDRt4Q0gf1KOq iQpytn1aKp1QNp/tRplN3AcKe2OD3AUwL7aa+V98VXphidlc45h/MD/FaYV67XnQoc93 G/Pg== 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:message-id:reply-to; bh=Sjo1DjnUkFFsgK5UipBBJf3Yoi/Km0K0ypahb5ZKpzw=; b=NTzqZuXath2FcinwxRvj7cQ8ua8tAuQ4yldHTlc3UXTbQKpg+4w3xayIpqFex2hEea 6/ttEKvB2BabryWGtGO0VSz6QNVWtAsj50t8uSJpy0LuyitFzv9GFd6bzk4M1i8k7oXL SfmGYApplkV+lHytYQBQlnK0NEtJpB1vmwf1o8e13lSd1XeOC8tivxTuO4OUDspaRNx0 OIBSrsOgZf/2m3+V7ooJRr9ulUYsGLrXx4+6deuO/rCUfPStfthrlwKmrC+VmI2PPBim Hzqcu3TWkhMPvNKzSXiZlDt3BNjQyeaUzhvd+GguOASdGFlxBlhP6CaJpFCxKh4+x8KK 78+A== X-Gm-Message-State: ANoB5plQBruN6+lpXWSzvawTRF8m5Ww3ZVxdCC/Wh1c8EkVUe8YK+RoI AweGcPR5PRPDQQFFunQS0yj/ULbQzSFehQ== X-Received: by 2002:a1c:a3c4:0:b0:3cf:b7bf:352d with SMTP id m187-20020a1ca3c4000000b003cfb7bf352dmr2234834wme.106.1668531779549; Tue, 15 Nov 2022 09:02:59 -0800 (PST) Received: from localhost.localdomain ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v21-20020a05600c215500b003c6c3fb3cf6sm15747090wml.18.2022.11.15.09.02.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 09:02:58 -0800 (PST) From: Srinivas Kandagatla To: agross@kernel.org, andersson@kernel.org Cc: konrad.dybcio@somainline.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 2/3] arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS Date: Tue, 15 Nov 2022 17:02:41 +0000 Message-Id: <20221115170242.150246-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221115170242.150246-1-srinivas.kandagatla@linaro.org> References: <20221115170242.150246-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749582716748107559?= X-GMAIL-MSGID: =?utf-8?q?1749582716748107559?= Add LPASS Codecs along with SoundWire controller for TX, RX, WSA and VA macros along with LPASS LPI pinctrl node. Signed-off-by: Srinivas Kandagatla --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 324 +++++++++++++++++++++++++ 1 file changed, 324 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index e3cdd8bccb0c..a87d58bee1e0 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -1115,6 +1116,9 @@ usb_2_ssphy1: phy@88f1e00 { }; }; + sound: sound { + }; + remoteproc_adsp: remoteproc@3000000 { compatible = "qcom,sc8280xp-adsp-pas"; reg = <0 0x03000000 0 0x100>; @@ -1195,6 +1199,326 @@ q6prmcc: cc { }; }; + rxmacro: rxmacro@3200000 { + pinctrl-names = "default"; + pinctrl-0 = <&rx_swr_active>; + compatible = "qcom,sc8280xp-lpass-rx-macro"; + reg = <0 0x3200000 0 0x1000>; + clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&vamacro>; + + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen"; + + assigned-clocks = <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_CLK_ID_RX_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + assigned-clock-rates = <19200000>, <19200000>; + + #clock-cells = <0>; + clock-frequency = <19200000>; + clock-output-names = "mclk"; + #sound-dai-cells = <1>; + }; + + /* RX */ + swr1: soundwire-controller@3210000 { + reg = <0 0x3210000 0 0x2000>; + compatible = "qcom,soundwire-v1.6.0"; + interrupts = ; + clocks = <&rxmacro>; + clock-names = "iface"; + label = "RX"; + qcom,din-ports = <0>; + qcom,dout-ports = <5>; + + qcom,ports-sinterval-low = /bits/ 8 <0x03 0x1F 0x1F 0x07 0x00>; + qcom,ports-offset1 = /bits/ 8 <0x00 0x00 0x0B 0x01 0x00>; + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x0B 0x00 0x00>; + qcom,ports-hstart = /bits/ 8 <0xFF 0x03 0xFF 0xFF 0xFF>; + qcom,ports-hstop = /bits/ 8 <0xFF 0x06 0xFF 0xFF 0xFF>; + qcom,ports-word-length = /bits/ 8 <0x01 0x07 0x04 0xFF 0xFF>; + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0x00 0x01 0xFF 0xFF>; + qcom,ports-lane-control = /bits/ 8 <0x01 0x00 0x00 0x00 0x00>; + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0x00>; + #sound-dai-cells = <1>; + #address-cells = <2>; + #size-cells = <0>; + }; + + txmacro: txmacro@3220000 { + pinctrl-names = "default"; + pinctrl-0 = <&tx_swr_active>; + compatible = "qcom,sc8280xp-lpass-tx-macro"; + reg = <0 0x3220000 0 0x1000>; + clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&vamacro>; + + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen"; + assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + assigned-clock-rates = <19200000>, <19200000>; + + #clock-cells = <0>; + clock-frequency = <19200000>; + clock-output-names = "mclk"; + #address-cells = <2>; + #size-cells = <2>; + #sound-dai-cells = <1>; + }; + + /* TX */ + swr2: soundwire-controller@3330000 { + reg = <0 0x3330000 0 0x2000>; + compatible = "qcom,soundwire-v1.6.0"; + interrupts-extended = <&intc GIC_SPI 959 IRQ_TYPE_LEVEL_HIGH>, + <&intc GIC_SPI 520 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "core", "wake"; + + clocks = <&vamacro>; + clock-names = "iface"; + label = "TX"; + + qcom,din-ports = <4>; + qcom,dout-ports = <0>; + qcom,ports-sinterval-low = /bits/ 8 <0x01 0x03 0x03 0x03>; + qcom,ports-offset1 = /bits/ 8 <0x01 0x00 0x02 0x01>; + qcom,ports-offset2 = /bits/ 8 <0x00 0x00 0x00 0x00>; + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>; + qcom,ports-hstart = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>; + qcom,ports-hstop = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>; + qcom,ports-word-length = /bits/ 8 <0xFF 0x00 0xFF 0xFF>; + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF>; + qcom,ports-lane-control = /bits/ 8 <0x00 0x01 0x00 0x00>; + qcom,port-offset = <1>; + #sound-dai-cells = <1>; + #address-cells = <2>; + #size-cells = <0>; + }; + + wsamacro: codec@3240000 { + compatible = "qcom,sc8280xp-lpass-wsa-macro"; + reg = <0 0x03240000 0 0x1000>; + clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&vamacro>; + clock-names = "mclk", "npl", "macro", "dcodec", "fsgen"; + + assigned-clocks = <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_CLK_ID_WSA_CORE_TX_2X_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + assigned-clock-rates = <19200000>, <19200000>; + + #clock-cells = <0>; + clock-frequency = <19200000>; + clock-output-names = "mclk"; + #sound-dai-cells = <1>; + + pinctrl-names = "default"; + pinctrl-0 = <&wsa_swr_active>; + }; + + /* WSA */ + swr0: soundwire-controller@3250000 { + reg = <0 0x03250000 0 0x2000>; + compatible = "qcom,soundwire-v1.6.0"; + interrupts = ; + clocks = <&wsamacro>; + clock-names = "iface"; + + qcom,din-ports = <2>; + qcom,dout-ports = <6>; + + qcom,ports-sinterval-low = /bits/ 8 <0x07 0x1f 0x3f 0x07 0x1f 0x3f 0x0f 0x0f>; + qcom,ports-offset1 = /bits/ 8 <0x01 0x02 0x0c 0x06 0x12 0x0d 0x07 0x0a>; + qcom,ports-offset2 = /bits/ 8 <0xFF 0x00 0x1f 0xff 0x00 0x1f 0x00 0x00>; + qcom,ports-hstart = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-hstop = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-word-length = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-block-pack-mode = /bits/ 8 <0xFF 0xFF 0x01 0xFF 0xFF 0x01 0xFF 0xFF>; + qcom,ports-block-group-count = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,ports-lane-control = /bits/ 8 <0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF 0xFF>; + qcom,port-offset = <1>; + #sound-dai-cells = <1>; + #address-cells = <2>; + #size-cells = <0>; + }; + + vamacro: codec@3370000 { + compatible = "qcom,sc8280xp-lpass-va-macro"; + reg = <0 0x03370000 0 0x1000>; + clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + + clock-names = "mclk", "npl", "macro", "dcodec"; + assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + assigned-clock-rates = <19200000>; + + #clock-cells = <0>; + clock-frequency = <19200000>; + clock-output-names = "fsgen"; + #sound-dai-cells = <1>; + }; + + lpass_tlmm: pinctrl@33c0000 { + compatible = "qcom,sc8280xp-lpass-lpi-pinctrl"; + reg = <0 0x33c0000 0x0 0x20000>, + <0 0x3550000 0x0 0x10000>; + gpio-controller; + #gpio-cells = <2>; + gpio-ranges = <&lpass_tlmm 0 0 18>; + + clocks = <&q6prmcc LPASS_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + clock-names = "core", "audio"; + + wsa_swr_active: wsa-swr-active-pins { + clk { + pins = "gpio10"; + function = "wsa_swr_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data { + pins = "gpio11"; + function = "wsa_swr_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + + }; + }; + + tx_swr_active: tx_swr-active-pins { + clk { + pins = "gpio0"; + function = "swr_tx_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data { + pins = "gpio1", "gpio2"; + function = "swr_tx_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + rx_swr_active: rx_swr-active-pins { + clk { + pins = "gpio3"; + function = "swr_rx_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data { + pins = "gpio4", "gpio5"; + function = "swr_rx_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + wsa2_swr_active: wsa2-swr-active-pins { + clk { + pins = "gpio15"; + function = "wsa2_swr_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data { + pins = "gpio16"; + function = "wsa2_swr_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + dmic01_active: dmic01-active-pins { + clk { + pins = "gpio6"; + function = "dmic1_clk"; + drive-strength = <8>; + output-high; + }; + data { + pins = "gpio7"; + function = "dmic1_data"; + drive-strength = <8>; + input-enable; + }; + }; + + dmic01_sleep: dmic01-sleep-pins { + clk { + pins = "gpio6"; + function = "dmic1_clk"; + drive-strength = <2>; + bias-disable; + output-low; + }; + + data { + pins = "gpio7"; + function = "dmic1_data"; + drive-strength = <2>; + pull-down; + input-enable; + }; + }; + + dmic02_active: dmic02-active-pins { + clk { + pins = "gpio8"; + function = "dmic2_clk"; + drive-strength = <8>; + output-high; + }; + data { + pins = "gpio9"; + function = "dmic2_data"; + drive-strength = <8>; + input-enable; + }; + }; + + dmic02_sleep: dmic02-sleep-pins { + clk { + pins = "gpio8"; + function = "dmic2_clk"; + drive-strength = <2>; + bias-disable; + output-low; + }; + + data { + pins = "gpio9"; + function = "dmic2_data"; + drive-strength = <2>; + pull-down; + input-enable; + }; + }; + }; + usb_0_qmpphy: phy-wrapper@88ec000 { compatible = "qcom,sc8280xp-qmp-usb43dp-phy"; reg = <0 0x088ec000 0 0x1e4>, From patchwork Tue Nov 15 17:02:42 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 20476 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a5d:6687:0:0:0:0:0 with SMTP id l7csp2841773wru; Tue, 15 Nov 2022 09:06:53 -0800 (PST) X-Google-Smtp-Source: AA0mqf4p6loou2MSZBOvv3aGyvMVNsGowJVQJKyDu35nj5VhOehkXrvDF6q1EizuaO6yamOmOCy5 X-Received: by 2002:a17:906:1446:b0:7ae:47ef:93f with SMTP id q6-20020a170906144600b007ae47ef093fmr14540672ejc.116.1668532012926; Tue, 15 Nov 2022 09:06:52 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1668532012; cv=none; d=google.com; s=arc-20160816; b=GDYEqGcu7MuzUKKf4OxZlSk1KbhU3idb2dfxy3fmuWi6r4ZR7cEEa4xv2+kUQ03osk 3v/7E8iO6emf0bCEIFoDiiGY5liktcNAKCngi88BXD/SY23QmIjPxDrG2mbFIJ7fAqxQ OzwMgDrhqr4xphtBd7jZbNHx7CH7PQD65/q1Rw5rNPlOXfoh2IIvXeuOdmNZxRP24FXx N99B2Ap0ewZT0jsAzM3egigp3khyjNTvRUmRJIBHUwReyvh8BrAv/J0GdnhGe52JjlQp DUPc7rD18xSSQZkgktLHiTu8Z3OYP/sMsegU2lvp0YlgFeunwryZmytKPWz4xPPEbqBC Vlig== 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=GoD9BdEjJzTDsHhj5zz1P6YN6LPcI0+uERdYyYITJrk=; b=K2T70vB0RsYQLOed39SgMjgGOKEyEq4Z0DiNLXmfeKMNfrjKYpRjoDFqvgLO7KHSxR E1M9RcLZh92m4uvSE69hRuE1HUGK4FYchauBlvb510vRRGRTJFEoPoE+riHJErtBYxm1 EtWHkOlRvKEm9ERIeT2htlTsq4tmjBatxZ1jQyk5ewjRLavkekBSOnmpXooNnars6ETs qF1H+I0TV87+ROUCHgMD/lUOnaxFxKHIuZ3TXu+2KDDtBijahNXu9Iru3r8DvNbVesmb 1RoQnLNKi9uikbkrMCokn9VeV/rxEbd3IhGwMiQZlqnLeCjQw4dWniTdkyxHp+fqRWFw kmpg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=zc3U4gbX; 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=linaro.org Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 19-20020a508e13000000b00461c12f1f4csi10106719edw.478.2022.11.15.09.06.24; Tue, 15 Nov 2022 09:06:52 -0800 (PST) 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=@linaro.org header.s=google header.b=zc3U4gbX; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231348AbiKORDb (ORCPT + 99 others); Tue, 15 Nov 2022 12:03:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40598 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229846AbiKORDL (ORCPT ); Tue, 15 Nov 2022 12:03:11 -0500 Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A9692F660 for ; Tue, 15 Nov 2022 09:03:03 -0800 (PST) Received: by mail-wm1-x329.google.com with SMTP id fn7-20020a05600c688700b003b4fb113b86so10755933wmb.0 for ; Tue, 15 Nov 2022 09:03:03 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.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 :message-id:reply-to; bh=GoD9BdEjJzTDsHhj5zz1P6YN6LPcI0+uERdYyYITJrk=; b=zc3U4gbXN+qQe9UhxIKb+ZoaEzXtpZjjrDEsmM2K2DVO6CwVcxJdH4Pwzx42ysH91p dogdUesMkWtWVUjWwvlVQJmJaaZC739y5pKBfpPDviUwauLcb6OQLOv9ILCYvcltZH1u hIWwFUfLdAKfVmZ2b0zlZnl0Zs4YMoF9m+ptKKZYk9UfCL4YirIyZ0oPn2JVr35JU74f DbAEFur4k++emM8d8UxtBuPs3jXu8WXnIEec6vTrB8qrI+qKY7Wmt9PXUMnJNTx/pxzX UVvaHIRk9Nx9WcHa9vb4VKsk6GClFRftgGYgowivbVkKPtNW84haK8r3JxuhmfputYuM 3RIA== 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:message-id:reply-to; bh=GoD9BdEjJzTDsHhj5zz1P6YN6LPcI0+uERdYyYITJrk=; b=0MXmLWTa3Bw7+GpnajgN6Pwa0+0TTjv8saR00RYV0tnM+DAM/IhI3dUhTuZQRt21MR AbPk/vSZwgoAYAKS/awBNjsa7DP2BWT6GqyTJ6SLP7ZBFHw5WzG9sSCoZeoIB6DSqLgo aQ/BfoMiBqbMtUKSsEM2ZEMZU8nCn/HF14bIMWQv1I+aVxkeqscb9rSeBlXad1dmHgyw +fQpJdb61bSXfYXreekZfWR8boIgC5aHSQBjsE4/aVixxaib8FS68NcONCy4YH7QFHRZ B3kvO9ODhVABpuHgNzkY2apJR6X06g/UVT6o5OzO1N5AH7Je0KBQC53hzLFYWsHemlAJ W9jA== X-Gm-Message-State: ANoB5plvhBKfZQu9+CYjvfy5Uy8ESk9jx0wO8sneIir5nICc9El0AU5D tSrWB4eqcxVY3R1DI2a2QjRhqOAR6aIt/Q== X-Received: by 2002:a05:600c:4998:b0:3cf:b102:c0e8 with SMTP id h24-20020a05600c499800b003cfb102c0e8mr1035786wmp.169.1668531782242; Tue, 15 Nov 2022 09:03:02 -0800 (PST) Received: from localhost.localdomain ([81.128.185.34]) by smtp.gmail.com with ESMTPSA id v21-20020a05600c215500b003c6c3fb3cf6sm15747090wml.18.2022.11.15.09.03.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Nov 2022 09:03:01 -0800 (PST) From: Srinivas Kandagatla To: agross@kernel.org, andersson@kernel.org Cc: konrad.dybcio@somainline.org, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Srinivas Kandagatla Subject: [PATCH 3/3] arm64: dts: qcom: sc8280xp: Add soundcard support Date: Tue, 15 Nov 2022 17:02:42 +0000 Message-Id: <20221115170242.150246-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221115170242.150246-1-srinivas.kandagatla@linaro.org> References: <20221115170242.150246-1-srinivas.kandagatla@linaro.org> MIME-Version: 1.0 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1749582623625314482?= X-GMAIL-MSGID: =?utf-8?q?1749582623625314482?= Add support for SoundCard on X13s. This patch adds support for Headset Playback, record and 2 DMICs on the Panel along with the regulators required for powering up the LPASS codecs. Signed-off-by: Srinivas Kandagatla --- .../qcom/sc8280xp-lenovo-thinkpad-x13s.dts | 213 ++++++++++++++++++ 1 file changed, 213 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts index b2b744bb8a53..99c3021e8149 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -58,6 +58,16 @@ vreg_misc_3p3: regulator-misc-3p3 { regulator-boot-on; regulator-always-on; }; + + vph_pwr: vph-pwr-regulator { + compatible = "regulator-fixed"; + regulator-name = "VPH_VCC3R9"; + regulator-min-microvolt = <3900000>; + regulator-max-microvolt = <3900000>; + + regulator-always-on; + regulator-boot-on; + }; }; &apps_rsc { @@ -67,6 +77,13 @@ pmc8280-1-rpmh-regulators { vdd-l3-l5-supply = <&vreg_s11b>; + vreg_s10b: smps10 { + regulator-name = "vreg_s10b"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + regulator-initial-mode = ; + }; + vreg_s11b: smps11 { regulator-name = "vreg_s11b"; regulator-min-microvolt = <1272000>; @@ -74,6 +91,13 @@ vreg_s11b: smps11 { regulator-initial-mode = ; }; + vreg_s12b: smps12 { + regulator-name = "vreg_s12b"; + regulator-min-microvolt = <984000>; + regulator-max-microvolt = <984000>; + regulator-initial-mode = ; + }; + vreg_l3b: ldo3 { regulator-name = "vreg_l3b"; regulator-min-microvolt = <1200000>; @@ -102,6 +126,7 @@ vreg_l6b: ldo6 { pmc8280c-rpmh-regulators { compatible = "qcom,pm8350c-rpmh-regulators"; qcom,pmic-id = "c"; + vdd-bob-supply = <&vph_pwr>; vreg_l1c: ldo1 { regulator-name = "vreg_l1c"; @@ -123,6 +148,13 @@ vreg_l13c: ldo13 { regulator-max-microvolt = <3072000>; regulator-initial-mode = ; }; + + vreg_bob: bob { + regulator-name = "vreg_bob"; + regulator-min-microvolt = <3008000>; + regulator-max-microvolt = <3960000>; + regulator-initial-mode = ; + }; }; pmc8280-2-rpmh-regulators { @@ -268,6 +300,80 @@ &remoteproc_nsp0 { status = "okay"; }; +&sound { + compatible = "qcom,sc8280xp-sndcard"; + model = "SC8280XP-LENOVO-X13S"; + audio-routing = + "SpkrLeft IN", "WSA_SPK1 OUT", + "SpkrRight IN", "WSA_SPK2 OUT", + "IN1_HPHL", "HPHL_OUT", + "IN2_HPHR", "HPHR_OUT", + "AMIC2", "MIC BIAS2", + "VA DMIC0", "MIC BIAS1", + "VA DMIC1", "MIC BIAS1", + "VA DMIC2", "MIC BIAS3", + "TX DMIC0", "MIC BIAS1", + "TX DMIC1", "MIC BIAS2", + "TX DMIC2", "MIC BIAS3", + "TX SWR_ADC1", "ADC2_OUTPUT"; + + wcd-playback-dai-link { + link-name = "WCD Playback"; + cpu { + sound-dai = <&q6apmbedai RX_CODEC_DMA_RX_0>; + }; + codec { + sound-dai = <&wcd938x 0>, <&swr1 0>, <&rxmacro 0>; + }; + platform { + sound-dai = <&q6apm>; + }; + }; + + wcd-capture-dai-link { + link-name = "WCD Capture"; + cpu { + sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>; + }; + + codec { + sound-dai = <&wcd938x 1>, <&swr2 0>, <&txmacro 0>; + }; + platform { + sound-dai = <&q6apm>; + }; + }; + + wsa-dai-link { + link-name = "WSA Playback"; + cpu { + sound-dai = <&q6apmbedai WSA_CODEC_DMA_RX_0>; + }; + + codec { + sound-dai = <&left_spkr>, <&right_spkr>, <&swr0 0>, <&wsamacro 0>; + }; + platform { + sound-dai = <&q6apm>; + }; + }; + + va-dai-link { + link-name = "VA Capture"; + cpu { + sound-dai = <&q6apmbedai TX_CODEC_DMA_TX_3>; + }; + + platform { + sound-dai = <&q6apm>; + }; + + codec { + sound-dai = <&vamacro 0>; + }; + }; +}; + &usb_0 { status = "okay"; }; @@ -346,9 +452,96 @@ edp_bl_pwm: edp-bl-pwm-state { }; }; +&soc { + wcd938x: codec { + compatible = "qcom,wcd9380-codec"; + #sound-dai-cells = <1>; + pinctrl-names = "default"; + pinctrl-0 = <&wcd_default>; + reset-gpios = <&tlmm 106 0>; + + vdd-buck-supply = <&vreg_s10b>; + vdd-rxtx-supply = <&vreg_s10b>; + vdd-io-supply = <&vreg_s10b>; + vdd-mic-bias-supply = <&vreg_bob>; + qcom,micbias1-microvolt = <1800000>; + qcom,micbias2-microvolt = <1800000>; + qcom,micbias3-microvolt = <1800000>; + qcom,micbias4-microvolt = <1800000>; + qcom,mbhc-buttons-vthreshold-microvolt = <75000 150000 237000 500000 500000 500000 500000 500000>; + qcom,mbhc-headset-vthreshold-microvolt = <1700000>; + qcom,mbhc-headphone-vthreshold-microvolt = <50000>; + qcom,rx-device = <&wcd_rx>; + qcom,tx-device = <&wcd_tx>; + }; +}; + +&swr0 { + left_spkr: wsa8830-left@0,1 { + compatible = "sdw10217020200"; + pinctrl-names = "default"; + pinctrl-0 = <&spkr_1_sd_n_active>; + powerdown-gpios = <&tlmm 178 GPIO_ACTIVE_HIGH>; + reg = <0 1>; + #thermal-sensor-cells = <0>; + sound-name-prefix = "SpkrLeft"; + #sound-dai-cells = <0>; + vdd-supply = <&vreg_s10b>; + }; + + right_spkr: wsa8830-right@0,2{ + pinctrl-names = "default"; + pinctrl-0 = <&spkr_2_sd_n_active>; + powerdown-gpios = <&tlmm 179 GPIO_ACTIVE_HIGH>; + compatible = "sdw10217020200"; + reg = <0 2>; + #thermal-sensor-cells = <0>; + sound-name-prefix = "SpkrRight"; + #sound-dai-cells = <0>; + vdd-supply = <&vreg_s10b>; + }; +}; + + +&swr1 { + status = "okay"; + + wcd_rx: wcd9380-rx@0,4 { + compatible = "sdw20217010d00"; + reg = <0 4>; + qcom,rx-port-mapping = <1 2 3 4 5 6>; + + }; +}; + +&swr2 { + status = "okay"; + + wcd_tx: wcd9380-tx@0,3 { + compatible = "sdw20217010d00"; + reg = <0 3>; + qcom,tx-port-mapping = <1 1 2 3>; + }; +}; + +&vamacro { + pinctrl-0 = <&dmic01_active>, <&dmic02_active>; + pinctrl-names = "default"; + vdd-micb-supply = <&vreg_s10b>; + qcom,dmic-sample-rate = <600000>; +}; + &tlmm { gpio-reserved-ranges = <70 2>, <74 6>, <83 4>, <125 2>, <128 2>, <154 7>; + wcd_default: wcd-default-state { + reset { + pins = "gpio106"; + function = "gpio"; + bias-disable; + }; + }; + kybd_default: kybd-default-state { disable { pins = "gpio102"; @@ -383,6 +576,26 @@ qup2_i2c5_default: qup2-i2c5-default-state { drive-strength = <16>; }; + spkr_1_sd_n_active: spkr_1_sd_n_active { + perst-n { + pins = "gpio178"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + output-high; + }; + }; + + spkr_2_sd_n_active: spkr_2_sd_n_active { + perst-n { + pins = "gpio179"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + output-high; + }; + }; + tpad_default: tpad-default-state { int-n { pins = "gpio182";