From patchwork Wed Nov 23 10:43: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: 24895 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2716315wrr; Wed, 23 Nov 2022 02:59:11 -0800 (PST) X-Google-Smtp-Source: AA0mqf4qz50cyo5siwKB1UE8nrAnl4nDG1bqFj+lPAdFzmD/lsqR9pwa7NwX3SqAhc5Z7d0BIzLV X-Received: by 2002:a17:907:d047:b0:7ba:530:223a with SMTP id vb7-20020a170907d04700b007ba0530223amr1584201ejc.215.1669201151756; Wed, 23 Nov 2022 02:59:11 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669201151; cv=none; d=google.com; s=arc-20160816; b=Q9I0RbklZ6C/2g6+679FSZHTY8e5dZSg3yIyh7wCnLcShFZqTvRg2sY3Hs0h+GUFQk K0+NKNeX3//tWgFU5LH5kqlJVp8RCam4RPB5OXHsrs3ceZj6etENW/DPmXTmezU0K2Nv Gi0TuEPRwxbyQvRqbBnoo/PkjgavrOhDUlie11KzYpP0vaKUpGaaMn7Yz+HOGq6EfF9n kItrksBatH9IKm0q3Ig1IH//tQvLjtkixrIZMaTeMW5U2FJlDRS6A5bUvYRq64EURq+l Dq9m4t5+ppizWrJiUUiXM/jBiliV62KZLJGkYQSoJoPuCqlNvqI+TOTcL4/+zuArwn8v 7OEA== 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=2PkEz/VWpHMBPTsS9RzibPZDWez5N0jos1ZT5P8gtSA=; b=eL8NRjeK+zVnEw7cJuZK0k8vqnF1wPFOWyHb6n702Sc8fgtWAB8cVXaX9z/Y6ZTU4/ ZetHzt86h6Ac7/AfwCzKnndr0aFYmXtAT6dLhifmxRvvfZ3N0lWL3V7vhRgF4yj6i3cd 2xHDIk2KXVHbOEIHO0AQMUO8pn/wq8rfZZfwW/WXJqQ2h9+oa2PsdUppsLJ06ZJliwDO Ejc4ommWOYl7RsXjpuEx/Q4FlxWch7F8VmsJUeRtfHyjY75YO6tMQeBat6yBJy7f8Cgn UqJGdqAbFCyY4PiPG3a9ZGfM9Gym/Tv67hHQPiNw4SM9HyvNrcqoWneagpeAGaAoNHi6 kDXQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vdKXNz0p; 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 ty8-20020a170907c70800b007a7d37e4681si12678755ejc.845.2022.11.23.02.58.47; Wed, 23 Nov 2022 02:59:11 -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=vdKXNz0p; 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 S236712AbiKWKzg (ORCPT + 99 others); Wed, 23 Nov 2022 05:55:36 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56886 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236573AbiKWKzC (ORCPT ); Wed, 23 Nov 2022 05:55:02 -0500 Received: from mail-wm1-x336.google.com (mail-wm1-x336.google.com [IPv6:2a00:1450:4864:20::336]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DE48513182E for ; Wed, 23 Nov 2022 02:43:55 -0800 (PST) Received: by mail-wm1-x336.google.com with SMTP id a11-20020a05600c2d4b00b003cf6f5fd9f1so994802wmg.2 for ; Wed, 23 Nov 2022 02:43:55 -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=2PkEz/VWpHMBPTsS9RzibPZDWez5N0jos1ZT5P8gtSA=; b=vdKXNz0pkRcukOZMeDJiCx8BMz5uJP4UzdchlBoQv/Swegezr56hQSsSaJiRZKXglm N1wBnuvCJyTRfvzUgr6C/KkEKQ+TARM2/tz3qBJ5pTj7ili+DFR4SE5Ju9QTTQ3K/D2B eQERrYDqngkCJPZZJ/dueo0/812ce0i3toqcx8QEtE5NpWweEcc0qaYsOqtVev12QEzx 70fAQilpXCQAzb2EyNLCp/53UjnkE5ra8VyTKCXktAs+82i3REjWxe5S+Mp0ZUWlGK8q XwWJPkajVv689E8LdV6YWfAcnaRdxQRtzVdeL3PIiuJgLQT24xM7nVfOI+IqPxD6Fhqr s4/Q== 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=2PkEz/VWpHMBPTsS9RzibPZDWez5N0jos1ZT5P8gtSA=; b=C8HBbVM604JpUo+OkJFWTXxi+Y9CYrTqYy29gWxlxcoJY8leIy3m0izebIEzU1nqht 3AdGx+ZPFS3zK4OOoVqbzj6/aI7OAPh9E+nzrHt8HaNvik5yURcBLb3D/VMXSkyLsAzW eqKB/xv1/uRRZzXSihwlwqbLHP5hQ6p8sGfKY+fQPFNSfB0rs1j7VUhaTU9pn8Qa5a+i 9BSv2tr3XkY2/aeISEapRHU2gn/42RyKQ4afsG43UCSVtC08zBrQuMeheWEj8PW2cIuq 8fjucqrHGuoWvqnVRKGh5FNB9eSG7i6PTwEz1OEoEDYb7LYx8U59+vD2tSf7Qo5/614g Ghtg== X-Gm-Message-State: ANoB5pnVyRIT/sXpQE+u1kHH+xgrOKdZmFpQ1enH1DX3Zod0biAeTN/l 5WHiMPzWw+WN01I3aSEKrZAREQ== X-Received: by 2002:a05:600c:5406:b0:3d0:21f6:43ec with SMTP id he6-20020a05600c540600b003d021f643ecmr8806838wmb.162.1669200234479; Wed, 23 Nov 2022 02:43:54 -0800 (PST) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id v14-20020a5d4b0e000000b002416e383e1csm16526863wrq.25.2022.11.23.02.43.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 02:43:54 -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 v4 1/3] arm64: dts: qcom: sc8280xp: add gpr node Date: Wed, 23 Nov 2022 10:43:40 +0000 Message-Id: <20221123104342.26140-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221123104342.26140-1-srinivas.kandagatla@linaro.org> References: <20221123104342.26140-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?1750284266959290962?= X-GMAIL-MSGID: =?utf-8?q?1750284266959290962?= Add GPR node along with APM(Audio Process Manager) and PRM(Proxy resource Manager) audio services. Signed-off-by: Srinivas Kandagatla Reviewed-by: Konrad Dybcio Reviewed-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index be72b1f7ad61..e8b6f67b928e 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi +++ b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include #include #include @@ -1626,6 +1627,44 @@ IPCC_MPROC_SIGNAL_GLINK_QMP label = "lpass"; qcom,remote-pid = <2>; + + gpr { + compatible = "qcom,gpr"; + qcom,glink-channels = "adsp_apps"; + qcom,domain = ; + qcom,intents = <512 20>; + #address-cells = <1>; + #size-cells = <0>; + + q6apm: service@1 { + compatible = "qcom,q6apm"; + reg = ; + #sound-dai-cells = <0>; + qcom,protection-domain = "avs/audio", + "msm/adsp/audio_pd"; + q6apmdai: dais { + compatible = "qcom,q6apm-dais"; + iommus = <&apps_smmu 0x0c01 0x0>; + }; + + q6apmbedai: bedais { + compatible = "qcom,q6apm-lpass-dais"; + #sound-dai-cells = <1>; + }; + }; + + q6prm: service@2 { + compatible = "qcom,q6prm"; + reg = ; + qcom,protection-domain = "avs/audio", + "msm/adsp/audio_pd"; + q6prmcc: clock-controller { + compatible = "qcom,q6prm-lpass-clocks"; + clock-controller; + #clock-cells = <2>; + }; + }; + }; }; }; From patchwork Wed Nov 23 10:43: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: 24894 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2716240wrr; Wed, 23 Nov 2022 02:58:58 -0800 (PST) X-Google-Smtp-Source: AA0mqf4iN1uXQJ7pStuHnyVSQ2MQxekIWUygweBC/qxwrDfGnjPqE8c9sc6tuRCbGp9c5+w4BOz1 X-Received: by 2002:a17:906:c449:b0:7ae:cbae:af1 with SMTP id ck9-20020a170906c44900b007aecbae0af1mr23629553ejb.31.1669201138774; Wed, 23 Nov 2022 02:58:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669201138; cv=none; d=google.com; s=arc-20160816; b=uWz9msDTH8T8zJDrMaNEwc//KorwuA6nZBrTq2d3mxNKYMPKNxNHkeRpIRzbj2X0we bF2Tuqt+AhCib1TfundCLRWwWOofvv8M3HrzeYSwDd1Cf+Lbuv9LzbKLGdUrXS4suAUv Mi/1po/jpfZZqpzAHwWspzubDwfb5IFuxzxRhJYYNvlBVPADflz0gBLgnhKCdCa8XUKa erkh6KG2zfi87GjvSPK+lHNKPIl/2/VYFFLW0MgrBYAl/5+L39ZOQ7LSqk75UhWgo6Ln ctawbzPbMgh0/5iqrNNWCgRL4pwrPFfV8nOHBIYPjhx5Sh4KvxWZAKAcb2+bzjzf70mf VsUg== 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=wMgtVnWLV383cVgEa1MrBL0wMT93JRfnk/rvnDGj4K8=; b=CpaHZGRj0mDho2b6+g4AK5U0Lrsngmq0y39M4ijSXnRTIGwfakIYLP0lMKQIWhg4ee uqdaO8tK6GbhdvBy15p37jY8vjXXbc/lhifd9CEV5BhBWfizF7tLLqyP55Dxkl+l4QGM 4P5N7M/L7sJwTa582k5sq7hzoqP5+WFPQEUJzyrxoxWzg6n21/IU7ZdiXTQbxORsq26d qdGUYRw3+GEmHx2rnFjKyL5QI18hMHPQcGVltkr2lkYudaKF1tTHVBUtkd6dcpYUV9ou 3Qx+p3LITkbJ+P6Auvuk6Qqtd0Q+JDxCYNNVIRTI8S13vB3IYXUylK7Y66LJ9g4vTt5q VPWQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="r7PKUd/P"; 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 ds11-20020a170907724b00b0078bcc872a6esi16712981ejc.360.2022.11.23.02.58.34; Wed, 23 Nov 2022 02:58:58 -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="r7PKUd/P"; 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 S236713AbiKWKzl (ORCPT + 99 others); Wed, 23 Nov 2022 05:55:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57034 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237190AbiKWKzF (ORCPT ); Wed, 23 Nov 2022 05:55:05 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 53909113FEF for ; Wed, 23 Nov 2022 02:43:57 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id s5so11557582wru.1 for ; Wed, 23 Nov 2022 02:43:57 -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=wMgtVnWLV383cVgEa1MrBL0wMT93JRfnk/rvnDGj4K8=; b=r7PKUd/P6KoqDbXd43KkuBFuLkP0VGrykJNroIW/af0nUgqaoBVNB8vU6fwFA0Zfl+ JhQEqeet/fX/GmQejUPcrkT/Rywhikdn05ODMastn2NiIhqFSqXSNNaKpJl+gaPMV3Ri MD3TuOrGdIcxN9BgeCdHJ0bfzcWzFnbjE8rSOWHuAnCziPjOJusMRwmj9820ttfMXeVu ZSg5gUKxL3Gtf0G9LR8AIF0jIczaeg3tyZZYD7QQ3mf6TztF8i+IUw16YkVKu2HBDphW uvJPG/pEj5hhTYazImPcJDhondVWvIgKnyH/dvKN1JrdO9GM+pctFRKsjXPw+YX6sguq xkzQ== 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=wMgtVnWLV383cVgEa1MrBL0wMT93JRfnk/rvnDGj4K8=; b=fAffc/cyOQwdNYitxTne7b5VxpzDTdEx1/UymeSaD4ZYW2DXEdSej5W7CJijV4EatC oU2ztmTaIvFwr+Mm4VV4LtjrNYrajWW6WhgNBb03vmzctBQBDeAxUQKRQlTG+KQhFAuP fZ926F6du3WSe4G+9oDcmYKhKV2OTs+2hJMBVUVjchmne2VhSLLeAQDNgJJeqnIh0LOa oupsS3/wccZAjuIH7gsGr8lRTB8I8D4r0LkiqnYyfhQz9d43INWu5Oh3NSoeNwwEdpeu pN07WByt38ZbqpAQwDjEOPAELHD3TBkvNI+dOAtTB6aIEvIzb8faJki8Nce9l6GmWQT+ RuIA== X-Gm-Message-State: ANoB5pmI4U4ZB6tzNAnGFJZADWzr8PeuQ5v1T1Itb36iQVZZvM2/zfNm 6AY23uKOnWLqAK9db6qrthixNvVxS88krA== X-Received: by 2002:a05:6000:114a:b0:22e:244d:687a with SMTP id d10-20020a056000114a00b0022e244d687amr5458463wrx.82.1669200235637; Wed, 23 Nov 2022 02:43:55 -0800 (PST) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id v14-20020a5d4b0e000000b002416e383e1csm16526863wrq.25.2022.11.23.02.43.54 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 02:43:55 -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 , Krzysztof Kozlowski Subject: [PATCH v4 2/3] arm64: dts: qcom: sc8280xp: add SoundWire and LPASS Date: Wed, 23 Nov 2022 10:43:41 +0000 Message-Id: <20221123104342.26140-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221123104342.26140-1-srinivas.kandagatla@linaro.org> References: <20221123104342.26140-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=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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1750284253654359389?= X-GMAIL-MSGID: =?utf-8?q?1750284253654359389?= 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 Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio --- arch/arm64/boot/dts/qcom/sc8280xp.dtsi | 320 +++++++++++++++++++++++++ 1 file changed, 320 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/sc8280xp.dtsi b/arch/arm64/boot/dts/qcom/sc8280xp.dtsi index e8b6f67b928e..c2e61c8db332 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 #include / { @@ -1668,6 +1669,322 @@ q6prmcc: clock-controller { }; }; + rxmacro: rxmacro@3200000 { + compatible = "qcom,sc8280xp-lpass-rx-macro"; + reg = <0 0x03200000 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-output-names = "mclk"; + #clock-cells = <0>; + #sound-dai-cells = <1>; + + pinctrl-names = "default"; + pinctrl-0 = <&rx_swr_default>; + }; + + /* RX */ + swr1: soundwire-controller@3210000 { + compatible = "qcom,soundwire-v1.6.0"; + reg = <0 0x03210000 0 0x2000>; + 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 { + compatible = "qcom,sc8280xp-lpass-tx-macro"; + reg = <0 0x03220000 0 0x1000>; + pinctrl-names = "default"; + pinctrl-0 = <&tx_swr_default>; + 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-output-names = "mclk"; + + #clock-cells = <0>; + #address-cells = <2>; + #size-cells = <2>; + #sound-dai-cells = <1>; + }; + + 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-output-names = "mclk"; + #sound-dai-cells = <1>; + + pinctrl-names = "default"; + pinctrl-0 = <&wsa_swr_default>; + }; + + /* 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>; + + #sound-dai-cells = <1>; + #address-cells = <2>; + #size-cells = <0>; + }; + + /* TX */ + swr2: soundwire-controller@3330000 { + compatible = "qcom,soundwire-v1.6.0"; + reg = <0 0x03330000 0 0x2000>; + 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"; + #sound-dai-cells = <1>; + #address-cells = <2>; + #size-cells = <0>; + + 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>; + }; + + 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_HW_MACRO_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_HW_DCODEC_VOTE LPASS_CLK_ATTRIBUTE_COUPLE_NO>, + <&q6prmcc LPASS_CLK_ID_TX_CORE_NPL_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + clock-names = "mclk", "macro", "dcodec", "npl"; + assigned-clocks = <&q6prmcc LPASS_CLK_ID_TX_CORE_MCLK LPASS_CLK_ATTRIBUTE_COUPLE_NO>; + assigned-clock-rates = <19200000>; + + #clock-cells = <0>; + 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"; + + tx_swr_default: tx-swr-default-state { + clk-pins { + pins = "gpio0"; + function = "swr_tx_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data-pins { + pins = "gpio1", "gpio2"; + function = "swr_tx_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + rx_swr_default: rx-swr-default-state { + clk-pins { + pins = "gpio3"; + function = "swr_rx_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data-pins { + pins = "gpio4", "gpio5"; + function = "swr_rx_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + + dmic01_default: dmic01-default-state { + clk-pins { + pins = "gpio6"; + function = "dmic1_clk"; + drive-strength = <8>; + output-high; + }; + + data-pins { + pins = "gpio7"; + function = "dmic1_data"; + drive-strength = <8>; + input-enable; + }; + }; + + dmic01_sleep: dmic01-sleep-state { + clk-pins { + pins = "gpio6"; + function = "dmic1_clk"; + drive-strength = <2>; + bias-disable; + output-low; + }; + + data-pins { + pins = "gpio7"; + function = "dmic1_data"; + drive-strength = <2>; + bias-pull-down; + input-enable; + }; + }; + + dmic02_default: dmic02-default-state { + clk-pins { + pins = "gpio8"; + function = "dmic2_clk"; + drive-strength = <8>; + output-high; + }; + + data-pins { + pins = "gpio9"; + function = "dmic2_data"; + drive-strength = <8>; + input-enable; + }; + }; + + dmic02_sleep: dmic02-sleep-state { + clk-pins { + pins = "gpio8"; + function = "dmic2_clk"; + drive-strength = <2>; + bias-disable; + output-low; + }; + + data-pins { + pins = "gpio9"; + function = "dmic2_data"; + drive-strength = <2>; + bias-pull-down; + input-enable; + }; + }; + + wsa_swr_default: wsa-swr-default-state { + clk-pins { + pins = "gpio10"; + function = "wsa_swr_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data-pins { + pins = "gpio11"; + function = "wsa_swr_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + + }; + }; + + wsa2_swr_default: wsa2-swr-default-state { + clk-pins { + pins = "gpio15"; + function = "wsa2_swr_clk"; + drive-strength = <2>; + slew-rate = <1>; + bias-disable; + }; + + data-pins { + pins = "gpio16"; + function = "wsa2_swr_data"; + drive-strength = <2>; + slew-rate = <1>; + bias-bus-hold; + }; + }; + }; + usb_0_qmpphy: phy-wrapper@88ec000 { compatible = "qcom,sc8280xp-qmp-usb43dp-phy"; reg = <0 0x088ec000 0 0x1e4>, @@ -2507,6 +2824,9 @@ IPCC_MPROC_SIGNAL_GLINK_QMP }; }; + sound: sound { + }; + thermal-zones { cpu0-thermal { polling-delay-passive = <250>; From patchwork Wed Nov 23 10:43: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: 24896 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp2717372wrr; Wed, 23 Nov 2022 03:01:10 -0800 (PST) X-Google-Smtp-Source: AA0mqf47LhMxhqZ4U06yzTLDhAR/tPbQr8oM/qXcq5E6vOy9g496zKIGEPcErukiPK3xX51fi/9Y X-Received: by 2002:aa7:dbd9:0:b0:461:e8c4:d21f with SMTP id v25-20020aa7dbd9000000b00461e8c4d21fmr14306755edt.186.1669201270425; Wed, 23 Nov 2022 03:01:10 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669201270; cv=none; d=google.com; s=arc-20160816; b=LnqOx3gE4UV1uNozZlw+IFVAA3vbb+Quc8Rx36UQVBrXazACCzr09nYaW/NeBzAPm2 4k1Sqm8yYJg//FRx363XFxV7tYF/jv3AGdi5SP8iaDXfjUYabMYo4v4qY21CYERdUVEy 0kxcgXzPAWfYuC4v8o8BYv5bhsmksuoUMubdd5huWs5afuesuEwN7nlSO861I2m60a4P oTL5cgukWPCIkHYimq5A14owgoB+7cMnswHXSxUK2IVQUwF1a8GR8I04aeYvE1pgd7o7 7yzGb+sRq1g61evNhGGgipHsp/No/Yrpj7OMKowy8d5ofdDGb0GBJstZpJ/Aug0A3Iy3 i2QA== 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=DXPz2AWe+QuLwH649mPAymTk7hdlEzu/qMvrDZgzlNQ=; b=rPzqxaxgqzumfudYt+YgyQpxkScZ4GrEL3GSwc40b5axh1AGSZc+M67StnbWY9TFT8 aZatl90brXxCYWudp1+mQl2dAwAvSGKkEKZrFdzWenak0FeK764lis8Jg5KSA/l62gLy iAv7TT+bZJjCB0Dg5yvswVzicpL+LXr0BmJPrCZcTIw2yobhSjjtFkxi+1ubXh8gWlCa mmWTcWSZ8NE+NttCtKqn0egQYq0nLiajn9GxPT5gRv4t06HaIjxHrXAgZnnBfv3Irwj7 gyRY2rZMdltA2kvACUrdDXIOPhgFZBuiQnz9icbapHABYHxMjZtAkTeONp5U+IrKJjzJ gFSg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b="JdCa/ItP"; 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 ev5-20020a056402540500b0046900e67e24si12550820edb.85.2022.11.23.03.00.45; Wed, 23 Nov 2022 03:01:10 -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="JdCa/ItP"; 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 S236270AbiKWKzp (ORCPT + 99 others); Wed, 23 Nov 2022 05:55:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:56968 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S237179AbiKWKzF (ORCPT ); Wed, 23 Nov 2022 05:55:05 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76C46134131 for ; Wed, 23 Nov 2022 02:43:58 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id d1so16637721wrs.12 for ; Wed, 23 Nov 2022 02:43:58 -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=DXPz2AWe+QuLwH649mPAymTk7hdlEzu/qMvrDZgzlNQ=; b=JdCa/ItPrOrZ8f3d/ck1sCSXQ35WiVEBMh/q0H8JPglJdZrBHbXxcfLSNwoFHQQmd5 1TCBuYmjSRdbt9gSWYOQzHP6T9kG+iYJ5069ZqiasXCcvSYgywJ6phQqRIzKc7RhTYbp wLD4VYZsPXgM1+pddFI1Tap0lNl8Nch11A7OEYRvqOfEGcePChzFTanfkjwwjpSBYSk3 Il35xYVIFXWn3J1qujaFi7p3+CHf/qCJ3EJL2tyBRaEThNP5ED34oPuPE2k8nSJoawqO myzBSCb/kEgeJ6O6HpPaGpQDSW+mIJh1ejVeaYWfvRnSQwtoV1CSHmS1Ggd0/rhwad7u Q4Ww== 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=DXPz2AWe+QuLwH649mPAymTk7hdlEzu/qMvrDZgzlNQ=; b=RaDhekOdN2daH8DL18H4S9aoSXQTcynZGEreQeX+AYXp/0i2ODRTvCD5VVph1cgAW1 +cYEJKURXtJ8FFSI1GgC1pNIjp3DTuM329V+nAHvhANAgpO/XzPWZewkMCZk+lRTYCqU 3lSY9RRlDVe1Qnnb/Lq/R1lKVzBNaYpZkk0DY9DEvZ4vCi35gnkhn5NjYaFNF28VKQLQ +tmC9/7GjjJqenw31F+Glr4KBvI0rTu0At9VWS2wSLRFg3Bgo+EOU0LQZ8C4x70LS0+1 OjYDOhBL3r0X22epznCNXUAQBBLpyVG7oVPNbuxC10XUx6BRNFc6mTN6bxYd3OJR68gt xJTQ== X-Gm-Message-State: ANoB5plV/PFqpkQpPN8Py+kOLUO5Y9zwAcZIpkWgJzUqnF50FWx+56n8 0xAKCn35/f+PSOFJxmFCUMc02g== X-Received: by 2002:a05:6000:1247:b0:238:aa36:6b0d with SMTP id j7-20020a056000124700b00238aa366b0dmr16290561wrx.688.1669200236963; Wed, 23 Nov 2022 02:43:56 -0800 (PST) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id v14-20020a5d4b0e000000b002416e383e1csm16526863wrq.25.2022.11.23.02.43.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Nov 2022 02:43:56 -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 , Krzysztof Kozlowski , Konrad Dybcio Subject: [PATCH v4 3/3] arm64: dts: qcom: sc8280xp-x13s: Add soundcard support Date: Wed, 23 Nov 2022 10:43:42 +0000 Message-Id: <20221123104342.26140-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221123104342.26140-1-srinivas.kandagatla@linaro.org> References: <20221123104342.26140-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?1750284391516937641?= X-GMAIL-MSGID: =?utf-8?q?1750284391516937641?= 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 Reviewed-by: Krzysztof Kozlowski Reviewed-by: Konrad Dybcio --- .../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 568c6be1ceaa..eefa22ea1ed7 100644 --- a/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts +++ b/arch/arm64/boot/dts/qcom/sc8280xp-lenovo-thinkpad-x13s.dts @@ -172,6 +172,14 @@ vreg_wwan: regulator-wwan { regulator-boot-on; }; + + vreg_vph_pwr: regulator-vph-pwr { + compatible = "regulator-fixed"; + regulator-name = "VPH_VCC3R9"; + regulator-min-microvolt = <3900000>; + regulator-max-microvolt = <3900000>; + regulator-always-on; + }; }; &apps_rsc { @@ -181,6 +189,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>; @@ -188,6 +203,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>; @@ -216,6 +238,7 @@ vreg_l6b: ldo6 { pmc8280c-rpmh-regulators { compatible = "qcom,pm8350c-rpmh-regulators"; qcom,pmic-id = "c"; + vdd-bob-supply = <&vreg_vph_pwr>; vreg_l1c: ldo1 { regulator-name = "vreg_l1c"; @@ -237,6 +260,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 { @@ -596,6 +626,161 @@ &remoteproc_nsp0 { status = "okay"; }; +&soc { + wcd938x: codec { + compatible = "qcom,wcd9380-codec"; + pinctrl-names = "default"; + pinctrl-0 = <&wcd_default>; + reset-gpios = <&tlmm 106 GPIO_ACTIVE_LOW>; + #sound-dai-cells = <1>; + + 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>; + }; +}; + +&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>; + }; + }; +}; + +&swr0 { + left_spkr: wsa8830-left@0,1 { + compatible = "sdw10217020200"; + reg = <0 1>; + pinctrl-names = "default"; + pinctrl-0 = <&spkr_1_sd_n_default>; + powerdown-gpios = <&tlmm 178 GPIO_ACTIVE_LOW>; + #thermal-sensor-cells = <0>; + sound-name-prefix = "SpkrLeft"; + #sound-dai-cells = <0>; + vdd-supply = <&vreg_s10b>; + }; + + right_spkr: wsa8830-right@0,2{ + compatible = "sdw10217020200"; + reg = <0 2>; + pinctrl-names = "default"; + pinctrl-0 = <&spkr_2_sd_n_default>; + powerdown-gpios = <&tlmm 179 GPIO_ACTIVE_LOW>; + #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>; + }; +}; + +&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_default>, <&dmic02_default>; + pinctrl-names = "default"; + vdd-micb-supply = <&vreg_s10b>; + qcom,dmic-sample-rate = <600000>; +}; + &usb_0 { status = "okay"; }; @@ -808,6 +993,26 @@ qup2_i2c5_default: qup2-i2c5-default-state { drive-strength = <16>; }; + spkr_1_sd_n_default: spkr-1-sd-n-default-state { + perst-n-pins { + pins = "gpio178"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + output-high; + }; + }; + + spkr_2_sd_n_default: spkr-2-sd-n-default-state { + perst-n-pins { + pins = "gpio179"; + function = "gpio"; + drive-strength = <16>; + bias-disable; + output-high; + }; + }; + tpad_default: tpad-default-state { int-n-pins { pins = "gpio182"; @@ -830,4 +1035,12 @@ reset-n-pins { drive-strength = <16>; }; }; + + wcd_default: wcd-default-state { + reset-pins { + pins = "gpio106"; + function = "gpio"; + bias-disable; + }; + }; };