From patchwork Sun Oct 20 08:30:50 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ryan Walklin X-Patchwork-Id: 13843013 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 92698D3C927 for ; Sun, 20 Oct 2024 08:33:51 +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: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:In-Reply-To:References:List-Owner; bh=2weQOXWCcAa/ThgSUhPb/LBC5XOmM7XD78NKpSzI2Xk=; b=KsFt5TurBHi2K/f2RKXlcy6rkX Joh50iDjV+FeHEBUJVY7jiz4ul9E16NrpE5naMFH+aP4F3nlStb4y11jL37NM4G5x7+gbtGsjAIuR m0IUNhBb2q0UBDyA0Aa6hPrBSYsONesqt7jofdNOJBt7Fs9GB3udSV8XWtVfnwrtjRToRO0YjsjeW IrqL+WJGDhelWlq2Y+ghmUIFhARvmEUHhbanhcBFqhqnhW26sO3bPU6QcetbcYU0/OpIkSYDuEBNe s82KT5De68YRu3ymAgC0YxEx3KwLfaRD9uioJ1X7bJFeC2PLKxExNF7Rqb2x/1TRTh5AY+/pS61+g tFXiVMqw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1t2RNW-00000004ccm-2c2m; Sun, 20 Oct 2024 08:33:34 +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 1t2RM2-00000004cTj-1xeK for linux-arm-kernel@lists.infradead.org; Sun, 20 Oct 2024 08:32:04 +0000 Received: from phl-compute-01.internal (phl-compute-01.phl.internal [10.202.2.41]) by mailfout.phl.internal (Postfix) with ESMTP id EAC731380191; Sun, 20 Oct 2024 04:32:00 -0400 (EDT) Received: from phl-mailfrontend-01 ([10.202.2.162]) by phl-compute-01.internal (MEProxy); Sun, 20 Oct 2024 04:32:00 -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:message-id:mime-version:reply-to:subject :subject:to:to; s=fm3; t=1729413120; x=1729499520; bh=2weQOXWCcA a/ThgSUhPb/LBC5XOmM7XD78NKpSzI2Xk=; b=W9KTwfuplv1ab8u3KEEuk/0WEq NQljQcIGyNagOBd6vukMIdiqlR3iqAq/VGhB4WHfHNexRQn4DarIA3dajeMJhw/6 dC6LjTj9UPr5yhcm/SiY4R40tEMw3Hj/nJqgmjZ9Dh5l3KZKse6dSQ+tVFplbnHP zFsqdz8YM3g7LbEeENdZFDAXu0VDjIL0eCqsipVA36cXk64A8DWOixhZDvQruxNU pI8u61iENt4bADzA5Dcd/OvV9FxYWDhdhHpbxRpE3AE/TOS7ijN2aK4c16uwgbGG UbCUIaaOapbt3RwQ6CsRcI4ko/HYdikG2wZUL0s3z4+6Eftyx2O4nPxv9UEQ== 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:message-id:mime-version:reply-to:subject:subject:to :to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s= fm3; t=1729413120; x=1729499520; bh=2weQOXWCcAa/ThgSUhPb/LBC5XOm M7XD78NKpSzI2Xk=; b=Jsi9HHpwYfJ/8px/Fjd369NwEPm1Ucr7Ncv+OgdRW9x6 boM1VanBUkCX6cWXWdlnrUmM/cdCzknGky6GrUTclaOBpU4VN8zIScLFwF90q2Lz ddiCDGBBHGOKf2CIobCBIGbd/zyfZi62ccJhQR5kljZ2VysSdaYfLBrW1g4dxIIH ivXC5kevITRwHLQ/wz2aTT+sFQR7E4TBeOWEiWMKPU6bTHGQgeKLXhkuVbEd4l+f PJGsBCcp/tHWGQ/H3BXZBfrKPh1c82jdaMnM4+atCubMIgINlZt3jzeXebAX6Xlg 0M2KTStuCuRXSOBzyCtdNaDXX2OnxDWYmdhApzIvCw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgeeftddrvdehjedgtdehucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdggtfgfnhhsuhgsshgtrhhisggvpdfu rfetoffkrfgpnffqhgenuceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnh htshculddquddttddmnecujfgurhephffvvefufffkofgggfestdekredtredttdenucfh rhhomheptfihrghnucghrghlkhhlihhnuceorhihrghnsehtvghsthhtohgrshhtrdgtoh hmqeenucggtffrrghtthgvrhhnpeduvdeuudeugedtueffteevveegheehvdfhfeduudev kefggfeftdehgeethffhffenucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmh grihhlfhhrohhmpehrhigrnhesthgvshhtthhorghsthdrtghomhdpnhgspghrtghpthht ohepudehpdhmohguvgepshhmthhpohhuthdprhgtphhtthhopehlghhirhgufihoohguse hgmhgrihhlrdgtohhmpdhrtghpthhtohepsghrohhonhhivgeskhgvrhhnvghlrdhorhhg pdhrtghpthhtohepphgvrhgvgiesphgvrhgvgidrtgiipdhrtghpthhtohepthhifigrih esshhushgvrdgtohhmpdhrtghpthhtohepfigvnhhssegtshhivgdrohhrghdprhgtphht thhopehjvghrnhgvjhdrshhkrhgrsggvtgesghhmrghilhdrtghomhdprhgtphhtthhope hsrghmuhgvlhesshhhohhllhgrnhgurdhorhhgpdhrtghpthhtohepmhgrtghrohgrlhhp hhgrkedvsehgmhgrihhlrdgtohhmpdhrtghpthhtohepshhimhhonhhsrdhphhhilhhiph hpvgesghhmrghilhdrtghomh X-ME-Proxy: Feedback-ID: idc0145fc:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Sun, 20 Oct 2024 04:31:55 -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 0/7] ASoC: add Allwinner H616 audio codec support Date: Sun, 20 Oct 2024 21:30:50 +1300 Message-ID: <20241020083124.174724-1-ryan@testtoast.com> X-Mailer: git-send-email 2.47.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241020_013202_740330_6704017A X-CRM114-Status: GOOD ( 12.83 ) 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 Hi, V2 of this patch adding support for the Allwinner H616 (and variants) audio codec. Some rework to improve clock correctness, and DTS changes to enable the codec on boards added. Changelog v1..v2: - Reordered patches to group ASoC changes - Corrected PLL_AUDIO clock dividers to match values from manual and vendor SDK. - Remove PLL_AUDIO_4X clock from the device tree binding (not used in the driver). - Restrict TX-only DMA changes to the H616. - Change the codec name to fit into the 16 char limit. - Move the codec (and spdif) blocks in the H616 DTSI to restore address-order. - Add board enablement (and power/GPIO changes for RG35XX to support speaker amp). Original blurb below: Hi, The Allwinner H616 has a playback-only audio codec, with a single stereo or differential-mono line output. This patch adds support for the H616 (and H313/H618/H700/T507) SoC. Based on the Allwinner kernel SDK driver, and tested on the H700. Regards, Ryan Marcus Cooper (2): ASoC: sun4i-codec: Add support for different DAC FIFOC addresses to quirks ASoC: sun4i-codec: Add playback only flag to quirks Ryan Walklin (5): clk: sunxi-ng: h616: Add sigma-delta modulation settings for audio PLL dt-bindings: allwinner: add H616 sun4i audio codec binding ASoC: sun4i-codec: support allwinner H616 codec arm64: dts: allwinner: h616: Add audio codec node arm64: dts: allwinner: h313/h616/h618/h700: Enable audio codec for all supported boards .../sound/allwinner,sun4i-a10-codec.yaml | 53 +++- .../dts/allwinner/sun50i-h313-tanix-tx1.dts | 5 + .../allwinner/sun50i-h616-orangepi-zero.dtsi | 5 + .../dts/allwinner/sun50i-h616-x96-mate.dts | 5 + .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 44 ++- .../allwinner/sun50i-h618-orangepi-zero2w.dts | 5 + .../sun50i-h618-transpeed-8k618-t.dts | 5 + .../sun50i-h700-anbernic-rg35xx-2024.dts | 13 +- drivers/clk/sunxi-ng/ccu-sun50i-h616.c | 44 ++- sound/soc/sunxi/sun4i-codec.c | 297 +++++++++++++++--- 10 files changed, 401 insertions(+), 75 deletions(-)