From patchwork Sun Sep 29 10:06:05 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13815049 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 3908ECF6499 for ; Sun, 29 Sep 2024 10:15:15 +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=lC8SNcb098lNqNGIZkeNhkroHm/BrSc1dzW9sPJ4q7M=; b=368y6bTo6pZIBXlodXRT+JRUJZ RwPql4nW9fXBqU0CBSPiEaajDT/HYuzMjYmKH6HB+UEg3k4AHsf0Gfn7L9F8WTFOa8RdtJzSNwt3s FhaosD+ERU/pnDj+5i0/gteaZjTqJ90aXl5TrljnhVmt6eo5ogp4LFAtLbCROTnrMqqiwK0xRirOE tz8BGgTdvojljSocjIpEXnZReaZgQmi0V8if5eDITUkRkyk/r0H7KVGvc8X+7nQL6ZdKkRzhGJ+hq SgHKSW9uLSaGYyeIbY/kazYm4qZZwcxqG2ejiih6xKmvyFPPIQrMastNW41hM0NosHcs3ITKKs4z/ 32k+MJ1w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1suqx4-0000000Eak5-32oj; Sun, 29 Sep 2024 10:14:57 +0000 Received: from fhigh-a2-smtp.messagingengine.com ([103.168.172.153]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1suqql-0000000Ea3h-3XU9 for linux-arm-kernel@lists.infradead.org; Sun, 29 Sep 2024 10:08:25 +0000 Received: from phl-compute-05.internal (phl-compute-05.phl.internal [10.202.2.45]) by mailfhigh.phl.internal (Postfix) with ESMTP id 35E5D11402B6; Sun, 29 Sep 2024 06:08:23 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-05.internal (MEProxy); Sun, 29 Sep 2024 06:08:23 -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=fm2; t=1727604503; x= 1727690903; bh=lC8SNcb098lNqNGIZkeNhkroHm/BrSc1dzW9sPJ4q7M=; b=W 7QxWS6mbfhS9DCW/jYpBj1U6F7hiaA2t6feK/tORA38d2TsfqEH6rBxQayo48Nh4 wB6w08ElHa6bmw60oDMM3RWKeOqiTq1CDOZ27qRpt+XAxszU8UdrJTlTaG3STKVt jD3sVjA+4zuFjLPBj+XPOC6os92AZ+tZ1YTsIhB70XPl5pUIYTalOx9q1hkPIlMv f0rDMyRDOVD8uuMhAnRiiKXwwsiIh/+5PsybZoYG4LB6YWglr4rfQKGaLEj6pxuW QdKDvFFl3mC4CAHft2ErXlJDmX1c6jgl9Xvgdz2S/5qSN9iNcaydgjVZP1oacsA7 3NMgl/5iq1v8Wg7h3J0zA== 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=fm2; t=1727604503; x= 1727690903; bh=lC8SNcb098lNqNGIZkeNhkroHm/BrSc1dzW9sPJ4q7M=; b=I MhD28joWycI6C+nCJ5zhMGjo5kouXKvEwnqOtZyLcc172N10Q2eFdECMzle58wpr q0iuG0wfl0li+AYZpnfxTOUPd8jDmCYytbDmWQBahzKCySRrCdm0hFC6LHEr7vg/ JHK6C9Y0MGgcl6LGYXROjwHXFMjyHLIgbSUY5DMdHW1eGiLyHEHcIgXr0Ere5Am9 9uqkSsrpkrMQjyyMm/w88erxluJfh9ssr9DM4UrvPOl/lV1vs/+ko/nI9gNJ6Saq wNnu2PNNx4ilhpw81lXcTXQoUfSXZJbuNUelDOxwrOKEoryuXkgQlYWG/9Y94reQ VGmnP4kQ8S3xayQK16Mtg== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvddufedgvdejucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkofgjfhgggfestdekredtredttden ucfhrhhomheptfihrghnucghrghlkhhlihhnuceorhihrghnsehtvghsthhtohgrshhtrd gtohhmqeenucggtffrrghtthgvrhhnpeffheeiffegtdfgffejteevgeefkeelieelkeev ueetffetteduffevgeeiieehteenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmh epmhgrihhlfhhrohhmpehrhigrnhesthgvshhtthhorghsthdrtghomhdpnhgspghrtghp thhtohepudefpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehlghhirhgufihooh gusehgmhgrihhlrdgtohhmpdhrtghpthhtohepsghrohhonhhivgeskhgvrhhnvghlrdho rhhgpdhrtghpthhtohepphgvrhgvgiesphgvrhgvgidrtgiipdhrtghpthhtohepthhifi grihesshhushgvrdgtohhmpdhrtghpthhtohepfigvnhhssegtshhivgdrohhrghdprhgt phhtthhopehjvghrnhgvjhdrshhkrhgrsggvtgesghhmrghilhdrtghomhdprhgtphhtth hopehsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgpdhrtghpthhtoheplhhinhhugidq shhouhhnugesvhhgvghrrdhkvghrnhgvlhdrohhrghdprhgtphhtthhopehlihhnuhigqd grrhhmqdhkvghrnhgvlheslhhishhtshdrihhnfhhrrgguvggrugdrohhrgh X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 29 Sep 2024 06:08:19 -0400 (EDT) From: Ryan Walklin To: Liam Girdwood , Mark Brown , Jaroslav Kysela , Takashi Iwai , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland 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 4/6] dt-bindings: allwinner: add H616 sun4i audio codec binding Date: Sun, 29 Sep 2024 23:06:05 +1300 Message-ID: <20240929100750.860329-5-ryan@testtoast.com> X-Mailer: git-send-email 2.46.1 In-Reply-To: <20240929100750.860329-1-ryan@testtoast.com> References: <20240929100750.860329-1-ryan@testtoast.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240929_030823_972948_7AA8C5B1 X-CRM114-Status: GOOD ( 10.96 ) 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 and the use of SDM requires some additional flexibility to the DMA and clock bindings. Add compatible string and routing for the H616 audio codec, and update the required clock and DMA descriptions. Signed-off-by: Ryan Walklin --- .../sound/allwinner,sun4i-a10-codec.yaml | 55 +++++++++++++++---- 1 file changed, 43 insertions(+), 12 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..5838600dbc730 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 @@ -30,24 +31,40 @@ properties: maxItems: 1 clocks: - items: - - description: Bus Clock - - description: Module Clock + oneOf: + - items: + - description: Bus Clock + - description: Module Clock + - items: + - description: Bus Clock + - description: Module Clock + - description: Module Clock (4X) clock-names: - items: - - const: apb - - const: codec + oneOf: + - items: + - const: apb + - const: codec + - items: + - const: apb + - const: codec + - const: audio-codec-4x 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 +246,20 @@ allOf: - Mic - Speaker + - if: + properties: + compatible: + enum: + - allwinner,sun50i-h616-codec + + then: + properties: + allwinner,audio-routing: + items: + enum: + - LINEOUT + - Line Out + unevaluatedProperties: false examples: