From patchwork Sun Oct 20 08:30:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13843015 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 3DB32D3C927 for ; Sun, 20 Oct 2024 08:36:41 +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=570RR7RRbKp4auuNkeZ4HJ7qmm9vuQy/ZAbAZMAZEWg=; b=vDM8YaggTGnSUkHf6Y80++nzpF +oyzI5DQgJzK8B6ph9p8EG9k59swokmq3HQ8x7ZK25kZneBRmba7KFosAH4NKbRf/jFZAUH4a49yU 5e9bgrZTICSOmOmz5FspKezk9uk/Ce1e5WgaGKnaebTrl68CwvdOJ/uFyfzvTsyMP+GSngP675+dq /X60SPOKjaAEn2OQMajJQ0YUCtuHOyne1OdgYHr0xL/Iao9ujO/CywVgvdyOJuJbUIXaSh+hKQ4VW fKKwnbkPE2k/j+4eGKg9v7RetbxAmH4KXJd1hn7cdMPYLx7seEe7MZEG89aRAoIJgDE/wCQQ/abEs jOcT4k/w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2RQM-00000004cq9-3aBY; Sun, 20 Oct 2024 08:36:30 +0000 Received: from fout-a2-smtp.messagingengine.com ([103.168.172.145]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1t2RMB-00000004cUd-1r4Q for linux-arm-kernel@lists.infradead.org; Sun, 20 Oct 2024 08:32:12 +0000 Received: from phl-compute-03.internal (phl-compute-03.phl.internal [10.202.2.43]) by mailfout.phl.internal (Postfix) with ESMTP id D1D481380181; Sun, 20 Oct 2024 04:32:10 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-03.internal (MEProxy); Sun, 20 Oct 2024 04:32:10 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=testtoast.com; h=cc:cc:content-transfer-encoding:content-type:date:date:from :from:in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to; s=fm3; t=1729413130; x= 1729499530; bh=570RR7RRbKp4auuNkeZ4HJ7qmm9vuQy/ZAbAZMAZEWg=; b=N hB3qeOQGG1KPeXe+uDXi8+czs3fNJRwIHLt4ttyRmP39ZivzGjpNIom4aibmiLjC 5o4ig6hFz91uVQuKbtCEvIQPaU6DztDfhVymJDqpiLWqt/OaoGgT6PBvb89vZ8QK 82xHy40F4A21/CDVoZITXBPOvPiNHYda+l7PmJfFv4gbUwB5zEWZsr14J3hY9F4Z c3p7iE4pMVYAcYuiVWMZCND72n3R76dltNoaYg7rV1C5+xHbZlOlNbIq8YknszId phd0jQFlAlNoz0JaoFoNwcBp29DzoP6/ZQMq8TX9wJ5SgFhmoziniA/OaaPliYYt ZsdlFXDFk1xyvqAHfjlDQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:date:date:feedback-id:feedback-id:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:subject:subject:to:to:x-me-proxy:x-me-proxy :x-me-sender:x-me-sender:x-sasl-enc; s=fm3; t=1729413130; x= 1729499530; bh=570RR7RRbKp4auuNkeZ4HJ7qmm9vuQy/ZAbAZMAZEWg=; b=g xHjeMCGCIxt2WEPqkAVv8JeYBc9BMGyvQZYVkhYL8zt0Gr6Gb0s+ybkifGTQ3pMy UFV8fteWa0n5NsS9VNnMUvmsuD15zBDovCzQo7KwEX/PMse4NJd2jrr7tBLWfvjr k195ug2KvJlJjndgMGbqLZhpmI8Xl8uWm0B8HgnX6q6tnOFf1X59/yxzT8ncps6+ tx8T+/CRKl0kqynbcAfccshHtSfEGm37hNbfNhBFeq3dl/qCn/O1zpZberbPQ4c8 RtkOmPyarURNLkQMbR3qiFeNGNW/XNZEvEZg45IMELZ79kknL1yQTSYlApUugf0b V/t6BMsMHvnDd7fAtObOA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehjedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredttden ucfhrhhomheptfihrghnucghrghlkhhlihhnuceorhihrghnsehtvghsthhtohgrshhtrd gtohhmqeenucggtffrrghtthgvrhhnpeffheeiffegtdfgffejteevgeefkeelieelkeev ueetffetteduffevgeeiieehteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehrhigrnhesthgvshhtthhorghsthdrtghomhdpnhgspghrtghp thhtohepudehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehlghhirhgufihooh gusehgmhgrihhlrdgtohhmpdhrtghpthhtohepsghrohhonhhivgeskhgvrhhnvghlrdho rhhgpdhrtghpthhtohepphgvrhgvgiesphgvrhgvgidrtgiipdhrtghpthhtohepthhifi grihesshhushgvrdgtohhmpdhrtghpthhtohepfigvnhhssegtshhivgdrohhrghdprhgt phhtthhopehjvghrnhgvjhdrshhkrhgrsggvtgesghhmrghilhdrtghomhdprhgtphhtth hopehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgpdhrtghpthhtohepmhgrtghrohgr lhhphhgrkedvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepshhimhhonhhsrdhphhhilh hiphhpvgesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 20 Oct 2024 04:32:06 -0400 (EDT) From: Ryan Walklin To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Chris Morgan , Philippe Simons Cc: linux-sound@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, devicetree@vger.kernel.org, linux-clk@vger.kernel.org, Ryan Walklin Subject: [PATCH v2 2/7] dt-bindings: allwinner: add H616 sun4i audio codec binding Date: Sun, 20 Oct 2024 21:30:52 +1300 Message-ID: <20241020083124.174724-3-ryan@testtoast.com> X-Mailer: git-send-email 2.47.0 In-Reply-To: <20241020083124.174724-1-ryan@testtoast.com> References: <20241020083124.174724-1-ryan@testtoast.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241020_013211_574990_AAE17A96 X-CRM114-Status: GOOD ( 11.80 ) 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 The H616 has an audio codec compatible with the sun4i-a10 driver. The codec is relatively cut down compared to some of the other Allwinner SoCs and only has a single line-out route (relying on a separate digital microphone IP block for input). HDMI and SPDIF audio are handled separately by an audio hub IP block, which is not currently implemented in mainline kernels. This requires some additional flexibility in the DMA bindings. Add compatible string and routing for the H616 audio codec, and update the required DMA descriptions. Signed-off-by: Ryan Walklin --- Changelog v1..v2: - Remove PLL_AUDIO_4X clock from definition (defined internally but not used by driver and so not required in DTSI) - Restrict TX-only DMA definition to H616 --- .../sound/allwinner,sun4i-a10-codec.yaml | 53 ++++++++++++++++--- 1 file changed, 47 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml index 78273647f7665..db4fde5122686 100644 --- a/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml +++ b/Documentation/devicetree/bindings/sound/allwinner,sun4i-a10-codec.yaml @@ -22,6 +22,7 @@ properties: - allwinner,sun8i-a23-codec - allwinner,sun8i-h3-codec - allwinner,sun8i-v3s-codec + - allwinner,sun50i-h616-codec reg: maxItems: 1 @@ -40,14 +41,20 @@ properties: - const: codec dmas: - items: - - description: RX DMA Channel - - description: TX DMA Channel + oneOf: + - items: + - description: RX DMA Channel + - description: TX DMA Channel + - items: + - description: TX DMA Channel dma-names: - items: - - const: rx - - const: tx + oneOf: + - items: + - const: rx + - const: tx + - items: + - const: tx resets: maxItems: 1 @@ -229,6 +236,40 @@ allOf: - Mic - Speaker + if: + properties: + compatible: + enum: + - allwinner,sun50i-h616-codec + + then: + properties: + allwinner,audio-routing: + items: + enum: + - LINEOUT + - Line Out + + dmas: + items: + - description: TX DMA Channel + + dma-names: + items: + - const: tx + + else: + properties: + dmas: + items: + - description: RX DMA Channel + - description: TX DMA Channel + + dma-names: + items: + - const: rx + - const: tx + unevaluatedProperties: false examples: