From patchwork Tue Oct 3 13:18:19 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147872 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2079328vqb; Tue, 3 Oct 2023 06:19:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFKrVk22fA6Yu8lNU2S1S6QUvadMEEDUdvxJngCnr2wU7ny5+pFiQWIqRi5lX2Nmwl79Lze X-Received: by 2002:a17:90b:4c8e:b0:276:a310:2be3 with SMTP id my14-20020a17090b4c8e00b00276a3102be3mr11436844pjb.19.1696339165818; Tue, 03 Oct 2023 06:19:25 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339165; cv=pass; d=google.com; s=arc-20160816; b=IBxxIbU1TXv++LMDrXSCaAb4/o1euzSTV01bpseao7XI2lgw8dZvxfcxyAQC1bKdMC qCw1qMNfeOTTcvh87i8Qj6rzx8bZlA8mpkOgVTGlJX5O1GAkn/zE2S3oELhdnzJ5DYqc /8jScaWNoffSeojBW9Ehz5TxxpoMszcr3qdbur52IEGCkw43gAOChRg/dcieW2bumTR8 oZCF6cA4ovyq7OHN2gonLT7+2CEWe3jzpQmZv3BTP4uLzthTlFVDR0GgII9b4VJXjxr6 bhPdWBGrTfzBi2IqkN7ZJy1EgrhTF78eyJjtkmHzCI/+M6Iy/06sh2hdm9vy+ODg5Ctu R/LQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=Tcfqcvw/OBMlFrrMXxA2/+w2/9iajTV/ZetLrmXPr8s=; fh=bATs8P+UjPQZO5TdJHtJrQS8Xj/b5KEkByH9kIx4Y/4=; b=cchqV9+ebprMDIcj2r4/cyD672hKIEjcgvcuRxh1fvv6kIwHQhrYfL9j2V40W1hNmq tmQQnB8vzAINk+10YhfIDHnX/cACcR4NdQYzojiw+5EZBJzWWzaTK3jjfXHsg9bDApZq cG6xhfsvcL9I90zFSl5hAzEq0JI7Lw4N050UpbaBviLZDI5J8YIUbDw3GPKC1dUqipn8 3UI1XevMBMmxc+lbis1kUaywqQL11X/qhpriF2W+y3aYXBRESdMAwCBnGvNOYpbCr4HR DSkf7KQ9p3RwLsuYZPL1XnUur7yco3Z8+9FTwc3GeOz36rCDj31N/zBMPYt/N+7txkoP y+LQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b="TTN/0qTz"; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=Ca2ZaqRX; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id a3-20020a17090a854300b0027740192bc9si1391195pjw.152.2023.10.03.06.19.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:19:25 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b="TTN/0qTz"; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=Ca2ZaqRX; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 9C1B88041C0D; Tue, 3 Oct 2023 06:19:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235131AbjJCNSx (ORCPT + 17 others); Tue, 3 Oct 2023 09:18:53 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46086 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232517AbjJCNSu (ORCPT ); Tue, 3 Oct 2023 09:18:50 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.171]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 734DCA3; Tue, 3 Oct 2023 06:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339124; cv=none; d=strato.com; s=strato-dkim-0002; b=fdIfBg7djrGLNldQCyqyw/z3+FAfxmNj876eOnFAGf17lNgABA+FpB83mO2xPS89H+ 9TM+syGHdI9GD0gsNMKT+SxoBneJbG9hTUU1tPqvdjZjeMNJGWi0FUhcCR2vn7eQzamH +xzAJgc0hZOOMFQsUwu0InAk5EN5TH//2q8K02vW3DcT4qMw4Kwul6PjEYDzJbaUZLF5 OHWjJBPa+RX+aVvkSQwKYLMJUQp/CS1FYoFuWyrJTRgiq/pM55pRhIbi0GPJCYFTW6By ds34oLa+xta8502APYokUXmnr+kosBE2D8c8Dh+7jIyw1uvd71h2dnxqYKDklrFl4PYh 5BRA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339124; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Tcfqcvw/OBMlFrrMXxA2/+w2/9iajTV/ZetLrmXPr8s=; b=DCi4E7ZWUVqdjsLkIe5tRTtu8IEnkexI9n7TMfnMzGxnQ0usU7WDsjzH6vcLBTPRKo KsWbYGRyWUZ+VByq6nWRszr88+GfSwgnyWZ6MFuZrdXucFvrpBUv7SJ/0tbG2K+sXD+E fRJHd8XgCXw2Ou0xnZcQC+Y963uSaZ9y30ZqD8PZPEpDnaEEQPioo4V84iywlUxvee9X yNf5L4mvNnHjzSY9EbMv6akYkbznclADEmDPe/faIP6W7k2sBfes0PND1FXlouMpds9+ +TZVkrdCW7jYIJVc8yMndDlrQfcKQghgWuD/BlYleqG9ZY71+4T4sbcRpqrXJ+u1LAo9 J6Wg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339124; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Tcfqcvw/OBMlFrrMXxA2/+w2/9iajTV/ZetLrmXPr8s=; b=TTN/0qTzq5ooaTjlgDYyskDve3QCpL8IBd8D++SIj8QzKl1iHDvgI7lq1DMLSiU5v/ EJ/gOjmfrbWwAQktLxs1hXAV3DwS36kkBrCsP56Jgr9Mi3/uAR41iBAJ/1rQpb33xhZH G/qvYUf+MtG8WPPQQu1Sp2hM5A6ficSxmqVJCGIhzXYOEqG/7sEC6vV5hVOB8XLFJrKi XMRAJxBUcYZf3Es02q18nLJrnyxIUA6I6qKQAkqb39yXG+OJ80euxKHiedu0Mf2RdhWg jeseAv4A4amNokVVbzDkrn4h/HYKtvLNuQld1xCJ4qxONq7F64FPwUU8RCe46mA6vB0z QoAA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339124; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Tcfqcvw/OBMlFrrMXxA2/+w2/9iajTV/ZetLrmXPr8s=; b=Ca2ZaqRXe+vS2Mmip733TQ0F1mXpBOswp8jwB1xvQghGKwyvEi9/tIeThlwGsKLSUG LgsQYh8R1qzO4H+0Z3Cw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIi2OD (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:44 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:19 +0200 Subject: [PATCH v2 01/14] arm64: dts: qcom: msm8939: Add BAM-DMUX WWAN MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-1-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , Vincent Knecht X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:19:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740537192832596 X-GMAIL-MSGID: 1778740537192832596 From: Vincent Knecht BAM DMUX is used as the network interface to the modem. This is copied as-is from msm8916.dtsi. Signed-off-by: Vincent Knecht Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8939.dtsi | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi index 324b5d26db40..65c68e0e88d5 100644 --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi @@ -1537,6 +1537,20 @@ spmi_bus: spmi@200f000 { #interrupt-cells = <4>; }; + bam_dmux_dma: dma-controller@4044000 { + compatible = "qcom,bam-v1.7.0"; + reg = <0x04044000 0x19000>; + interrupts = ; + #dma-cells = <1>; + qcom,ee = <0>; + + num-channels = <6>; + qcom,num-ees = <1>; + qcom,powered-remotely; + + status = "disabled"; + }; + mpss: remoteproc@4080000 { compatible = "qcom,msm8916-mss-pil"; reg = <0x04080000 0x100>, <0x04020000 0x040>; @@ -1569,6 +1583,22 @@ mpss: remoteproc@4080000 { qcom,halt-regs = <&tcsr 0x18000 0x19000 0x1a000>; status = "disabled"; + bam_dmux: bam-dmux { + compatible = "qcom,bam-dmux"; + + interrupt-parent = <&hexagon_smsm>; + interrupts = <1 IRQ_TYPE_EDGE_BOTH>, <11 IRQ_TYPE_EDGE_BOTH>; + interrupt-names = "pc", "pc-ack"; + + qcom,smem-states = <&apps_smsm 1>, <&apps_smsm 11>; + qcom,smem-state-names = "pc", "pc-ack"; + + dmas = <&bam_dmux_dma 4>, <&bam_dmux_dma 5>; + dma-names = "tx", "rx"; + + status = "disabled"; + }; + mba { memory-region = <&mba_mem>; }; From patchwork Tue Oct 3 13:18:20 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147878 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2080599vqb; Tue, 3 Oct 2023 06:21:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEwzs1+n772sUJw8v86mCNO+9mSA7qXAcZeUOLiCCOtyrnPR5hg2V9mevwy2G3/SPczxlCZ X-Received: by 2002:a05:6870:b50e:b0:1dc:d8c6:39f with SMTP id v14-20020a056870b50e00b001dcd8c6039fmr17898037oap.14.1696339274274; Tue, 03 Oct 2023 06:21:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339274; cv=pass; d=google.com; s=arc-20160816; b=fX8n3gU+naq4eDoiGexyTk639A2JCNJq4vNZ32G+J2TIW9v9+URY3IMYPvry6PTf01 nziKC0i7v/wyIrruyR9BewG4IMMmxbmzdgeEcs9SxhkLz2XhXyOOES9getfVnzpGehNC xeX9T9jRMtWnfAJN8UZMuWWnYvO0Jg/FGGQqCihvF17bx5V0TdGDozhdAkcBl42jaZDU bVJBFoCjWne+et93yjfiCqYbPO87fdkRC6HwlcLSf+RFYAiM2RPsQ1tO8HBNUvCiz4Xr NOTDph4dWo0yHIKcfUGMidKualWE4F1xipgASLd/oQvEdEEHcq6Im0qS8obhoq8FLPU+ c++w== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=5tOaNBnZIp76aCZehJuiHTr9zQUl8dzXjSzMfoXuOec=; fh=2KZCdDDOrrR71Og9rtv+A3rmI3MualZUlNJjU056txw=; b=Ut42CR3KPVCD8CBrSMFp8NdlKpvLTxBmNOrTe855pzXrUKuax5zrfaZxLPpEb3gpwg ib2rCiWtrYtiutSW2JU3QtErHllLUSoVOv3AjKQGVHPHtAH9Vdo8BeO78eWeE2+C8Ff0 0iAcB1MAD+4mlnD3glK6a1t+1Iw7tCZkARMXXnXOfZVM4zootRuOEXBn7tAHy/vzkdQt dhygeCGdLT1WFac9fj7f2R28eYGyZYkVF4jmgE1oXy7z/qjFJCQiSz5Z/pMvtyHULq/z bM2rD3wI5yDuH0jh0pHfABn7KveG6zvQAXNyqai141MqhEmvikXdeDT5M9ABG9ZtXL78 EOEQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=ji+N9xk0; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id z1-20020a63c041000000b00565e42ba541si1357253pgi.482.2023.10.03.06.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:21:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=ji+N9xk0; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 50AD4807E45A; Tue, 3 Oct 2023 06:20:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235483AbjJCNSz (ORCPT + 17 others); Tue, 3 Oct 2023 09:18:55 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46096 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232671AbjJCNSu (ORCPT ); Tue, 3 Oct 2023 09:18:50 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.83]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C8610A6; Tue, 3 Oct 2023 06:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339125; cv=none; d=strato.com; s=strato-dkim-0002; b=GRkXnFQBMI3C6pufZHuf7L7dYme3EGvJTbnmew385D1YsNuDZxQqWhXUvVNiYHg/Da Aw+uCumPsL7ZUcVM4qKjReVFI1f65S959ZGtWdw7Uq5P00L373m5pC64AtBOGOlGdQeY GR4bhSVjWSUmU7Mpnr5+wtDxZbHReTd5oVk4UJOcpkvv70estx4eF6nedGEWvb3/hDhF ZNPp7A1NmD60plsa5rRa4Gx/MS4I/AMuub1VmMx+mO3rnV4zEG6xPyBPEN8mQTihKmx7 wA3gYtxWTSkM8OTy/svfyXCnZgb+5FxHB40OsAHSjXSE5ZzQouo07AtNU/92HuhvQpGU qEDw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339125; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=5tOaNBnZIp76aCZehJuiHTr9zQUl8dzXjSzMfoXuOec=; b=IeB0CnFklh5LGJ1OMiA2mK7JZM/NWAK+ziEigROZq9BDvl7ikr8eaJNC+GNiZP+H4y C+4F4HfNApMO+iqOEAiiyrJPBLBe3X4E/Yv2NJQSMWNKE8+T+aBG+dC4bggsG3YgdT0/ l1aTYW2asWeGY8HbTpKkkkJj02GN86QFx9N60q0xtxQGUddwezs9QDXL0tb9F3Uu931S dhlXVL9qNmWOAX9khV47+yS9RZcKQ8xO9X09TBrOYqbJRDJptaQpNdH9HQhSQilIDIL8 dnipR93IYDXqTCc2LnNeify7Uto2g6ZU7dHT/NjLWxjlZJS/bwTbByTx+L9HiRSraEL5 GvCQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339125; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=5tOaNBnZIp76aCZehJuiHTr9zQUl8dzXjSzMfoXuOec=; b=ji+N9xk0EAk9NVXHJKl69Sz1HfUW5Vand9bimnxpgV83/ojJHbxsTjhaNb2bkNQlgb 5JwlfQMfBzDJM8I9XDe/4itpSe+ENp8nSz6XIZhMuuJeCXK6ssBf47U6kiqkT2cg2xXS zhbYHv3EEkJ943p48vdoERn4j6pF01trv1PBXco6Tf1drPCqdK42oVUZS1l7M17icvjX shu1MKAsjMc0sPHUiYqvzsicNjZKPiigE2o6oiNPvPHc5WxDFXDnvnAFjj966td0AFMP bmfGRrAPUO3lC8+MIa+DB6UlgnTdq8SNGfkH2nsLxRJjkJCH29aPfpd9JYJ79fTWScwz 5UJA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339125; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=5tOaNBnZIp76aCZehJuiHTr9zQUl8dzXjSzMfoXuOec=; b=EsyIxqIcj/QY/mf4vEHjknXo26GA7GjV5YePYzLtELiZt8xt/bg2YbnNHiyVPVHk23 T/5CsOg2MS1rdEdXRBDQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIi2OE (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:44 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:20 +0200 Subject: [PATCH v2 02/14] arm64: dts: qcom: msm8916: Add QDSP6 MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-2-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:20:19 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740650642658178 X-GMAIL-MSGID: 1778740650642658178 MSM8916 does not have a dedicated ADSP. Instead, the audio services via APR are also implemented by the modem DSP. Audio can be either routed via the modem DSP (necessary for voice call audio etc) or directly sent to the LPASS hardware (currently used by DB410c). Bypassing QDSP6 audio is only possible with special firmware (on DB410c) or when the modem DSP is completely disabled. Add the typical nodes for QDSP6 audio to msm8916.dtsi. The apr node is disabled by default to avoid changing behavior for devices like DB410c that use the bypassed audio path. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916.dtsi | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916.dtsi b/arch/arm64/boot/dts/qcom/msm8916.dtsi index 4f799b536a92..e8a14dd7e7c2 100644 --- a/arch/arm64/boot/dts/qcom/msm8916.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include #include / { @@ -1989,6 +1990,54 @@ smd-edge { label = "hexagon"; + apr: apr { + compatible = "qcom,apr-v2"; + qcom,smd-channels = "apr_audio_svc"; + qcom,domain = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + q6core: service@3 { + compatible = "qcom,q6core"; + reg = ; + }; + + q6afe: service@4 { + compatible = "qcom,q6afe"; + reg = ; + + q6afedai: dais { + compatible = "qcom,q6afe-dais"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + }; + }; + + q6asm: service@7 { + compatible = "qcom,q6asm"; + reg = ; + + q6asmdai: dais { + compatible = "qcom,q6asm-dais"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + }; + }; + + q6adm: service@8 { + compatible = "qcom,q6adm"; + reg = ; + + q6routing: routing { + compatible = "qcom,q6adm-routing"; + #sound-dai-cells = <0>; + }; + }; + }; + fastrpc { compatible = "qcom,fastrpc"; qcom,smd-channels = "fastrpcsmd-apps-dsp"; From patchwork Tue Oct 3 13:18:21 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147881 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2080816vqb; Tue, 3 Oct 2023 06:21:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGknyAyBs8VCGcuiAe3YG/SJJm/G9abLwG7cN9kih+njs7MG5uBhd4B3bdVtXFRKm6MMrjD X-Received: by 2002:a05:6a00:2d9d:b0:692:b3da:9f35 with SMTP id fb29-20020a056a002d9d00b00692b3da9f35mr15012578pfb.7.1696339289612; Tue, 03 Oct 2023 06:21:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339289; cv=pass; d=google.com; s=arc-20160816; b=Ebl8V6cUR6O0uhgSbGjGA+nxIDbvYLyzQd+pQC8KMpjqERMhqfJ2eMV0Ras7/Xi9Ky QF8ECu6vWaT21H4BZeYnv84JuvQ6rd+45BF4IrCvAOHOe/F10j6nQA/Q0pS6NaenZsp/ xmbv8tH7tUDmT7cXbgBLjQDwlU7MIWV2HBXiDYm1kir3qH1dCj01gc/UezBcpJur0VlW l2DB3fEOilItd9dP9WE24subrHboH6dF4tmM3PVlnwdd+ErjR09YleMPlGq/R+rajJ2m IMNJmBATIkOzPtkGc8iNmruZ8LxIc49BJ4n5iAMbBdPkitrX99ivSujFcQJ88s16QZ+I w8rA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=9LB17dLFMfNzTJngJvf42XBLSmJlOf4/DOV/P11USUY=; fh=2KZCdDDOrrR71Og9rtv+A3rmI3MualZUlNJjU056txw=; b=Pv9GFkVuLw925TI4WLBFkVqgvrgpHHNmd8bvHNNJixu1mlHfqyar5o6D5vr7AKoq4A l4PWzWX3BNeflyDfo4tP4GNNPxfYP7pTCo3zzLiW4Za/iKvG1qMhZ4DWbaF9ih9Xoy0S mklaI5PAepu51bFMi1De5WEBXcIdxrebzUJvtgf0KVmvPcwk1Rq9VJxqZNC6nEbkHudk DrWmJ0dmfFzqi5RFdNnSQ29YXYuEYdNQpfiTTLxBK9O1QkW5RZEua6kzeJUIkAonM42Q fgRjMdA9nru97bm5juBeuUYuVa4sEb4NAxbylBhobhpH51j/7WxOyDQZQr1+eMTn37Y0 6E+w== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=NkYEZ9e+; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [2620:137:e000::3:5]) by mx.google.com with ESMTPS id h20-20020a056a001a5400b00690d9cd7b56si1524826pfv.66.2023.10.03.06.21.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:21:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) client-ip=2620:137:e000::3:5; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=NkYEZ9e+; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:5 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CD06B80ED98B; Tue, 3 Oct 2023 06:20:52 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235542AbjJCNS5 (ORCPT + 17 others); Tue, 3 Oct 2023 09:18:57 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46104 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234445AbjJCNSv (ORCPT ); Tue, 3 Oct 2023 09:18:51 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [85.215.255.82]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 23E56A7; Tue, 3 Oct 2023 06:18:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339125; cv=none; d=strato.com; s=strato-dkim-0002; b=iXvByhZmQv4Vwaqxi5klQsQ1u4CuQgIoeUAkwcbYtdy1S5iyBZiIDoZV68gNqkF+It 2mbflE67R7hYoq6VhRgWzXgAtqK4Wf5hsMulEj7Q6wOjbg8MyqJnrMugUX2/FeLicOu0 Qh9klP5Cgt25jphownK55vgM8ZLXpAz+5Nw7IPuVrcsD+RQVDaZtOsFkUjcvUXHijFZt H5upgM5/zMHZe+RaVLO1yb9if2GQUHlXg91Lcr08EHpNvx2NHalAAyxR/vBAZka6Cr6U WTaK2Vlf4kakSUNzW/vrJzYZsbfxdjcdsCEav6Gj2QB8CzgDV8wTkI0KOIiFRsrOgR38 z/5g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339125; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=9LB17dLFMfNzTJngJvf42XBLSmJlOf4/DOV/P11USUY=; b=YdbmUy8X8f6a9Nj4x/E/Oub6xXxlrtrhHBNCyF1HYahIZLpewtu1zun6DGNDT06jtF ML6iIR9/q0BmSVTo5V25QNOO3wCWVRpiDEZkf0eIF3Cr3IHHoEcLCnFpI2/+nWd/nzbe QRaGcLbrc17vhhzSIO8r2MAbhzwf/gjNhu4cGySWi71L93d+SK2gXQ7es4+vqVrlEWHp zsxV3tXU1eoNKaPAR1s7lTMYMjazNCxF7U5txSuxN9gtieZiBGl6hEbwYOSaCm+DsKWB ++i321gZ5m9CnP5kcmcspEDJpwLfL4rwnj/PwM/RhMijKbSzbf+7NGAkbyZPi8cQgh1f klfw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339125; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=9LB17dLFMfNzTJngJvf42XBLSmJlOf4/DOV/P11USUY=; b=NkYEZ9e+dEE6Gtu+yuSQHUqrgCjjWDIEQ46+yczB0lgu8BE9Dzbc0BLgcpqFXXCcIY QgrS7awYirwGzUs1COV13+85thlioRah1OPM3rXsRiPUGO34kkmNQDfkh5MnW9i6ZblZ 4a1oNdkm5SAnMCYDBU0gANGGOHqJLxl+xc9HF0GBpz6qj3WUASacElzDi+vaQg+hE9Xk RcA4RW1njFlbXqe52f6IUWZj7A9ljPy8PCbC0iKY8dPRl9CHviJ42vM4jpyXgDUFzKRf gwYsf2GvM8oE4TVIrX91qHq7OW1DEKGYByCS8EdJvj06/ta63Wgn26iknJx4+5iVt8Dj O0aw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339125; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=9LB17dLFMfNzTJngJvf42XBLSmJlOf4/DOV/P11USUY=; b=ZPdEbvBV1b0xqeLjPFGT/XZno1FBBAM77dYEP5XOE1R8PLvjtgn+gaLNJmXuTtkWYy rhIG1rs9+EgZag97e6BA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIj2OF (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:45 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:21 +0200 Subject: [PATCH v2 03/14] arm64: dts: qcom: msm8939: Add QDSP6 MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-3-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:20:52 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740666581686003 X-GMAIL-MSGID: 1778740666581686003 MSM8939 does not have a dedicated ADSP. Instead, the audio services via APR are also implemented by the modem DSP. Audio can be either routed via the modem DSP (necessary for voice call audio etc) or directly sent to the LPASS hardware (currently used by DB410c). Bypassing QDSP6 audio is only possible with special firmware (on DB410c) or when the modem DSP is completely disabled. Add the typical nodes for QDSP6 audio to msm8939.dtsi. The apr node is disabled by default to avoid changing behavior for devices like apq8039-t2 that use the bypassed audio path. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8939.dtsi | 49 +++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8939.dtsi b/arch/arm64/boot/dts/qcom/msm8939.dtsi index 65c68e0e88d5..95610a32750a 100644 --- a/arch/arm64/boot/dts/qcom/msm8939.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8939.dtsi @@ -10,6 +10,7 @@ #include #include #include +#include #include / { @@ -1615,6 +1616,54 @@ smd-edge { qcom,remote-pid = <1>; label = "hexagon"; + + apr: apr { + compatible = "qcom,apr-v2"; + qcom,smd-channels = "apr_audio_svc"; + qcom,domain = ; + #address-cells = <1>; + #size-cells = <0>; + status = "disabled"; + + q6core: service@3 { + compatible = "qcom,q6core"; + reg = ; + }; + + q6afe: service@4 { + compatible = "qcom,q6afe"; + reg = ; + + q6afedai: dais { + compatible = "qcom,q6afe-dais"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + }; + }; + + q6asm: service@7 { + compatible = "qcom,q6asm"; + reg = ; + + q6asmdai: dais { + compatible = "qcom,q6asm-dais"; + #address-cells = <1>; + #size-cells = <0>; + #sound-dai-cells = <1>; + }; + }; + + q6adm: service@8 { + compatible = "qcom,q6adm"; + reg = ; + + q6routing: routing { + compatible = "qcom,q6adm-routing"; + #sound-dai-cells = <0>; + }; + }; + }; }; }; From patchwork Tue Oct 3 13:18:22 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147879 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2080600vqb; Tue, 3 Oct 2023 06:21:14 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFR1q8CcPT50c6mOLuM+p3Cf6jMj6EAfH/1Fl8u8wfaXY62yvixq/pE1zBwiq/QtL0dFeRq X-Received: by 2002:a17:903:184:b0:1c0:bcbc:d67 with SMTP id z4-20020a170903018400b001c0bcbc0d67mr4233378plg.22.1696339274242; Tue, 03 Oct 2023 06:21:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339274; cv=pass; d=google.com; s=arc-20160816; b=HWm2XrwtdcvBxiI7081NXqgBOxjGRRYFrv/ZOtuwlxWDNRBdtfPNeHlTsePcXIgUCz vNB9u9rC9g60Oq+LmyT11uRstP9lhsLZdVufgQWi5jefM2n5YIU/pLNDbiPsrwb4XXh9 9WZzpVbe4fPcPEVFiojCYgKZmXs7gSisq/Y+2A7GqDnMdYAQZ1nmCkoHbUit+V69gfzg fReFjFff5jlKBOXxqsXwcanBXUL73ueNEG+RNxfUWu5uFSxqmCX7hhqTi0AFdbm+IP9f TggSbBaESTNtBcIZMkrNZPUL4zLrQfkkpDnvR4Hjlz/A1/oF3PqowR18LSGEj2/ZSUIi ZT8A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=axN5JTKzeHnuAwCYNQDx+NKlDEDPR1XqPTp8Vpb9ugo=; fh=2KZCdDDOrrR71Og9rtv+A3rmI3MualZUlNJjU056txw=; b=twOw7ivFR0PNUODAm5oYoljb5RTPlaXzM/PdmW90JALJvoIsY8tD8faoxqDdirTFBC AR6IrRjsmgUQmoPTDZyhesIUPc7nW+Sa829QPQ0wdQr/Yyf+a60J4NHYglK42JCBVDm4 EFzE47s7UtX8QbanPDap3igKRbHgKy+UZe4X5JiywPnhNSAa39WIs4B8Xerng2M1mphN /OXN5fzYtV5n2IIfrJN2YG+KrBsaL6xtKWrG/2AyoAXS/TNakT9toL7AB/JbQEgvzDtb V3LTkaCjKj72Y5E3q2XEtJmyzWxVcRrM67ps+fbwpI6yKGA+1xZF2MOhCp01y7MDa1w7 Yn4A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=PJqm4E5g; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [23.128.96.36]) by mx.google.com with ESMTPS id u190-20020a6385c7000000b00582f2161cb4si1496368pgd.300.2023.10.03.06.21.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:21:14 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) client-ip=23.128.96.36; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=PJqm4E5g; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.36 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id F3C7480765D5; Tue, 3 Oct 2023 06:20:24 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235655AbjJCNS7 (ORCPT + 17 others); Tue, 3 Oct 2023 09:18:59 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46118 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234590AbjJCNSv (ORCPT ); Tue, 3 Oct 2023 09:18:51 -0400 Received: from mo4-p02-ob.smtp.rzone.de (mo4-p02-ob.smtp.rzone.de [81.169.146.168]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 812BEAB; Tue, 3 Oct 2023 06:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339125; cv=none; d=strato.com; s=strato-dkim-0002; b=RJJJ6c3m9rHxAG2DyN+OMi8V6qhNOzpQXPVMHa3Wz/Qh4EJc/TfNoa0cAQ8BMyqgB+ Pp3xtnkWqo4qKQwDGVjuBTVOBqyxHMNYM+zHjs3q7SztLM4Acr7DUh6hL+QseaCxIu3c AJjXEPiT4jf2qHWaVwJ00UulOFO3o1D3hEG9VYADtzIl1pUf/MFhmKNGhg95higmypk5 vL6Ajm62sr0GdRo62aSnUIiix6dUcG4FcIptLnyUKlQqDu6scxg4dZKyZXvCby0DqZ+B yUdP1MMoB9aF6ETordixoX1BFFzS09pOUMZA2DWmh/QILXEf/kUrVfgbkERJYlAVFA0e rhNg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339125; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=axN5JTKzeHnuAwCYNQDx+NKlDEDPR1XqPTp8Vpb9ugo=; b=SNOATYAqOZBizfJlp66r2gcRodkOMZ4rwWy2pzc90+f234WwLoaVChimYCrWcqXJEI KRk0fjz+HxjJV3uCTMJoDczjZnioO2JGtQO6oRGNYS4672j55P4fkOVOuHXW6N12uym5 /RazlJu6qStkWwNYZwQ7Gr4THT1yEZkvK9Vm3eKLBr2AavAuCByNgoMzCnns/tsbnCtr VJLLENYOBPF6ahFTemxQatJ5JZyK5wULYXYEv6VHtax41mmg8gm5uNOVLRcV8vKyTSKa 1IsGi/UbOFoWAYWe7qpTMjzGERqmCQQP5FS90fRUj4CFBGvdmCiQrCqDspUUo+0WCOF6 1yaw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo02 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339125; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=axN5JTKzeHnuAwCYNQDx+NKlDEDPR1XqPTp8Vpb9ugo=; b=PJqm4E5guv2vaMi+fMjYoEJlLMRF1ciNE2n34JOqcv2sx4dhr32JyvxYBkNsYoA7o5 /X8yhdDFPAfru2ag1saVVoHe3OPfOJ47Hdf0Maxrg0WN/XNVvpzAtp1TZXvnu4i0UH3d 43F3Hjv8KRj+K7Nbin34G1Ajh4D4TCe1/5wUgKTDJmXOBOOASee5YPQPHmAVUMycoemp S87csp5qPfCeyClbC7tWNblU0o6ot09l/960LmUo1LlinxFMF5CgqgrSrsUqc4heDIH2 PlLJeH46Y3Dp6HzqoT1zBHgUHqyU6TMzLjhp9+mcW3i34EYdjoBzNYXmd/LeURj7gk1R nMGQ== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339125; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=axN5JTKzeHnuAwCYNQDx+NKlDEDPR1XqPTp8Vpb9ugo=; b=Lru4Q6MDj5yRw8HsZG/E+xkykGPBaoNXE24VxA2E0+OfkP9OL5KE96r+RtXeQ6mSmH vEx7PZlAqI2buIg8d6AQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIj2OG (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:45 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:22 +0200 Subject: [PATCH v2 04/14] arm64: dts: qcom: msm8916: Add common msm8916-modem-qdsp6.dtsi MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-4-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:20:25 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740650376512516 X-GMAIL-MSGID: 1778740650376512516 Most MSM8916/MSM8939 devices use very similar setups for the modem, because most of the device-specific details are abstracted by the modem firmware. There are several definitions (status switches, DAI links etc) that will be exactly the same for every board. Introduce a common msm8916-modem-qdsp6.dtsi include that can be used to simplify enabling the modem for such devices. By default the digital/analog codec in the SoC/PMIC is used, but boards can define additional codecs by adding additional backend DAI links. Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916-modem-qdsp6.dtsi | 148 ++++++++++++++++++++++ 1 file changed, 148 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-modem-qdsp6.dtsi b/arch/arm64/boot/dts/qcom/msm8916-modem-qdsp6.dtsi new file mode 100644 index 000000000000..039961622633 --- /dev/null +++ b/arch/arm64/boot/dts/qcom/msm8916-modem-qdsp6.dtsi @@ -0,0 +1,148 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) +/* + * msm8916-modem-qdsp6.dtsi describes the typical modem setup on MSM8916 devices + * (or similar SoCs) with audio routed via the QDSP6 services provided by the + * modem firmware. The digital/analog codec in the SoC/PMIC is used by default, + * but boards can define additional codecs by adding additional backend DAI links. + */ + +#include +#include + +&apr { + status = "okay"; +}; + +&bam_dmux { + status = "okay"; +}; + +&bam_dmux_dma { + status = "okay"; +}; + +&lpass { + status = "reserved"; /* Controlled by QDSP6 */ +}; + +&lpass_codec { + status = "okay"; +}; + +&mba_mem { + status = "okay"; +}; + +&mpss { + status = "okay"; +}; + +&mpss_mem { + status = "okay"; +}; + +&pm8916_codec { + status = "okay"; +}; + +&q6afedai { + dai@16 { + reg = ; + qcom,sd-lines = <0 1>; + }; + dai@20 { + reg = ; + qcom,sd-lines = <0 1>; + }; +}; + +&q6asmdai { + dai@0 { + reg = <0>; + direction = ; + }; + dai@1 { + reg = <1>; + direction = ; + }; + dai@2 { + reg = <2>; + direction = ; + }; + dai@3 { + reg = <3>; + direction = ; + is-compress-dai; + }; +}; + +&sound { + compatible = "qcom,msm8916-qdsp6-sndcard"; + model = "msm8916"; + + pinctrl-0 = <&cdc_pdm_default>; + pinctrl-1 = <&cdc_pdm_sleep>; + pinctrl-names = "default", "sleep"; + + status = "okay"; + + frontend0-dai-link { + link-name = "MultiMedia1"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA1>; + }; + }; + + frontend1-dai-link { + link-name = "MultiMedia2"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA2>; + }; + }; + + frontend2-dai-link { + link-name = "MultiMedia3"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA3>; + }; + }; + + frontend3-dai-link { + link-name = "MultiMedia4"; + + cpu { + sound-dai = <&q6asmdai MSM_FRONTEND_DAI_MULTIMEDIA4>; + }; + }; + + sound_link_backend0: backend0-dai-link { + link-name = "Primary MI2S"; + + cpu { + sound-dai = <&q6afedai PRIMARY_MI2S_RX>; + }; + platform { + sound-dai = <&q6routing>; + }; + codec { + sound-dai = <&lpass_codec 0>, <&pm8916_codec 0>; + }; + }; + + sound_link_backend1: backend1-dai-link { + link-name = "Tertiary MI2S"; + + cpu { + sound-dai = <&q6afedai TERTIARY_MI2S_TX>; + }; + platform { + sound-dai = <&q6routing>; + }; + codec { + sound-dai = <&lpass_codec 1>, <&pm8916_codec 1>; + }; + }; +}; From patchwork Tue Oct 3 13:18:23 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147869 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2079107vqb; Tue, 3 Oct 2023 06:19:07 -0700 (PDT) X-Google-Smtp-Source: AGHT+IE8xN7ID2uTBJ0rcfiD7hCku0+N7j2meRKHA+DzA6i7QAW6cm1UbK9SVEgUAHv3zaU1kOJa X-Received: by 2002:a05:6a21:6da9:b0:14c:d5e9:14d5 with SMTP id wl41-20020a056a216da900b0014cd5e914d5mr14399531pzb.14.1696339146734; Tue, 03 Oct 2023 06:19:06 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339146; cv=pass; d=google.com; s=arc-20160816; b=tT1f9UH95JyTUkUP3YP4hDGU3PK+cE0xA/GAKZ0CmoHWsyJopCEK8IZaFiA9z5jEnn aUgrePS15tybyiXMx32eKe+3uCMpWQx9xNYIrd1NfEagjuHGCEdxD4K1leW4aDszo0Nu +VnVEX265qqmrWDZuGLnIuhtbDpWbgMHP9jvdOtwvpmRtX7f/9/L3voZVb25f0ypaqiW Y+aO25/PBckT/dm0djWAsnB7pFptXLaTNbmi/JyUQF6epduSAhmoxEMCoIEY9KX4lWtd wHMHfc00JSqZe0mp5OjENRRk6atmpy6+aSiChXCEfXeGzNNLvDWSOjCLKmIzdQdRczga 1dnA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=KXUcWTcA9b6HuhOlbQlLI1PnL8fJ2J/EZHn+uesquek=; fh=yhPhsXeoouGZrZLJImGjJYwO55HwsglfdgCIGKom2q8=; b=o4oX/TmhCWUVbBmJnpcy6JNaiNI7cD0me/C299TQYEfpYKYTI+vjrVkbgJxZqQ/JPy paCcKhHuNRyHWwSWae2lG0jOH+kAfYukaPkgBNsozcnHMthxcJfud8D4K6fxfY/K0AzQ cYWBK7EfWwvv7K+Yq5UuBPeAKzkX+tmOIiP+BvcBhjkmUUa0gXgaIVJj/usZltqWDGwp jANRjpjmvYrxxoK8saPBGEdCke8Df+ADCFRQKPt0JQXTAnMbjUZRTJKnp4ccJSej+5Ba frVAIp3CAk0NHSrrCaE5os4trSYZvDe+RYc0tO4NjzBh2uZWetuHh0ImTcGqQM6iBK4D ROJQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=TxShZE2Y; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id dw5-20020a056a00368500b0068fdeb84453si1425407pfb.265.2023.10.03.06.19.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:19:06 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=TxShZE2Y; dkim=neutral (no key) header.i=@gerhold.net; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 04B5280213A2; Tue, 3 Oct 2023 06:19:06 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236349AbjJCNTD (ORCPT + 17 others); Tue, 3 Oct 2023 09:19:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46132 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232608AbjJCNSv (ORCPT ); Tue, 3 Oct 2023 09:18:51 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [81.169.146.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0DF76B4; Tue, 3 Oct 2023 06:18:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339126; cv=none; d=strato.com; s=strato-dkim-0002; b=aVgM+IvjYki+e6m03nYvuqPVuUudpgj3brw1fubF1/D0uXwih5JJo5hAdpMRJbqMFl EEx3JS47drXV7/eOm38fJCymgKL8PSR+f7zFY+opt4JJ2bGKOP6VDUHY9edI7jnIK5i7 fHQ0bpe83Ut1QL5oJQHYRhvrVpwspb6EyrJFzmIo1Q6st4r/3MisCmB3DXiDuqMScCny EXs7pSbPsLfzm7s9mhMiiFHcEFVOF6Hcb5mgNHsNDCCWZNcRunE9Wowxt364OC3x70JF raxAQVgxhnxp8ichqABmcylugQaIYOW/rbMerk3U+YZ2AwO3p9A0F++w/rLK0PF/lL2x dDXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339126; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=KXUcWTcA9b6HuhOlbQlLI1PnL8fJ2J/EZHn+uesquek=; b=AV4/OhY3AaERy8MdxKMdvt3/Txm9qEu/f7TFoHpN0h13WzIFmDhnrdCuPKB0DQLwRf J/bzdkOZsL3kQiVIE5vkixUcLqY4lgQQ3K+p1gKutRtZywu5OCDme8d0Cl9Pt18N5oi0 FOHLkZd/rLZa7fWD1ASRlNyuvo8T3CALPaQB1fDP6m0tLPntffL8tTYZq0ODU78w6IpR 0CIyHftunN/dvJTRho/09hYWeAvOsvqZPD+zqqAH9TiNc3zlaURkwkC3UN4xRAY5s0f+ Fc/K51WvKSCz2w83czRpdeh1B6TdadFkWxly3rJ+uBEKEJrvOnuwgEWMtsC0qGulC31O WdEA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339126; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=KXUcWTcA9b6HuhOlbQlLI1PnL8fJ2J/EZHn+uesquek=; b=TxShZE2YDdsni6N0gmA6ElBz62zsKCOSxM1tIgUkvAP+m/bAsBhtiddhdGLpM6rOp4 0HZxBP/9FagVXR1B+N4/TQhxehPv5KTzLf1uPpNivVWbkWPcK1aDpmgTPtLQV0A/aT51 2LYKZ2pPlZ7raOPP8AITxV3Rq1gKdBWCb45nvQpHIEmGYnvf7KktJ2+KPZ4B2HXz63Xv lbQUcpotscHodVSedRYJgIvDQOT1m6MLzCfhH47deiDx8k1BxpZ8rH/H7W9yUy6Iz8wJ pj+deeNHEOkyvbtNTgwKUK6pZWq9WNGkXsyAM4qrSWPguEC5YJQAkhaER1Vyy54vEgvZ wpvg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339126; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=KXUcWTcA9b6HuhOlbQlLI1PnL8fJ2J/EZHn+uesquek=; b=e6/VmJm9jzo7SdTpCy/zciG2cqfjI1yuFWwrkybuCLiyMVA1DWWPQvOUtRWx/JRknm MF1/7A6RL0hlMJeyrfBw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIj2OH (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:45 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:23 +0200 Subject: [PATCH v2 05/14] arm64: dts: qcom: msm8916-samsung-a2015: Add sound and modem MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-5-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , "Lin, Meng-Bo" X-Mailer: b4 0.12.3 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_BLOCKED, SPF_HELO_PASS,SPF_NONE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:19:06 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740516686460040 X-GMAIL-MSGID: 1778740516686460040 Enable sound and modem for the Samsung A2015 based devices (A3, A5, E5, E7, Grand Max). The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except: - NXP TFA9895 codec for speaker on Quaternary MI2S - Samsung-specific audio jack detection (not supported yet) [Lin: Add e2015 and grandmax] Co-developed-by: "Lin, Meng-Bo" Signed-off-by: "Lin, Meng-Bo" Signed-off-by: Stephan Gerhold --- .../dts/qcom/msm8916-samsung-a2015-common.dtsi | 71 ++++++++++++++++++++++ .../dts/qcom/msm8916-samsung-e2015-common.dtsi | 4 ++ .../boot/dts/qcom/msm8916-samsung-grandmax.dts | 4 ++ 3 files changed, 79 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi index 0b29132b74e1..2937495940ea 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-a2015-common.dtsi @@ -1,10 +1,13 @@ // SPDX-License-Identifier: GPL-2.0-only #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include #include +#include / { aliases { @@ -196,6 +199,18 @@ vibrator: vibrator { }; }; +&blsp_i2c1 { + status = "okay"; + + speaker_codec: audio-codec@34 { + compatible = "nxp,tfa9895"; + reg = <0x34>; + vddd-supply = <&pm8916_l5>; + sound-name-prefix = "Speaker"; + #sound-dai-cells = <0>; + }; +}; + &blsp_i2c2 { status = "okay"; @@ -243,6 +258,25 @@ &gpu { status = "okay"; }; +/* + * For some reason the speaker amplifier is connected to the second SD line + * (MI2S_2_D1) instead of the first (MI2S_2_D0). This must be configured in the + * device tree, otherwise audio will seemingly play fine on the wrong SD line + * but the speaker stays silent. + * + * When routing audio via QDSP6 (the default) the &lpass node is reserved and + * the definitions from &q6afedai are used. When the modem is disabled audio can + * be alternatively routed directly to the LPASS hardware with reduced latency. + * The definitions for &lpass are here for completeness to simplify changing the + * setup with minor changes to the DT (either manually or with DT overlays). + */ +&lpass { + dai-link@3 { + reg = ; + qcom,playback-sd-lines = <1>; + }; +}; + &mdss { status = "okay"; }; @@ -253,6 +287,10 @@ &mdss_dsi0 { pinctrl-1 = <&mdss_sleep>; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5400000>; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -265,6 +303,13 @@ pm8916_l17: l17 { }; }; +&q6afedai { + dai@22 { + reg = ; + qcom,sd-lines = <1>; + }; +}; + &sdhc_1 { status = "okay"; }; @@ -279,6 +324,32 @@ &sdhc_2 { cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; }; +&sound { + model = "samsung-a2015"; + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; + + pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>; + pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>; + pinctrl-names = "default", "sleep"; + + sound_link_backend2: backend2-dai-link { + link-name = "Quaternary MI2S"; + + cpu { + sound-dai = <&q6afedai QUATERNARY_MI2S_RX>; + }; + platform { + sound-dai = <&q6routing>; + }; + codec { + sound-dai = <&speaker_codec>; + }; + }; +}; + &usb { status = "okay"; extcon = <&muic>, <&muic>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi index 0824ab041d80..3c49dac92d2d 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-e2015-common.dtsi @@ -65,6 +65,10 @@ accelerometer@1d { }; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5a00000>; +}; + ®_motor_vdd { regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts index 3f145dde4059..5882b3a593b8 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-grandmax.dts @@ -49,6 +49,10 @@ ®_touch_key { status = "disabled"; }; +&sound { + model = "samsung-gmax"; /* No secondary microphone */ +}; + &tlmm { gpio_leds_default: gpio-led-default-state { pins = "gpio60"; From patchwork Tue Oct 3 13:18:24 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147870 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2079174vqb; Tue, 3 Oct 2023 06:19:13 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHnYMx78ITvMiJtzL4SH+GTIUUMxLOK0lSPCQM69aYzLNmHdUjbv5Lv7ODXfox3Xv4cMV1r X-Received: by 2002:a92:d781:0:b0:34f:6837:6ab7 with SMTP id d1-20020a92d781000000b0034f68376ab7mr15544877iln.16.1696339152841; Tue, 03 Oct 2023 06:19:12 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339152; cv=pass; d=google.com; s=arc-20160816; b=NET2qi+Bi/lLfd+uHYQn+Gq47pcu3qhilN9TYeHbywTAQBk0p+5bdjHeM/CsWlh0Qh fKk5t5l05HjHeInP1B3HdDmRvdnxUaJ8HVMTSMysnwVu33SFciq795I5lyzi9W1HFLkZ HtHVibJPUsxfNmrQZuE61RIl9uZXPV8WBVkh54a8uxoMtiKqg+5Dw4+992+Cb2AW729w tnKH2ODzxns3kbuh2619Cc6x90J/8UFMfbY05Svm0zgxpXcLDcQvAmp1hVs/9gtxXMwU Ucuv3oS6X8eKC+h3AKGeEn8MkqRpltWLO/8RWU/pTSej3jjZUKsgiUJqYamdb6X4NlEx aF9g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=wkEd/6Cy6zxlz0xNYtgtZA9rujzyPOBqe0YaT0QbcHk=; fh=2KZCdDDOrrR71Og9rtv+A3rmI3MualZUlNJjU056txw=; b=p7Ni6SAcsL1hmgE/g2O9UkeAVSccHG7RTZddPtvAkRuZ6IjkwU6qePlwRX1mg2N85s y210yPeNGsH2XhoquMhw0dZN47hm/QhnLP50jiDw4swdKXszlm4+SzykzTNWlxltbIRe Xq65Z0QpkB312mik9FQgxJWt+jFYF3V3dzExLixv0Xrs8M1ybYSpqMuw9RoD/ef/YRQT GEYL5HUbsonB7z8cdvyeJeHs7sAXQ8nu9HhbwOLMxSWY6b4pQlyBXXi9Dp3feBTX4g02 iGCTYnl/S00AEpypJ0NOqt8SIKPQFfqEyY4FBus8AHcEPDJDpsPhMl6522v3J5N6O6wX P0ug== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=q7IP0NAB; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=UR9uo9p9; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id u8-20020a17090a400800b0026f3395cd7fsi9830594pjc.184.2023.10.03.06.19.12 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:19:12 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=q7IP0NAB; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=UR9uo9p9; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 7DA2D827D662; Tue, 3 Oct 2023 06:19:10 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235896AbjJCNTG (ORCPT + 17 others); Tue, 3 Oct 2023 09:19:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46148 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234880AbjJCNSw (ORCPT ); Tue, 3 Oct 2023 09:18:52 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3EAAFB7; Tue, 3 Oct 2023 06:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339126; cv=none; d=strato.com; s=strato-dkim-0002; b=fT1o1bfvAJmEucKypk4JvnYvVPf+gyyz7e86whnVfZ20S7qNU5yGUIvrwnz84Uphc7 jeCjbtpjr/ZgpKBKttj2klCINZ3gldsp82VIYQLwGj2xaI+gliiC0C63SgshSwqO4DJV Evqq2sGmK8rAx4zAPMWPO1xR6WSZjLdXUxrg7+me6fomISSGVvpMakOppNfyS1oQMLlI NTfqou2YB7n3M/sPVW/oLYZMBDWDveVGFPVejoystOSgTzrnvkSqrBqicaq09ONbmN7N dna4f7Gh8Hxtk5YbgRLMP6E84CxZuvsNtTgGtWU32w/0gWS3RW5nuazQqZLRlG76CDhF 8cMQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339126; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=wkEd/6Cy6zxlz0xNYtgtZA9rujzyPOBqe0YaT0QbcHk=; b=i0U6MZKYoPjCIbPzdQbe4u2/uGaRqki9rdE6+qIte0Gb/qGCsfxp2yg85iQ1vlw4Gz B7DcXych98b7h2ExMMBRX7npTf2/bybFYpksgz5ESD3cmvhpls7OG2olJTx4rhB/jtNJ mjkjmL24khi/bvFzDpRzbb3fi3U9AEIpse0wg3Qi2neWiFaulzznE+SSuO3jmsjSOEzz 2+IucfzhCSXtvh6D/Li9EyltV093uY9XXGzCklAEHnIxyirISkymShja40s7ciFIVcxA h5eWo74rSvlZnQS2GAOFksUsZWCKptEjCHPlZ6GTbWYPNMrGp6Ysw5H/5aBnrDcrP/JG NdlQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339126; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=wkEd/6Cy6zxlz0xNYtgtZA9rujzyPOBqe0YaT0QbcHk=; b=q7IP0NABHFpBrIhoZsdS+Sf6TwV2hADuAkBQ1mwqO/TuJCTtIU7+NiNBSbKoSqux8w ukFRK+fA3cdmkNmC1h1oZs/DqGR3IxwhoKtkQcN0J+hKX3O9Jo/U7RjkyucaoCx8B3A9 cJDD3ftnNeqDQLmd44qYR508e4mOmnMrnrAxcQQpE1h2u6JEq8meL28X+p1ONsTo7abv NjBAHIxJu7RE7BEd2/zbLRXYaUYbZEWBU1cgAGk1Fd0zSUoAkoS249x8e4G70QDQgcJh l9DbfJv2FGJZaTaA5+KL5aNBSKakTwiOLEhG8fA/QfdnSayrHBZlY2dRlbaufJBt9FGS rdCA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339126; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=wkEd/6Cy6zxlz0xNYtgtZA9rujzyPOBqe0YaT0QbcHk=; b=UR9uo9p9yO0V8BYeBwl1Vyoal4Zp8OgENSuFA1GbvpTNCxGHRSQJw7j23sS5LNtmkC 13r9oY40LQ7Fi4VTBKCA== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIk2OI (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:46 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:24 +0200 Subject: [PATCH v2 06/14] arm64: dts: qcom: msm8916-samsung-serranove: Add sound and modem MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-6-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 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_BLOCKED, SPF_HELO_PASS,SPF_NONE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:19:10 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740523065008987 X-GMAIL-MSGID: 1778740523065008987 Enable sound and modem for the Samsung S4 Mini Value Edition. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speaker/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except: - Samsung-specific audio jack detection (not supported yet) Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts index 68da2a2d3077..5ce8f1350abc 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-serranove.dts @@ -6,6 +6,8 @@ /dts-v1/; #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include @@ -319,6 +321,10 @@ &blsp_uart2 { status = "okay"; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5a00000>; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -350,6 +356,13 @@ &sdhc_2 { no-1-8-v; }; +&sound { + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; +}; + &usb { status = "okay"; extcon = <&muic>, <&muic>; From patchwork Tue Oct 3 13:18:25 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147876 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2079659vqb; Tue, 3 Oct 2023 06:19:51 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHxh2f3bOhyroFG/B6ReEk9j4OMrq08Di//lSpIfQuVr72qfwQ4dQtXbKpKoqPJ7PmML77p X-Received: by 2002:a17:902:b286:b0:1c6:1c80:5663 with SMTP id u6-20020a170902b28600b001c61c805663mr11413176plr.41.1696339190993; Tue, 03 Oct 2023 06:19:50 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339190; cv=pass; d=google.com; s=arc-20160816; b=Gw8+jdrDD9FZpb0sIWbQvUQknc+Vh4Ee+ycOjM3oO3eckgVvkXOuYTE6wW53uSumRn dT1mHAuIWY9qvwxfXVeUdS6SyxnCqJuwioK+gmck9ZbsiPnDvQLgsQEXoeed1PL7s13F lxCFgpmSNNpuARG3y8QB8bQQP02AdyHla3nyBa0OkOMt3f/xIEEViE4LKyOC1Pq9ZhXt CaiN4rusoHTmoy6rgf5pGgV5+Wix1LJvHBgkOfUn8iHs4W0IXBZ6s/B99z61wJtzyrFb upAlH4rpcpt1fdrDw5PGAsSLbFVjYdK/o1X/FFsZplcHK8xx1cdu7SySl8DbdJEJvRWV Ix3A== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=CJfhHqq4bYPkDlzc+To1FAdUVzbIpBsNH1YlvpKh7/I=; fh=2KZCdDDOrrR71Og9rtv+A3rmI3MualZUlNJjU056txw=; b=H+1edIz8zvIU9urIxPDkMSkJsCdqlxPZRLnHEABsoPf9NesufKPVq0PQpq+ITQ+Jej 2t9YZ16YGad4jnd8YwGGUqOuO64K24XF5wBNeojHYmfLYrfWsJTHFtceDg1Pkcl4xV+I sFiySLu6ED0+NgV2si6nMCD4q6zAIsIS0Zu7aKKH2omOHMb7p7Ilmj4zm6DJ23m0d4IH gErRWgo8h5YzG9AuBUNWOJuAg8UEw9R+f3LEY1LG8MXuo8cklcuaOemCnMWqAAze8PFh rRGuaB+kBSLRt8EsQzlFDDvSle82hCHfP9XTx4GPeQA/zIXQD67Nm5aa3FoQjbfChlPM 2fsg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=EfvDZSgk; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from agentk.vger.email (agentk.vger.email. [23.128.96.32]) by mx.google.com with ESMTPS id v18-20020a170902f0d200b001c72dbaf7c3si1337525pla.240.2023.10.03.06.19.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:19:50 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) client-ip=23.128.96.32; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=EfvDZSgk; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.32 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by agentk.vger.email (Postfix) with ESMTP id 16E7081355DA; Tue, 3 Oct 2023 06:19:38 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at agentk.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236091AbjJCNTK (ORCPT + 17 others); Tue, 3 Oct 2023 09:19:10 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234909AbjJCNSw (ORCPT ); Tue, 3 Oct 2023 09:18:52 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [81.169.146.172]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 90469BD; Tue, 3 Oct 2023 06:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339126; cv=none; d=strato.com; s=strato-dkim-0002; b=L1oQY7PnVX/f6k10ssuj3NeRvAvSwmvEvpCWMQ7B8o3qWsQB8fxtjpA8rWmehWX+Gv Agtb7WK0WCsF4tL+jAI//5JmtobedGbkAb5hjJLB6lKLoAppta40KQYTrA0hGUWVQuFy qcvXhW5oiBGd7DE8xE631leYAfa1Y0dRz7u6jLc96hoSRiCWxhIUL5hHD9h54xrX++fb tN91gPUr3pmZDhZAQCCZNwrLJZHxEdvAB3BCvvY8HZ93hAbMeEV9Y+FUp9lyq+33YF/R Zp8fhO3w11iMgIQmvVfB652kp8tEBhA6z8ZEJwuMrfQU63jQkfuqf2/HOw4Y38QFs5pu itng== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339126; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=CJfhHqq4bYPkDlzc+To1FAdUVzbIpBsNH1YlvpKh7/I=; b=GeCizgeOuxN19DGUGNvSNXNywnok/uHOL1mE25O4V0d/egFPgQVoIJlE49hg6E/5cp GI5Im/xIkWSfIrcX3qqhB6YwNdiEacnPmFrR+6E0WbizE7+SfSaO1+/dg16dr78DcAFT fd05xQNOOhXQqWD8OKnLAZna9VVuhGAlG0GPCSMfgTZlg/gBdoCBmiNgcQiIzkb6fzwc 8G5BZQXg6VTnD+G/kEweLFpcHNQugXX10Xexx9KlNl8cUik6bDWOTNVm3frD66gOsebW 52BE8cJUNVTfXjkVJ38gXXe97KA8CqvQ8UXkOxI3kKGDjhVsgNm6AgH70uTu2jQJ9GyZ gZbQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339126; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=CJfhHqq4bYPkDlzc+To1FAdUVzbIpBsNH1YlvpKh7/I=; b=EfvDZSgkuR9Cx98wiizOeEeMWht+xrpoEDw1AB/0eRTxZwK20bcFaDJqFSvLdMonng meP1aURrKGxzzGHq3lxQI+7Kwu8LaO89Day/IwpJIgG3y2nWNFDqe3f9Y4mdgB3ONJAV W3CwPpXtKCXGWr/um0B14pom0TylTpgJ5eZpNVWGpjNEEOf6MMNm4C+cvGw4Y3a7+gkw UXscrg/YPMaRhnQGt90KtuGolUaAJ6bIgI2LrTV0H8xLFkFYFTVUMZxdKdHwdSujQ9k/ yGYTyYbBFJxi5F9hijx8Pe5fUVvQLplzutpYgZoWEm0lXXWj2Kt156oyi3j30dztV2Pc tJtg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339126; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=CJfhHqq4bYPkDlzc+To1FAdUVzbIpBsNH1YlvpKh7/I=; b=fvq1pFVmORGTNpEVVlqgoTlioAa5Ef0OxDhYhkMTxHkkD847h4/mvZAJv1yny9obVy HAIj2Y043r2904QSHsCg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIk2OJ (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:46 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:25 +0200 Subject: [PATCH v2 07/14] arm64: dts: qcom: msm8916-wingtech-wt88047: Add sound and modem MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-7-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 agentk.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (agentk.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:19:38 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740563725587593 X-GMAIL-MSGID: 1778740563725587593 Enable sound and modem for the Xiaomi Redmi 2. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - Audio jack detection via analog codec in PM8916 - WWAN Internet via BAM-DMUX except: - Speaker amplifier is connected to HPH_R (headphones) output of the analog codec. There is a separate analog switch that allows disabling playback via the headphone jack. Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold --- .../boot/dts/qcom/msm8916-wingtech-wt88047.dts | 74 ++++++++++++++++++++++ 1 file changed, 74 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts index 419f35c1fc92..d4b88c787e59 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-wingtech-wt88047.dts @@ -6,6 +6,8 @@ /dts-v1/; #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include @@ -25,6 +27,28 @@ chosen { stdout-path = "serial0"; }; + speaker_amp: audio-amplifier { + compatible = "simple-audio-amplifier"; + enable-gpios = <&tlmm 117 GPIO_ACTIVE_HIGH>; + sound-name-prefix = "Speaker Amp"; + pinctrl-0 = <&speaker_amp_default>; + pinctrl-names = "default"; + }; + + /* + * This seems to be actually an analog switch that either routes audio + * to the headphone jack or nowhere. Given that we need to enable a GPIO + * to get sound on headphones, modelling it as simple-audio-amplifier + * works just fine. + */ + headphones_switch: audio-switch { + compatible = "simple-audio-amplifier"; + enable-gpios = <&tlmm 8 GPIO_ACTIVE_HIGH>; + sound-name-prefix = "Headphones Switch"; + pinctrl-0 = <&headphones_switch_default>; + pinctrl-names = "default"; + }; + flash-led-controller { compatible = "ocs,ocp8110"; enable-gpios = <&tlmm 31 GPIO_ACTIVE_HIGH>; @@ -146,6 +170,18 @@ &blsp_uart2 { status = "okay"; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5100000>; +}; + +&pm8916_codec { + qcom,micbias1-ext-cap; + qcom,micbias-lvl = <2800>; + qcom,mbhc-vthreshold-low = <75 100 120 180 500>; + qcom,mbhc-vthreshold-high = <75 100 120 180 500>; + qcom,hphl-jack-type-normally-open; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -180,6 +216,30 @@ &sdhc_2 { non-removable; }; +&sound { + /* + * Provide widgets/pin-switches to allow enabling speaker and headphones + * separately. Both are routed via the HPH_L/HPH_R pins of the codec. + */ + model = "wt88047"; + widgets = + "Speaker", "Speaker", + "Headphone", "Headphones"; + pin-switches = "Speaker", "Headphones"; + audio-routing = + "Speaker", "Speaker Amp OUTL", + "Speaker", "Speaker Amp OUTR", + "Speaker Amp INL", "HPH_R", + "Speaker Amp INR", "HPH_R", + "Headphones", "Headphones Switch OUTL", + "Headphones", "Headphones Switch OUTR", + "Headphones Switch INL", "HPH_L", + "Headphones Switch INR", "HPH_R", + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2"; + aux-devs = <&speaker_amp>, <&headphones_switch>; +}; + &usb { status = "okay"; extcon = <&usb_id>, <&usb_id>; @@ -226,6 +286,13 @@ gpio_keys_default: gpio-keys-default-state { bias-pull-up; }; + headphones_switch_default: headphones-switch-default-state { + pins = "gpio8"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + imu_default: imu-default-state { pins = "gpio115"; function = "gpio"; @@ -234,6 +301,13 @@ imu_default: imu-default-state { bias-disable; }; + speaker_amp_default: speaker-amp-default-state { + pins = "gpio117"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + touchscreen_default: touchscreen-default-state { touchscreen-pins { pins = "gpio13"; From patchwork Tue Oct 3 13:18:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147871 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2079308vqb; Tue, 3 Oct 2023 06:19:24 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHFU0EO75YQLYDxNADO8/HUGr+VP0e8s7zyA1ayX97ZNy6TRfNohzPVJWjDy+9rOnjyJ2Sj X-Received: by 2002:a05:6a20:5607:b0:157:eb32:e739 with SMTP id ir7-20020a056a20560700b00157eb32e739mr13787803pzc.32.1696339163744; Tue, 03 Oct 2023 06:19:23 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339163; cv=pass; d=google.com; s=arc-20160816; b=tsR02ZsRw3DjPeqjE5nTAE309bsP0Owi0bRvpKpz+CB05/kkoDywFD1yL3+AJev3r5 f28qmJcqlrywSBsfykaT4FCNoLXf+EpA0U+IZPZuD/SSlquXAviMpGwVc2YrtBZiNZ/h dtx+Dld+jfdtSBA80K3ujATfOeJVzaGrvpFvLmx9NBXE+dhtq/BAW51EcSQDS5WxvzoH 5IrRVMPY8UlZUBKRY2uQu6NvRJEGKcjrDNRTWM6r5JtooHoeey5n9drNQmeos55Ua/qF vRHzXzGhDr75f3pGMQsGRo+f9bMs7Dx700csgxqtA19YBtHcJGuf9smI+RWmDfoF4ltX Nn3g== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=V80D4xHlpO7GexIpJNi9sjTtC2eqOZQwsBpEhLVnXdA=; fh=bATs8P+UjPQZO5TdJHtJrQS8Xj/b5KEkByH9kIx4Y/4=; b=MtspVk9eWqu6ttA6zlmoYCSEBstTKWdUVod8qpAMqHXMCRHS7YOQVsNb4h59Mk/qo8 WjOhZz1Hgoqq8PXxqDsMS5acE86D+7iRVjWWdc0JeCGdPb7GdzePPDC6a+T0LAwEm5Eq Bi/DZPdCov/Cudj4HxnuspXPzowiY2Pfk9M/b7BttD+d0t555HnIPoDk55LcYmUDYRqQ ZHUsy38MKCrwroGDFDld60QzKCCZ4F5aUaYnIhrM1PwN5JpGsQr1YgSeAjM1x1aVYglf aDOwWs0CTgctt4cN8CoJCf7tnzK0CndOu2xMQ7GzbchrzHgqaSSOcdak2nhbLgkFBrRH Przg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=ATbsn7AU; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=ZNivYSzt; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id j35-20020a634a63000000b00565335587absi1338821pgl.802.2023.10.03.06.19.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:19:23 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=ATbsn7AU; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=ZNivYSzt; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id AA08C8283A68; Tue, 3 Oct 2023 06:19:22 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236142AbjJCNTR (ORCPT + 17 others); Tue, 3 Oct 2023 09:19:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46190 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235170AbjJCNSx (ORCPT ); Tue, 3 Oct 2023 09:18:53 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 05F99BF; Tue, 3 Oct 2023 06:18:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339127; cv=none; d=strato.com; s=strato-dkim-0002; b=deyQBF1qDu2pB+WCeifvnr3fxdE7k/s7EX/ejVGlu3s8YyOqVe2bDtzgR1B+q2Iggs BV455oysg3m0vOv5v0Wd4FCyjSeD1MARkGVzro43RbAQr8Zf6UUu3uDVZJRDoL9/nSdx ZmP74Rc6dEtUQP07lo3K1r1eouN4MOVuAd5ZYZ+2R/tWWmwxK4HhlOp656n1YOxv27WE hB91feAgaHuv3QBkdwCJTCWAqAgI9ScO9xvkiD0NZH2tXQefHPgkZH5mVIU/Z+jP3QlC xG36YlvyN4e84mC9HbzBENdsHLuda/SA1wVpHOiQjh9ODDI8p4rdbVRrSMy4chtVOenv MVtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339127; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=V80D4xHlpO7GexIpJNi9sjTtC2eqOZQwsBpEhLVnXdA=; b=ZpBuZ+ckmBj0Mo59Ii7EEfyS356gptNaGBpU13KrlK71EUC1SShpZArWGuYuayxez4 RaIPr4ZPG0LrzOl5sHCzkIiZ+b3x8alzoMi7EZSaScFxxJUrvOQ2G+1DsggI6eQWbPmi +nj8X+UIXPidQJkV50O1czrvLzsUjLv/OJaHZHBmiihWVd/CsbLEQRfiEi8SXK5FktJY on+V5vwkhxvwwHY197iaHFVuSCPdif4C+YjxzP2E9LTIDxFm1pv+gBCWFiVKzEyLtzJR aAgYYavuhtFgLWvzK7Y+EeFkAUEMy+BcokGZtaOEwoLb6Oe4KxQOSizth4xbwGR+T4J6 VBnQ== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339127; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=V80D4xHlpO7GexIpJNi9sjTtC2eqOZQwsBpEhLVnXdA=; b=ATbsn7AUMsIQfZAhkJyhSGFmVgCziAecdOqs8nrCV6Uw2Tsjgp3VXmyXdnJx1GmpAC Y14ghcXrBJR5sbLzTrqn2Rp2fuAv8OUkdiOFmpu1C1ch+nw1ZyfprotHXpUqYrcsteZ6 PFyX3SBN8g6T0OAOOSbKy9zgGJSvMj5Qp5Zm4v+Ae2Y/iBJaZe8zU0uc+FaK8f43/nw5 V530PFiNiJnC4Pi5CrO7idbRnOB70Bc77+dAzvUrtcyyKLhhRASVmYDTMsjzzFTbMcHI TuxA9MKmOo0p99h7ibHv6vEl/vHWmMOssItDutjZEfLYg8F3eOyF3beCeuhFavT07l2F R4KA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339127; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=V80D4xHlpO7GexIpJNi9sjTtC2eqOZQwsBpEhLVnXdA=; b=ZNivYSztKdV3G2A8O0/E4qj7yTR6QnV71U0XKyi2fIeuATyD0wf6VVzaWa+2cYzOfq 0uu76QzpQfs5xQ8VhpCQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIl2OK (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:47 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:26 +0200 Subject: [PATCH v2 08/14] arm64: dts: qcom: msm8916-alcatel-idol347: Add sound and modem MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-8-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , Vincent Knecht X-Mailer: b4 0.12.3 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_BLOCKED, SPF_HELO_PASS,SPF_NONE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:19:22 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740535049970737 X-GMAIL-MSGID: 1778740535049970737 From: Vincent Knecht Enable sound and modem for the Alcatel Idol 3 (4.7"). The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except: - Stereo NXP TFA9890 codecs for speakers on Quaternary MI2S - These are also used as earpieces at the top/bottom. - Asahi Kasei AK4375 headphone codec on Secondary MI2S -> Primary MI2S is not used for playback Signed-off-by: Vincent Knecht [Stephan: Minor refactoring, add consistent commit message] Signed-off-by: Stephan Gerhold --- There are some trivial conflicts unless https://lore.kernel.org/linux-arm-msm/20230921-msm8916-rmem-fixups-v1-3-34d2b6e721cf@gerhold.net/ is applied first. But given that there are important fixups for the dynamic reserved memory changes in that series it should preferably get applied before this one anyway. --- .../boot/dts/qcom/msm8916-alcatel-idol347.dts | 171 +++++++++++++++++++++ 1 file changed, 171 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts index fade93c55299..3459145516a1 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-alcatel-idol347.dts @@ -3,6 +3,8 @@ /dts-v1/; #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include @@ -22,6 +24,19 @@ chosen { stdout-path = "serial0"; }; + reserved-memory { + /delete-node/ reserved@86680000; + /delete-node/ rmtfs@86700000; + + rmtfs: rmtfs@86680000 { + compatible = "qcom,rmtfs-mem"; + reg = <0x0 0x86680000 0x0 0x160000>; + no-map; + + qcom,client-id = <1>; + }; + }; + gpio-keys { compatible = "gpio-keys"; @@ -50,6 +65,17 @@ led-0 { }; }; + reg_headphones_avdd: regulator-headphones-avdd { + compatible = "regulator-fixed"; + regulator-name = "headphones_avdd"; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + gpio = <&tlmm 121 GPIO_ACTIVE_HIGH>; + enable-active-high; + pinctrl-0 = <&headphones_avdd_default>; + pinctrl-names = "default"; + }; + usb_id: usb-id { compatible = "linux,extcon-usb-gpio"; id-gpios = <&tlmm 69 GPIO_ACTIVE_HIGH>; @@ -58,6 +84,43 @@ usb_id: usb-id { }; }; +&blsp_i2c3 { + status = "okay"; + + headphones: audio-codec@10 { + compatible = "asahi-kasei,ak4375"; + reg = <0x10>; + avdd-supply = <®_headphones_avdd>; + tvdd-supply = <&pm8916_l6>; + pdn-gpios = <&tlmm 114 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&headphones_pdn_default>; + pinctrl-names = "default"; + #sound-dai-cells = <0>; + }; + + speaker_codec_top: audio-codec@34 { + compatible = "nxp,tfa9897"; + reg = <0x34>; + vddd-supply = <&pm8916_l6>; + rcv-gpios = <&tlmm 50 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&speaker_top_default>; + pinctrl-names = "default"; + sound-name-prefix = "Speaker Top"; + #sound-dai-cells = <0>; + }; + + speaker_codec_bottom: audio-codec@36 { + compatible = "nxp,tfa9897"; + reg = <0x36>; + vddd-supply = <&pm8916_l6>; + rcv-gpios = <&tlmm 111 GPIO_ACTIVE_HIGH>; + pinctrl-0 = <&speaker_bottom_default>; + pinctrl-names = "default"; + sound-name-prefix = "Speaker Bottom"; + #sound-dai-cells = <0>; + }; +}; + &blsp_i2c4 { status = "okay"; @@ -153,6 +216,18 @@ &blsp_uart2 { status = "okay"; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5000000>; +}; + +&pm8916_codec { + qcom,micbias1-ext-cap; + qcom,micbias-lvl = <2800>; + qcom,mbhc-vthreshold-low = <75 100 120 180 500>; + qcom,mbhc-vthreshold-high = <75 100 120 180 500>; + qcom,hphl-jack-type-normally-open; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -169,6 +244,17 @@ &pm8916_vib { status = "okay"; }; +&q6afedai { + dai@18 { + reg = ; + qcom,sd-lines = <0>; + }; + dai@22 { + reg = ; + qcom,sd-lines = <0>; + }; +}; + &sdhc_1 { status = "okay"; }; @@ -183,6 +269,54 @@ &sdhc_2 { cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; }; +&sound { + /* Add pin switches for speakers to allow disabling them individually */ + model = "alcatel-idol3"; + widgets = + "Speaker", "Speaker Top", + "Speaker", "Speaker Bottom"; + pin-switches = "Speaker Top", "Speaker Bottom"; + audio-routing = + "Speaker Top", "Speaker Top OUT", + "Speaker Bottom", "Speaker Bottom OUT", + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; + + pinctrl-0 = <&cdc_pdm_default &pri_mi2s_default &pri_mi2s_ws_default &sec_mi2s_default>; + pinctrl-1 = <&cdc_pdm_sleep &pri_mi2s_sleep &pri_mi2s_ws_sleep &sec_mi2s_sleep>; + pinctrl-names = "default", "sleep"; + + sound_link_backend2: backend2-dai-link { + link-name = "Quaternary MI2S"; + + cpu { + sound-dai = <&q6afedai QUATERNARY_MI2S_RX>; + }; + platform { + sound-dai = <&q6routing>; + }; + codec { + sound-dai = <&speaker_codec_top>, <&speaker_codec_bottom>; + }; + }; +}; + +&sound_link_backend0 { + /* Primary MI2S is not used, replace with Secondary MI2S for headphones */ + link-name = "Secondary MI2S"; + + cpu { + sound-dai = <&q6afedai SECONDARY_MI2S_RX>; + }; + platform { + sound-dai = <&q6routing>; + }; + codec { + sound-dai = <&headphones>; + }; +}; + &usb { status = "okay"; extcon = <&usb_id>, <&usb_id>; @@ -212,6 +346,15 @@ &wcnss_mem { status = "okay"; }; +/* Only some of the pins are used */ +&pri_mi2s_default { + pins = "gpio113", "gpio115"; +}; + +&pri_mi2s_sleep { + pins = "gpio113", "gpio115"; +}; + &tlmm { accel_int_default: accel-int-default-state { pins = "gpio31"; @@ -245,6 +388,20 @@ gyro_int_default: gyro-int-default-state { bias-disable; }; + headphones_avdd_default: headphones-avdd-default-state { + pins = "gpio121"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + headphones_pdn_default: headphones-pdn-default-state { + pins = "gpio114"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + /* * The OEM wired an additional GPIO to be asserted so that * the si-en,sn3190 LED IC works. Since this GPIO is not @@ -291,6 +448,20 @@ sdc2_cd_default: sdc2-cd-default-state { bias-disable; }; + speaker_bottom_default: speaker-bottom-default-state { + pins = "gpio111"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + + speaker_top_default: speaker-top-default-state { + pins = "gpio50"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + ts_int_reset_default: ts-int-reset-default-state { pins = "gpio13", "gpio100"; function = "gpio"; From patchwork Tue Oct 3 13:18:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147873 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2079463vqb; Tue, 3 Oct 2023 06:19:36 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHuCSgHPNsNxmz7oE8f3p2V84j0zOtl6/QYj1uQlURAAn/1IPXqvmwzArFAv2QA9B8ng7XI X-Received: by 2002:a92:dac3:0:b0:352:a19c:a581 with SMTP id o3-20020a92dac3000000b00352a19ca581mr806031ilq.13.1696339176062; Tue, 03 Oct 2023 06:19:36 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339176; cv=pass; d=google.com; s=arc-20160816; b=iqa3tb14zVwIaVHAfvbJ+sQvHsucNOPVU/GvAhpWi1eSj6P+oKv4b4xJRjJ7nPT8A5 7Se4uqQ2BVZ7cT6QrGSmVYVmzF006wKz0v8oVc0Z8qi6+naS6SqOO9y0sb3uDGK7BjPl wIOpgLVGPWWsdllO0MPsVhXASkX6yFIZSJlKOC0k0o4RA8HG3LfQsQ1lWrQwdDztZFX0 /WZcCYOouRI3De7ehRj8M6/S+5qJNAFB8rJe9uTvKpRpx2Y65SyvRGRuO5ypT0wdVGTk oN4SjsqLp2ZBqDS7syBSeAqAvCrEZC+deXSut/+N7X3RXSuLmlSosaomYZXpD/OSyQp0 j5TA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=fl2zPeMOpvqp5YiTJDF1poGBKcAKVmQvhzP6pe1xmJc=; fh=WHt7jQ1L0JXcGsxNyp6bhBbD8oKKwF5cPMxiHEFp3hk=; b=JcYO6xj/1iu+n5HQMt/4/Wy+F3FpJ8xGA0E+qTA6bmj7dLBCN4CSFuWMO3Havqd1+j XlWNJSvaZm9LxqXyx78HT21s6BrH82Ct40j2uyqjlQW7dTluuvtx9Lri5wWV+kJaueqX Nt1+eqO2Js+/NDol1qySHN/RYlqtAZg2PDIwV99nXFU62PL32qnghYYZoH72iNuZqVEH HaFlh6JmfVrb41FKH5xQKLJHXpD3zzE4TQkhq+1kyLX4TxeUe8f3VcNmE79MIR/eKpdo 2QRkmiUlhkqb4iOqZlQLTl+yxaNjnb9NZTuEvTzqNy0y3lgNFZzE1YpbCbdNm3pvedT8 sGEg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=CUVMA85I; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id n21-20020a634d55000000b00578fc70f905si1424161pgl.315.2023.10.03.06.19.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:19:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=CUVMA85I; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id F0840828E8FC; Tue, 3 Oct 2023 06:19:34 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236100AbjJCNTa (ORCPT + 17 others); Tue, 3 Oct 2023 09:19:30 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46230 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235380AbjJCNSy (ORCPT ); Tue, 3 Oct 2023 09:18:54 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id CB8A0D7; Tue, 3 Oct 2023 06:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339127; cv=none; d=strato.com; s=strato-dkim-0002; b=m9nBnBQlIjsjlTOXU5RINHos6/J7VNn7Dm4f4VEVZE4JCtbqzxoTgLUi9/7CZNy9P2 pKP7GielkEBg3LdVYn3y6p/0hqwhl2DxanhWWSDqu1b9otfB+gaSSvibzH3Zcd/tXUTe zMmHS8IDvhUZxhD9rxxElhokrV1Euo416zT6xb4I6Q5H9l2fAAVxlhJ64UYeZA8O1a9P J7B3kNoFkfVYlh1pNOHID85uE3zEXWnaVbaaJ9BaIWSkxlznKvco1swEi7wYz2PKKA3e VTFlWp3PKFiqxhGxPy0x08ueYwUstfHI8o+kODdmu30PY5KQZ0gGwCq8lnNO0D91FYQO qOjA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339127; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=fl2zPeMOpvqp5YiTJDF1poGBKcAKVmQvhzP6pe1xmJc=; b=nZxeR8dZCAD+H9mHntgb56ZPxulUxcn5CmI0uSwVYL92kXbV4yhUL2o3E3nIAmIR1z cbvKDsfrfIwQsnzAz+/qOtB+fdP45oox0EwZouxPEacOZgnFX3LNl7fyFa5Fci7mRUxN vmQpawYmWrFedLwqhO9bTDZ5ZwHQkaIt9GnLrhYbfMVm/XScJS10qEeXfYqoK3OaiA1W mnliF5osbXAYV4Kjm0VKlIrf5pZKBQGxEKfTI1v1stSSp4HE4yfyD1/EDd/TLMCGjHpd XOrliFSaQsUq825mDgm47uXONX/adYxg5WtTE7VznKY4EdUvqH4pMLxcPk6xK8mWDIjs DOPg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339127; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=fl2zPeMOpvqp5YiTJDF1poGBKcAKVmQvhzP6pe1xmJc=; b=CUVMA85IO5/nB8jEayAhcWrW3OLaax6qW/gjNM6Pq/SY8Cg4fO2ZP3jBA/ytuDS949 2XiN23tzagy2gFRc/Y1Yl1Dw2+gdSd0d3YiUmavlmfCbIfn7iMLXJJajMMDd6laoJ1V6 YTRdjesm7ZbXqpgqVLB3KQZjf33jPZgLsfmgcU1KhtN3kT1rVXteKYf+X0orw9z49U0c YTLv7jaEZuOjT1zilKuUiFm79jqyMghd+RitHH+0qcGpukEHRHwpYK1l6EOu0JLeji4D L3aZ82pVyxdgUQlCIu8K7sxMwG9GjsnxWGrV6qVNtb7SiEYVgRLfU8IkIsGul3u4YrDf oxaA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339127; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=fl2zPeMOpvqp5YiTJDF1poGBKcAKVmQvhzP6pe1xmJc=; b=zCq0ZrWN2+ZjnyBSKSOrGk6GNSRYR2VLQIHMgGx6tzFQCW1EVFW49Ang05NK2oed0I rGKunBXb3KK9M/7nOuBg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIl2OL (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:47 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:27 +0200 Subject: [PATCH v2 09/14] arm64: dts: qcom: msm8916-asus-z00l: Add sound and modem MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-9-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , "J.R. Divya Antony" X-Mailer: b4 0.12.3 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_BLOCKED, SPF_HELO_PASS,SPF_NONE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:19:35 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740547960336833 X-GMAIL-MSGID: 1778740547960336833 From: "J.R. Divya Antony" Enable sound and modem for the ASUS Zenfone 2 Laser. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speakear/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - Audio jack detection via analog codec in PM8916 - WWAN Internet via BAM-DMUX Signed-off-by: "J.R. Divya Antony" [Stephan: rebase and simplify, add consistent commit message] Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts index a8be6ff66893..77618c7374df 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-asus-z00l.dts @@ -3,6 +3,8 @@ /dts-v1/; #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include @@ -130,6 +132,18 @@ &blsp_uart2 { status = "okay"; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5500000>; +}; + +&pm8916_codec { + qcom,micbias-lvl = <2800>; + qcom,mbhc-vthreshold-low = <75 150 237 450 500>; + qcom,mbhc-vthreshold-high = <75 150 237 450 500>; + qcom,micbias1-ext-cap; + qcom,hphl-jack-type-normally-open; +}; + &pm8916_rpm_regulators { pm8916_l17: l17 { regulator-min-microvolt = <2850000>; @@ -151,6 +165,13 @@ &sdhc_2 { cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; }; +&sound { + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; +}; + &usb { status = "okay"; extcon = <&usb_id>, <&usb_id>; From patchwork Tue Oct 3 13:18:28 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147875 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2079650vqb; Tue, 3 Oct 2023 06:19:50 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHaR7n1YgbpNEy2vfbkgkMrSy/PsJD+pJwdeYah4xMjiORyZa6odQIVAVMFeD8bejlIZYxk X-Received: by 2002:a05:6870:f584:b0:1bb:c50d:7437 with SMTP id eh4-20020a056870f58400b001bbc50d7437mr15433235oab.53.1696339189949; Tue, 03 Oct 2023 06:19:49 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339189; cv=pass; d=google.com; s=arc-20160816; b=oAiVjT73VHGfJWP7FpXe4nGtm+PC6qlpzns4t1kU1nk8SfJFX21dhy9h18wpwApema uq+TZWTedVM7Vn1cECvFuWg+3cSUmJStoRhJ0OvQlGZ5KQfdKbBcBzt9DBd7iZmhPF/8 EgfLnj2A87Eco3pj0NX0+J+BV0sZgGCESIDGDxBw3rKhjcdrHzPkPhCaTF1qrT7KNfO5 iPpJx5obWC+DhVgERIJoNOjUpr6drQL0vfxwKZza1T5tDKwOcZqI0pjNiB2Xfn+8Crwe Wk7bbtHd6iI9Jj0DZfw+2eFwbomtLKy9C5+cgt4XR66BKKM/JoPszrJDCg+5OOb9UwRz XzNQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=5bjXhesMmGj3qm6NxqLDNr7lzDiYOW8cVTbalWvbuQc=; fh=UCC5LSho6eyBkDdWxipgYMJEVTa+hbuVGif/g5oA+zM=; b=MKceQQ9ErSCt3O0KyH7tCj6qwDZzPWbdxrvyCz7XzyxHyRbzI+bqL7cNaHnXWpjWVI PefjrI4bAGw//jc6XHfIFVYj1uMhh9BC/HgdBZSNL5QTn+H2vziSsN549w+LY5c5ciU0 gFmLkLKQXzSWxA5hlai4kmfDLSFmT3vUFugnbeCHNryaLmtqD2gbDN0n17XG0Yzd5Y0W v2RnAQfjtpPG2LUlnkjrjx6NSQU4l4CAWa8E/5zPfKcxx8CQ7sVlnyQwy8YysreR9YAT BSvMm7qEYmyyQN+TwhdxjNtcXcuHGQBcmIaY9mXk+NdmXPCIIIN6vltHhdrYvXjClZNk YHAg== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=SatUV8jM; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=jNGWsy1w; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id n1-20020a632701000000b0056569ee3ae6si1423930pgn.798.2023.10.03.06.19.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:19:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=SatUV8jM; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003 header.b=jNGWsy1w; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id B73D98145948; Tue, 3 Oct 2023 06:19:36 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235838AbjJCNTN (ORCPT + 17 others); Tue, 3 Oct 2023 09:19:13 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46182 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235144AbjJCNSx (ORCPT ); Tue, 3 Oct 2023 09:18:53 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.103]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 97968C9; Tue, 3 Oct 2023 06:18:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339128; cv=none; d=strato.com; s=strato-dkim-0002; b=TD1KFakuRZxiSGXYRwMy++LKN5m/TwQVAup1OshHdXHDHjZlulOS5gp6mjEYMcRYIo nNWCXtOmU8pcGLFarvpIWth361Wx27APwN7cmCty2bVyvihAUgR5W8/P68yHwMfTpvr4 F/U/8m4Fjeroj2R6nbwpv02x3JygRbxDoRi0gWvfWuaEwgQjjGDoT9Q1Zck+/ydTMmdP 2AMfUcm5bxRVSS2TvqSRRq/Sa8nPkEUStf/V4nracW81aCFK80pabPQB2tZaxJz0eBZb UDEKt8W4iqT8JROJEtrVBCSYD5AjbisONNsoBablUI9XRVKyHQc62axx8cLlI3V8x62D 05og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339128; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=5bjXhesMmGj3qm6NxqLDNr7lzDiYOW8cVTbalWvbuQc=; b=a240hws91gaaA/tI9/tPi0xK9GYMCzuSrHS1EKOe3khoCifItn3V34cehYNmtd6/ZV gH1Q5QMJoXcAL/Mc3rFTLlQbGtJusry40dwtOVHPgkyh/9fxj/ILYvdtwzE4SRbwC1Vw XHJJq8dUxUbZq9OqBSPpbTEBdBI37fS3K/8fSA+Me2SXwIrRJFX3p/weqUr0WFpXdJ5N iKKuaIbJs7X+CfaJf8/L5Az5JzHTK0PTgHsUnLjkm2yluYdxQ8lCSvoE3XiSfzHdglMS 51GPDPo38WqWsBAlgoUXoqV0haDEYup/u3szRFo+O2ZebsRULZ0oyvwUN0BsvyVfHRvs sNvA== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339128; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=5bjXhesMmGj3qm6NxqLDNr7lzDiYOW8cVTbalWvbuQc=; b=SatUV8jMwzJWRYy+QYQz5EDs3Od8DmThzcd2f2wNyf9lLJkIyHni/IdnztjCSo8PRW P0F4WSty6g4MFDM6IC2Dfz1/FIIYxA+FOFHB/ALJ5q31m0eURlRsbNAr6IngvlJUsDVx 1KD05E/DWA9GGxHCQr1kpXFWH7hwJBU7UpiBfGRld8LA3RhG2RSB0N2DXCUBCUQ9lSkD YGcLGSw65CSqRTDBXPMTv2ZGy8Nq5s1kvVB2yn++bJh3RKcW6VREl66OejMB4wDaukIu MWnwkfgkbD0AXU+daW0xheaYLUOdB9lVLsHIlg2wXgAiFBkskJhQ8R5glUD5LjtKieXH 3wLw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339128; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=5bjXhesMmGj3qm6NxqLDNr7lzDiYOW8cVTbalWvbuQc=; b=jNGWsy1w0WWdM5V5n0Xblcc4uRuG988okfqOTbx1E7gMttEmqudKafIP7LMbZ7Cqu4 ga5oJo2NSGvt7yV7gHCw== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIl2OM (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:47 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:28 +0200 Subject: [PATCH v2 10/14] arm64: dts: qcom: msm8916-longcheer-l8150: Add sound and modem MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-10-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , Nikita Travkin X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:19:36 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740562347488458 X-GMAIL-MSGID: 1778740562347488458 From: Nikita Travkin Enable sound and modem for the Longcheer L8150 (e.g. Wileyfox Swift). The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speaker/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - Audio jack detection via analog codec in PM8916 - WWAN Internet via BAM-DMUX except: - The mpss firmware region must be relocated to a different address. This is because the wcnss firmware is not relocatable for some reason. The mpss firmware is too large to avoid overlap with wcnss when placed at the default address (0x86800000). Surprisingly the vendor kernel does not handle this. The firmware regions end up overlapping there and somehow this does not explode. We try to handle this more safely by relocating the mpss region to the first higher address that is working correctly: 0x8e800000. Signed-off-by: Nikita Travkin Co-developed-by: Stephan Gerhold Signed-off-by: Stephan Gerhold --- .../boot/dts/qcom/msm8916-longcheer-l8150.dts | 31 +++++++++++++++++++--- 1 file changed, 28 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts index 47d1c5cb13f4..37fa55166918 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8150.dts @@ -3,6 +3,8 @@ /dts-v1/; #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include @@ -25,17 +27,26 @@ chosen { /* * For some reason, the signed wcnss firmware is not relocatable. - * It must be loaded at 0x8b600000. All other firmware is relocatable, - * so place wcnss at the fixed address and then all other firmware - * regions will be automatically allocated at a fitting place. + * It must be loaded at 0x8b600000. Unfortunately, this also means that + * mpss_mem does not fit when loaded to the typical address at 0x86800000. + * + * Load wcnss_mem to the fixed address and relocate mpss_mem to the next + * working higher address. For some reason the modem firmware does not + * boot when placed at 0x8a800000 to 0x8e800000. */ reserved-memory { + /delete-node/ mpss@86800000; /delete-node/ wcnss; wcnss_mem: wcnss@8b600000 { reg = <0x0 0x8b600000 0x0 0x600000>; no-map; }; + + mpss_mem: mpss@8e800000 { + reg = <0x0 0x8e800000 0x0 0x5000000>; + no-map; + }; }; gpio-keys { @@ -225,6 +236,13 @@ &blsp_uart2 { status = "okay"; }; +&pm8916_codec { + qcom,micbias-lvl = <2800>; + qcom,mbhc-vthreshold-low = <75 150 237 450 500>; + qcom,mbhc-vthreshold-high = <75 150 237 450 500>; + qcom,hphl-jack-type-normally-open; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -254,6 +272,13 @@ &sdhc_2 { non-removable; }; +&sound { + audio-routing = + "AMIC1", "MIC BIAS Internal1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS Internal3"; +}; + &usb { status = "okay"; dr_mode = "peripheral"; From patchwork Tue Oct 3 13:18:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147882 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2081031vqb; Tue, 3 Oct 2023 06:21:47 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHh7IBGQhmxQyI7iViqkWjgsYiRRQgBDiesk/O4gr7bjvbJO2S/UsJLBUlBa7ZroI5GvGxd X-Received: by 2002:a05:6871:5ca:b0:1d6:7449:e0dc with SMTP id v10-20020a05687105ca00b001d67449e0dcmr14832604oan.20.1696339307537; Tue, 03 Oct 2023 06:21:47 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339307; cv=pass; d=google.com; s=arc-20160816; b=yd/9uSZLnYFrGZ6zYjnp59V0t+O2/HMqOpU6ZI8Ihrts62PTIhV2WfAwO4zUAY5GPQ vz9b9Y/OJlGUZPkfppds8KEsZ/aisoEgzoiAi09Y6v811ffSm2a2B2TRYYwDnnDEV+zB KiGUUr3ECrFAziMAQFqaKk//2lgJ+e5bVV3/p9RnfneIBUyIYPVncn9KwfKQXFuHHTse 8o7z9mxYXEgog24XkGzHZuuRui/5PmQ2SNUh8vSpkyQwd0G0fDzTVPbAtb3t/XDfuYAB Xji7oQFtOqjcT6DCLOcUdARlgABwk218TFoLA5pS71BtKrdBuvXzohGejxYMAKcQ2B+5 muEg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=Ii17T7VAoR8+UlL8LnMJpVNUDvOUl5el80hXLnYIkJo=; fh=MmsYe5+0QpGRUq/V3MzrdnTzAUK0lT43VcEiSDD72oM=; b=PT4ThM7eVB54oS3MArTFE3iMy7gFeBmymP+t6h02ksGdWhJaBDECSr+a1CmWFWc9v6 jNMxbHrSuNudihQrHqwUtfCoUEI+HbkU59HyBoiRqImthEfTlAyEnMNA/VZL8dShNLic gv++qVCze+1d/vMP7QBM8sJV7fn2UWm0JC62ZS+ciA9gvlhvqH4xpO/XROIkbkP/TSoJ +HZM9Cf6VY9CqiocqOvJ39FUbl+e3BsJeu2xDwLOIm6ORpdaC8NnwrKSHPATG0yIT5W+ AR8w4xAtQU8SQiQdL2yneUfJMBaSPMmCzvbxjcPkLTmIV+XfS/+gr8IxGjfe8gkpKgtD 8y/Q== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=jT9t3bAZ; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from pete.vger.email (pete.vger.email. [2620:137:e000::3:6]) by mx.google.com with ESMTPS id bv128-20020a632e86000000b0056c4189d6cbsi1466381pgb.171.2023.10.03.06.21.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:21:47 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) client-ip=2620:137:e000::3:6; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=jT9t3bAZ; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:6 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by pete.vger.email (Postfix) with ESMTP id 10A38802FD63; Tue, 3 Oct 2023 06:21:35 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at pete.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S236352AbjJCNTV (ORCPT + 17 others); Tue, 3 Oct 2023 09:19:21 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46216 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235376AbjJCNSy (ORCPT ); Tue, 3 Oct 2023 09:18:54 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.102]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 844F6A3; Tue, 3 Oct 2023 06:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339128; cv=none; d=strato.com; s=strato-dkim-0002; b=sz9sAkCK8nYQM08RmK+Niu0nJ96gXHB4dcHE7dOH1tgAQQmQahK0C4qw450TSd+YXn OVAtib9CITCBZXjUkjWKbfhKogzDbWkhH0f7oIkm8GQWXayGE18e8p2GdAmgx5NSOUR9 cNf4JjvsdPtHEpmMYbHsVnZm1nQjbIm51PVJ7tE/EXomPNkNyN9s0EM+Sq5NuLJAfgQ6 aOAMFZu0YimOtaaef57T+lCpGBgA8QJ8fFQWvHEE/ADlvl4SiMx0lVbxDkgfLAmGRBvl gXBaqcq9kJL9oqscBGSZ+mFv9lQPDmKsDl+AEfmfp7bxL+NVdDrsekU5TdvfFNj2zO3A 7tvQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339128; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Ii17T7VAoR8+UlL8LnMJpVNUDvOUl5el80hXLnYIkJo=; b=n33Db94ywl7q0QOxk9RuBpvzP0ErDHw+X1mkcGQDZ8g4z+iBftMiQQtVeRkjgvZUZd cyAB95mDA0qjk6uvMm9XGlSlh8zraT1FZRTzhsGfwoqA6fYhZJ3b9rG/IWWJ9Pv6YyFj xgqBtuFSD90jJOlsYpgtkIdd/Lxh98P64zXbIMQjkKUxce6DPPlwtCiKqUKERNV4b6m5 n59W8kLUWLIMoPy+rF1aR606J4Skp1z1VM+XXY7vvJKxsFV4i2XbkmO9MgADi5ru8JpT Ng90G+8WO1V2Vk8uRvqyeDr6+vAyRZqD8M9ZBXMqmfMV2LsukuzCfZmdZE8eE/5KwfZN Sjuw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339128; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Ii17T7VAoR8+UlL8LnMJpVNUDvOUl5el80hXLnYIkJo=; b=jT9t3bAZE2QwYwGkFuOj+LzsQKPjVaK6gKO1iar8yikAlW7zHRC7Ad6/rdqODbwVeN io4NcpB04oYMW/Mcm0ZKyRNfZKH1MgpzhPuHApVVR9XojThYVSyfSVz0uaT5+3F6Qdyh L8L8vfeNxsFtBsL5/ks0Sma7rJvHITCoXSZylW1qu5AOLqyoP+cvuhvjoDRu1Itz2Jh7 wVJdc4WrqVsFdLEUp1XjbW6uCcDVeO+/Npe8ggAfQ8hqvQX+LgB6YH2jGOHNjBUOkpFm 3VehuW6LDCP6qEsQA0/VS5nuqn92I06+ZfYihVzVS2qQ+FhRBLR40N3MCFDo9p89c4x4 9xgg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339128; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Ii17T7VAoR8+UlL8LnMJpVNUDvOUl5el80hXLnYIkJo=; b=1AL1PwhzDlQEgjQnEhg9f6KfmcMyaS2vsWoz1Se02CpydRblR6Qka2UXpdzthnjMK5 chEX3takA9dtJ+mNG7CQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIm2ON (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:48 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:29 +0200 Subject: [PATCH v2 11/14] arm64: dts: qcom: msm8916-longcheer-l8910: Add sound and modem MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-11-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , Jonathan Albrieux X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 pete.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (pete.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:21:35 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740685314951625 X-GMAIL-MSGID: 1778740685314951625 From: Jonathan Albrieux Enable sound and modem for the Longcheer L8910 (BQ Aquaris X5). The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - Audio jack detection via analog codec in PM8916 - WWAN Internet via BAM-DMUX except: - Awinic AW8738 connected to HPH_R (headphones) output of the analog codec. Note that unlike for wingtech-wt88047 there is no analog switch that would allow disabling output via the headphone jack when the speaker is enabled. Signed-off-by: Jonathan Albrieux Co-developed-by: Stephan Gerhold Reviewed-by: Konrad Dybcio Signed-off-by: Stephan Gerhold --- .../boot/dts/qcom/msm8916-longcheer-l8910.dts | 52 ++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts index 41cadb906b98..e64bf687ca7d 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-longcheer-l8910.dts @@ -3,6 +3,8 @@ /dts-v1/; #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include @@ -22,6 +24,16 @@ chosen { stdout-path = "serial0"; }; + speaker_amp: audio-amplifier { + compatible = "awinic,aw8738"; + mode-gpios = <&tlmm 114 GPIO_ACTIVE_HIGH>; + awinic,mode = <5>; + sound-name-prefix = "Speaker Amp"; + + pinctrl-0 = <&spk_ext_pa_default>; + pinctrl-names = "default"; + }; + flash-led-controller { compatible = "ocs,ocp8110"; enable-gpios = <&tlmm 49 GPIO_ACTIVE_HIGH>; @@ -107,6 +119,17 @@ &blsp_uart2 { status = "okay"; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5000000>; +}; + +&pm8916_codec { + qcom,micbias-lvl = <2800>; + qcom,mbhc-vthreshold-low = <75 100 120 180 500>; + qcom,mbhc-vthreshold-high = <75 100 120 180 500>; + qcom,hphl-jack-type-normally-open; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -137,6 +160,28 @@ &sdhc_2 { cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; }; +&sound { + /* + * Provide widgets/pin-switches to allow enabling speaker separately. + * The hardware does not provide a way to disable the output via the + * headphone jack when the speaker is enabled. + */ + model = "bq-paella"; + widgets = + "Speaker", "Speaker", + "Headphone", "Headphones"; + pin-switches = "Speaker"; + audio-routing = + "Speaker", "Speaker Amp OUT", + "Speaker Amp IN", "HPH_R", + "Headphones", "HPH_L", + "Headphones", "HPH_R", + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; + aux-devs = <&speaker_amp>; +}; + &usb { status = "okay"; extcon = <&usb_id>, <&usb_id>; @@ -205,6 +250,13 @@ sdc2_cd_default: sdc2-cd-default-state { bias-disable; }; + spk_ext_pa_default: spk-ext-pa-default-state { + pins = "gpio114"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + usb_id_default: usb-id-default-state { pins = "gpio110"; function = "gpio"; From patchwork Tue Oct 3 13:18:30 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147874 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2079587vqb; Tue, 3 Oct 2023 06:19:44 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGouewl/OFaeqvUMR/dFl7FZ7oLxv0MxNvblBu06Ni5kENIzV8sYwi3c4LPYvJ1jvaIH5NS X-Received: by 2002:a17:902:6bc9:b0:1c3:83e2:d0a9 with SMTP id m9-20020a1709026bc900b001c383e2d0a9mr11092589plt.58.1696339184425; Tue, 03 Oct 2023 06:19:44 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339184; cv=pass; d=google.com; s=arc-20160816; b=iOaFCrFGRSf+wA8+v4/OmWI0VBSEESNlNvkUbUB4lBBqpKgOmnjQdw2akUy/nMsbkN 6pJJQ7vo0xlm9Gkk568A/by7Gdpqt3WS53M2w7O2A4DJwXUys1xIeK1tO8TN8KmXeWPy ZJkkFSZcyvfx9eYc7sOlFf0PL/9jJCe8Yn1VowkWXv8jLSRVjkjMKE/qXmE0rO0H+VZ6 hHS2TNOq5Drs1er/XHhRMqKz/O8ryt68dIO6MK/lhf5d5HJDoQBZdtygm0gbavRI0IPs 9H1CcPT9j7TAr/rX4V1+e/Ni3uCTw5cHbpw85pjjyoJrCtesIo/gCXn+g2zz3Lw1EM37 q2pA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=ABcr19tRNPJA9WwA6xu4YglVdNWC2sFiJ/DvAai4lIo=; fh=HlfUTu9Qv7G7HZbUEsyZZDvxDfG4bnbF4I4aLC27ZN4=; b=e464xaFws+PapeIv/Y4Nd6UO7kbVgL/JLiKsColbMFZ6xR5FevS4hbcNDsZp/RYbtC vmVaNkDq5UUP3O9IQTOKa9jGBnpQluHtd/c6ps2fcMKwVfw8zBo1rjs5dauIAcuglnxO vD+IeFBwrS+bRvr/gGs7SUleYllWChg09qc6yQELvLInhvOoIeIUAE4O1ovXCCkMr8GQ qs88thf3B+jHHxsinYIZsvyKdQ8iwEt6lTcouL2O5IK7kogDmy9y9IAHCTKjsFzyRevz pvi/2YcGneeRqxAcamORbtrnhNY5HBXmxLf7LQyrv9dlHT246yC6ayD51oRWRzpuTpZf MehA== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=mtGigz86; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from howler.vger.email (howler.vger.email. [23.128.96.34]) by mx.google.com with ESMTPS id d5-20020a170902654500b001c5c632aea4si1381656pln.217.2023.10.03.06.19.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:19:44 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) client-ip=23.128.96.34; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=mtGigz86; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.34 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 6B232828F4ED; Tue, 3 Oct 2023 06:19:43 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237689AbjJCNTc (ORCPT + 17 others); Tue, 3 Oct 2023 09:19:32 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:34994 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235625AbjJCNS7 (ORCPT ); Tue, 3 Oct 2023 09:18:59 -0400 Received: from mo4-p03-ob.smtp.rzone.de (mo4-p03-ob.smtp.rzone.de [85.215.255.104]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 8D8D8D3; Tue, 3 Oct 2023 06:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339128; cv=none; d=strato.com; s=strato-dkim-0002; b=sBTOCYL0l7xpzClqzSaMp1yAB+TbcIG0/h+JA1rplR1ec06wItNwxweMhv8iR8CCSW 8ubxVOrPS44ovxVBBGV8QqHhfrG+ntjnDzd8LbrDNJzrbgvEmKm5kdQdnmf5J1tj+ZvA WJGudu03eOChKkhboox6R7KZzB3BSNB/N/aniSUIjj4RCRRw9VFeFjMZG2BGlNGLJjZx 55DwQD/JksF79TBsJOCYB1mwtIlxAFAqcbpAaq1WGWrwC3N8yCtJc2+TFkowHY5hXfNv SMEe7110tvV2j3Hx8yL6NDjAMKYeDtwV1b+M23fYzOHE/wTy1HV89ffr8S9DzC6UfXw7 iQaA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339128; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=ABcr19tRNPJA9WwA6xu4YglVdNWC2sFiJ/DvAai4lIo=; b=n+5mtP/7v2dRfGdBn8FC2cQEDqZz4nUXdZP8O654BJCrtbaUrRouH54pq+F6Pa+cYD 32f2ac0KAfmyRm5Y/hvxCVcDqwKT//49ZwHK1D9lDC3bMp3GzCXTpfYaAEtdszAYvuRj LKsanQSFDxSr+IxI2NoHhmK3LLcDbQUgj4P1/siUW2gSNNWREe3NHIo1hnkYLZIgm0BK AR6vaKU9L1TtwqpMJApzauyb2zN9soGYOGYuCds/596vWfIJDMisLYC1g7ZE94wCbMIO GLXrU1rViq/I7lUzHpkeC41/QxV9ahLjf4wP3lvb0mK2Mekk/ATR7yUkJv/7yzSqrOMA pdAg== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo03 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339128; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=ABcr19tRNPJA9WwA6xu4YglVdNWC2sFiJ/DvAai4lIo=; b=mtGigz86apnLDj4Aef2RFkKeMYEQ4Fj06SefhLGT8Mjc9F+Pd+TGxdNGqDhBCARhEA ke+fm003Xb6as6voEbHMBN5/LsG8e7x1KmQyCWa+YxqygUDUPMP/JmEMOuzgnAxH1oJS baXA+edN4EGbQg5w7pvBAs90gqMyrOAP238dHYRTXsgTyur/n+/XlZVUUs6IplXMTymi G3rFarBl3Ba8qWBiU8E8DuQgELKIJ8a8hRfxHWzNY1iqBoliwIR1SZ53KYPDkgmCicgA dwlbPJMGRiI/QVfD22X5pYhp+ukAJPPkL4mTjQ2UcEdXqmD50LPN4e5tdVzx1ygaIv+3 JMxA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339128; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=ABcr19tRNPJA9WwA6xu4YglVdNWC2sFiJ/DvAai4lIo=; b=0rBD6xGGMzYpccoyDhR5F3E2OKkHPicRep76JrYZNxJE09AEt7xPEWwEbMgYxtlCVH pgcSghTHcwohbkBWCXDg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIm2OO (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:48 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:30 +0200 Subject: [PATCH v2 12/14] arm64: dts: qcom: msm8916-samsung-gt5: Add sound and modem MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-12-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , Jasper Korten , Siddharth Manthan , Nikita Travkin X-Mailer: b4 0.12.3 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_BLOCKED, SPF_HELO_PASS,SPF_NONE 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-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:19:43 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740556402520223 X-GMAIL-MSGID: 1778740556402520223 From: Jasper Korten Enable sound and modem for the Samsung Galaxy Tab A 2015 tablets. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Headphones/microphones via digital/analog codec in MSM8916/PM8916. Earpiece exists on samsung-gt58 only. - WWAN Internet via BAM-DMUX except: - gt510: Stereo Maxim MAX98357A codecs for speaker on Quaternary MI2S - gt58: Mono NXP TFA9895 codec for speaker on Quaternary MI2S - For some reason connected to GPIOs where no hardware I2C controller is available -> need to use i2c-gpio - Samsung-specific audio jack detection (not supported yet) Signed-off-by: Jasper Korten Co-developed-by: Siddharth Manthan Signed-off-by: Siddharth Manthan Co-developed-by: Nikita Travkin Signed-off-by: Nikita Travkin [Stephan: Add consistent commit message, minor refactoring] Signed-off-by: Stephan Gerhold --- .../boot/dts/qcom/msm8916-samsung-gt5-common.dtsi | 54 ++++++++++++++++++++++ arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts | 22 +++++++++ arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts | 42 +++++++++++++++++ 3 files changed, 118 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi index 6a16eb5ce07b..fbd2caf405d5 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt5-common.dtsi @@ -3,9 +3,12 @@ /dts-v1/; #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include +#include / { aliases { @@ -116,6 +119,29 @@ &blsp_uart2 { status = "okay"; }; +/* + * For some reason the speaker amplifier is connected to the second SD line + * (MI2S_2_D1) instead of the first (MI2S_2_D0). This must be configured in the + * device tree, otherwise audio will seemingly play fine on the wrong SD line + * but the speaker stays silent. + * + * When routing audio via QDSP6 (the default) the &lpass node is reserved and + * the definitions from &q6afedai are used. When the modem is disabled audio can + * be alternatively routed directly to the LPASS hardware with reduced latency. + * The definitions for &lpass are here for completeness to simplify changing the + * setup with minor changes to the DT (either manually or with DT overlays). + */ +&lpass { + dai-link@3 { + reg = ; + qcom,playback-sd-lines = <1>; + }; +}; + +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5400000>; +}; + &pm8916_resin { linux,code = ; status = "okay"; @@ -133,6 +159,13 @@ &pm8916_usbin { status = "okay"; }; +&q6afedai { + dai@22 { + reg = ; + qcom,sd-lines = <1>; + }; +}; + &sdhc_1 { status = "okay"; }; @@ -147,6 +180,27 @@ &sdhc_2 { status = "okay"; }; +&sound { + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; + + sound_link_backend2: backend2-dai-link { + link-name = "Quaternary MI2S"; + + cpu { + sound-dai = <&q6afedai QUATERNARY_MI2S_RX>; + }; + platform { + sound-dai = <&q6routing>; + }; + codec { + sound-dai = <&speaker_codec>; + }; + }; +}; + &usb { dr_mode = "peripheral"; extcon = <&pm8916_usbin>; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts index c3f1acc55078..5b34529b816c 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt510.dts @@ -9,6 +9,14 @@ / { compatible = "samsung,gt510", "qcom,msm8916"; chassis-type = "tablet"; + speaker_codec: audio-codec { + compatible = "maxim,max98357a"; + sdmode-gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>; + #sound-dai-cells = <0>; + pinctrl-0 = <&audio_sdmode_default>; + pinctrl-names = "default"; + }; + clk_pwm: pwm { compatible = "clk-pwm"; #pwm-cells = <2>; @@ -146,7 +154,21 @@ &mdss_dsi0_out { remote-endpoint = <&panel_in>; }; +&sound { + model = "samsung-gt510"; + pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>; + pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>; + pinctrl-names = "default", "sleep"; +}; + &tlmm { + audio_sdmode_default: audio-sdmode-default-state { + pins = "gpio55"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + buckbooster_en_default: buckbooster-en-default-state { pins = "gpio51"; function = "gpio"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts index 998625abd409..579312ed53ce 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-gt58.dts @@ -35,6 +35,26 @@ reg_vdd_tsp: regulator-vdd-tsp { pinctrl-names = "default"; }; + i2c-amplifier { + compatible = "i2c-gpio"; + sda-gpios = <&tlmm 55 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + scl-gpios = <&tlmm 56 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>; + + pinctrl-0 = <&_i2c_default>; + pinctrl-names = "default"; + + #address-cells = <1>; + #size-cells = <0>; + + speaker_codec: audio-codec@34 { + compatible = "nxp,tfa9895"; + reg = <0x34>; + vddd-supply = <&pm8916_l5>; + sound-name-prefix = "Speaker"; + #sound-dai-cells = <0>; + }; + }; + vibrator { compatible = "gpio-vibrator"; enable-gpios = <&tlmm 76 GPIO_ACTIVE_HIGH>; @@ -98,7 +118,21 @@ &mdss_dsi0_out { remote-endpoint = <&panel_in>; }; +&sound { + model = "samsung-a2015"; + pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default &secondary_mic_default>; + pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep &secondary_mic_default>; + pinctrl-names = "default", "sleep"; +}; + &tlmm { + amp_i2c_default: amp-i2c-default-state { + pins = "gpio55", "gpio56"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + }; + buckbooster_en_default: buckbooster-en-default-state { pins = "gpio8"; function = "gpio"; @@ -127,6 +161,14 @@ reg_tsp_en_default: reg-tsp-en-default-state { bias-disable; }; + secondary_mic_default: secondary-mic-default-state { + pins = "gpio98"; + function = "gpio"; + drive-strength = <2>; + bias-disable; + output-high; + }; + tsp_int_default: tsp-int-default-state { pins = "gpio13"; function = "gpio"; From patchwork Tue Oct 3 13:18:31 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147880 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2080812vqb; Tue, 3 Oct 2023 06:21:29 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHK9IaIuyh3ixf/akaZaPerwRt9sAsf+knz/cLkiJnNQD6PmTK2RcGxJRxkW59Ro+1Y2AJk X-Received: by 2002:a05:6a00:2d13:b0:68a:5773:6319 with SMTP id fa19-20020a056a002d1300b0068a57736319mr16886673pfb.11.1696339289127; Tue, 03 Oct 2023 06:21:29 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339289; cv=pass; d=google.com; s=arc-20160816; b=fy4VlkHBMadSH08b38NO1gWKY2XTqv6RDRNCHEKIqsSna8fwfjaJS9wQVu8ZXAhN3N uJhCTQoTRrYFrhVf6f4H3SNImr8J1I39JQf5mWRW+xSb+e2DtUxQGXI1X98noSuTjnpm MkhrKU3epP/UCwZxqMQJJDr6v5AKw6VhK5uXTCHl9N1s4FQ7nw1TAuVzlo2lWvRptu+g 4SrBQeOwapn1rvgEcY2LxgBDBJWKKXE+tReE7Lf1RFFi1mOUdgmQRw+Krbl+LtcibbTs JcUCkEcA33Z/7Zz52oApiaENNUI+bLggg0FfAvL4tMs5erOr4+SZtiY6c1OiStjFMf/T 80CQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=R4s/lgVmJSqQs8BGSp4xT87hMmc1uv7f8BEO2YPhFgk=; fh=MBXZGIXy4ztGdgHf5gUwRzq7yBHMi6CUunsDSAaN0rY=; b=sxP7ZLS2zWpjQSa/5xBcOxY8yy1vI8OJ5s0w8Qysw3GGF7WNULcrS1hwpRogffYjIC hdN4sdG45DslmnNNBDcK4KhO4BKq0SXWznFDYyWSmuMjfQy8uyv+xu2sP8znopeG5aFE PGrUDvNLZuPiX4dAJrBwGYtlT7tFPJy75D0FjKo8kvTBLbEg2D2edOXnVQGTavXFV0Rz WLxrENgcjO/pW4EeqdB/qtrlua/tbwDB6GMMqlgEvjP29cXzIlzrhKLAQVpGpAkiw3a8 f5yXzLGyvY/xW1efh3tMiDPXd+yLbmjr4Ce68oo3Qff3H+/GjvPWZG6q82sAduhnu4/m IzKw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=Q7BSuBMa; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from groat.vger.email (groat.vger.email. [23.128.96.35]) by mx.google.com with ESMTPS id x11-20020a63fe4b000000b00578af609d05si1412686pgj.244.2023.10.03.06.21.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:21:29 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) client-ip=23.128.96.35; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=Q7BSuBMa; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.35 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by groat.vger.email (Postfix) with ESMTP id CBCAE80ED996; Tue, 3 Oct 2023 06:20:17 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at groat.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237361AbjJCNT1 (ORCPT + 17 others); Tue, 3 Oct 2023 09:19:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35008 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235745AbjJCNTC (ORCPT ); Tue, 3 Oct 2023 09:19:02 -0400 Received: from mo4-p04-ob.smtp.rzone.de (mo4-p04-ob.smtp.rzone.de [85.215.255.120]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 10121CC; Tue, 3 Oct 2023 06:18:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339129; cv=none; d=strato.com; s=strato-dkim-0002; b=FS5+Y/AfTep34ifUSpJ8zB8RurYCufhoKSfXI9nuaVGcWkCAoRvwqcseP1EjXyG2tK rjNBiD7lR36KdxMv+ha5x7UUq4DJk5Y3ZnwlvS7yM48bUTQPQL5ESSDUJ2Pk0iz4Pk44 s5v2yxqBk4FSKkvacGihl99w79odK/Dpe3JHJaoE2rVHo1EjiCTkJJ51W+1NDNAOE4dq AyPrhMxIuOAMpjo4FsRi/m06pD6TulDoLn8lMUiXLLAND9pfzygutWeFLvhNwaq0uplx TD1m1eEZ9UN+NVxbl4jsKBku0ieqz5d6l+OFiElLdzBg997y/7uh5AN6Rcc9P0EPDCxX GXsw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339129; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=R4s/lgVmJSqQs8BGSp4xT87hMmc1uv7f8BEO2YPhFgk=; b=fG8hXeQqxJl4GWJkbShX8jdJBVS3yorIpcYbc3UAdqLo9r4bf44T+9TmYwIyjHcoDX ENG6KmBzQ3essMhE7DN7aUh9ohP3m5OhpwFZkYMRcqNvjtPLVXopjmk0aHwetZ6t+uZM rHwfaRsEDw6xCsyrxZiox1R9rBB4AUrSr2mCQOAPYrx8bdFwJLHlCOXiKSldQmzCN9UW UXRmL+W2feXnmOo+TlTbVZwtOTQJM+1b9uGHKhHGeM365IoSQj6Pk01cntlX8Jvow57/ TyPVDRaK3Ek5JxmoUrqgnj1lBZ7v1yZvETv55UXwmVKk8E/ddSuSZuLy9lO07H/iBojc 5YSw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo04 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339129; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=R4s/lgVmJSqQs8BGSp4xT87hMmc1uv7f8BEO2YPhFgk=; b=Q7BSuBMaPb/fvXbYBDYbusu8qG2+0jkLuQpvn+n/RaydPANXT85WzF+PRW7/rF5J4H Lq7g4aNbb6WxsYyMCGt5isFJAPWKjjkMLlOcMhQW2cGm9SiEhb+tv0hibXHOtLXZ5c5a CeUZKW0oZTZ5pHZJTqggpmwHReVol2t2tQS8bHQ5C+8plAHUepSCxqLk4OViTZrcsk9N UKBt1txkL8Jmjkyz4ZApzixecOimCWjLkQgBQ9LgVp53/lqQO3iYHqnN+VMJh0/6uSlP JlDir1GjIQYB4xK/YC3LKN/KXORQcrGtmy2/cxzsOpippMfxWIis5CMFx9TTaKnmNXJX Sswg== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339129; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=R4s/lgVmJSqQs8BGSp4xT87hMmc1uv7f8BEO2YPhFgk=; b=NRufaT6G56Rng47fiYU4lUKx58p6XehzYKsQu2NDPe01dHKJxxmYVJ+tCsufx/EYdo bZ0JAtNYFiiIp4z3oDDQ== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIn2OP (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:49 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:31 +0200 Subject: [PATCH v2 13/14] arm64: dts: qcom: msm8916-samsung-j5: Add sound and modem MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-13-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , "Lin, Meng-Bo" , Markuss Broks X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 groat.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (groat.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:20:17 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740666623190246 X-GMAIL-MSGID: 1778740666623190246 From: "Lin, Meng-Bo" Enable sound and modem for the Samsung J5 smartphones. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Speaker/earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except: - There is no secondary microphone, so a different "model" is used to differentiate that in the UCM configuration. - Samsung-specific audio jack detection (not supported yet) Co-developed-by: Markuss Broks Signed-off-by: Markuss Broks Signed-off-by: "Lin, Meng-Bo" [Stephan: Add consistent commit message] Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi | 14 ++++++++++++++ arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts | 4 ++++ 2 files changed, 18 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi index fe59be3505fe..5ca2ada266f4 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5-common.dtsi @@ -1,6 +1,8 @@ // SPDX-License-Identifier: GPL-2.0-only #include "msm8916-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" + #include #include #include @@ -135,6 +137,10 @@ &blsp_uart2 { status = "okay"; }; +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5800000>; +}; + &pm8916_resin { status = "okay"; linux,code = ; @@ -154,6 +160,14 @@ &sdhc_2 { cd-gpios = <&tlmm 38 GPIO_ACTIVE_LOW>; }; +&sound { + model = "msm8916-1mic"; + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; +}; + &usb { extcon = <&muic>, <&muic>; status = "okay"; diff --git a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts index 58c2f5a70e78..ba8650971d6a 100644 --- a/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts +++ b/arch/arm64/boot/dts/qcom/msm8916-samsung-j5.dts @@ -19,6 +19,10 @@ &blsp_i2c5 { status = "disabled"; }; +&pm8916_codec { + qcom,micbias1-ext-cap; +}; + &touchscreen { /* FIXME: Missing sm5703-mfd driver to power up vdd-supply */ }; From patchwork Tue Oct 3 13:18:32 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Stephan Gerhold X-Patchwork-Id: 147877 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2a8e:b0:403:3b70:6f57 with SMTP id in14csp2080365vqb; Tue, 3 Oct 2023 06:20:55 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGe4EgUvZyki+KO99B+oYUq0S1aRGRM94oNaoSGvmMeMNDQKsvcLeDjrlj0QzvRmyEAeHbf X-Received: by 2002:a05:6a21:7747:b0:121:ca90:df01 with SMTP id bc7-20020a056a21774700b00121ca90df01mr10789502pzc.40.1696339255385; Tue, 03 Oct 2023 06:20:55 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1696339255; cv=pass; d=google.com; s=arc-20160816; b=e+jtWOkgx68631vcNCSyXxHYllFIAR1M+vyFa/GODyQKU6334uawubOtDacapkENbz SFb4pfQzJmgQVi6Oh+okPH24xxaxfqdVZ51Q9J23VnZANM0lDzPxfQnLHST8fmlq3304 UgTR72qpMdfY790mM9p5IWdxOmm9l8hfxk8Ml9r2Rr8LHQ3IEO5HaIARMtvhWpm+rinR rk/yPY08rc0E2Qr23QT82ACMYZmlINv6zvP8O/VO8gFH/l1JURezGw6kTJLHtREulUfx vR8AfCHv4cy+zsOnDWm/l35z2tmnwrmQJmGy8CefnvV7Jk1s/DE1yBvyCowq3QUecVjI Fegg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature:dkim-signature; bh=Gthy3JZsd0POCax8iakG2TwMg0evFgfpOwFOAF4TfGU=; fh=yhPhsXeoouGZrZLJImGjJYwO55HwsglfdgCIGKom2q8=; b=yYH4+vvVN+xYZvAwakBvAfH7G+v0nB/Vsxqg+xQ1EQI1RVndnnntZX42KbwBSlW4Ai 1kIeQxDrK8C34w5PC6RLLvexypyvisWkUPFlbYMT5H8JeWRSoD6DNcb6BegAfPwoDMi7 KUprHpdI0RbT8jr58VVFqksTHxbVk1b9ln5fNi1dTQdaT2xJym1O6uyNh+0ONhSwqfEF kvZZpzxNAFcLXhDu/nDB+NCL8nTTXDMlwZMKkY+C/iNIScV2nGd3yF1MVf74HGLKsEWl nWtJT0avRRl38w+xIC5pnS5WB1b76T1eeEsGKyAB7V2vZthIekjgtkTfljgOsS0poGDB KY9A== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=KpgqbqGl; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from lipwig.vger.email (lipwig.vger.email. [2620:137:e000::3:3]) by mx.google.com with ESMTPS id m24-20020a637d58000000b00578e7a37c45si1416026pgn.10.2023.10.03.06.20.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 03 Oct 2023 06:20:55 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) client-ip=2620:137:e000::3:3; Authentication-Results: mx.google.com; dkim=pass header.i=@gerhold.net header.s=strato-dkim-0002 header.b=KpgqbqGl; dkim=neutral (no key) header.i=@gerhold.net header.s=strato-dkim-0003; arc=pass (i=1); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:3 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C2E0D806B07D; Tue, 3 Oct 2023 06:20:19 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237939AbjJCNTi (ORCPT + 17 others); Tue, 3 Oct 2023 09:19:38 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35044 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235893AbjJCNTC (ORCPT ); Tue, 3 Oct 2023 09:19:02 -0400 Received: from mo4-p04-ob.smtp.rzone.de (mo4-p04-ob.smtp.rzone.de [81.169.146.176]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5F690A1; Tue, 3 Oct 2023 06:18:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1696339129; cv=none; d=strato.com; s=strato-dkim-0002; b=FfXHI5z85pFW5Y617fsif0hDGFdhByWmGZKgyC6ItfYRrl6e1uxDUztu58PDnWw1sG ggE0w0gBXVVI3Dz21GwEWXMeC7qxh8V4lR/5Tp28a7VM5r8WiX5OLAKmejzSNk6GNbFB RAb/4XDrZOkbQ+XBnc6PijJwgZkOWkuSQq4g7q/uyqgovRDTmpy2GB2cXDHZhZrtF/tl C6z0fXXMl75uJrXCV8R86uWk6IE+xBHGENy00ZsnfZmlKSyP9v9iOgd7BSWR6qhH9QmH KpiAkfUFu0SRy+0Yo0XvfhunwlatvDK9dRADIBBySCjJx05uLCBKVMVEp797h0YC1QBX Hjiw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339129; s=strato-dkim-0002; d=strato.com; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Gthy3JZsd0POCax8iakG2TwMg0evFgfpOwFOAF4TfGU=; b=OIxGCXWXBRM8TQ0arBmYXi0iUmNH0KTrIJTF40U0/mfTFHE9sfrNt5L34/eqOshA/p Nu9rfTA6Cn/9fh9baQwgDO7oNFX4+yMOO/uzDp/lU1iy5bbxDeZqBdDtvKTiZV+8FuUB y0aJjREap5C9HMXMIf54nS2xX/7+MMNykC4JaZivWwHHgEVcPoyFyrQtdFyPhqdBKApq zfS3RyxuvKDWmMwPRL4YVHsgPf37OLbK0oHEMfK34sDk+a++egG2pCJRE8Iql+xO+pSs JqF0Ly9IoTAw/a21azfUWgM2yI/XQV5Tj9prZBvYdUcYteuoVGlAWNYZT31Paq4WSQi9 LJhw== ARC-Authentication-Results: i=1; strato.com; arc=none; dkim=none X-RZG-CLASS-ID: mo04 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; t=1696339129; s=strato-dkim-0002; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Gthy3JZsd0POCax8iakG2TwMg0evFgfpOwFOAF4TfGU=; b=KpgqbqGlCBEbqsIh5Z5cnOA9nM8SvKhW1z4HpDvLrq56BdRL3uh2MeeFPcYb7Eaaif gixvA/zzA7054hPv/qDNNUx9vLqor+1GNmC/nzxt/mm/YtQ8OOiAsQ7OVnqcY3k1dG+3 ylM6zaZKu1WsF/4y/+VTWOU0z0NcB4Mh3294xL7JEMdNUb0mazI1XecGKTNrpAMArraa EY9wPYMjHEaPg4qQsRXeQv3WwxfU25frVHyiJRTxIeoVNRe5rEVWugcPqw1yvlkZHwPZ 12V8Uuyj1xcGbxLYsSnWTp4qC2WJnnPU9Lx6Bh0l9WeBI78LCrbIViaGenSlW/j4VECM TOaA== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; t=1696339129; s=strato-dkim-0003; d=gerhold.net; h=Cc:To:In-Reply-To:References:Message-Id:Subject:Date:From:Cc:Date: From:Subject:Sender; bh=Gthy3JZsd0POCax8iakG2TwMg0evFgfpOwFOAF4TfGU=; b=DKuerXdB9UpbvEy5/to8ka0g/S5knTp24S+f3VVpez6j1EOLt8x/FNCqbE2XNjw5wo uuGsMjzl7cSS1/tGCyBg== X-RZG-AUTH: ":P3gBZUipdd93FF5ZZvYFPugejmSTVR2nRPhVOQjVd4CteZ/7jYgS+mLFY+H0JAn8u4l+/zY=" Received: from [192.168.244.3] by smtp.strato.de (RZmta 49.8.2 DYNA|AUTH) with ESMTPSA id R04c57z93DIn2OQ (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256 bits)) (Client did not present a certificate); Tue, 3 Oct 2023 15:18:49 +0200 (CEST) From: Stephan Gerhold Date: Tue, 03 Oct 2023 15:18:32 +0200 Subject: [PATCH v2 14/14] arm64: dts: qcom: msm8939-samsung-a7: Add sound and modem MIME-Version: 1.0 Message-Id: <20231003-msm8916-modem-v2-14-61b684be55c0@gerhold.net> References: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> In-Reply-To: <20231003-msm8916-modem-v2-0-61b684be55c0@gerhold.net> To: Bjorn Andersson Cc: Andy Gross , Konrad Dybcio , linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, phone-devel@vger.kernel.org, ~postmarketos/upstreaming@lists.sr.ht, Bryan O'Donoghue , Stephan Gerhold , "Lin, Meng-Bo" X-Mailer: b4 0.12.3 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, 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 lipwig.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Tue, 03 Oct 2023 06:20:19 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1778740631312972248 X-GMAIL-MSGID: 1778740631312972248 From: "Lin, Meng-Bo" Enable sound and modem for the Samsung A7. The setup is similar to most MSM8916 devices, i.e.: - QDSP6 audio - Earpiece/headphones/microphones via digital/analog codec in MSM8916/PM8916 - WWAN Internet via BAM-DMUX except for the same differences as the MSM8916-based Samsung A2015 devices: - NXP TFA9895 codec for speaker on Quaternary MI2S - Samsung-specific audio jack detection (not supported yet) Signed-off-by: "Lin, Meng-Bo" [Stephan: Add consistent commit message, minor refactoring] Signed-off-by: Stephan Gerhold --- arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts | 70 +++++++++++++++++++++++++ 1 file changed, 70 insertions(+) diff --git a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts index fccd8fec8b8f..aa6c39482a2f 100644 --- a/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts +++ b/arch/arm64/boot/dts/qcom/msm8939-samsung-a7.dts @@ -3,10 +3,12 @@ /dts-v1/; #include "msm8939-pm8916.dtsi" +#include "msm8916-modem-qdsp6.dtsi" #include #include #include +#include / { model = "Samsung Galaxy A7 (2015)"; @@ -287,6 +289,18 @@ muic: extcon@25 { }; }; +&blsp_i2c2 { + status = "okay"; + + speaker_codec: audio-codec@34 { + compatible = "nxp,tfa9895"; + reg = <0x34>; + vddd-supply = <&pm8916_l5>; + sound-name-prefix = "Speaker"; + #sound-dai-cells = <0>; + }; +}; + &blsp_i2c5 { status = "okay"; @@ -309,6 +323,29 @@ &blsp_uart2 { status = "okay"; }; +/* + * For some reason the speaker amplifier is connected to the second SD line + * (MI2S_2_D1) instead of the first (MI2S_2_D0). This must be configured in the + * device tree, otherwise audio will seemingly play fine on the wrong SD line + * but the speaker stays silent. + * + * When routing audio via QDSP6 (the default) the &lpass node is reserved and + * the definitions from &q6afedai are used. When the modem is disabled audio can + * be alternatively routed directly to the LPASS hardware with reduced latency. + * The definitions for &lpass are here for completeness to simplify changing the + * setup with minor changes to the DT (either manually or with DT overlays). + */ +&lpass { + dai-link@3 { + reg = ; + qcom,playback-sd-lines = <1>; + }; +}; + +&mpss_mem { + reg = <0x0 0x86800000 0x0 0x5800000>; +}; + &pm8916_resin { linux,code = ; status = "okay"; @@ -321,6 +358,13 @@ pm8916_l17: l17 { }; }; +&q6afedai { + dai@22 { + reg = ; + qcom,sd-lines = <1>; + }; +}; + &sdhc_1 { status = "okay"; }; @@ -335,6 +379,32 @@ &sdhc_2 { status = "okay"; }; +&sound { + model = "samsung-a2015"; + audio-routing = + "AMIC1", "MIC BIAS External1", + "AMIC2", "MIC BIAS Internal2", + "AMIC3", "MIC BIAS External1"; + + pinctrl-0 = <&cdc_pdm_default &sec_mi2s_default>; + pinctrl-1 = <&cdc_pdm_sleep &sec_mi2s_sleep>; + pinctrl-names = "default", "sleep"; + + sound_link_backend2: backend2-dai-link { + link-name = "Quaternary MI2S"; + + cpu { + sound-dai = <&q6afedai QUATERNARY_MI2S_RX>; + }; + platform { + sound-dai = <&q6routing>; + }; + codec { + sound-dai = <&speaker_codec>; + }; + }; +}; + &usb { extcon = <&muic>, <&muic>; status = "okay";