From patchwork Wed Oct 23 16:21:11 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13847753 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A2661CFA45E for ; Wed, 23 Oct 2024 17:45:16 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=bgC15d/pQkY9/ZdNYZmW9U8JEuWcaoADNmU9EGiwgmk=; b=bDz8P2b3C3Vp/WOP3G6xr7h93k Cot/akY8e9ECdINXLozv0nAjYw88W8srxbzaXWiv7eY3uvqjZJAko3SdLt2GgtzBKqHJkcuLHrJRV bv55K+JLjqUeR7tzWU44QaWdmXjw4I1QJP3cRm6r3nFZwo6I5cic4G1mQ05QGss4Y8/moy+XXzHm3 M/8V4DXU4BrhO2eqiNrRDLiEXJpbFGvwzzb7qNRk+zv5VRoA/WZ3Cwd1gQxO6NxEx0YEHsz5fymC8 1ZIOe+9R9I06lD31Cr/9nNxjOovEVojeBJBK3I991tZg2aoYf/MfBZuLaNgmmomnfiC+x4BD0zwP0 qzn9Uw2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3fPs-0000000FPgz-3KjL; Wed, 23 Oct 2024 17:45:04 +0000 Received: from mail-lj1-x22d.google.com ([2a00:1450:4864:20::22d]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3e7N-0000000F7dQ-3XtN for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2024 16:22:00 +0000 Received: by mail-lj1-x22d.google.com with SMTP id 38308e7fff4ca-2f75c56f16aso68354571fa.0 for ; Wed, 23 Oct 2024 09:21:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729700511; x=1730305311; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=bgC15d/pQkY9/ZdNYZmW9U8JEuWcaoADNmU9EGiwgmk=; b=JE5Vg/TmDlyH4itky0U+yqOXMa8swoIw8ku8GlUYbT3gVFVA+4BibigV4eTmP6Cnhl PU3wfizdO2bufo/2Wb7Un7C29AmomPvRZyWsH+cc+oh5nVRohV4PkdYHXIk7bkAzeBK5 KpFDC8VfsMWSy376oNxksHHW04n4hldVjSrM4jl03bU1qoYXtoczUZ0hM0U5+YBRV6YW zUeydasyvQ6S5Qke1K2iB0EHP4sgLJ5nFNubF2015XuBI83xaJn0Zwvw0bk0CjUIfAS1 bM3W3SVdUPA/aQJRmlpfZcxSM9hwim9MZRH7bjHz9cAmCariI0qvukCBKYXcyraU8H5o nSJw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729700511; x=1730305311; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=bgC15d/pQkY9/ZdNYZmW9U8JEuWcaoADNmU9EGiwgmk=; b=KIWbax25ZXjsAF5IriBzlYtyFZRAuw3Uk8MGUbY30qzdMUmUHEKyLs8w2FmOSUjG/s qkEvj2XAlc91HKwNgYiFChsP30WcO0j418coE7q8TwqGG4JAN1B1g7IJ4ZwoepRuO1bS jOVQmO1NoIxk0ycXnPUMg/UCMtlWL+y/I/vy8aAq/CKWndgIT5rnY6FCenDi6idE7ekl IsMPPMj1EZ7jt69igyMtGIhVfD0US7KocGvQ0z5DcZ0VMry1DfgExlzMCYdwg+N/JL9D vwLriyNcBv0sEZlNc8dw/RUlwsYWeJm3pRok0EZJFyaqZZJAwP8Z6cWBTUD28eMj/+tr Vwng== X-Forwarded-Encrypted: i=1; AJvYcCVdA00rMt6SB+I4bqKig3+hLUcinUYmqFvVnZJ56wYUcB3t48SXlACJWVYIOsOLipvjBZoSawmjlrdpZ4RG6hvW@lists.infradead.org X-Gm-Message-State: AOJu0YzVUXdRXVg1fh0g0yGq1LO4eCmt1hQQHSrvHRJCT35WGZwR3u+M TEnxJ2X1weVKlBvEqGADscjucMeWXDvgniOxZyGguaBGxg9loVee X-Google-Smtp-Source: AGHT+IH6A0+R1gxcuSRH5wO+QbdVBb6hBn6+S5OLqazKgIRlUbTwpM/jY7yy8fE+80bw1Otx1SyW+w== X-Received: by 2002:a2e:be09:0:b0:2fa:e52f:4470 with SMTP id 38308e7fff4ca-2fc9d2ddc23mr14523171fa.9.1729700511046; Wed, 23 Oct 2024 09:21:51 -0700 (PDT) Received: from playground.localdomain ([86.127.146.72]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c72609sm4588382a12.88.2024.10.23.09.21.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 09:21:50 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Daniel Baluta , Peng Fan , Mark Brown , Takashi Iwai , Kuninori Morimoto , Bard Liao , Peter Ujfalusi , Jaroslav Kysela , Pierre-Louis Bossart , Conor Dooley , Mathieu Poirier , Iuliana Prodan Cc: linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sound@vger.kernel.org, sound-open-firmware@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/4] dt-bindings: remoteproc: fsl,imx-rproc: add new compatible Date: Wed, 23 Oct 2024 12:21:11 -0400 Message-Id: <20241023162114.3354-2-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023162114.3354-1-laurentiumihalcea111@gmail.com> References: <20241023162114.3354-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_092154_502678_854C524F X-CRM114-Status: GOOD ( 11.21 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea Add new compatible for imx95's CM7 with SOF. Signed-off-by: Laurentiu Mihalcea --- .../bindings/remoteproc/fsl,imx-rproc.yaml | 58 +++++++++++++++++-- 1 file changed, 53 insertions(+), 5 deletions(-) diff --git a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml index 57d75acb0b5e..ab0d8e017965 100644 --- a/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml +++ b/Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml @@ -28,6 +28,15 @@ properties: - fsl,imx8qxp-cm4 - fsl,imx8ulp-cm33 - fsl,imx93-cm33 + - fsl,imx95-cm7-sof + + reg: + maxItems: 2 + + reg-names: + items: + - const: dram + - const: mailbox clocks: maxItems: 1 @@ -38,10 +47,8 @@ properties: Phandle to syscon block which provide access to System Reset Controller mbox-names: - items: - - const: tx - - const: rx - - const: rxdb + minItems: 1 + maxItems: 4 mboxes: description: @@ -49,7 +56,7 @@ properties: List of <&phandle type channel> - 1 channel for TX, 1 channel for RX, 1 channel for RXDB. (see mailbox/fsl,mu.yaml) minItems: 1 - maxItems: 3 + maxItems: 4 memory-region: description: @@ -84,6 +91,10 @@ properties: This property is to specify the resource id of the remote processor in SoC which supports SCFW + port: + $ref: /schemas/sound/audio-graph-port.yaml# + unevaluatedProperties: false + required: - compatible @@ -114,6 +125,43 @@ allOf: properties: power-domains: false + - if: + properties: + compatible: + contains: + const: fsl,imx95-cm7-sof + then: + properties: + mboxes: + minItems: 4 + mbox-names: + items: + - const: txdb0 + - const: txdb1 + - const: rxdb0 + - const: rxdb1 + memory-region: + maxItems: 1 + required: + - reg + - reg-names + - mboxes + - mbox-names + - memory-region + - port + else: + properties: + reg: false + reg-names: false + mboxes: + maxItems: 3 + mbox-names: + items: + - const: tx + - const: rx + - const: rxdb + port: false + additionalProperties: false examples: From patchwork Wed Oct 23 16:21:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13847754 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CE7ABCFA45C for ; Wed, 23 Oct 2024 17:46:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=4T91d+bznCB7MrilGZZnGDp0TGLFXhhuyuq/BXHaJaU=; b=aAASAt15aBrHqcDCADIWcwBYeq xhJlkGYwWN94kU2TLiaQy9Qa1f7p/VbQgya1VLTOYB++PXnWNBwhRU3a2KsOwT9PlcARlKt/ZXdsH QpXgvqMZUH5DvmpKGDMpMV6GqOhIvvgpcjSJT9YbbR7fNLTLGzPi6xJ7M+uTVmpfM+vL9CZ2T9FK/ ZC8RnpIYwHGjIqC85xZJY9QFvuCWVgybRZA/3AwuzHsDvYdcIDUOo+ziU5T3n6Ut3uXaOVE41nZyY YC8eJT53qoRE62JO3vmNhCdt9D5zlzL+cnlH2dxG0d3QPD85XQcuwYgEXVuV1z2lB7uzlApM6BIFZ 3G0lE7QQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3fRO-0000000FQ86-1CUf; Wed, 23 Oct 2024 17:46:38 +0000 Received: from mail-lj1-x230.google.com ([2a00:1450:4864:20::230]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3e7R-0000000F7gX-0X3o for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2024 16:22:03 +0000 Received: by mail-lj1-x230.google.com with SMTP id 38308e7fff4ca-2fb559b0b00so62325531fa.0 for ; Wed, 23 Oct 2024 09:21:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729700515; x=1730305315; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=4T91d+bznCB7MrilGZZnGDp0TGLFXhhuyuq/BXHaJaU=; b=EL8g9ZN7ZFYnkBoCZ7es1fidNV2CHmkT4K1j++dLWpLOiWByY8ZoaObueqkiiieO39 fVySEiypsBPfVtHprlhoCmzSzq00kTn04FcaL+37Tp/3vUFkwobQDjI2XENbXE1L+Kx9 frww63ZzBpm5OPEMOD8lBxmLAo1CgmbnAXzdaHUZvIWgZEJKzeJADySjcq740nJO87lN 4kYLQ/q3E78H6rBDh6jaCdF6+nCNI/1kYcLynKwObswrgFSrFyQhy7aq8dHhqec/r2sZ xPLFDp/ugG6kug+JjnHoHSBuEspSBfCHBEAIMfLhMzfUU9xb79tmO3JFcRzkHP+fTMtq fZhw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729700515; x=1730305315; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=4T91d+bznCB7MrilGZZnGDp0TGLFXhhuyuq/BXHaJaU=; b=WoMn0J2b2miqQzUTKG9exrcUJu3fu+OgCWTw98PC+/wdJ/Rcr5Dy+uU9ry3SjkqKRO +KjZz4VbDOD6612b0/RyIhEBOgkw2AHVD2KE4/25AcwTHDsuAq1Tq93SWkUiXl0wnyAS H2ROdqku4cOeHvgARp5OaJbgb7hgUcK/oqWxwHLi9h4jndduXww4bOEGdfpcd0qQvgYC 5Cp4s2RA9OvzGiT+MymNysR6zgI1m+1IZNYFoOFkDkE8MWjxhaJ9ZWVKICyu3AmOi9kB 0RS7fSR2L7Nxk1E0H8K6S2W5CB81e4usHS9X51Y86aYte9cHu92kmBoihRd0r1HRLTTL vlLg== X-Forwarded-Encrypted: i=1; AJvYcCU2jGfqigb+GornsmHk8IEW52EiAXh8m5iynbT/2wqzmjwpSCKC0xtxINfS6EtRqI31p4PR6Dp5bIqPfMNEdMpG@lists.infradead.org X-Gm-Message-State: AOJu0YwRM+sd0qCqVEIxxMu329oUXlmiV3rGiVZwccKsuXt91vwoX3dR eZ0cWfSvWzW3oK0AsW5ld9n2JDN4dsLXBzvmA3FfeYXS1+bOeqvx X-Google-Smtp-Source: AGHT+IGSuRDP9QiG7QKq9fGBE5EgHFrsYc0Z88Wu4omye9JKc34vnBuHAWvJD+QR/DERkoh54VOejA== X-Received: by 2002:a2e:819:0:b0:2fb:c20:dbc3 with SMTP id 38308e7fff4ca-2fc9d5d4042mr14177941fa.39.1729700514531; Wed, 23 Oct 2024 09:21:54 -0700 (PDT) Received: from playground.localdomain ([86.127.146.72]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c72609sm4588382a12.88.2024.10.23.09.21.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 09:21:53 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Daniel Baluta , Peng Fan , Mark Brown , Takashi Iwai , Kuninori Morimoto , Bard Liao , Peter Ujfalusi , Jaroslav Kysela , Pierre-Louis Bossart , Conor Dooley , Mathieu Poirier , Iuliana Prodan Cc: linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sound@vger.kernel.org, sound-open-firmware@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 2/4] ASoC: dt-bindings: audio-graph-card2: add widgets and hp-det-gpios support Date: Wed, 23 Oct 2024 12:21:12 -0400 Message-Id: <20241023162114.3354-3-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023162114.3354-1-laurentiumihalcea111@gmail.com> References: <20241023162114.3354-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_092157_450387_CBEAE9F2 X-CRM114-Status: GOOD ( 11.30 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea Introduce the 'widgets' property, allowing the creation of widgets from 4 template widgets: Microphone, Line, Headphone, and Speaker. Also introduce the 'hp-det-gpios' property, which allows using headphone detection using the specified GPIO. Signed-off-by: Laurentiu Mihalcea --- .../devicetree/bindings/sound/audio-graph-card2.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml b/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml index f943f90d8b15..f0300a08f7fe 100644 --- a/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml +++ b/Documentation/devicetree/bindings/sound/audio-graph-card2.yaml @@ -37,6 +37,15 @@ properties: codec2codec: type: object description: Codec to Codec node + hp-det-gpios: + maxItems: 1 + widgets: + description: + User specified audio sound widgets. + Each entry is a pair of strings, the first being the type of + widget ("Microphone", "Line", "Headphone", "Speaker"), the + second being the machine specific name for the widget. + $ref: /schemas/types.yaml#/definitions/non-unique-string-array required: - compatible From patchwork Wed Oct 23 16:21:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13847762 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id F1561CFA45C for ; Wed, 23 Oct 2024 17:48:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=One71U5tHDn0Fw0x5xIglBa+y9G8Ir7vW4xGkDlikec=; b=TnftIIx+iTDTyi1rgdBh13ZQ4v 9702+wGj1XqEhX0QGhaeEDPqfLY35uj22Yn8DEymMvrX+Cq2qI/u5cH2SefUFpSo7pkQ5HIdRlTiI 5aK2q5+5OVrRQy6eF0Cjv3b6kdAUbjNuuRGGbaui1L8s7dmAVW7A1HR3wJVpzp07+mBXl/y5x1TCj jWxtW0L1Io/CGwsWWjR4wAU68Alv8NivqihUpDwLuKk/PJFAJezkF5maSoVZcGomRLx2PTHzzwVf5 KvZv/Q6P2diyB8TbeDqzDT3ubJOGmfO8s4H9+ebFQS/CcG6BFNNKMAp9zb05/+UteynSRqxH6Fwi9 AXQ8p1ug==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3fSv-0000000FQad-1f7C; Wed, 23 Oct 2024 17:48:13 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3e7Z-0000000F7ny-15xK for linux-arm-kernel@bombadil.infradead.org; Wed, 23 Oct 2024 16:22:05 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=One71U5tHDn0Fw0x5xIglBa+y9G8Ir7vW4xGkDlikec=; b=HdPUQKdoiuRPAY3k3SmbrKjxAV Uywn6Q8HS+NnlHEWUAbyFeb5UpsvxMqJfXFEcVIoBsapEfANG2Rsl0QLqKOECyw7OVvuEEHS+mmMk pPAWGhbOFKZ5ihyvE3Atz7ruLuIVhEDJezEvTfTaoadhHa0/p9cachcnjqAESQO1t5orMPiHvbpLo vXppo9BnyMdSZqI62Yn0wFmY8IOQZZgWcsgCvPt1DRtgEwZAPAwOHdHLwb1wDom90s+hi6Cz21haS CvKM+/ur+xCxP6rbYCEJ4o93OppOHcNnckNqcs/8Sy7Y79yrv8SCraJ7jA+YZSzNzxTeFde7zWG/C n5xxrXSA==; Received: from mail-ed1-x533.google.com ([2a00:1450:4864:20::533]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3e7V-00000008R9Z-3gES for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2024 16:22:03 +0000 Received: by mail-ed1-x533.google.com with SMTP id 4fb4d7f45d1cf-5c9428152c0so8940014a12.1 for ; Wed, 23 Oct 2024 09:21:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729700518; x=1730305318; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=One71U5tHDn0Fw0x5xIglBa+y9G8Ir7vW4xGkDlikec=; b=ZZnPZiZGf5PYq2WntMibqsHxeg3ZFYhwhKkf/aBUhd8qKA5w2rU4wcolKlVCmgvpdB QXKgYzWqRAoeuhnlzHRcBqIRvw0oqsLmdzmtb8mivn1UGh0vkO/knwSXZvKqLHT3BeDm LfqmVQ0NUxpPzAUA88wzMrbMMkFo17YMCJSWKP3IsM0cp0zzLEnGqX/GAnXPjvbNhVSt LgV/MGjCp21wty+YQHmO2qDEHUVatO++7C2x66XwVJDmbpSPnOp6mG+HMKURdv+isMsz Y2dI5l/FFI9Bk23PEY9Z7TWJem8LtoLzVNAtqih6g37Gf+Uk28c+LEIjinrFQcfz+rGa sMow== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729700518; x=1730305318; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=One71U5tHDn0Fw0x5xIglBa+y9G8Ir7vW4xGkDlikec=; b=drOyoyZcK99giyc9txgPu/jUNlcZLQs87Jw8OnkAVd3LFtyz9K+7AY8Mqh68HTlWLD nRLXraIo/kX3D2qfvi1UeYlf46O0IyRslHVwOMwE0WFGgsAjYvyTZHoxNqSyvPsdCBJP SYZM3RQpeQXzIy0JARv88nC6vZsSt+5RUEyA/I8ygJtH6v0x3ZosaPgcQlSvSzNxf4Z+ cy08c4G3Z5Db4/A2bWid/YM8arC7xq7d9dDsfo/VZcMLSnswN+Npc29tgqGW90HbC7Hn IhbhpXh+JbrLBpRrJ7mg/4brSFBsSpUTj72cvvEzZcIWoi6l51bHJogWbTbHX7CohvyB mahA== X-Forwarded-Encrypted: i=1; AJvYcCW1mA5TFxZm/9j3ZwgA4wzHzo6jfAe3xDw31q7Kpe+HFQBcCn4KIbeVfIBO3QjVeVBJgK19YdhLOTGiLH8hPRLZ@lists.infradead.org X-Gm-Message-State: AOJu0YzACUoq7L3LvqufJk0KtxmtQPS+dLMCeb1OV75ePdNcsnZVmNp9 qX4sc06YuETlV02IIg69OkZN97rI1w24cVJHZnSHhsk4i2OHfkrd X-Google-Smtp-Source: AGHT+IFHCIbcnEqthuiotWM3IhUwJGO5vNmq5ANb1TEU7fxVmhEQejK0iqQE+TAOgYiUqP2tsdRD2Q== X-Received: by 2002:a05:6402:4311:b0:5c9:547d:99 with SMTP id 4fb4d7f45d1cf-5cb8ac49231mr2888617a12.2.1729700517759; Wed, 23 Oct 2024 09:21:57 -0700 (PDT) Received: from playground.localdomain ([86.127.146.72]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c72609sm4588382a12.88.2024.10.23.09.21.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 09:21:57 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Daniel Baluta , Peng Fan , Mark Brown , Takashi Iwai , Kuninori Morimoto , Bard Liao , Peter Ujfalusi , Jaroslav Kysela , Pierre-Louis Bossart , Conor Dooley , Mathieu Poirier , Iuliana Prodan Cc: linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sound@vger.kernel.org, sound-open-firmware@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 3/4] ASoC: SOF: imx: add driver for imx95 Date: Wed, 23 Oct 2024 12:21:13 -0400 Message-Id: <20241023162114.3354-4-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023162114.3354-1-laurentiumihalcea111@gmail.com> References: <20241023162114.3354-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_172202_246089_4E03B974 X-CRM114-Status: GOOD ( 26.22 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea Add SOF driver for imx95. Signed-off-by: Laurentiu Mihalcea --- sound/soc/sof/imx/Kconfig | 8 + sound/soc/sof/imx/Makefile | 2 + sound/soc/sof/imx/imx95.c | 383 +++++++++++++++++++++++++++++++++++++ 3 files changed, 393 insertions(+) create mode 100644 sound/soc/sof/imx/imx95.c diff --git a/sound/soc/sof/imx/Kconfig b/sound/soc/sof/imx/Kconfig index 4751b04d5e6f..51a70a193533 100644 --- a/sound/soc/sof/imx/Kconfig +++ b/sound/soc/sof/imx/Kconfig @@ -50,4 +50,12 @@ config SND_SOC_SOF_IMX8ULP Say Y if you have such a device. If unsure select "N". +config SND_SOC_SOF_IMX95 + tristate "SOF support for i.MX95" + depends on IMX_DSP + help + This adds support for Sound Open Firmware for NXP i.MX95 platforms. + Say Y if you have such a device. + If unsure select "N". + endif ## SND_SOC_SOF_IMX_TOPLEVEL diff --git a/sound/soc/sof/imx/Makefile b/sound/soc/sof/imx/Makefile index be0bf0736dfa..715ac3798668 100644 --- a/sound/soc/sof/imx/Makefile +++ b/sound/soc/sof/imx/Makefile @@ -2,10 +2,12 @@ snd-sof-imx8-y := imx8.o snd-sof-imx8m-y := imx8m.o snd-sof-imx8ulp-y := imx8ulp.o +snd-sof-imx95-y := imx95.o snd-sof-imx-common-y := imx-common.o obj-$(CONFIG_SND_SOC_SOF_IMX8) += snd-sof-imx8.o obj-$(CONFIG_SND_SOC_SOF_IMX8M) += snd-sof-imx8m.o obj-$(CONFIG_SND_SOC_SOF_IMX8ULP) += snd-sof-imx8ulp.o +obj-$(CONFIG_SND_SOC_SOF_IMX95) += snd-sof-imx95.o obj-$(CONFIG_SND_SOC_SOF_IMX_COMMON) += imx-common.o diff --git a/sound/soc/sof/imx/imx95.c b/sound/soc/sof/imx/imx95.c new file mode 100644 index 000000000000..3f7ed6a16c42 --- /dev/null +++ b/sound/soc/sof/imx/imx95.c @@ -0,0 +1,383 @@ +// SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) +/* + * Copyright 2024 NXP + */ + +#include +#include +#include +#include +#include +#include +#include + +#include "../sof-of-dev.h" +#include "../ops.h" + +#define IMX_SIP_SRC 0xC2000005 +#define IMX_SIP_SRC_M_RESET_ADDR_SET 0x03 + +#define IMX95_CPU_VEC_FLAGS_BOOT BIT(29) + +#define IMX_SIP_LMM 0xC200000F +#define IMX_SIP_LMM_BOOT 0x0 +#define IMX_SIP_LMM_SHUTDOWN 0x1 + +#define IMX95_M7_LM_ID 0x1 + +#define MBOX_DSPBOX_OFFSET 0x1000 + +struct imx95_priv { + struct platform_device *ipc_dev; + struct imx_dsp_ipc *ipc_handle; + resource_size_t bootaddr; +}; + +static void imx95_ipc_handle_reply(struct imx_dsp_ipc *ipc) +{ + unsigned long flags; + struct snd_sof_dev *sdev = imx_dsp_get_data(ipc); + + spin_lock_irqsave(&sdev->ipc_lock, flags); + snd_sof_ipc_process_reply(sdev, 0); + spin_unlock_irqrestore(&sdev->ipc_lock, flags); +} + +static void imx95_ipc_handle_request(struct imx_dsp_ipc *ipc) +{ + snd_sof_ipc_msgs_rx(imx_dsp_get_data(ipc)); +} + +static struct imx_dsp_ops ipc_ops = { + .handle_reply = imx95_ipc_handle_reply, + .handle_request = imx95_ipc_handle_request, +}; + +static int imx95_disable_enable_core(bool enable) +{ + struct arm_smccc_res res; + + if (enable) + arm_smccc_smc(IMX_SIP_LMM, IMX_SIP_LMM_BOOT, IMX95_M7_LM_ID, + 0, 0, 0, 0, 0, &res); + else + arm_smccc_smc(IMX_SIP_LMM, IMX_SIP_LMM_SHUTDOWN, IMX95_M7_LM_ID, + 0, 0, 0, 0, 0, &res); + + return res.a0; +} + +static int imx95_run(struct snd_sof_dev *sdev) +{ + return imx95_disable_enable_core(true); +} + +static int imx95_send_msg(struct snd_sof_dev *sdev, struct snd_sof_ipc_msg *msg) +{ + struct imx95_priv *priv = sdev->pdata->hw_pdata; + + sof_mailbox_write(sdev, sdev->host_box.offset, + msg->msg_data, msg->msg_size); + + imx_dsp_ring_doorbell(priv->ipc_handle, 0); + + return 0; +} + +static int imx95_get_mailbox_offset(struct snd_sof_dev *sdev) +{ + return MBOX_DSPBOX_OFFSET; +} + +static int imx95_get_bar_index(struct snd_sof_dev *sdev, u32 type) +{ + switch (type) { + case SOF_FW_BLK_TYPE_SRAM: + case SOF_FW_BLK_TYPE_DRAM: + return type; + default: + return -EINVAL; + } +} + +static int imx95_get_window_offset(struct snd_sof_dev *sdev, u32 id) +{ + /* no offset for window regions - they are already relative + * to the mailbox memory region described in DT. + */ + return 0; +} + +static int imx95_set_power_state(struct snd_sof_dev *sdev, + const struct sof_dsp_power_state *target_state) +{ + sdev->dsp_power_state = *target_state; + + return 0; +} + +/* no other resources to power on during (runtime) resume so these functions + * don't do any resource management (i.e: clks, PDs, etc...). As for enabling + * the M7 LM: this is taken care of by run(), which is called during sof_resume(). + */ +static int imx95_runtime_resume(struct snd_sof_dev *sdev) +{ + const struct sof_dsp_power_state target_state = { + .state = SOF_DSP_PM_D0, + }; + + return snd_sof_dsp_set_power_state(sdev, &target_state); +} + +static int imx95_resume(struct snd_sof_dev *sdev) +{ + const struct sof_dsp_power_state target_state = { + .state = SOF_DSP_PM_D0, + }; + + if (pm_runtime_suspended(sdev->dev)) { + pm_runtime_disable(sdev->dev); + pm_runtime_set_active(sdev->dev); + pm_runtime_mark_last_busy(sdev->dev); + pm_runtime_enable(sdev->dev); + pm_runtime_idle(sdev->dev); + } + + return snd_sof_dsp_set_power_state(sdev, &target_state); +} + +static int imx95_runtime_suspend(struct snd_sof_dev *sdev) +{ + int ret; + const struct sof_dsp_power_state target_state = { + .state = SOF_DSP_PM_D3, + }; + + ret = imx95_disable_enable_core(false); + if (ret < 0) { + dev_err(sdev->dev, "failed to disable core: %d\n", ret); + return ret; + } + + return snd_sof_dsp_set_power_state(sdev, &target_state); +} + +static int imx95_suspend(struct snd_sof_dev *sdev, unsigned int target_state) +{ + int ret; + const struct sof_dsp_power_state target_power_state = { + .state = target_state, + }; + + if (!pm_runtime_suspended(sdev->dev)) { + ret = imx95_disable_enable_core(false); + if (ret < 0) { + dev_err(sdev->dev, "failed to suspend: %d\n", ret); + return ret; + } + } + + return snd_sof_dsp_set_power_state(sdev, &target_power_state); +} + +static struct snd_soc_dai_driver imx95_dai[] = { + { + .name = "sai3", + .playback = { + .channels_min = 1, + .channels_max = 32, + }, + .capture = { + .channels_min = 1, + .channels_max = 32, + }, + }, +}; + +static int imx95_probe(struct snd_sof_dev *sdev) +{ + struct platform_device *pdev; + struct imx95_priv *priv; + struct resource *res; + struct arm_smccc_res smc_ret; + int ret; + + pdev = container_of(sdev->dev, struct platform_device, dev); + + priv = devm_kzalloc(&pdev->dev, sizeof(*priv), GFP_KERNEL); + if (!priv) + return dev_err_probe(&pdev->dev, -ENOMEM, "failed to alloc priv\n"); + + sdev->pdata->hw_pdata = priv; + + /* map DRAM */ + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "dram"); + if (!res) + return dev_err_probe(&pdev->dev, -ENODEV, + "failed to fetch DRAM region\n"); + + sdev->bar[SOF_FW_BLK_TYPE_DRAM] = devm_ioremap(&pdev->dev, res->start, + resource_size(res)); + if (IS_ERR(sdev->bar[SOF_FW_BLK_TYPE_DRAM])) + return dev_err_probe(&pdev->dev, + PTR_ERR(sdev->bar[SOF_FW_BLK_TYPE_DRAM]), + "failed to map DRAM region\n"); + + sdev->mmio_bar = SOF_FW_BLK_TYPE_DRAM; + priv->bootaddr = res->start; + + /* map mailbox region */ + res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "mailbox"); + if (!res) + return dev_err_probe(&pdev->dev, -ENODEV, + "failed to fetch MAILBOX region\n"); + + sdev->bar[SOF_FW_BLK_TYPE_SRAM] = devm_ioremap_wc(&pdev->dev, res->start, + resource_size(res)); + if (IS_ERR(sdev->bar[SOF_FW_BLK_TYPE_SRAM])) + return dev_err_probe(&pdev->dev, + PTR_ERR(sdev->bar[SOF_FW_BLK_TYPE_SRAM]), + "failed to map mailbox region\n"); + + sdev->mailbox_bar = SOF_FW_BLK_TYPE_SRAM; + sdev->dsp_box.offset = MBOX_DSPBOX_OFFSET; + + ret = of_reserved_mem_device_init(sdev->dev); + if (ret) + return dev_err_probe(&pdev->dev, ret, + "failed to bind DMA region\n"); + + priv->ipc_dev = platform_device_register_data(&pdev->dev, "imx-dsp", + PLATFORM_DEVID_NONE, + pdev, sizeof(*pdev)); + if (IS_ERR(priv->ipc_dev)) + return dev_err_probe(&pdev->dev, PTR_ERR(priv->ipc_dev), + "failed to create IPC device\n"); + + priv->ipc_handle = dev_get_drvdata(&priv->ipc_dev->dev); + if (!priv->ipc_handle) { + ret = -EPROBE_DEFER; + dev_err(&pdev->dev, "failed to fetch ipc handle\n"); + goto err_unregister_ipc_dev; + } + + priv->ipc_handle->ops = &ipc_ops; + imx_dsp_set_data(priv->ipc_handle, sdev); + + /* set core boot reset address */ + arm_smccc_smc(IMX_SIP_SRC, IMX_SIP_SRC_M_RESET_ADDR_SET, priv->bootaddr, + IMX95_CPU_VEC_FLAGS_BOOT, 0, 0, 0, 0, &smc_ret); + if ((int)smc_ret.a0 < 0) { + ret = smc_ret.a0; + dev_err(&pdev->dev, "failed to set boot address: %d", ret); + goto err_unregister_ipc_dev; + } + + return 0; + +err_unregister_ipc_dev: + platform_device_unregister(priv->ipc_dev); + + return ret; +} + +static void imx95_remove(struct snd_sof_dev *sdev) +{ + struct imx95_priv *priv; + + priv = sdev->pdata->hw_pdata; + + if (imx95_disable_enable_core(false)) + dev_err(sdev->dev, "failed to stop core\n"); + + platform_device_unregister(priv->ipc_dev); +} + +static const struct snd_sof_dsp_ops sof_imx95_ops = { + .probe = imx95_probe, + .remove = imx95_remove, + + /* mandatory "DSP" ops */ + .run = imx95_run, + .block_read = sof_block_read, + .block_write = sof_block_write, + .send_msg = imx95_send_msg, + .load_firmware = snd_sof_load_firmware_memcpy, + .ipc_msg_data = sof_ipc_msg_data, + + .mailbox_read = sof_mailbox_read, + .mailbox_write = sof_mailbox_write, + + .get_mailbox_offset = imx95_get_mailbox_offset, + .get_bar_index = imx95_get_bar_index, + .get_window_offset = imx95_get_window_offset, + + .pcm_open = sof_stream_pcm_open, + .pcm_close = sof_stream_pcm_close, + .set_stream_data_offset = sof_set_stream_data_offset, + + .runtime_suspend = imx95_runtime_suspend, + .runtime_resume = imx95_runtime_resume, + + .resume = imx95_resume, + .suspend = imx95_suspend, + + .set_power_state = imx95_set_power_state, + + .drv = imx95_dai, + .num_drv = ARRAY_SIZE(imx95_dai), + + .hw_info = SNDRV_PCM_INFO_MMAP | + SNDRV_PCM_INFO_MMAP_VALID | + SNDRV_PCM_INFO_INTERLEAVED | + SNDRV_PCM_INFO_PAUSE | + SNDRV_PCM_INFO_BATCH | + SNDRV_PCM_INFO_NO_PERIOD_WAKEUP, +}; + +static struct snd_sof_of_mach sof_imx95_machs[] = { + { + .compatible = "fsl,imx95-19x19-evk", + .sof_tplg_filename = "sof-imx95-wm8962.tplg", + .drv_name = "asoc-audio-graph-card2", + }, + { + }, +}; + +static struct sof_dev_desc sof_of_imx95_desc = { + .of_machines = sof_imx95_machs, + .ipc_supported_mask = BIT(SOF_IPC_TYPE_3), + .ipc_default = SOF_IPC_TYPE_3, + .default_fw_path = { + [SOF_IPC_TYPE_3] = "imx/sof", + }, + .default_tplg_path = { + [SOF_IPC_TYPE_3] = "imx/sof-tplg", + }, + .default_fw_filename = { + [SOF_IPC_TYPE_3] = "sof-imx95.ri", + }, + .ops = &sof_imx95_ops, +}; + +static const struct of_device_id sof_of_imx95_ids[] = { + { .compatible = "fsl,imx95-cm7-sof", .data = &sof_of_imx95_desc }, + { }, +}; +MODULE_DEVICE_TABLE(of, sof_of_imx95_ids); + +static struct platform_driver snd_sof_of_imx95_driver = { + .probe = sof_of_probe, + .remove = sof_of_remove, + .driver = { + .name = "sof-audio-of-imx95", + .pm = &sof_of_pm, + .of_match_table = sof_of_imx95_ids, + }, +}; +module_platform_driver(snd_sof_of_imx95_driver); + +MODULE_LICENSE("Dual BSD/GPL"); +MODULE_DESCRIPTION("SOF support for i.MX95 platforms"); +MODULE_AUTHOR("Laurentiu Mihalcea "); From patchwork Wed Oct 23 16:21:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Laurentiu Mihalcea X-Patchwork-Id: 13847763 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 37227CFA45D for ; Wed, 23 Oct 2024 17:49:58 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Type:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=EXfzRrMmGuS4F2YWdJq/YzxJF9IR9HFQYca1G3wKa1M=; b=G9VPIriT9s5EdcM9k5TZzblPLS gCQ37gPNlTi5DOW8lTCnxaG4OQlJnBNdxcNMuVJqNEoF2X7WvX76MfLXg6alDMuuBJZGbBspiw7M6 DUEGchCm3Z4tc8acvkEMSeSjgnEO6/qmzr+sN8NPyVYNk3Hb/lIbfazWQwCa3lg7w7Nl2PJWNBNfS u3kOPZwIjSKxw0y9DFURZEPLGR13ELz+9Ly3zaJglJr3JUlfrv79kN0G66WEP2eXEFUjPSKlfV4Ov zRAAcJxFGvQboaDc/NWvVejuGYGq6NRSe5BJjy+O1WpxvaSOFmV8l+b4zvtCW1izjp9sGpG4KtFKO begso6KA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t3fUP-0000000FQms-2jgu; Wed, 23 Oct 2024 17:49:45 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3e7a-0000000F7oW-0JX7 for linux-arm-kernel@bombadil.infradead.org; Wed, 23 Oct 2024 16:22:06 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=Content-Transfer-Encoding:MIME-Version :References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From:Sender:Reply-To: Content-Type:Content-ID:Content-Description; bh=EXfzRrMmGuS4F2YWdJq/YzxJF9IR9HFQYca1G3wKa1M=; b=O+WwOCU/Tfu5Af5DQJ5+8dt+Lf XpjGyeqToeaXStTyRjjx9eILrO6jxYZAf/LiF8OeGzNcmsbLUcAUBEgPw/19Lo1E2AozCTcg49Dms qOUr9jhKEarabVj+F4J1h20WZu7GkQ/N+dtzDnP2YFK8qd4kIgdwQzM5UNL036EqngVkvFDyWutUA EzLl/JKgo8QeXWJqEDcLoFxOLTxWYlUfDoEj0cSiB2Aap7VNH0FsotQuAwBw04i6KUOv1aM++Eeg9 I2o60rcPvWr9saRZKsrBIUBYmA5wX5G+TZDf75myDaHg+SOxB5wAjS4dSkX1zcKolNaGxx7nlgKUy LQSLDK4w==; Received: from mail-ed1-x529.google.com ([2a00:1450:4864:20::529]) by desiato.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t3e7X-00000008R9f-04Vu for linux-arm-kernel@lists.infradead.org; Wed, 23 Oct 2024 16:22:04 +0000 Received: by mail-ed1-x529.google.com with SMTP id 4fb4d7f45d1cf-5c9c28c1e63so8095682a12.0 for ; Wed, 23 Oct 2024 09:22:01 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1729700520; x=1730305320; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=EXfzRrMmGuS4F2YWdJq/YzxJF9IR9HFQYca1G3wKa1M=; b=NcAeFxOyRwZXZ/UveHjfDBVVAvvnz1+lfJxOSBDJ5t69X23nZIxJNZZr4TkUG6GqNS F+B+YM5geyfrYKGTEA3f2osRNM+5lGHpErR+CKyJ4CiLDv6MU+1PWoEJJcqsbbvJA2c6 xb2Ob3hIUj9dcZFYMBxCeneWRUgpk+Chs8rZzY/iC1+EUebxTPKZzeV4DnedKKoOViHe r2GEXCkBKHbtyNQf4CnXi5ZN6G9zppNAsf/i+c4E2uR8x7JHHMXVHaI64YqZOoULJq0e Noh9MFDvCXzct7C/JtPRpvjHJ4m8vWLBuWlm7v7/YcDvxsZbjuJ8fXQMvjCkBFUCkFg3 4Q9w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1729700520; x=1730305320; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=EXfzRrMmGuS4F2YWdJq/YzxJF9IR9HFQYca1G3wKa1M=; b=EOfjgHJkAHPbx79eOCc8K7aGMqZbwMRPAH3Bgm9fjq+4RVTDIaOiHLdZWNKXjTolfu 2gyEh4HBpzAya0HKBFkidGUlvMjFDGgHR/8BdcV5bRhwOXwWi0Isil6loEF5vH3QlcTV HddjYiZakEW1l9+D1XQTI4vou8ohQ+vw+lTHMnvhYwkXtFoJIAdDZoSD5dFw2eNKZcc4 8zNKb5+vXq7kIowp7JwY2wD0HUdpEfmw1/besEoFuHAj4wL73JMLVtfpYQtDcjEIy6DP G2+U0cdbhXTuCGO7zWFk4jHLloAbBXJunKBmgOCISUc8sFtGh2wHcLxDAzb8pc8Kmn+r Fg/A== X-Forwarded-Encrypted: i=1; AJvYcCXcdlV70obOw5BI+govu36vY4VsTqFMvUUCbEKCihuVxZrRAPKHyWDmYdfFLM8CMcIngpXrPJ39Ztr9k+NWZ1CO@lists.infradead.org X-Gm-Message-State: AOJu0YxmFuy6zdZxpzAKo2GI2D7ibFMmBFbXSWi3s/agdwij9yA2ueML Y13Eb/kxbn6qgSCidakJAG0VUI1DgYqBclyl1GQDXUUPWqxRXPfE X-Google-Smtp-Source: AGHT+IHyWANucfMDs/aKTkkC8XZgbLKNuPqA5aMjbx82Ju9yhv6/bGm9rJGwx/eAlr5ksCAKO44IYQ== X-Received: by 2002:a05:6402:2344:b0:5c9:59e6:e908 with SMTP id 4fb4d7f45d1cf-5cb8ac5e8ebmr3350503a12.6.1729700520186; Wed, 23 Oct 2024 09:22:00 -0700 (PDT) Received: from playground.localdomain ([86.127.146.72]) by smtp.gmail.com with ESMTPSA id 4fb4d7f45d1cf-5cb66c72609sm4588382a12.88.2024.10.23.09.21.58 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Oct 2024 09:21:59 -0700 (PDT) From: Laurentiu Mihalcea To: Rob Herring , Krzysztof Kozlowski , Shawn Guo , Daniel Baluta , Peng Fan , Mark Brown , Takashi Iwai , Kuninori Morimoto , Bard Liao , Peter Ujfalusi , Jaroslav Kysela , Pierre-Louis Bossart , Conor Dooley , Mathieu Poirier , Iuliana Prodan Cc: linux-remoteproc@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-sound@vger.kernel.org, sound-open-firmware@alsa-project.org, linux-kernel@vger.kernel.org Subject: [PATCH 4/4] arm64: dts: imx: add imx95 dts for sof Date: Wed, 23 Oct 2024 12:21:14 -0400 Message-Id: <20241023162114.3354-5-laurentiumihalcea111@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241023162114.3354-1-laurentiumihalcea111@gmail.com> References: <20241023162114.3354-1-laurentiumihalcea111@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241023_172203_222834_E4AF2B01 X-CRM114-Status: GOOD ( 14.67 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Laurentiu Mihalcea Add imx95 DTS for SOF usage. Signed-off-by: Laurentiu Mihalcea --- arch/arm64/boot/dts/freescale/Makefile | 1 + .../dts/freescale/imx95-19x19-evk-sof.dts | 86 +++++++++++++++++++ 2 files changed, 87 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile index 2a69b7ec6d6d..94660e3e8b2b 100644 --- a/arch/arm64/boot/dts/freescale/Makefile +++ b/arch/arm64/boot/dts/freescale/Makefile @@ -267,6 +267,7 @@ dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxca.dtb dtb-$(CONFIG_ARCH_MXC) += imx93-tqma9352-mba93xxla.dtb dtb-$(CONFIG_ARCH_MXC) += imx93-var-som-symphony.dtb dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk.dtb +dtb-$(CONFIG_ARCH_MXC) += imx95-19x19-evk-sof.dtb imx8mm-kontron-dl-dtbs := imx8mm-kontron-bl.dtb imx8mm-kontron-dl.dtbo diff --git a/arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts b/arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts new file mode 100644 index 000000000000..b10dc1af5ce2 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx95-19x19-evk-sof.dts @@ -0,0 +1,86 @@ +// SPDX-License-Identifier: (GPL-2.0+ OR MIT) +/* + * Copyright 2024 NXP + */ + +/dts-v1/; + +#include "imx95-19x19-evk.dts" + +/ { + reserved-memory { + adma_res: memory@86100000 { + compatible = "shared-dma-pool"; + reg = <0x0 0x86100000 0x0 0x100000>; + no-map; + }; + }; + + sound-wm8962 { + status = "disabled"; + }; + + sof-sound-wm8962 { + compatible = "audio-graph-card2"; + + links = <&cpu>; + label = "wm8962-audio"; + + hp-det-gpios = <&gpio2 11 GPIO_ACTIVE_HIGH>; + + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_hp>; + + widgets = + "Headphone", "Headphones", + "Microphone", "Headset Mic"; + routing = + "Headphones", "HPOUTL", + "Headphones", "HPOUTR", + "Headset Mic", "MICBIAS", + "IN3R", "Headset Mic", + "IN1R", "Headset Mic"; + }; + + sof_cpu: cm7-cpu@80000000 { + compatible = "fsl,imx95-cm7-sof"; + + reg = <0x0 0x80000000 0x0 0x400000>, + <0x0 0x86000000 0x0 0x3000>; + reg-names = "dram", "mailbox"; + + memory-region = <&adma_res>; + + mboxes = <&mu7 2 0>, <&mu7 2 1>, <&mu7 3 0>, <&mu7 3 1>; + mbox-names = "txdb0", "txdb1", "rxdb0", "rxdb1"; + + cpu: port { + cpu_ep: endpoint { remote-endpoint = <&codec_ep>; }; + }; + }; +}; + +&wm8962 { + assigned-clocks = <&scmi_clk IMX95_CLK_AUDIOPLL1_VCO>, + <&scmi_clk IMX95_CLK_AUDIOPLL2_VCO>, + <&scmi_clk IMX95_CLK_AUDIOPLL1>, + <&scmi_clk IMX95_CLK_AUDIOPLL2>, + <&scmi_clk IMX95_CLK_SAI3>; + assigned-clock-parents = <0>, <0>, <0>, <0>, <&scmi_clk IMX95_CLK_AUDIOPLL1>; + assigned-clock-rates = <3932160000>, <3612672000>, + <393216000>, <361267200>, + <12288000>; + status = "okay"; + + port { + codec_ep: endpoint { remote-endpoint = <&cpu_ep>; }; + }; +}; + +&edma2 { + dma-channel-mask = <0x3fffffff>, <0xffffffff>; +}; + +&sai3 { + status = "disabled"; +};