From nobody Sun Sep 22 01:30:06 2024 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 64D75C433EF for ; Mon, 9 May 2022 20:59:06 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229904AbiEIVC6 (ORCPT ); Mon, 9 May 2022 17:02:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59214 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229885AbiEIVCs (ORCPT ); Mon, 9 May 2022 17:02:48 -0400 Received: from bhuna.collabora.co.uk (bhuna.collabora.co.uk [46.235.227.227]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2F812B8D24; Mon, 9 May 2022 13:58:53 -0700 (PDT) Received: from [127.0.0.1] (localhost [127.0.0.1]) (Authenticated sender: nfraprado) with ESMTPSA id 564EA1F42F48 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=collabora.com; s=mail; t=1652129932; bh=j+wdfrc3FXi43X0VkODadFay6bg9FKNBstYCTMpecA8=; h=From:To:Cc:Subject:Date:From; b=U74Ljn728Csp+ET2xThho9d1REqGnsswajm8GHfb67k2/RQZQWrjH38iHELrF44Nj xjNY6xlKH4B+68AQjDzJ4U9UXWZJZvRQXVg+CE577q+KjYL03FmMa/3TLtBWPFbaJc CZtRlFSbP4P6LvKc4+03hk9wBfEX4V83iyBOVw4o1AuuX92sETE6/YrYOK5HC+RLse usJnlXHQmatb4Tr1cmtTPqJ7rXIY3//R6J9m5ZXiAvwzZW6PwC2awkxQcnstozW5iT i1yFHZ/MGA/PZzO3rWICOJ8hBGFEU41lmBA6aSosZ+mnNFsx4iQ1oOlQOIjrv9EE/V Tc+X6cFr8gC1Q== From: =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= To: Mark Brown Cc: kernel@collabora.com, AngeloGioacchino Del Regno , =?UTF-8?q?N=C3=ADcolas=20F=2E=20R=2E=20A=2E=20Prado?= , Jiaxin Yu , Krzysztof Kozlowski , Liam Girdwood , Matthias Brugger , Rob Herring , Shane Chien , alsa-devel@alsa-project.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-mediatek@lists.infradead.org Subject: [PATCH v2] ASoC: dt-bindings: mediatek: mt8192: Add i2s-share properties Date: Mon, 9 May 2022 16:58:47 -0400 Message-Id: <20220509205847.607076-1-nfraprado@collabora.com> X-Mailer: git-send-email 2.36.0 MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org The Mediatek AFE PCM controller for MT8192 allows two I2S interfaces to share the same clock and act as a single interface with both input and output. Add patterns for these properties in the dt-binding. The property is split into two patterns in order to allow all valid interface pairings. Signed-off-by: N=C3=ADcolas F. R. A. Prado --- The series from v1 of this patch was merged although some changes were still needed in this patch, so the v1 of this patch was reverted [1] and this standalone commit addresses the feedback from v1 and readds the property. [1] https://lore.kernel.org/all/20220509185625.580811-1-nfraprado@collabora= .com v1: https://lore.kernel.org/all/20220429203039.2207848-2-nfraprado@collabor= a.com/ Changes in v2: - Added "mediatek," prefix to property - Rewrote and added more information to property description - Split into two patterns to validate that output-input pairings are done .../bindings/sound/mt8192-afe-pcm.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml b/= Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml index 7a25bc9b8060..2abf43c6c2c3 100644 --- a/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml +++ b/Documentation/devicetree/bindings/sound/mt8192-afe-pcm.yaml @@ -54,6 +54,22 @@ properties: - const: aud_infra_clk - const: aud_infra_26m_clk =20 +patternProperties: + "^mediatek,i2s[13579]-share$": + description: + Each I2S interface has a single data line, input if its index is eve= n or + output if the index is odd. An input and an output I2S interface can= be + used together as if they were a single I2S interface with both input= and + output data lines by sharing the same clock. This property represent= s this + pairing. The value should be the name of the interface whose clock is + used, and the property name the other interface that depends on this + clock. + pattern: "^I2S[0268]$" + + "^mediatek,i2s[0268]-share$": + description: Same as above. + pattern: "^I2S[13579]$" + required: - compatible - interrupts --=20 2.36.0