From patchwork Mon Feb 26 14:01:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Mergnat X-Patchwork-Id: 206654 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7300:a81b:b0:108:e6aa:91d0 with SMTP id bq27csp2098059dyb; Mon, 26 Feb 2024 06:07:52 -0800 (PST) X-Forwarded-Encrypted: i=3; AJvYcCV6cstah2K4KLvODnMcmeTUhLk5s21L1NvPXh71LV2tt9Zrkb3a29fRclsOokou9bffksNThixguCYz01Cw8DSjr6Hqbw== X-Google-Smtp-Source: AGHT+IGt58QxeelZ2rvOQleKjXka4tdcoAami/I07pnTlL2rWyF8kyP/Zo4q8IjRzvs9yFIZnFgl X-Received: by 2002:a17:906:e204:b0:a3f:7d84:4d2e with SMTP id gf4-20020a170906e20400b00a3f7d844d2emr5060670ejb.30.1708956471941; Mon, 26 Feb 2024 06:07:51 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1708956471; cv=pass; d=google.com; s=arc-20160816; b=GgHl3xr9Rz9YGTsayAfTdgel83mxo0g1hcdar/t8P+XS32QOPLBUXBMIxZN1GdFlxl j5RyqVr3ogLJYOnnaCxLOtnJ4POUdyM5IV0yk/LNnKUugTOZ3R1H6EspgJgv6U+sJJGe rG75rP1eGPlcXjVZ/tp4Xhz0MIGMRppeoJTPKH/rgbioXHyQseakc7GNoojR5Anbl2wv oUunyt3uOLo+cgo8l2bwBOg6ENhKkfJezFml8fDksdT0Sa7vnwzhDpGFI/1MpDD8XmoS JwGpSxKf81k1a/LXE1/0K2UR3N9A+PJ3TH90gWFu+VaQlAHBqZ+IbyHWbqxdg3GpJeSN jw5Q== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :subject:date:from:dkim-signature; bh=zA6Y8WaWiyVxJ/xYCh7GUPTM71b4HBf0Ymw0AKthDEc=; fh=zo7TGt5DC6mau7+Au3HbD2lLyYRNSSnlwRZX9mX3WRM=; b=mA0IQlS95ICj+0nA1BFlpT7RVhCDuLk6dRbIiJdhAS6d3ED8EkRa3qRJNgNtCGsdkA GwWCKlerPEuj4UfqQROxWfW1Nj+v1KD3iWSEIHHVfwtWX3MSYZrUWxH0wleKoNo2AnqR dkO+jVhrzV2NtuXBZ943BBlUd9y944dNq2BODfZs67BHGr67fvRGV4Mk7c13qTUfySLD /M6EHN/QmHnS2uJbpCM+0/BjKL7hy2sJfghie7qc7Csss2AcBP+Onv6UUf+KV9xLS3Uv d7QZRnNCXIgdhJO8ggQG3tgFyq2I8Wwbum05cI/UmWtEmBcnou9rbHfs7YQrp465EfIg 6sDg==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=CHvpZawQ; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-81570-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81570-ouuuleilei=gmail.com@vger.kernel.org" Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [147.75.80.249]) by mx.google.com with ESMTPS id lb11-20020a170906adcb00b00a3e6dc386d7si2077429ejb.826.2024.02.26.06.07.51 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 06:07:51 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-81570-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) client-ip=147.75.80.249; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20230601.gappssmtp.com header.s=20230601 header.b=CHvpZawQ; arc=pass (i=1 spf=pass spfdomain=baylibre.com dkim=pass dkdomain=baylibre-com.20230601.gappssmtp.com); spf=pass (google.com: domain of linux-kernel+bounces-81570-ouuuleilei=gmail.com@vger.kernel.org designates 147.75.80.249 as permitted sender) smtp.mailfrom="linux-kernel+bounces-81570-ouuuleilei=gmail.com@vger.kernel.org" Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by am.mirrors.kernel.org (Postfix) with ESMTPS id C694B1F24338 for ; Mon, 26 Feb 2024 14:07:49 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5B4E6130ACC; Mon, 26 Feb 2024 14:02:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b="CHvpZawQ" Received: from mail-lf1-f42.google.com (mail-lf1-f42.google.com [209.85.167.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 99A6712DD87 for ; Mon, 26 Feb 2024 14:02:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.167.42 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708956153; cv=none; b=W8ErJCD5v+5G3AyR4QZaJB9zXR2J01zKDW9KL4IkdHdSx7Y3ES13KMmXa5dJwjzecvFoBJW6KnpIZP02mBp8HLgpbyXUhbOb2bfjKvMM+BWHHWsdFIYhMJ2GbnDQxAS+QXQo3KlWDC8axk6p74dDHSggGIMib8knFBeC6oEfIOo= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1708956153; c=relaxed/simple; bh=7gKtKZ96mpebE4/UyNGtTbO/tF9O5foCSjcP2W5e+6o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nu9i79gtRAWnTVS0k/LEX0ZsiuuORDQgAoXCUwyROFlzeFKqhDSSUyngNjMuyg1Gs8Eh/k/QcJaLf/OZmNrBxKFWSDNv76L4sFi7cDWqm+IIqOT2NSV1PlS91iR7XP8ePHHuLW3sJlpI3UkNTLMgaedvbyyKffohj3AD2ZoTZ6w= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com; spf=pass smtp.mailfrom=baylibre.com; dkim=pass (2048-bit key) header.d=baylibre-com.20230601.gappssmtp.com header.i=@baylibre-com.20230601.gappssmtp.com header.b=CHvpZawQ; arc=none smtp.client-ip=209.85.167.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=baylibre.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=baylibre.com Received: by mail-lf1-f42.google.com with SMTP id 2adb3069b0e04-512f892500cso1093590e87.3 for ; Mon, 26 Feb 2024 06:02:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20230601.gappssmtp.com; s=20230601; t=1708956146; x=1709560946; darn=vger.kernel.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=zA6Y8WaWiyVxJ/xYCh7GUPTM71b4HBf0Ymw0AKthDEc=; b=CHvpZawQ/AkJeA9oiqBnUcpASxOCV5HJeiHpmAmHapogfO1vKGNRsO2yIt9nQAdoNJ A7a+IuS4Jr9tSxrgvLM35qQ61rbjWBfKBfQUxecJQ0x14QuxCPVaJ/pnzp5BHlE0/LpT /SFA1jOgVEpCSu/9CGFHJFnvVGfB/JEdm4UkDQW8LyzY4WNDUkiY1HfqbSFHEjZQIAu6 dzzIVD2Sz4AxtFjeu+KsxVN+CJwD+Jh7R8IdNJOQSWlg0MLNjm8UXxtidaWkLJJBMck5 GjTIlGDO8qRfPw1SKlMdiuRJ4cHybR3DT/+yc28pqDNj5OA/Use8n0R/arhoMmlGSppz KYvg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1708956146; x=1709560946; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=zA6Y8WaWiyVxJ/xYCh7GUPTM71b4HBf0Ymw0AKthDEc=; b=gm7aI8WkGy9gDCaCBRKbCRe3Acfm82FDubdzWhJLiC1q0+RgdTwto6dF9qGVRiHZnI NgZXRDK9d2Ok/8EQv7W4hAB/lmF5LDgOMbo7a4h0YUZr8cmFD0XdvATouCn5HfAqPLp1 qrrL56fNUB3n7lON30KHGEfoXlikjP0HS1+bMYpLGY8+oPZD9MgOzwdnM25S4JuqfPsx BER5UWI52LJA6cuzBk7N95QRxAYY/Q3rjW+aboj5Klmieoj+kBYfI9u80gOTIJMLtJtS SQ8q5zjxpn8TG3u1eInIsloan7huhnIJCcq/J1+HOUFCTelbp2uwKCgvZ2Th/wTdN8UL Xt2w== X-Forwarded-Encrypted: i=1; AJvYcCXLaBSXnsIm1xpiXwqAN6SWgYX8FvsVFI5lh4WJqQb9NIgZgoudp8JnJt+QY7CEFWlYfD88/A5MMMjMswRaxKsQabBw0aEgRtgVYllo X-Gm-Message-State: AOJu0YxFSUPSerEp2xwQABWWoCKaak7XQWwllC7BLIhc2yxL376CthQ8 Sjvv/Hwab/A3ZCXPYdBBBR2nG3LPSQkJn8zUCBYFdasjMBaANwjAO0HgKrnXKvY= X-Received: by 2002:a05:6512:3da9:b0:512:aa52:5cce with SMTP id k41-20020a0565123da900b00512aa525ccemr5583650lfv.12.1708956146625; Mon, 26 Feb 2024 06:02:26 -0800 (PST) Received: from [127.0.1.1] ([93.5.22.158]) by smtp.googlemail.com with ESMTPSA id d33-20020a05600c4c2100b004129f87a2c6sm2838475wmp.1.2024.02.26.06.02.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 26 Feb 2024 06:02:26 -0800 (PST) From: Alexandre Mergnat Date: Mon, 26 Feb 2024 15:01:52 +0100 Subject: [PATCH 14/18] ASoC: mediatek: Add MT8365 support Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Message-Id: <20240226-audio-i350-v1-14-4fa1cea1667f@baylibre.com> References: <20240226-audio-i350-v1-0-4fa1cea1667f@baylibre.com> In-Reply-To: <20240226-audio-i350-v1-0-4fa1cea1667f@baylibre.com> To: Liam Girdwood , Mark Brown , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Matthias Brugger , AngeloGioacchino Del Regno , Lee Jones , Flora Fu , Jaroslav Kysela , Takashi Iwai , Sumit Semwal , =?utf-8?q?Christian_K=C3=B6nig?= , Catalin Marinas , Will Deacon Cc: linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, Alexandre Mergnat X-Mailer: b4 0.12.2 X-Developer-Signature: v=1; a=openpgp-sha256; l=2430; i=amergnat@baylibre.com; h=from:subject:message-id; bh=7gKtKZ96mpebE4/UyNGtTbO/tF9O5foCSjcP2W5e+6o=; b=owEBbQKS/ZANAwAKAStGSZ1+MdRFAcsmYgBl3JncDRU2NBAq5rld4NoSuR28KwMZlIfGU8IBQSkN SNQJ2tqJAjMEAAEKAB0WIQQjG17X8+qqcA5g/osrRkmdfjHURQUCZdyZ3AAKCRArRkmdfjHURfDGD/ 9m97Nzpk6hOjVqK3PFbQax0+QGFlRuqovyHNa4EU9vmGuGO8caLPUuugYcx559tE8h+O1jkQCrwNWX Q/XOJ1FDmQ6RI9Q+XZF3AxpJllFfCjLhgqxMDYasFUG3w/1ZZ+ENS9Nl1WonR/58W3CFvWLABh6fqV N3JD01coH9rYNalJvFiv512AS5tFcJFWbfHDgxPE9yPGue60swyFLkrzI5+2j3X4SrKoM6Dgzqq4wc eojs5yS/ONSWbcY0vq3o5QMLyQkPdZBm5BLautmVV3Jy3SHMqvwmuve/casoFCf5K/J3MBxJDDVhqs OxpWXaazPI1cPcWxo3B3pVoK6YuwDtZb6QH3dWTgiJlmdorv3ErELXiBUZy6Sua5s3+zvVJS8RPz8Y VKeco0kB7OYIYUWEs0BT0TVeGj4sUqqyV99af0vY4kP21ygqowS6nN+yioba0wVhvNidAcRHZB/qoL lkBf9JDhphrOQl8xUhvVGCAmMxegJ6est/k6fJZ7hCb1UE3biVtE/p7RAeYSlt8/nMBrXK+2SO58XW AC5zcWZnuO6QzvwI29ZugDYm0/gxJx+tHTdzK7IqfeloT5QeH3QDzvxl0JQBbP3FUXC1vKm59Or25T LhPQU64Udhs7slsra/bjBBFsekuxfIFzBMn9iRPU7SDoam+8QkzwtjU02C5A== X-Developer-Key: i=amergnat@baylibre.com; a=openpgp; fpr=231B5ED7F3EAAA700E60FE8B2B46499D7E31D445 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1791970741602545814 X-GMAIL-MSGID: 1791970741602545814 - Add specific config to enable: - MT8365 sound support - MT6357 audio codec support - Add the mt8365 directory and all drivers under it. Signed-off-by: Alexandre Mergnat --- sound/soc/mediatek/Kconfig | 20 ++++++++++++++++++++ sound/soc/mediatek/Makefile | 1 + sound/soc/mediatek/mt8365/Makefile | 15 +++++++++++++++ 3 files changed, 36 insertions(+) diff --git a/sound/soc/mediatek/Kconfig b/sound/soc/mediatek/Kconfig index 296b434caf81..671020037a99 100644 --- a/sound/soc/mediatek/Kconfig +++ b/sound/soc/mediatek/Kconfig @@ -314,3 +314,23 @@ config SND_SOC_MT8195_MT6359 boards with the MT6359 and other I2S audio codecs. Select Y if you have such device. If unsure select "N". + +config SND_SOC_MT8365 + tristate "ASoC support for Mediatek MT8365 chip" + depends on ARCH_MEDIATEK + select SND_SOC_MEDIATEK + help + This adds ASoC platform driver support for Mediatek MT8365 chip + that can be used with other codecs. + Select Y if you have such device. + If unsure select "N". + +config SND_SOC_MT8365_MT6357 + tristate "ASoC Audio driver for MT8365 with MT6357 codec" + depends on SND_SOC_MT8365 && MTK_PMIC_WRAP + select SND_SOC_MT6357 + help + This adds support for ASoC machine driver for Mediatek MT8365 + boards with the MT6357 codec. + Select Y if you have such device. + If unsure select "N". diff --git a/sound/soc/mediatek/Makefile b/sound/soc/mediatek/Makefile index 3938e7f75c2e..4b55434f2168 100644 --- a/sound/soc/mediatek/Makefile +++ b/sound/soc/mediatek/Makefile @@ -9,3 +9,4 @@ obj-$(CONFIG_SND_SOC_MT8186) += mt8186/ obj-$(CONFIG_SND_SOC_MT8188) += mt8188/ obj-$(CONFIG_SND_SOC_MT8192) += mt8192/ obj-$(CONFIG_SND_SOC_MT8195) += mt8195/ +obj-$(CONFIG_SND_SOC_MT8365) += mt8365/ diff --git a/sound/soc/mediatek/mt8365/Makefile b/sound/soc/mediatek/mt8365/Makefile new file mode 100644 index 000000000000..52ba45a8498a --- /dev/null +++ b/sound/soc/mediatek/mt8365/Makefile @@ -0,0 +1,15 @@ +# SPDX-License-Identifier: GPL-2.0 + +# MTK Platform driver +snd-soc-mt8365-pcm-objs := \ + mt8365-afe-clk.o \ + mt8365-afe-pcm.o \ + mt8365-dai-adda.o \ + mt8365-dai-dmic.o \ + mt8365-dai-i2s.o \ + mt8365-dai-pcm.o + +obj-$(CONFIG_SND_SOC_MT8365) += snd-soc-mt8365-pcm.o + +# Machine driver +obj-$(CONFIG_SND_SOC_MT8365_MT6357) += mt8365-mt6357.o