From patchwork Mon Nov 21 13:04:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 23729 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1575727wrr; Mon, 21 Nov 2022 05:09:12 -0800 (PST) X-Google-Smtp-Source: AA0mqf5VmpmQVDYoz6+GycGRZZhVFyYkM0q2dYzLUM6pHWrFPMO2NqwVpA0rxbmk3HexGTVxuCNX X-Received: by 2002:a05:6a00:21c8:b0:562:e0fb:3c79 with SMTP id t8-20020a056a0021c800b00562e0fb3c79mr841971pfj.39.1669036152307; Mon, 21 Nov 2022 05:09:12 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669036152; cv=none; d=google.com; s=arc-20160816; b=OM0xYfJ5LJU7DKldPjTKPo6uWUh3sOIuqgy1WM8HLAnHkkyhI2Z0tI/4TT+x1sbioy d5t/YqeNB2aGF9uREWCHD6AYBXGYuKYqkGmG3TzOlJZ3a6oSgtjd7zsFpN/e/PbfIXgG C6aX830nJza8vpCJNG8ljc7D0PTcUoMScVCEjXx5+uUGSXjWSQQTeWMHY+CmSAFIXwi4 IaFcIy2S5fdpI/MC3bJjQbp+2YEAeg8uBiPH4/j5W7EHUofgPGjKO6RU2G/NXivOouPe pmP9QrLUcf9FlpT9IO5q+FTM+5rQeQ5sSeSfEH2znCB/uLkiTf77tGixODujtKWbygT2 2Fsg== 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=lcQAjzVivIzQj2w9iKAgRK1Du16HBMevQocYIlmnioc=; b=xIg631OlpbFxSGY7hxEIp34IYW8IXTXyeTPfFfCm3hBDWdawCrBWnup1NwdoON7rSt Go/VDJBVBQQrR+NDX1kTBj334lWXsQifve1PgAGnXZV9+uKEDrNQMnrz1ilSOqqHaVya MrhXpPMvIeQxHtI+/j+vha+kzvlt0RVZMysq1Iy9MOqw6/ygYerPzrvD9QApWGATG6gf JrVUUChxXQtDbCmzhjCD3nmNDOHB3SeZAB/GiniOdwNwxvlPi1tq2xufdZm7LZlyRzd+ ly7AsQ09GXlunWMp2B/FqWLxVeJp3IwO2fjPmWBUlXn7HDNGeDuUc28TOaKprSEPfsNO e0ww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vX4H259e; 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 p6-20020a654906000000b0046fb6e0b960si11586944pgs.210.2022.11.21.05.08.57; Mon, 21 Nov 2022 05:09:12 -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=vX4H259e; 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 S229980AbiKUNEZ (ORCPT + 99 others); Mon, 21 Nov 2022 08:04:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48378 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229489AbiKUNEV (ORCPT ); Mon, 21 Nov 2022 08:04:21 -0500 Received: from mail-wr1-x42e.google.com (mail-wr1-x42e.google.com [IPv6:2a00:1450:4864:20::42e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id AAC77450A4 for ; Mon, 21 Nov 2022 05:04:18 -0800 (PST) Received: by mail-wr1-x42e.google.com with SMTP id g12so19724181wrs.10 for ; Mon, 21 Nov 2022 05:04:18 -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=lcQAjzVivIzQj2w9iKAgRK1Du16HBMevQocYIlmnioc=; b=vX4H259eD8RhoO4kSAXbSzSeRlhQTv2XGt9JgkZ3WQhcZbREpLqO1IdxqMo+hwGhRO HYdGMaecdNg4KL2cEsqS76uSE/JVoZOvIlE4m5GSjPazcQgz46AolmzPACXeWTD0tfe1 3LwBvSNI0Ta54mPgYgRXTuzHixYeO3eNk6UEjBUak1s/Z3ZHAwLNB2JvgvB2VXt6fguW BPtRdXxcdf/JgirPEqQAs6Za8OEKUf2F8fosPtb4cf8J20Muzhb2k2QmPb+FqxDyWt9P KygKL+P9kmbMma/jCxfSM/pq1ubB3Akru6BWp5HlEFdoftosqzxZecf1AMqsoXMABEfO f+qQ== 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=lcQAjzVivIzQj2w9iKAgRK1Du16HBMevQocYIlmnioc=; b=22lasPAh9BHZmfX2h0lAXlAlFBCu/UnG/3o5SQWOk57uOV3cfb7n0c2XWIOsG2gsq4 3uPLBzLXt6MNpCT0TYW6gycj8PBk2tDFr4lnZHG2IDRJ/hUbk0kVfosaNyL41xJR5oKm n5vZQWPKoPRFMPdthKAxEyRo6R8ujzkWJOQF/JXJfIClKstSQjdwfzH1DNSdy644c5SO bvHk3aD18i8ZGs6R+5dbcgHVGBUK/mCTpDh5+9KaXlhR2LwVQkONC3z6EUYnnBKwQ+7j DAYfvYCTErQX5e89+eXG4PTRKp89yavG9km12PYesXuZABTPULis53bhSclLqib6/yvE hOYQ== X-Gm-Message-State: ANoB5pmJPLaFlBqctxb7588FXECRt02X/J0bSAJMRcvjt8tUwHxqS4zG es7SeSwovVpUGs0pZRn3k3CBX78P5aq3PA== X-Received: by 2002:a5d:5d0b:0:b0:241:9e29:17cd with SMTP id ch11-20020a5d5d0b000000b002419e2917cdmr11008044wrb.167.1669035857195; Mon, 21 Nov 2022 05:04:17 -0800 (PST) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id a13-20020a5d53cd000000b002383edcde09sm11133898wrw.59.2022.11.21.05.04.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 05:04:16 -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 v3 1/3] arm64: dts: qcom: sc8280xp/sa8540p: add gpr node Date: Mon, 21 Nov 2022 13:04:01 +0000 Message-Id: <20221121130403.161817-2-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221121130403.161817-1-srinivas.kandagatla@linaro.org> References: <20221121130403.161817-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?1750111251990557167?= X-GMAIL-MSGID: =?utf-8?q?1750111251990557167?= 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 | 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..65b657f73ebb 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 / { @@ -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 Mon Nov 21 13:04:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 23732 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1575878wrr; Mon, 21 Nov 2022 05:09:24 -0800 (PST) X-Google-Smtp-Source: AA0mqf5v/REGgbDT1XkjOmkJGPUbKG+K6aJZhEf5MzDuArwdWmlNFk8v1Ny3HwLldQBUQL6LTpYx X-Received: by 2002:a63:1464:0:b0:46a:f665:ed96 with SMTP id 36-20020a631464000000b0046af665ed96mr17650986pgu.486.1669036164331; Mon, 21 Nov 2022 05:09:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669036164; cv=none; d=google.com; s=arc-20160816; b=JlBB4Pkd4S7O3CMsUChedkj8coqg/xS0LbWQ7zjz/3lCnQlSKtdw6rdIcneXldhTiV 6p8doZR3jMHMBwsijkWTYHlkzhgXYbPCXYlR7xcHt3Gp9tTacvem/Hws6NexZHRg6mkj KM7wiDDmkjPUZsuo+0sNEUl/feR+FXCiGL1UBFhLGm3z8DjAWH9aA9g9XG+l3VrQnz+k YO5VwDFiI3bL0uRUbj9AqUo5h3t986x1aB7F40Y79aOFdgCYVRLe5kF+sDV56GIehNJ8 okjpD26kLU4ycgw4OagA5L4nvh989v3C0r8uenyFbygqlgu7feIpPx5JjncQwkCduEuU UJmg== 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=168g2rDZa1+78R7vllDnGeqldLSUhAux4/DT8oY9BVg=; b=yUCLXoGsE534pajjjwV+B7emJGV/EFfGYog46rB6IKf2+ifEXJHxwcFvHOKvVZ0F5B 66HWyAn1J3ceoj9oguL/D8aK3T0nUeDpNbfx7K8TDANUubCv3RoMN4l9LDvPpDpJIYGo niRHAYGBayrfonQmGtEUoyFBXm/xS3826P3i3bo19xuw+pnb1dr7OdRzFeHs28jvcV9s nH7rBOkZSVnXdF6iw4Q0Tzb/I8WaTeh/kpLzcd37WBLqvDiIoKHLfP2TJYkxWjQVfyMU sU/Tyje1RJnIP4qWMl+DeyV+cRX1G6bdXWleak252dV4fVmu91OXbUo1lWTLTB98zYeH rlaw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=DvGoJTyN; 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 j191-20020a6380c8000000b004774a855375si6537289pgd.351.2022.11.21.05.08.56; Mon, 21 Nov 2022 05:09:24 -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=DvGoJTyN; 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 S230048AbiKUNE3 (ORCPT + 99 others); Mon, 21 Nov 2022 08:04:29 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48380 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229520AbiKUNEV (ORCPT ); Mon, 21 Nov 2022 08:04:21 -0500 Received: from mail-wr1-x42d.google.com (mail-wr1-x42d.google.com [IPv6:2a00:1450:4864:20::42d]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36D8D4733C for ; Mon, 21 Nov 2022 05:04:20 -0800 (PST) Received: by mail-wr1-x42d.google.com with SMTP id v1so19720047wrt.11 for ; Mon, 21 Nov 2022 05:04:20 -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=168g2rDZa1+78R7vllDnGeqldLSUhAux4/DT8oY9BVg=; b=DvGoJTyNkvPFmRKq6zOxxVNDVt3wN20lppwEv1XA+3Vysis3PEqiw3R1PTjBLVRWDP kobvElwfQlQU7eHDjqY+DNppdJzTLHjrdvLrnz8PUGSStTZLvzNvUfyqAhFdLjUBuWvT 4cYnjKxBdXxWGuNUxw/IpZlt2nuqpQfZNxKAYsBer4SoZgi5AdsONN/DZGOsHb8PL0/e nKGE4QyMHILswhz36/rxfEIBEqGVs64HTrgu095HQf0yfZ3Kyq7f3smDpk1rPOAFAdSN 2moNjOI5n6mjb6WW+YWXLXK3Cae9H0oOeLQ3r7qhomzDuH6/IoeuOnB8eHWRHKe3jg6c sMqQ== 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=168g2rDZa1+78R7vllDnGeqldLSUhAux4/DT8oY9BVg=; b=ZYc2+tUD4P/4xLlwqKVnEVvfDgBXxpFDruu3loYIqTbo/CwKN05K8upwhbxEBcX0+J deRUiZ1qDxQuam3eAysnhlAWAj+BN5jI1OyXCWJjd1uC8cNliCttB1dOMfXNZNM7J1M5 8XWKPB2kq/DdKdOycKiOqNRYAlOehF4NKBHuBT3tpsP4Kab250zax62cHfIBEdad6LUb ew2HCG8GxRDrIYQKZrD+EykkTrmpnIYrI2ej4PxwI//gUSxwj61IMQkd4h7A4/GeHgRb 9E++IqZZVEUS9pyYFPSHzO2wnvxT16ruOe9OpNnhISZp0y/uaxO2i/JKBGeGhhN2QJkP 2D9A== X-Gm-Message-State: ANoB5pnL9b7YQf/gVI/ZIvZEjwsuO2wFp0g1SLW7a4T6BYT659Zd2r0+ MuIYsfais+ihF+sPf3iz1nRRcA== X-Received: by 2002:adf:e784:0:b0:241:784b:666b with SMTP id n4-20020adfe784000000b00241784b666bmr11024762wrm.483.1669035858667; Mon, 21 Nov 2022 05:04:18 -0800 (PST) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id a13-20020a5d53cd000000b002383edcde09sm11133898wrw.59.2022.11.21.05.04.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 05:04:17 -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 v3 2/3] arm64: dts: qcom: sc8280xp/sa8540p: add SoundWire and LPASS Date: Mon, 21 Nov 2022 13:04:02 +0000 Message-Id: <20221121130403.161817-3-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221121130403.161817-1-srinivas.kandagatla@linaro.org> References: <20221121130403.161817-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?1750111264874202632?= X-GMAIL-MSGID: =?utf-8?q?1750111264874202632?= 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 --- 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 65b657f73ebb..19b79c601417 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 Mon Nov 21 13:04:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Srinivas Kandagatla X-Patchwork-Id: 23733 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:f944:0:0:0:0:0 with SMTP id q4csp1576053wrr; Mon, 21 Nov 2022 05:09:40 -0800 (PST) X-Google-Smtp-Source: AA0mqf5bgykmchsNxH7WEKHUuFsqXuBte7UMr2KRE/7rvKHT8Kon8loVBCgNNToGeirwgCabnrgc X-Received: by 2002:a63:491a:0:b0:43c:c4cf:6682 with SMTP id w26-20020a63491a000000b0043cc4cf6682mr2940404pga.49.1669036179764; Mon, 21 Nov 2022 05:09:39 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1669036179; cv=none; d=google.com; s=arc-20160816; b=uGGWz16IzAVxp8dmuJb95g7gfqvvT0NYk7gAODGfR2fdPRQ2PsZtCLegQE4QORkW0N XirichtyEPxoC0m6zfYz7yeHBuw9d8/+lIm7TiIoEwNnxBvQJr5ILHyOfnUSaVq6f+PN HB5KiNIAs5KnRUZDc88zaAWWiNHFnjadMNltU7dxXpxATAk1qccqU5jm6/ZoTHKe0B5E q4PGOuPe5K5/awkcUBHSdShwhmwAZe47DUF//KxMtdSbd9ySLRgJh6gGrFWhoNO3spO0 M6cICzUgSgJQvCBFnUSdjDYQKyAIDtd2NjVxe68hi8zjfH2QzAqSqCxG8aotvvQAw30B kcQA== 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=8JTMxU+6gfRPvxZA59rbrUjR3s8BRx+fpfpTMx5IUg4=; b=nnc1mQcVg4iwlR89GuSaCIYFXcuDs/svQ0LCLqfE585O/BcsX7rWE5xGqxvYAe6GjP oscOV8VZJIsnBXZG3Wym2pT5/9tNk9JEkt9xriIx5do1xBdnz0J7UdkSY1PvKNgJIgaH BW6w3qLDOKefNodIUxbue59Z5Za0lPEF75yk5yNY3R4nzTR1cIvZZNrUF6/9qprS6QvJ OhOarRPr7OVfa+7pSjydRIz9YnFEa6U2+zMNjnLkkd1DSk3dGEOGrMMLzcBTNZYNmp0C uSp1uWNbWVrt0Nfsnfe9cV+wZOE1IeoBzDMXtQDo7/Yak+cbEXbXkN1Qs1YQQh/yyAd4 +8kg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=kYRi09O4; 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 64-20020a620643000000b005639db953adsi10229973pfg.68.2022.11.21.05.09.20; Mon, 21 Nov 2022 05:09:39 -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=kYRi09O4; 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 S230120AbiKUNEb (ORCPT + 99 others); Mon, 21 Nov 2022 08:04:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:48340 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230031AbiKUNEX (ORCPT ); Mon, 21 Nov 2022 08:04:23 -0500 Received: from mail-wr1-x42c.google.com (mail-wr1-x42c.google.com [IPv6:2a00:1450:4864:20::42c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A537140936 for ; Mon, 21 Nov 2022 05:04:21 -0800 (PST) Received: by mail-wr1-x42c.google.com with SMTP id g12so19724372wrs.10 for ; Mon, 21 Nov 2022 05:04:21 -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=8JTMxU+6gfRPvxZA59rbrUjR3s8BRx+fpfpTMx5IUg4=; b=kYRi09O4jMyvtQMcpFEVv+DDGspQBWH7zGviGjCMIAcjarbUS1gGLq61SvS+ZzLV1T JzE0ZEQPK/9FoH28jK0KaFvRMjBwus853Gu9fqI7hZxacQ9pmyNwJ+IM9a31TmQ0cDM8 570Pwfoc67fJN9pb5L4W6KC2qCVo6w+C90pJfiWE+y4wQJwsLL22lSRicnXXrAe/pY9w HNVthFNcb/Hp0VYKPh6n3ISKv8Tk5iBqrMMmXcZhpNCCbi0fVmX2iFHP5W6MgEcrYVaJ GGsjvU4DhhuFZGUBmAotz4cZ/rpPD43qTLUFHRyaRBJURGrFJljiy+tWAYjCI6Ng0ez3 rbuQ== 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=8JTMxU+6gfRPvxZA59rbrUjR3s8BRx+fpfpTMx5IUg4=; b=Z9T2yUEDQ4mmfYoDK5X+W4+AVW4/gDcCaPBALWCxzMcXProbQPljEwyXOWCR2YhXHU 94uHxZilInXUJwnKURCXotX3JhEHrdBPCLZT6CcXgPp9652fXsmX3msFRuAyjaAIfFqc hjRq60uAHFSVxktsf5OpGk7Me7gBkDgG9FL3Jd+Rapz2BtXt/YVhGr5BstbKJbbYGlP2 gBPFL70KPsM5Sqr0dMEKWcIv2YqUMbVaLM7qWLtPmCmAKRmClRNJPSAT0iXQMzauYfJo LFLQ9Tex2LpS7lgQKxymbvwKVx7e3BEhB2qEh8xlfL+jSY9pu5RTcUMJnvD1qoYoByBe w2Hw== X-Gm-Message-State: ANoB5pl6HioHOMsGm6Rbs5SffViU8optP1xRQhMjRKa9UyRn+TozdUUG kBzh2Rl7YjqIuB4xECItLkBo2w== X-Received: by 2002:adf:de0a:0:b0:241:cdf6:6a81 with SMTP id b10-20020adfde0a000000b00241cdf66a81mr1045965wrm.243.1669035860013; Mon, 21 Nov 2022 05:04:20 -0800 (PST) Received: from localhost.localdomain ([5.133.47.210]) by smtp.gmail.com with ESMTPSA id a13-20020a5d53cd000000b002383edcde09sm11133898wrw.59.2022.11.21.05.04.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Nov 2022 05:04:19 -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 v3 3/3] arm64: dts: qcom: sc8280xp-x13s: Add soundcard support Date: Mon, 21 Nov 2022 13:04:03 +0000 Message-Id: <20221121130403.161817-4-srinivas.kandagatla@linaro.org> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20221121130403.161817-1-srinivas.kandagatla@linaro.org> References: <20221121130403.161817-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?1750111281057514840?= X-GMAIL-MSGID: =?utf-8?q?1750111281057514840?= 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; + }; + }; };