Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp5339330iob; Mon, 9 May 2022 14:12:21 -0700 (PDT) X-Google-Smtp-Source: ABdhPJwqB7lXgFB0G67E6Ab/ITfsjiMfO/rIO2NHKaAwvlzzuIeG+qutIRZTXlAKP1Jm8XGuUsHV X-Received: by 2002:a17:907:960d:b0:6f4:3b68:8d55 with SMTP id gb13-20020a170907960d00b006f43b688d55mr16339797ejc.105.1652130741547; Mon, 09 May 2022 14:12:21 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652130741; cv=none; d=google.com; s=arc-20160816; b=Zu+3PJhsUKzFzjY+w4MSIS5Sh4BAE9Swoo1J0SNVpB3455rNRM4l2oaks6NfNdTzGt 338wsJxkfbEfGsnVYGjSr+YQ2D2ur4jH2IZv8Z9VqpQvW7hLVnsdIsJe0k70I0nSp1KO MO+wauxm0GhkSSg49wokvgEjpdKOdp3OfPXYudiIWg1Z/gqXQWqcCDzfoYpCttdBNiFb GY7rbmm9nmT6WLr2cjCShuPftpTWKW/E+50wWpuUv7zO8To+wRIHfYNoaMrbGoOX3m8d 6gCfgV+SNcU/wK10koOKHgi69DzFpER0eeDXXv86Xo2YDoqanGDDoy2Z+oJJAC45lQot RC0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=bBUzmnZlA/+81Hwr7unx1vKZNgsgPprlhy555dwjKsw=; b=bsZ45zJKNYM0OAsfEV5jup8a/Ojb0XW+/v/h01JwcNjU7qQo8VkrjfLhEg8SIsnLZJ eowP40NwLNS+zh+QIZTbiJ+ThSftx5PZcS/hkh1Sy1y3XL/XWynCo4SZWt/GokjO8x5Q +jfKaXfcgaw2+QU/V/SZqXZQ1N6SviAeXPe7qnXPbPW2PV5TDEtQa7g1dYWZTBNueLTz em49o3XF1VF2K9VBamuiHlNa5HfuTxQCbZZtuL3yZo7AIZmjBW4xSuXay5vCrZWd3a83 9P7QDLrv9QOcjVIXhm78O22GrtZkh04/hwLpzADAaIv+OFmaVMNxJCms343+y17k/TyR kNTw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=U74Ljn72; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id s2-20020a170906a18200b006f3c161e088si14572795ejy.544.2022.05.09.14.11.53; Mon, 09 May 2022 14:12:21 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@collabora.com header.s=mail header.b=U74Ljn72; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=collabora.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229910AbiEIVC4 (ORCPT + 99 others); Mon, 9 May 2022 17:02:56 -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: 8bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,UNPARSEABLE_RELAY autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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Ă­colas 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@collabora.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 +patternProperties: + "^mediatek,i2s[13579]-share$": + description: + Each I2S interface has a single data line, input if its index is even 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 represents 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 -- 2.36.0