From nobody Sat Feb 7 15:12:17 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DB813244668; Mon, 27 Oct 2025 12:56:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569820; cv=none; b=JrnyS7j5KN0pHz+z3iIZ5BzLaP5cCSGSPz2LsTQStavhJdGh3NlOoPOZH7eh5gPHQ5NKRmRwjKXJwM3oYRHaL2uNVelWXFe1a7p2jjaeRkx1Z5mksaRIYXRYxTyEXJjSpdvWAgQMGk7TRFasDw7roicB9J0DFgEbOveRE809XF0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569820; c=relaxed/simple; bh=fHOStHU8iPV24HUnkdIweLHy8WakycAIf7e5q0yhXig=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qxZPKWWoZaUhNFODR1NZx53zGMSNiKzEPQQkOn55zG7X2ZN5nguBFQolbHt/GEiYRZanAK6v8iyJwjs+JW7bQmwFASlmnXf4+KZUEYmEeT+UuFnM/odAXuTPWGOOdudsA5kpvNT4dOGQUOlJAh5vIHRc8fELkJ3X0J7oz6FWC8o= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Oxxn+ju1; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Oxxn+ju1" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 5FDA8C4CEFF; Mon, 27 Oct 2025 12:56:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761569819; bh=fHOStHU8iPV24HUnkdIweLHy8WakycAIf7e5q0yhXig=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Oxxn+ju1l1rZrihiBgso9u9BBjSAS/FhnaJRzZdarxEuKtSpRtSf5fqjjOwMBbivl NI9k+q3LmooVQs9qeRPxH8wcIKn0UodDzTuDdwdVmBw/bS9qVuDbnW/knnCpPB0gQB jiaQaV7yxOpf0ZN2//uUpAAVFI/089gonDn85pLiRkEGehvBcqhNRKBSpt2yKDUFZg OotIs24M7QPN+q+r3e448MpqaJAE4xmEZJroe62ZLaLRSUtt0y/rMr4VGyGv2Gu8w3 Ac59jKopBQ5ui77x9xnBdyuS6bNDte0R8wAcodmw+d6eejMpcVJ1eWgRZGHubKuu0m kzj6eg9OOJcXw== Received: by wens.tw (Postfix, from userid 1000) id 6CF805FCB3; Mon, 27 Oct 2025 20:56:57 +0800 (CST) From: Chen-Yu Tsai To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mark Brown , Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Conor Dooley Subject: [PATCH v2 01/10] dt-bindings: dma: allwinner,sun50i-a64-dma: Add compatibles for A523 Date: Mon, 27 Oct 2025 20:56:42 +0800 Message-ID: <20251027125655.793277-2-wens@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027125655.793277-1-wens@kernel.org> References: <20251027125655.793277-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" There are two DMA controllers on the A523, one in the main system area and the other for the MCU. These are the same as the one found on the A100. The only difference is the DMA endpoint (DRQ) layout. Since the number of channels and endpoints are described with additional generic properties, just add new A523-specific compatible strings and fallback to the A100 one. Acked-by: Conor Dooley Signed-off-by: Chen-Yu Tsai --- .../devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma= .yaml b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml index 0f2501f72cca..c3e14eb6cfff 100644 --- a/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml +++ b/Documentation/devicetree/bindings/dma/allwinner,sun50i-a64-dma.yaml @@ -29,7 +29,10 @@ properties: - const: allwinner,sun8i-r40-dma - const: allwinner,sun50i-a64-dma - items: - - const: allwinner,sun50i-h616-dma + - enum: + - allwinner,sun50i-h616-dma + - allwinner,sun55i-a523-dma + - allwinner,sun55i-a523-mcu-dma - const: allwinner,sun50i-a100-dma =20 reg: --=20 2.47.3 From nobody Sat Feb 7 15:12:17 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 53AEC25CC5E; Mon, 27 Oct 2025 12:57:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569820; cv=none; b=IbsfZWjrmZMcTa3P+BfOYC14ERy3MvJdbUxahbhsoPW0AiEbyj94zECLNjo73qtxqx4tgcSVwLUfOqVxnLKzO9IqmcxNMLyk2OSVmdygl48wDIcTNQOkyaZh6A9NIka3/2CF/SAUagsXINn0ihYyyNHBUFE+ghoaDU9G5qG0OqI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569820; c=relaxed/simple; bh=C8ZaO/vclhrRJ/sXVWYmHzL2b2GlrrEHt+/9PpUhHqU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=H53wu900lt+EVy7NarKIr/mKEm10K2Rg4n08b9UqCZhvQqvZfrmCifpxi+svdypS8zGajXXbtiMswX3i/eetXYmqGac01uFhLAEr9bqI0NypINgEZcOWuf3NuzRJMNj+C/qlDjEllK0irIT2q8tyeeB+ngZru2R9hgBMO3sE12U= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=SDpZx8JT; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="SDpZx8JT" Received: by smtp.kernel.org (Postfix) with ESMTPSA id BFBBAC116D0; Mon, 27 Oct 2025 12:56:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761569819; bh=C8ZaO/vclhrRJ/sXVWYmHzL2b2GlrrEHt+/9PpUhHqU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=SDpZx8JTOCG0wRJg0weXMLzBMOKL3CC40Xm7nOBQYuKbOmthaI+FftWarXiTp+UWn 02Kmhs06jxILnPOt44lobvccd9IQfQikm9RdesoQGDQuoYLGutkfPJptcQocV4HPXj NTlCbumL91ih/jBOmL5LHVV8PKoSDkI3EBxPesdU2oRdJeBIkVEDd1ONVbf4Y44uWT M4totbnOLEgSZE8p/1MSXWujDst7x/Xf4ahQL+WX79Z14KRJXYWwZjoBjM4f38z5W4 Z+KOZuJSn2xXPoFANLwZBUyrH9EglolNIW7RanbsBNEclZGg5pZ08I/0etAIgDTHfm SrEJx7cPvWsCQ== Received: by wens.tw (Postfix, from userid 1000) id 73D5F5FE34; Mon, 27 Oct 2025 20:56:57 +0800 (CST) From: Chen-Yu Tsai To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mark Brown , Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Conor Dooley Subject: [PATCH v2 02/10] ASoC: dt-bindings: allwinner,sun4i-a10-i2s: Add compatible for A523 Date: Mon, 27 Oct 2025 20:56:43 +0800 Message-ID: <20251027125655.793277-3-wens@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027125655.793277-1-wens@kernel.org> References: <20251027125655.793277-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" As far as the author can tell, based on their respective manuals, the I2S interface controllers found in the Allwinner A523 SoC is the same as ones in the R329 SoC. Add a SoC-specific compatible for it, with a fallback to the R329's compatible. Acked-by: Conor Dooley Signed-off-by: Chen-Yu Tsai --- .../devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2= s.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.ya= ml index 739114fb6549..ae86cb5f0a74 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-i2s.yaml @@ -33,7 +33,9 @@ properties: - const: allwinner,sun50i-h6-i2s - const: allwinner,sun50i-r329-i2s - items: - - const: allwinner,sun20i-d1-i2s + - enum: + - allwinner,sun20i-d1-i2s + - allwinner,sun55i-a523-i2s - const: allwinner,sun50i-r329-i2s =20 reg: --=20 2.47.3 From nobody Sat Feb 7 15:12:17 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5365925C838; Mon, 27 Oct 2025 12:57:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569820; cv=none; b=tXJrDHQqd76M5DxLUiKNyXguZC08ouHlcP1rtKOKX1z4zuKimA1fuIzPpBMDN/oO4qWVjxlKyyj29cpT6djx+P8UgJ6effC9AtbBdDAohwkvGzqCKX5LW1xE857Mt9jxHQlR0lLQhFuZOJEdecvoOF/tMFYBbp136SVhKreXsQQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569820; c=relaxed/simple; bh=tZng3pvLf5NVIYjrv5Cdlkb3kjII1JMSXNhC/Cdf7Og=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Tal9yfGAaSgWkcWy3b5Crzyo5vyuiqAHzU+iOlnaTEpa+ryAxgIGRyvAjFMS9/kyF8O8S3gCQRw8k7yOYQz6OpoPynCmDYMldh4JMQxvE3A1f9NFYJtdkYeWMkQNh/C9Bn3QZWAGGCMmNkKxjCO/hipmL4iwR8z847wwbpCpfWs= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=W/brPLd2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="W/brPLd2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id B5F34C16AAE; Mon, 27 Oct 2025 12:56:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761569819; bh=tZng3pvLf5NVIYjrv5Cdlkb3kjII1JMSXNhC/Cdf7Og=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=W/brPLd27LQxkag5GvBdnPPh7bFVokQlJWK6AREvtkOXp7m0Ter+XyZTQafVICWIL XNX5HD29gmuENvJOFkRAgzO8W8T5Wx7bBHckFOOaw0cU+f2qwGBMWKLmuxrmJOQ+DZ IhcY1MQaGv+x7kE6ys2jMpKouNNg/GOKrYDpWWQqVc6YN9pFkGke5Hs4+Hn9Gqwj+g 1gCSFNx7NPhZ3+vZFRHiuw1KOTbP+8JdtiXQgxe0zCCsuZ0YRx1cnoGkBWlz252F7q zuciNLynCA+ngLHjDc9AKQa5SdAeUEZq5kbHMhur97m7r4LaqVUYRE6CTowG1o/QiK uY7FEv03zbb9g== Received: by wens.tw (Postfix, from userid 1000) id 8455C5FEEE; Mon, 27 Oct 2025 20:56:57 +0800 (CST) From: Chen-Yu Tsai To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mark Brown , Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Conor Dooley Subject: [PATCH v2 03/10] ASoC: dt-bindings: allwinner,sun4i-a10-spdif: Add compatible for A523 Date: Mon, 27 Oct 2025 20:56:44 +0800 Message-ID: <20251027125655.793277-4-wens@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027125655.793277-1-wens@kernel.org> References: <20251027125655.793277-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The SPDIF hardware block in the A523 SoC has the same layout as the H616 for the transmitter side. However unlike previous generations, the hardware block now takes separate module clocks for the TX and RX sides. This presumably allows the hardware to send and receive audio streams at different sample rates. The new hardware also gained RX insertion detection, and some extra information registers. Add a new compatible for it without any fallbacks. Acked-by: Conor Dooley Signed-off-by: Chen-Yu Tsai --- .../sound/allwinner,sun4i-a10-spdif.yaml | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-sp= dif.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdi= f.yaml index aa32dc950e72..1d089ba70f45 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-spdif.yaml @@ -23,6 +23,7 @@ properties: - const: allwinner,sun8i-h3-spdif - const: allwinner,sun50i-h6-spdif - const: allwinner,sun50i-h616-spdif + - const: allwinner,sun55i-a523-spdif - items: - const: allwinner,sun8i-a83t-spdif - const: allwinner,sun8i-h3-spdif @@ -37,14 +38,12 @@ properties: maxItems: 1 =20 clocks: - items: - - description: Bus Clock - - description: Module Clock + minItems: 2 + maxItems: 3 =20 clock-names: - items: - - const: apb - - const: spdif + minItems: 2 + maxItems: 3 =20 # Even though it only applies to subschemas under the conditionals, # not listing them here will trigger a warning because of the @@ -65,6 +64,7 @@ allOf: - allwinner,sun8i-h3-spdif - allwinner,sun50i-h6-spdif - allwinner,sun50i-h616-spdif + - allwinner,sun55i-a523-spdif =20 then: required: @@ -98,6 +98,38 @@ allOf: - const: rx - const: tx =20 + - if: + properties: + compatible: + contains: + enum: + - allwinner,sun55i-a523-spdif + + then: + properties: + clocks: + items: + - description: Bus Clock + - description: TX Clock + - description: RX Clock + + clock-names: + items: + - const: apb + - const: tx + - const: rx + else: + properties: + clocks: + items: + - description: Bus Clock + - description: Module Clock + + clock-names: + items: + - const: apb + - const: spdif + required: - "#sound-dai-cells" - compatible --=20 2.47.3 From nobody Sat Feb 7 15:12:17 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 656CE25D202; Mon, 27 Oct 2025 12:57:00 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569820; cv=none; b=T36VdFTBt/tgPo8vbJBk5ferupslNJ0a4Fh6+Q5ku6UaF59wLYLDk+Xa37mSFl8i+wUYT+vjyrIjnTJY9pzUJbba71ngA71HQ+bEUhsMGAd2QPcncOCFaCI9CouhOMZ/aS+zeP53VqEbOemuh2Zt/15cPodKWP1uZ700ZOhOtGw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569820; c=relaxed/simple; bh=zxJ79mA1lCmnOVxEdjNKKgjbhpuWz79NbCyv/SzMZnU=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sV0DUhKxSlLLIuCkincZeGztwJ1xTK6UwL4bD+WTpG3LomElM5fwRf7DnNhqH4vm/VTndTOgqGRj5OiZFs3lC71m+ME3uwJ/y8J9OdxwmJUXjVI5tPsioErahR1yC+E6wjiU0VfSzy9Z+L8QnHCoB72KPNXNHH0YG8SOgVTfmFE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=YHZDMTLr; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="YHZDMTLr" Received: by smtp.kernel.org (Postfix) with ESMTPSA id C9365C19421; Mon, 27 Oct 2025 12:56:59 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761569820; bh=zxJ79mA1lCmnOVxEdjNKKgjbhpuWz79NbCyv/SzMZnU=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=YHZDMTLr3lwyO8l6wrInwbdUuhdncaCwZ9Zhr1SZXbEfLFaNW0Fea+0g8ZCksTdXl w3jM0ZTCu/3tEkV2pcKDgTzYmob7A8A/UtHCOUcHvfDjprmNT+rdrFj+vWZCyeUf8b kLGIOCIz+FqoySc3Apx1fY7Yc+iwzlWUV0DkNM41wWLEHi4rd8m2yJBtqAJBAmHxBr BPzovagqCU838CIrey56iuHp75/IxTxqYCecIqs8Cr0euOhjxzw1tv0w6CMwzhId+H J9xRafULE7Txu4/Dm5OewCkiPep+pOYHJUbBTEZdynXcx92f2h6g7OFvu0AKhBeSiV emgADGE+zq/Lg== Received: by wens.tw (Postfix, from userid 1000) id 89EE15FF19; Mon, 27 Oct 2025 20:56:57 +0800 (CST) From: Chen-Yu Tsai To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mark Brown , Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 04/10] ASoC: sun4i-spdif: Support SPDIF output on A523 family Date: Mon, 27 Oct 2025 20:56:45 +0800 Message-ID: <20251027125655.793277-5-wens@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027125655.793277-1-wens@kernel.org> References: <20251027125655.793277-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The TX side of the SPDIF block on the A523 is almost the same the previous generations, the only difference being that it has separate module clock inputs for the TX and RX side. Since this driver currently only supports TX, add support for a different clock name so that TX and RX clocks can be separated if RX support is ever added. Then add support for the A523. Signed-off-by: Chen-Yu Tsai Reviewed-by: Jernej Skrabec --- Changes since v1: - Dropped bogus name removal - Dropped clock rate debug message --- sound/soc/sunxi/sun4i-spdif.c | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/sound/soc/sunxi/sun4i-spdif.c b/sound/soc/sunxi/sun4i-spdif.c index 34e5bd94e9af..2e7ac8ab71bb 100644 --- a/sound/soc/sunxi/sun4i-spdif.c +++ b/sound/soc/sunxi/sun4i-spdif.c @@ -177,6 +177,7 @@ struct sun4i_spdif_quirks { bool has_reset; unsigned int val_fctl_ftx; unsigned int mclk_multiplier; + const char *tx_clk_name; }; =20 struct sun4i_spdif_dev { @@ -572,6 +573,14 @@ static const struct sun4i_spdif_quirks sun50i_h6_spdif= _quirks =3D { .mclk_multiplier =3D 1, }; =20 +static const struct sun4i_spdif_quirks sun55i_a523_spdif_quirks =3D { + .reg_dac_txdata =3D SUN8I_SPDIF_TXFIFO, + .val_fctl_ftx =3D SUN50I_H6_SPDIF_FCTL_FTX, + .has_reset =3D true, + .mclk_multiplier =3D 1, + .tx_clk_name =3D "tx", +}; + static const struct of_device_id sun4i_spdif_of_match[] =3D { { .compatible =3D "allwinner,sun4i-a10-spdif", @@ -594,6 +603,15 @@ static const struct of_device_id sun4i_spdif_of_match[= ] =3D { /* Essentially the same as the H6, but without RX */ .data =3D &sun50i_h6_spdif_quirks, }, + { + .compatible =3D "allwinner,sun55i-a523-spdif", + /* + * Almost the same as H6, but has split the TX and RX clocks, + * has a separate reset bit for the RX side, and has some + * expanded features for the RX side. + */ + .data =3D &sun55i_a523_spdif_quirks, + }, { /* sentinel */ } }; MODULE_DEVICE_TABLE(of, sun4i_spdif_of_match); @@ -635,6 +653,7 @@ static int sun4i_spdif_probe(struct platform_device *pd= ev) const struct sun4i_spdif_quirks *quirks; int ret; void __iomem *base; + const char *tx_clk_name =3D "spdif"; =20 dev_dbg(&pdev->dev, "Entered %s\n", __func__); =20 @@ -671,9 +690,12 @@ static int sun4i_spdif_probe(struct platform_device *p= dev) return PTR_ERR(host->apb_clk); } =20 - host->spdif_clk =3D devm_clk_get(&pdev->dev, "spdif"); + if (quirks->tx_clk_name) + tx_clk_name =3D quirks->tx_clk_name; + host->spdif_clk =3D devm_clk_get(&pdev->dev, tx_clk_name); if (IS_ERR(host->spdif_clk)) { - dev_err(&pdev->dev, "failed to get a spdif clock.\n"); + dev_err(&pdev->dev, "failed to get the \"%s\" clock.\n", + tx_clk_name); return PTR_ERR(host->spdif_clk); } =20 --=20 2.47.3 From nobody Sat Feb 7 15:12:17 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1466F29A9FA; Mon, 27 Oct 2025 12:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; cv=none; b=kOzW6YV6TfQUPijZzakd8PeJNjZOFqoHJX8ycPEvBOEUvRQQTTqW3/Jh+7doOQOqvV0ogxxvGXCzQulburSiGde1PfnKw2zEd/QWstYNs7Q2lo0RAHHwp9bDB+6DrAjIbGxUTqbI9kEO+IBPoFaVw/xg93QN/8evrXAiAM0XmsE= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; c=relaxed/simple; bh=6zf3HJ4SFn/da8903S5Ji6WZxaAKcw0a+EFVvyPIafQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=riQ0Sr4cq27yRKY5mKDvphJ7qF3WVOzraP+BHmA6uq3oWn5YEOLzqqIs4y49ardhyjrw71wuLNsqtS/ZqiC1o1EPOAq2/0bUgPAgU6u0JOAs49gz+GZpNEDcpXvpSI6OeRqGyDjjZ9vvVcBu6Rgv7stNCf8hUKogIELK7QqDxOM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=d8WqVO9e; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="d8WqVO9e" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 7C0CBC4CEFF; Mon, 27 Oct 2025 12:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761569821; bh=6zf3HJ4SFn/da8903S5Ji6WZxaAKcw0a+EFVvyPIafQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=d8WqVO9ewM2f4dpadJXwH1G+wsCxcKw+wOJe7fbd8xZMraDijIwwWQJwC0V9Go5Lh 4vK02KElzkfrDwK1vZhMHZ5llNawWQZumn5YFXJ4quAz4mBIgNF5zG4aTM/TQz4cXs GUXF84eXaQVjeoWxqOW509eQtGbWJAhI3t1ow1bkZvCduTMC/wZRyo6Vc3bcDa7qPC YJzJOQW280WqEtSGg5mYR8Yb7+1TRtAmOqZKZHXKU2TQyck8DwKpZz3RtITkg+ZY5C ACYpBno32losPmltjPYDo+5no/FlkpPBRAvi5BVTXg4O8XfISPeOABN9teHdWiZ04Q XCJEEeDHWJL6g== Received: by wens.tw (Postfix, from userid 1000) id 933FB5FF71; Mon, 27 Oct 2025 20:56:57 +0800 (CST) From: Chen-Yu Tsai To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mark Brown , Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH v2 05/10] arm64: dts: allwinner: a523: Add DMA controller device nodes Date: Mon, 27 Oct 2025 20:56:46 +0800 Message-ID: <20251027125655.793277-6-wens@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027125655.793277-1-wens@kernel.org> References: <20251027125655.793277-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The A523 has two DMA controllers. Add device nodes for both. Also hook up DMA for existing devices. Acked-by: Jernej Skrabec Signed-off-by: Chen-Yu Tsai --- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/bo= ot/dts/allwinner/sun55i-a523.dtsi index a9e051a8bea3..8edbd3873199 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi @@ -241,6 +241,8 @@ uart0: serial@2500000 { reg-io-width =3D <4>; clocks =3D <&ccu CLK_BUS_UART0>; resets =3D <&ccu RST_BUS_UART0>; + dmas =3D <&dma 14>, <&dma 14>; + dma-names =3D "tx", "rx"; status =3D "disabled"; }; =20 @@ -252,6 +254,8 @@ uart1: serial@2500400 { reg-io-width =3D <4>; clocks =3D <&ccu CLK_BUS_UART1>; resets =3D <&ccu RST_BUS_UART1>; + dmas =3D <&dma 15>, <&dma 15>; + dma-names =3D "tx", "rx"; status =3D "disabled"; }; =20 @@ -263,6 +267,8 @@ uart2: serial@2500800 { reg-io-width =3D <4>; clocks =3D <&ccu CLK_BUS_UART2>; resets =3D <&ccu RST_BUS_UART2>; + dmas =3D <&dma 16>, <&dma 16>; + dma-names =3D "tx", "rx"; status =3D "disabled"; }; =20 @@ -274,6 +280,8 @@ uart3: serial@2500c00 { reg-io-width =3D <4>; clocks =3D <&ccu CLK_BUS_UART3>; resets =3D <&ccu RST_BUS_UART3>; + dmas =3D <&dma 17>, <&dma 17>; + dma-names =3D "tx", "rx"; status =3D "disabled"; }; =20 @@ -285,6 +293,8 @@ uart4: serial@2501000 { reg-io-width =3D <4>; clocks =3D <&ccu CLK_BUS_UART4>; resets =3D <&ccu RST_BUS_UART4>; + dmas =3D <&dma 18>, <&dma 18>; + dma-names =3D "tx", "rx"; status =3D "disabled"; }; =20 @@ -296,6 +306,8 @@ uart5: serial@2501400 { reg-io-width =3D <4>; clocks =3D <&ccu CLK_BUS_UART5>; resets =3D <&ccu RST_BUS_UART5>; + dmas =3D <&dma 19>, <&dma 19>; + dma-names =3D "tx", "rx"; status =3D "disabled"; }; =20 @@ -307,6 +319,8 @@ uart6: serial@2501800 { reg-io-width =3D <4>; clocks =3D <&ccu CLK_BUS_UART6>; resets =3D <&ccu RST_BUS_UART6>; + dmas =3D <&dma 20>, <&dma 20>; + dma-names =3D "tx", "rx"; status =3D "disabled"; }; =20 @@ -318,6 +332,8 @@ uart7: serial@2501c00 { reg-io-width =3D <4>; clocks =3D <&ccu CLK_BUS_UART7>; resets =3D <&ccu RST_BUS_UART7>; + dmas =3D <&dma 21>, <&dma 21>; + dma-names =3D "tx", "rx"; status =3D "disabled"; }; =20 @@ -329,6 +345,8 @@ i2c0: i2c@2502000 { interrupts =3D ; clocks =3D <&ccu CLK_BUS_I2C0>; resets =3D <&ccu RST_BUS_I2C0>; + dmas =3D <&dma 43>, <&dma 43>; + dma-names =3D "rx", "tx"; status =3D "disabled"; #address-cells =3D <1>; #size-cells =3D <0>; @@ -342,6 +360,8 @@ i2c1: i2c@2502400 { interrupts =3D ; clocks =3D <&ccu CLK_BUS_I2C1>; resets =3D <&ccu RST_BUS_I2C1>; + dmas =3D <&dma 44>, <&dma 44>; + dma-names =3D "rx", "tx"; status =3D "disabled"; #address-cells =3D <1>; #size-cells =3D <0>; @@ -355,6 +375,8 @@ i2c2: i2c@2502800 { interrupts =3D ; clocks =3D <&ccu CLK_BUS_I2C2>; resets =3D <&ccu RST_BUS_I2C2>; + dmas =3D <&dma 45>, <&dma 45>; + dma-names =3D "rx", "tx"; status =3D "disabled"; #address-cells =3D <1>; #size-cells =3D <0>; @@ -368,6 +390,8 @@ i2c3: i2c@2502c00 { interrupts =3D ; clocks =3D <&ccu CLK_BUS_I2C3>; resets =3D <&ccu RST_BUS_I2C3>; + dmas =3D <&dma 46>, <&dma 46>; + dma-names =3D "rx", "tx"; status =3D "disabled"; #address-cells =3D <1>; #size-cells =3D <0>; @@ -381,6 +405,8 @@ i2c4: i2c@2503000 { interrupts =3D ; clocks =3D <&ccu CLK_BUS_I2C4>; resets =3D <&ccu RST_BUS_I2C4>; + dmas =3D <&dma 47>, <&dma 47>; + dma-names =3D "rx", "tx"; status =3D "disabled"; #address-cells =3D <1>; #size-cells =3D <0>; @@ -394,6 +420,8 @@ i2c5: i2c@2503400 { interrupts =3D ; clocks =3D <&ccu CLK_BUS_I2C5>; resets =3D <&ccu RST_BUS_I2C5>; + dmas =3D <&dma 48>, <&dma 48>; + dma-names =3D "rx", "tx"; status =3D "disabled"; #address-cells =3D <1>; #size-cells =3D <0>; @@ -408,6 +436,19 @@ syscon: syscon@3000000 { ranges; }; =20 + dma: dma-controller@3002000 { + compatible =3D "allwinner,sun55i-a523-dma", + "allwinner,sun50i-a100-dma"; + reg =3D <0x03002000 0x1000>; + interrupts =3D ; + clocks =3D <&ccu CLK_BUS_DMA>, <&ccu CLK_MBUS_DMA>; + clock-names =3D "bus", "mbus"; + dma-channels =3D <16>; + dma-requests =3D <54>; + resets =3D <&ccu RST_BUS_DMA>; + #dma-cells =3D <1>; + }; + sid: efuse@3006000 { compatible =3D "allwinner,sun55i-a523-sid", "allwinner,sun50i-a64-sid"; @@ -729,6 +770,8 @@ r_i2c0: i2c@7081400 { reg =3D <0x07081400 0x400>; interrupts =3D ; clocks =3D <&r_ccu CLK_BUS_R_I2C0>; + dmas =3D <&dma 49>, <&dma 49>; + dma-names =3D "rx", "tx"; resets =3D <&r_ccu RST_BUS_R_I2C0>; pinctrl-names =3D "default"; pinctrl-0 =3D <&r_i2c_pins>; @@ -775,6 +818,19 @@ mcu_ccu: clock-controller@7102000 { #reset-cells =3D <1>; }; =20 + mcu_dma: dma-controller@7121000 { + compatible =3D "allwinner,sun55i-a523-mcu-dma", + "allwinner,sun50i-a100-dma"; + reg =3D <0x07121000 0x1000>; + interrupts =3D ; + clocks =3D <&mcu_ccu CLK_BUS_MCU_DMA>, <&mcu_ccu CLK_MCU_MBUS_DMA>; + clock-names =3D "bus", "mbus"; + dma-channels =3D <16>; + dma-requests =3D <15>; + resets =3D <&mcu_ccu RST_BUS_MCU_DMA>; + #dma-cells =3D <1>; + }; + npu: npu@7122000 { compatible =3D "vivante,gc"; reg =3D <0x07122000 0x1000>; --=20 2.47.3 From nobody Sat Feb 7 15:12:17 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 14519299948; Mon, 27 Oct 2025 12:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; cv=none; b=dIXWLzwdI6IjBFct+PQIOwXZFk9PqLUMQ4yzfY+474myOkJahamHgmK4dCwACrvEwcy8x8CIycIL+0yyqbFmGVVdhipP8f6Tfmwe2wN1fbcTEAOK8mJHqxGsq2D6udG2LGsaL4v6JwLP9q2VfGm7dq96RU/UVedc3uVZrt+JTHk= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; c=relaxed/simple; bh=f0SoP/zvRQAOERqGrbZ2nIh2yRiuv79vNh/YNhiYisw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=IrY1LlEVXyPDHBMwOqqDWyIbX+niV9rynaAXthkH+jI/2nv0WNrgQuOIcGlwdQ2vMs7Dd2xQh/Do0UpxJdtE2q/zUlXBOnMdBV2of5BISwYMtUj5nASV5LS+dlZav1cuzSg4+avFK1m4Csoacf4SEFjcPs1dwmhnifzZtjxe3UE= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=Mqs824nK; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="Mqs824nK" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8501BC113D0; Mon, 27 Oct 2025 12:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761569821; bh=f0SoP/zvRQAOERqGrbZ2nIh2yRiuv79vNh/YNhiYisw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Mqs824nK/IIPtizqFpAnhI2rX4aRkfAg+jwVA5oVxmxbdQClrPE7CszShxsjr6iyq mgxON4vZ4z+8asFVhBA1/vTHiHZVoQKfW4Gg6yIicdXWCRcUDfKfQrN5Y/7uT+jRRH 0d+3tk6ASvDZs/1+UjUZ9H6wZFQ6d7+0AkcuSDBOzciTavPewMZU/s8NZGjETwOvBe vjPmZFvYXndf/vXJooLdmIjEx09dZtwknBp+gI06mVbEBlLcM+AejPQoXxcLnD0X0E e7bCocBVhxFuAJpGCioLwPnYIXYeMsVZCSWENqXE4FH2uUdnWfYwfuHYfXICYHYDrM dyupOIZ8E8PQg== Received: by wens.tw (Postfix, from userid 1000) id 9AF925FF56; Mon, 27 Oct 2025 20:56:57 +0800 (CST) From: Chen-Yu Tsai To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mark Brown , Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH v2 06/10] arm64: dts: allwinner: a523: Add device node for SPDIF block Date: Mon, 27 Oct 2025 20:56:47 +0800 Message-ID: <20251027125655.793277-7-wens@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027125655.793277-1-wens@kernel.org> References: <20251027125655.793277-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The A523 has a SPDIF interface that is capable of both playback and capture. Add a node for it. Acked-by: Jernej Skrabec Signed-off-by: Chen-Yu Tsai --- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/bo= ot/dts/allwinner/sun55i-a523.dtsi index 8edbd3873199..33f991dbd00b 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi @@ -818,6 +818,21 @@ mcu_ccu: clock-controller@7102000 { #reset-cells =3D <1>; }; =20 + spdif: spdif@7116000 { + compatible =3D "allwinner,sun55i-a523-spdif"; + reg =3D <0x07116000 0x400>; + interrupts =3D ; + clocks =3D <&mcu_ccu CLK_BUS_MCU_SPDIF>, + <&mcu_ccu CLK_MCU_SPDIF_TX>, + <&mcu_ccu CLK_MCU_SPDIF_RX>; + clock-names =3D "apb", "tx", "rx"; + resets =3D <&mcu_ccu RST_BUS_MCU_SPDIF>; + dmas =3D <&mcu_dma 2>, <&mcu_dma 2>; + dma-names =3D "rx", "tx"; + #sound-dai-cells =3D <0>; + status =3D "disabled"; + }; + mcu_dma: dma-controller@7121000 { compatible =3D "allwinner,sun55i-a523-mcu-dma", "allwinner,sun50i-a100-dma"; --=20 2.47.3 From nobody Sat Feb 7 15:12:17 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4AD482C326A; Mon, 27 Oct 2025 12:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; cv=none; b=ii8qNEDhHdR1mEZqWgVncTPcjr29o5IeyvCdOOuek9hDVYYlMtNoEHlPxOmJnY+ZscdyVbTjQ5wiiovgZDjYJC4O8gIFkCZ85KITcQCjDfFLUgfK5RO6Efr1fxjb6AtKXAkukV/QndRt7EA/eKiMStRt+2Zf8tJRyXgDlXABJwg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; c=relaxed/simple; bh=gr1lBgtAFiXlQWjgkAnVsdgPcHRamw/CNfsD0rtnh5I=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=mNmIFEWovjfQFVu3iMyfdtrlfNPezF8ZuGPfvoT6DdYMm/P5TeMVnrQGMR5S3mnnzaUtPLVKaRYoZ5Fct2SGMtJ+S39KneBAmAFkULLz6Sz2jpzPeLnswEkoB6ehB4mEvEKPH6oQWBgx5HwbI1FwUXFUhwuw3leq8DTfsoaqPMo= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=FEiCOsgU; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="FEiCOsgU" Received: by smtp.kernel.org (Postfix) with ESMTPSA id AF72CC116B1; Mon, 27 Oct 2025 12:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761569821; bh=gr1lBgtAFiXlQWjgkAnVsdgPcHRamw/CNfsD0rtnh5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=FEiCOsgUv6Y+W2ZHZvg2uRCOCghvJLo7bsCubi8TrN7K/i8O7GiaxTwHnKXF2ZFwL 9KsRERyjTwn2iB2n9F73IVNzvVLSmuKM41PM/ej/mrYyzwnx0FmVNQCqhJ4HoZQr4L pgp1Sm27R7H4cqk6/AZx1lL7JdlwiRSVOwYsXejHua/f3JIuUN5UXHcX81LKy10ReH Wx2qdMP7d0ybfH25AkiV57SVcuzt/YHuzMdnc1mHDvpBkecvc2ld0gf4ykSVsCO4sK ZASilZoS8x7z9Ta6RhTQp4WxEsi5dCt8rFuOWbaUxBgWsxb6dwp/J0Y3idVUndU+WG Up3tiKzh00n+A== Received: by wens.tw (Postfix, from userid 1000) id A234B5FF76; Mon, 27 Oct 2025 20:56:57 +0800 (CST) From: Chen-Yu Tsai To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mark Brown , Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH v2 07/10] arm64: dts: allwinner: a523: Add device nodes for I2S controllers Date: Mon, 27 Oct 2025 20:56:48 +0800 Message-ID: <20251027125655.793277-8-wens@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027125655.793277-1-wens@kernel.org> References: <20251027125655.793277-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The A523 family of SoCs have four I2S controllers capable of both playback and capture. The user manual also implies that I2S2 also outputs to the eDP interface controller. Add device nodes for all of them. Acked-by: Jernej Skrabec Signed-off-by: Chen-Yu Tsai --- .../arm64/boot/dts/allwinner/sun55i-a523.dtsi | 56 +++++++++++++++++++ 1 file changed, 56 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/bo= ot/dts/allwinner/sun55i-a523.dtsi index 33f991dbd00b..eea9ce83783c 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi @@ -818,6 +818,62 @@ mcu_ccu: clock-controller@7102000 { #reset-cells =3D <1>; }; =20 + i2s0: i2s@7112000 { + compatible =3D "allwinner,sun55i-a523-i2s", + "allwinner,sun50i-r329-i2s"; + reg =3D <0x07112000 0x1000>; + interrupts =3D ; + clocks =3D <&mcu_ccu CLK_BUS_MCU_I2S0>, <&mcu_ccu CLK_MCU_I2S0>; + clock-names =3D "apb", "mod"; + resets =3D <&mcu_ccu RST_BUS_MCU_I2S0>; + dmas =3D <&mcu_dma 3>, <&mcu_dma 3>; + dma-names =3D "rx", "tx"; + #sound-dai-cells =3D <0>; + status =3D "disabled"; + }; + + i2s1: i2s@7113000 { + compatible =3D "allwinner,sun55i-a523-i2s", + "allwinner,sun50i-r329-i2s"; + reg =3D <0x07113000 0x1000>; + interrupts =3D ; + clocks =3D <&mcu_ccu CLK_BUS_MCU_I2S1>, <&mcu_ccu CLK_MCU_I2S1>; + clock-names =3D "apb", "mod"; + resets =3D <&mcu_ccu RST_BUS_MCU_I2S1>; + dmas =3D <&mcu_dma 4>, <&mcu_dma 4>; + dma-names =3D "rx", "tx"; + #sound-dai-cells =3D <0>; + status =3D "disabled"; + }; + + i2s2: i2s@7114000 { + compatible =3D "allwinner,sun55i-a523-i2s", + "allwinner,sun50i-r329-i2s"; + reg =3D <0x07114000 0x1000>; + interrupts =3D ; + clocks =3D <&mcu_ccu CLK_BUS_MCU_I2S2>, <&mcu_ccu CLK_MCU_I2S2>; + clock-names =3D "apb", "mod"; + resets =3D <&mcu_ccu RST_BUS_MCU_I2S2>; + dmas =3D <&mcu_dma 5>, <&mcu_dma 5>; + dma-names =3D "rx", "tx"; + #sound-dai-cells =3D <0>; + status =3D "disabled"; + }; + + i2s3: i2s@7115000 { + compatible =3D "allwinner,sun55i-a523-i2s", + "allwinner,sun50i-r329-i2s"; + reg =3D <0x07115000 0x1000>; + interrupts =3D ; + clocks =3D <&mcu_ccu CLK_BUS_MCU_I2S3>, <&mcu_ccu CLK_MCU_I2S3>; + clock-names =3D "apb", "mod"; + resets =3D <&mcu_ccu RST_BUS_MCU_I2S3>; + dmas =3D <&mcu_dma 6>, <&mcu_dma 6>; + dma-names =3D "rx", "tx"; + #sound-dai-cells =3D <0>; + status =3D "disabled"; + }; + spdif: spdif@7116000 { compatible =3D "allwinner,sun55i-a523-spdif"; reg =3D <0x07116000 0x400>; --=20 2.47.3 From nobody Sat Feb 7 15:12:17 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 145E029A9CD; Mon, 27 Oct 2025 12:57:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; cv=none; b=hWqIvryLqMaXcqKuI3KYeizJ0HhbLTOskGdNPpZ9w6XN4bKGO6+r83/gD/mJEYpx9JRqsTWcbjBXc7Vhh8dXF+oOZp4xaPPhl5Asx0GORTl7W7lJXa+qpl9i77VlkEtP8t/GUlyOgh+ZkNdnue57qF9vEO22sAqYht4Uwh1/J2k= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; c=relaxed/simple; bh=cH78ltGLFEwaRc+5sKH7tOpj/oTnWSF/SJD99Q8jJBg=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=qRLsQFKCH1P5uKb1wLrTQ4q3eZbEj7t3FO/TwBzjgstlMYVUek/x5+yIM0f0kq5rPUkqJuzuQQFEsf6D+c6xRl+2xtZ4/14oyic5JwT5aH6Kyl979ylYoBbLyGE3ESekicXaWhnjJ0IhmzX2Zvih5APFxmaeqJKW/ncQFZbwlYA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=HYW1H6mW; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="HYW1H6mW" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 882A6C116C6; Mon, 27 Oct 2025 12:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761569821; bh=cH78ltGLFEwaRc+5sKH7tOpj/oTnWSF/SJD99Q8jJBg=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=HYW1H6mW7jSbquUJYM2sqUZm38jlpvEbmqNe+my2P3ZAWIGYTjTFCpgEHS9+DemLl eiO701QwLGQZgcMjyENFmnzaX2DuPiLvU5f5S/jqK5yBncWj4TKpenGg8zLXyON90Y j6WeTmxg2pTIY5KKnWtWeu1rAR4H55dta7wG/l5kE40i6Xb04Dh+GKUL4az1eKLoKh iSEB1tkqrY/0I68cXpJeU3s2Gjcu7+Es7P8ZDN8ZffBEzYAw5bxNuFlyXZeevVrDfm DTUW0B2pCZjZ+0njaESUw78t9iIW5e9nfbHIiMJdYb2oZqLnQNfBzU91eQYD1YFgfC wVoUJoR+eJlIg== Received: by wens.tw (Postfix, from userid 1000) id A9CF25FF8E; Mon, 27 Oct 2025 20:56:57 +0800 (CST) From: Chen-Yu Tsai To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mark Brown , Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org, Jernej Skrabec Subject: [PATCH v2 08/10] arm64: dts: allwinner: a523: Add I2S2 pins on PI pin group Date: Mon, 27 Oct 2025 20:56:49 +0800 Message-ID: <20251027125655.793277-9-wens@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027125655.793277-1-wens@kernel.org> References: <20251027125655.793277-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The Radxa Cubie A5E exposes I2S2 through the PI pin group on the 40-pin GPIO header. Add a pinmux setting for it so potential users can directly reference it. Acked-by: Jernej Skrabec Signed-off-by: Chen-Yu Tsai --- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/bo= ot/dts/allwinner/sun55i-a523.dtsi index eea9ce83783c..cebd8e16e845 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi @@ -145,6 +145,14 @@ pio: pinctrl@2000000 { interrupt-controller; #interrupt-cells =3D <3>; =20 + /omit-if-no-ref/ + i2s2_pi_pins: i2s2-pi-pins { + pins =3D "PI2", "PI3", "PI4", "PI5"; + allwinner,pinmux =3D <5>; + function =3D "i2s2"; + bias-disable; + }; + mmc0_pins: mmc0-pins { pins =3D "PF0" ,"PF1", "PF2", "PF3", "PF4", "PF5"; allwinner,pinmux =3D <2>; --=20 2.47.3 From nobody Sat Feb 7 15:12:17 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 4DDB22C375E; Mon, 27 Oct 2025 12:57:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; cv=none; b=uCvZ2cVffR1dHr3xTGrQo7XFHV9dssYK6bDc3ou8nQHj0WG0i3DyohZx4yiV4JLBsKUXuGYJA67xZZDkjbzZcw8y18oElJytlmIQIMWWGKJXxtLtLiZp0mC3xT70TzSDqH51mzAz1Q/k258PyYlkdV3BUL1uSrEi0oh9xjV3E7A= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; c=relaxed/simple; bh=ojezu/Uo+J/jAdJIMpppL/LYPdk+yEgDql0KTa8tpLY=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=gcoPBIm/908P2SI5lA+AYcAhmEdfvf9LxoTaJPeEH9FgFnb9o+SBAHCNx3LJnosSE96sbLGDt5f4P9Nr3cDU30Bd+4GRfOFBe2hZOqrq5CUYUOwZ6UTdDCcopn5jAMew3vh7X9+jn3TSUlGS66oY3Djxy6bglM67FjDCBofM+Ro= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=qg0MZF86; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="qg0MZF86" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE238C2BCAF; Mon, 27 Oct 2025 12:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761569822; bh=ojezu/Uo+J/jAdJIMpppL/LYPdk+yEgDql0KTa8tpLY=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=qg0MZF86i4vHoRckQjlkDFV5bPrs3QDJSL2A9/3OY1IGg5jIiM9/gdlkeXeNcL3Rl mQOl8sNE44ENaSnQYXf7Z2OLHb21+6XH7Y3Gnb73lPdKC5Ls18135AKkstxdUh2wjZ FBX9vwtDrO5bCWnFOqhoekD4k2PIgQjENgtiSpFlnUQHqJ78L8sOeoZwryi2jiAbLX iwCaLAPPKT7jTzkv/Xa0cygTc3lAQ8FHPMCcwD4R3k0NXJxw7igG9OVoJ3MS3Pqs0h fk6EBlAhndWAy0Ug3f11LupepS9nQFX9S0tsq9PrObIKXrjVq8idNusltjb4xnwrUN xtgNDCwMI/FKw== Received: by wens.tw (Postfix, from userid 1000) id BBDE85FFCF; Mon, 27 Oct 2025 20:56:57 +0800 (CST) From: Chen-Yu Tsai To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mark Brown , Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 09/10] arm64: dts: allwinner: a523: Add SPDIF TX pin on PB and PI pins Date: Mon, 27 Oct 2025 20:56:50 +0800 Message-ID: <20251027125655.793277-10-wens@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027125655.793277-1-wens@kernel.org> References: <20251027125655.793277-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The SPDIF TX (called OWA OUT in the datasheet) is available on three pins. Of those, the PH pin is unlikely to be used since it conflicts with the first Ethernet controller. The Radxa Cubie A5E exposes SPDIF TX through the PI pin group on the 40-pin GPIO header. The Orange Pi 4A exposes SPDIF TX through both the PB and PI pin groups on the 40-pin GPIO header. The PB pin alternatively would be used for I2S0 though. Add pinmux settings for both options so potential users can directly reference either one. Signed-off-by: Chen-Yu Tsai --- Changes since v1: - New patch; missing from v1 causing dts to not compile --- arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi b/arch/arm64/bo= ot/dts/allwinner/sun55i-a523.dtsi index cebd8e16e845..42dab01e3f56 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi +++ b/arch/arm64/boot/dts/allwinner/sun55i-a523.dtsi @@ -200,6 +200,20 @@ rgmii1_pins: rgmii1-pins { bias-disable; }; =20 + /omit-if-no-ref/ + spdif_out_pb_pin: spdif-pb-pin { + pins =3D "PB8"; + function =3D "spdif"; + allwinner,pinmux =3D <2>; + }; + + /omit-if-no-ref/ + spdif_out_pi_pin: spdif-pi-pin { + pins =3D "PI10"; + function =3D "spdif"; + allwinner,pinmux =3D <2>; + }; + uart0_pb_pins: uart0-pb-pins { pins =3D "PB9", "PB10"; allwinner,pinmux =3D <2>; --=20 2.47.3 From nobody Sat Feb 7 15:12:17 2026 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9945F2D8792; Mon, 27 Oct 2025 12:57:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; cv=none; b=m1WqNcEgYFGubV3Jt5Enoq01mFVfEq2szRj1uFVCM7PfJhKTzTwfFmKkYWrEeJg5HO8MNfB78u44FwYMcsJYSLn5a4pURd5ckumazRDSafHHebiY1H2KZaQFHMeoNHiW8qkdMHgO7AJJlfb0tVoEzCpxolFXvU9MHgCeTAtcbi0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761569822; c=relaxed/simple; bh=7WylpHCfl5v2xSL09jxwrG9Ik/L6u+sN2kDjKM+sdbI=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=sPplHthEXJKouMLRFkFj1H0ofXkGUpjNNC/Pzn9TRtlqic38iKEOPf+PzYDJUD9FYWOmQAR5mr0d2YvlWbaETMWNIrk+h6cZnhJncnw+9pWl3JkMTzV5fkFU8xKgNxSyKqgjLCRwHqAwEEg70h3YWa/3tApJlOKc7wygHb3wpcY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=AytX+UM2; arc=none smtp.client-ip=10.30.226.201 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="AytX+UM2" Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE1EFC2BC87; Mon, 27 Oct 2025 12:57:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1761569822; bh=7WylpHCfl5v2xSL09jxwrG9Ik/L6u+sN2kDjKM+sdbI=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=AytX+UM2VJpPevBJmVH1Guw+dpV6MPA9jbKvvQQHiS7kw9AfqGTx0FrICPKUZUkXe 6e4CkYRLhzVMvy9sfDOv4HX/uKFcb2Xhp8o3JgnjwFvQbtA0Cw+EzT64dtVckmdoFz 6asLarvlAUHXRrNNH4kghjBNEsz1CdIdiLz9bhFE8+cyEPA3z3C+C9omB/nvfR6C2R GLLFeU4geEafPxvRycr9XsIIfF6i4j2bCzOclYbNvEb0XEmyTJ6R4py5QrsHBDFZeJ btAiPlc5igKle+32Ffzt5Se1r0B2XjcnRSvWzPd+xuKic36v1TwvSYeduYk3jdLebl 2Q73IV9Kql5Fw== Received: by wens.tw (Postfix, from userid 1000) id C5E7E5FFAB; Mon, 27 Oct 2025 20:56:57 +0800 (CST) From: Chen-Yu Tsai To: Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Mark Brown , Vinod Koul Cc: Rob Herring , Krzysztof Kozlowski , Conor Dooley , linux-sunxi@lists.linux.dev, linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, dmaengine@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v2 10/10] [EXAMPLE] arm64: dts: allwinner: a527-cubie-a5e: Enable I2S and SPDIF output Date: Mon, 27 Oct 2025 20:56:51 +0800 Message-ID: <20251027125655.793277-11-wens@kernel.org> X-Mailer: git-send-email 2.47.3 In-Reply-To: <20251027125655.793277-1-wens@kernel.org> References: <20251027125655.793277-1-wens@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" This is an example change. The Radxa Cubie A5E exposes I2S2 and SPDIF on the 40-pin header. Enable both. In this example, I2S2 is connected to adafruit speaker bonnet, which sports a pair of MAX98357A for speaker amplication. SPDIF is connected to a SPDIF interface card for PCs, which has both coaxial and optical outputs. The output was connected via optical cable to a dumb SPDIF to analog audio converter. Signed-off-by: Chen-Yu Tsai --- .../dts/allwinner/sun55i-a527-cubie-a5e.dts | 52 +++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts b/arch= /arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts index bfdf1728cd14..828d101d28e8 100644 --- a/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts +++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-cubie-a5e.dts @@ -64,6 +64,46 @@ reg_usb_vbus: vbus { gpio =3D <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */ enable-active-high; }; + + codec: audio-codec { + compatible =3D "maxim,max98360a"; + #sound-dai-cells =3D <0>; + }; + + sound-i2s { + compatible =3D "simple-audio-card"; + simple-audio-card,name =3D "I2S"; + simple-audio-card,format =3D "left_j"; + simple-audio-card,bitclock-master =3D <&dailink_cpu>; + simple-audio-card,frame-master =3D <&dailink_cpu>; + simple-audio-card,mclk-fs =3D <128>; + + dailink_cpu: simple-audio-card,cpu { + sound-dai =3D <&i2s2>; + }; + + dailink0_master: simple-audio-card,codec { + sound-dai =3D <&codec>; + }; + }; + + sound-spdif { + compatible =3D "simple-audio-card"; + simple-audio-card,name =3D "spdif-out"; + + simple-audio-card,cpu { + sound-dai =3D <&spdif>; + }; + + simple-audio-card,codec { + sound-dai =3D <&spdif_out>; + }; + }; + + spdif_out: spdif-out { + #sound-dai-cells =3D <0>; + compatible =3D "linux,spdif-dit"; + }; }; =20 &ehci0 { @@ -101,6 +141,12 @@ &gpu { status =3D "okay"; }; =20 +&i2s2 { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&i2s2_pi_pins>; + status =3D "okay"; +}; + &mdio0 { ext_rgmii0_phy: ethernet-phy@1 { compatible =3D "ethernet-phy-ieee802.3-c22"; @@ -344,6 +390,12 @@ &r_pio { vcc-pm-supply =3D <®_aldo3>; }; =20 +&spdif { + pinctrl-names =3D "default"; + pinctrl-0 =3D <&spdif_out_pi_pin>; + status =3D "okay"; +}; + &uart0 { pinctrl-names =3D "default"; pinctrl-0 =3D <&uart0_pb_pins>; --=20 2.47.3