From patchwork Thu Feb 2 18:36:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 52149 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp419996wrn; Thu, 2 Feb 2023 11:08:52 -0800 (PST) X-Google-Smtp-Source: AK7set9v3oizU/LEZ8AbTCkKNtyo9n+jdPhDxSrslWxTDHd+OyGzGJCTsLdI+VYkS40IM0fZi1n+ X-Received: by 2002:a62:501:0:b0:594:3fde:40c6 with SMTP id 1-20020a620501000000b005943fde40c6mr1185640pff.25.1675364931788; Thu, 02 Feb 2023 11:08:51 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675364931; cv=none; d=google.com; s=arc-20160816; b=jabw072KdQ3PFSN5Tqs1YkkWmr10HuBTRlddmSGDWqemryj4FUZRvR44cqv9eMLBGY SnmtbYnjlU0N2cP7nrLnPFpCNH4fq9J34uq6ub59PrhSsjWgLkrgUdQpLutn6gx9twls lpalmBSVrXU+ZHTFSFz7PrA09O991Axwq1wUQc7dU5z2BSVbLGqCnDzo/vW+2f1pk2F5 +x8whVpI1K7grx6fWdfo/m2i0UW4G084BMWNdZrR+z8RtVS1NBUFFKGWYks4RqofBDYu j21T4nOI9kEJ8/a3Tz5pLtD/jiadZ/v4BhVA2rzSPcjl6WczQ2ykSnTBrgHUztWgh2pC 8BxQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=it81YP95JIRPJswh/FgK8dhTohEGTS21tUAjm96BPMQ=; b=dCdSQEVDybAjcZndXiZqCSN7vX2vVaDgjrsydC0/cG6XEEWG/kquMhlEddQQS54Aa+ oPuPOGNJY/pyxz0aK1/ZkQihMYVfph2vWnwdeP4k2E6nRGoVpUOjOUfopDLCv2/86E3E dEfywTBo7Zwiz96l4g+OuIuPydXPXklil+w+LOLBYnICxe7Hp0fc9eMKPIPIxy0Zbe3R yl6HU6NYm7ilRzUeY+qnNMj/Opn4LYWwjqk7qEgL6gZEWIHGcRb/ImSftRKYUetJlHQW BeNOwKhF4somigl4Sgq1kdQoaNlh8p/N4WhAvRI87EhdlFHGVTZvF7Jm93sfVrpwe3xY vBww== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=T35BJJth; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 64-20020a620543000000b0053e8d0c9909si42663pff.221.2023.02.02.11.08.32; Thu, 02 Feb 2023 11:08:51 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=T35BJJth; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232552AbjBBSiL (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:11 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45498 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232563AbjBBSiF (ORCPT ); Thu, 2 Feb 2023 13:38:05 -0500 Received: from mail-wr1-x42b.google.com (mail-wr1-x42b.google.com [IPv6:2a00:1450:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EFFDC7B784 for ; Thu, 2 Feb 2023 10:37:28 -0800 (PST) Received: by mail-wr1-x42b.google.com with SMTP id h16so2534315wrz.12 for ; Thu, 02 Feb 2023 10:37:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=it81YP95JIRPJswh/FgK8dhTohEGTS21tUAjm96BPMQ=; b=T35BJJthNSXWGuipJ/S57/Vin4LoRONI1yOJ2iw8a6ampM/SH/alQlaM3pwJXbfIto rhB/lH9b1SfkOR19HeWTkVB7VSSsTJgHyiavcYsEoM/cXzmWt6zg2rxDTIV6fKG7uY6C R59zbQQItYpdbiiKXP3AQ7Vsyoc4Swh2MVx05ksPml3KYRaXwgZdpVxGAzQzbmS6ZsUk hFKqBE/i/V1NnVVjwq0cZN7FQRbfbNj0VLT9zzJo0vI2vf1zI2ghqgOOttCZZN4+N/qR OJNFfbUx3uQyls1lZ4AVo++FolCmlr1lg3WtFc0TRW0TSRpiuvX8jLi/jVecCpg+wtgK voEA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=it81YP95JIRPJswh/FgK8dhTohEGTS21tUAjm96BPMQ=; b=yu8lGQXW7iRqQX05wxmBfPiee1V8YrCLznWXn1eLxArvnWH/9ZAcWxMKxELax8nJfD sKuCMxdZkbR2qB8gCx5qRHu5jsfYH75swQ706ZhJ2sdR0x6q12KGnkH3EZyDuXprmxGA xyu/F3u5ETMaGkqqlHiCBDaV0AUY9oyF1tLK7XBUwXAhd1IPao6VrBkkVelVkfdMpsSW eMIyjkQQHIiSqmLoy8E1nSae1qhVXgh7ZIp7Pzp22+8mqIhu2cozokbGwySECoddqYrS qyWACTZxCIADKwAljwCF9pVzQDvyVd/kKVMPPh/q536FI85wQyMrLvjX+95DGmDosYL5 6kxw== X-Gm-Message-State: AO0yUKUjCwgYbC5auwqeY3BWGtnoT1wYhdHxWG+MwGKyRSEL+b2oM/mt 1dj8KkuV1eiqHHr8hETpAvgJKQ== X-Received: by 2002:a05:6000:1285:b0:2bf:b036:ffe3 with SMTP id f5-20020a056000128500b002bfb036ffe3mr6707490wrx.45.1675363047162; Thu, 02 Feb 2023 10:37:27 -0800 (PST) Received: from localhost.localdomain (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id p12-20020a5d48cc000000b00241fab5a296sm164664wrs.40.2023.02.02.10.37.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:26 -0800 (PST) From: Jerome Brunet To: Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org Subject: [PATCH 1/9] ASoC: dt-bindings: create component common schema Date: Thu, 2 Feb 2023 19:36:45 +0100 Message-Id: <20230202183653.486216-2-jbrunet@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230202183653.486216-1-jbrunet@baylibre.com> References: <20230202183653.486216-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756747458822551536?= X-GMAIL-MSGID: =?utf-8?q?1756747458822551536?= All DAIs are component but not all components are DAI. Move the component properties (sound-name-prefix ATM) to a separate schema file so it can be used by non-DAI components, such as auxiliary devices. Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski --- .../bindings/sound/component-common.yaml | 21 +++++++++++++++++++ .../devicetree/bindings/sound/dai-common.yaml | 11 +++------- 2 files changed, 24 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/sound/component-common.yaml diff --git a/Documentation/devicetree/bindings/sound/component-common.yaml b/Documentation/devicetree/bindings/sound/component-common.yaml new file mode 100644 index 000000000000..37766c5f3974 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/component-common.yaml @@ -0,0 +1,21 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/component-common.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Audio Component Common Properties + +maintainers: + - Jerome Brunet + +properties: + sound-name-prefix: + $ref: /schemas/types.yaml#/definitions/string + description: | + Card implementing the routing property define the connection between + audio components as list of string pair. Component using the same + sink/source names may use this property to prepend the name of their + sinks/sources with the provided string. + +additionalProperties: true diff --git a/Documentation/devicetree/bindings/sound/dai-common.yaml b/Documentation/devicetree/bindings/sound/dai-common.yaml index d858eea73ed7..1aed2f0f1775 100644 --- a/Documentation/devicetree/bindings/sound/dai-common.yaml +++ b/Documentation/devicetree/bindings/sound/dai-common.yaml @@ -9,15 +9,10 @@ title: Digital Audio Interface Common Properties maintainers: - Jerome Brunet -properties: - sound-name-prefix: - $ref: /schemas/types.yaml#/definitions/string - description: | - Card implementing the routing property define the connection between - audio components as list of string pair. Component using the same - sink/source names may use this property to prepend the name of their - sinks/sources with the provided string. +allOf: + - $ref: component-common.yaml# +properties: '#sound-dai-cells': true additionalProperties: true From patchwork Thu Feb 2 18:36:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 52141 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp410447wrn; Thu, 2 Feb 2023 10:50:34 -0800 (PST) X-Google-Smtp-Source: AK7set9lXFGvtHKbqpn0w11DVXpmi4IYMakdVsF7Ky6LSgz7O/x46VxPbvyjaT0KiJ9b6rSDBLNR X-Received: by 2002:a05:6a20:e60f:b0:af:7762:3c29 with SMTP id my15-20020a056a20e60f00b000af77623c29mr6950965pzb.10.1675363833913; Thu, 02 Feb 2023 10:50:33 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675363833; cv=none; d=google.com; s=arc-20160816; b=U4nNGP2nB2PJ+HdOKBz6rIWzJctXDTS9+/mn6HSho9kP6fkL2+slF8ecN/y7qCVQ/X aImVazEzat17ewCOEc+hPpk1z1zxMtsDyIjVAVGvPHLJdyONRuCLj4clLdeDDI5egPuK 7zHe520Z5c3hCf/muG2WrpsCnfiWZKjnxcoMMW1glA8rFkaPUKNjLrwFVNwPkdCxgDQT 3sSJLm4kT9XffnMIMZ4eidJcTrsC7d/bqcW2KOQM13npPhL29+Fl165P858dfxlfGlB1 RrkefTEQxw5Qbbcgimv5ahie8oHscJOA8XV0wLin0v/tKJzMQPYy3mmJn7ZVy2xdD2Oj 7ECQ== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=QeIfWHDa2fvM5jUnMkL8MI7fcZ0bv0i4OOCgMKL446E=; b=hp+sbBq4OluhNMpxAn9jbNaf1xphrfD64c78ukd5tNrw8IHpf+mL2TBMAGIAOidcIF DkiYDrqZkQEOeC//Jq8pvt/5UYwswTA9fRZu39kK19EpVK7tE80nywNfcopqAduHxxXn 9AUqd09RVuZd7PHMXjOIoRsDKqcIH9zdqt87SUeSVTh1Ia8obQ9helonmMgUYWldyrM5 RyNWi+aZ3eAjzGDnzE2/FVEsEHIUzSf1lkyH3PPF0LuEHv9xN9LllX8bieMIqn7rcCVF XtDLMDaOuHLRzRNPv+uoXs9KJKNUKYX+a8rvkIrg8WU6vEwG3PDec7uLpnocGL785wkx Q9NA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=l06A1cmX; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id d188-20020a6336c5000000b004b439eefdc7si390348pga.4.2023.02.02.10.50.21; Thu, 02 Feb 2023 10:50:33 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=l06A1cmX; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232708AbjBBSiP (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:15 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45666 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232417AbjBBSiJ (ORCPT ); Thu, 2 Feb 2023 13:38:09 -0500 Received: from mail-wr1-x42f.google.com (mail-wr1-x42f.google.com [IPv6:2a00:1450:4864:20::42f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E37881632D for ; Thu, 2 Feb 2023 10:37:32 -0800 (PST) Received: by mail-wr1-x42f.google.com with SMTP id m7so2549883wru.8 for ; Thu, 02 Feb 2023 10:37:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=QeIfWHDa2fvM5jUnMkL8MI7fcZ0bv0i4OOCgMKL446E=; b=l06A1cmXwgKENlFdGLp7sC4/eyJqhQGFvt4WqG9szuR7KAzjP3ilZlD2hOQqUJNRqD y3ckO43HNJ3hiNoIuABaBoCYWYdHAr2oVhJXGyhd0e3wQfZdsBGSaJJleNkYc+7imVdc jQrNTRkmnSzPebl/3WAjEkdFAkMP81O7guCTHQzCMtxl09H0Q2KgM7/MCLQDnpg5DCBj +dGns2SgfBT/jHvrCuq1PRHBINCr7tyy/gk/Erwt2XpcxqtESE3Qz8vzRbe/KQzjqJzF DRUXob7GENdxln0PH2KRCPhBsLN3/lzLRlG9s5jKXszXTeTJY073AMpEBT8ZL6ApjJ8Y xzrQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QeIfWHDa2fvM5jUnMkL8MI7fcZ0bv0i4OOCgMKL446E=; b=MUZSm/7uH0utYy+OAnQPQ7xyjmV8n7JNXcr6domCXCUYhVP/5M/3pUDZfLSlvy+h6C hWllD40GjQk8kO/P59c0x1xao84kNEg8M7QGmzjhruKZLSVuOcXAq7wtHkINqfJYX+x4 /nufMl1jZPzwJ9DyZQ+5dbr9djXxX6HvnW7iy/6y+LQpJ3Akz8kudDI9GAeVwie1RTem Ed9vVnflZtttNe04SvgiKIoaoPXClIiT5i530w8L4HBtF824j7XIpz0us6dJtHZkZ4Sf MVgBVLZiDRXhQfHntvN8svfZb6ewoO/DE7dRgxys/P7bs9fJYBQhdDmKDgRTTwh6aIW2 JVPg== X-Gm-Message-State: AO0yUKWU14glwUUfpXNgjLZq64BGs76TZSek0QuGtDbw90Xqw3kUIJS8 6cDTUP8BzlYL7rdavAm2qHTbRQ== X-Received: by 2002:adf:9c8e:0:b0:2c1:28dc:1561 with SMTP id d14-20020adf9c8e000000b002c128dc1561mr6380662wre.44.1675363050459; Thu, 02 Feb 2023 10:37:30 -0800 (PST) Received: from localhost.localdomain (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id p12-20020a5d48cc000000b00241fab5a296sm164664wrs.40.2023.02.02.10.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:30 -0800 (PST) From: Jerome Brunet To: Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org Subject: [PATCH 2/9] ASoC: dt-bindings: meson: fix gx-card codec node regex Date: Thu, 2 Feb 2023 19:36:46 +0100 Message-Id: <20230202183653.486216-3-jbrunet@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230202183653.486216-1-jbrunet@baylibre.com> References: <20230202183653.486216-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756746307615635208?= X-GMAIL-MSGID: =?utf-8?q?1756746307615635208?= 'codec' is a valid node name when there is a single codec in the link. Fix the node regular expression to apply this. Fixes: fd00366b8e41 ("ASoC: meson: gx: add sound card dt-binding documentation") Signed-off-by: Jerome Brunet Reviewed-by: Krzysztof Kozlowski --- .../devicetree/bindings/sound/amlogic,gx-sound-card.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml index 5b8d59245f82..b358fd601ed3 100644 --- a/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml +++ b/Documentation/devicetree/bindings/sound/amlogic,gx-sound-card.yaml @@ -62,7 +62,7 @@ patternProperties: description: phandle of the CPU DAI patternProperties: - "^codec-[0-9]+$": + "^codec(-[0-9]+)?$": type: object additionalProperties: false description: |- From patchwork Thu Feb 2 18:36:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 52146 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp416224wrn; Thu, 2 Feb 2023 11:02:17 -0800 (PST) X-Google-Smtp-Source: AK7set+xP1sva0iHbKrTzCkPxZatQNDmbv5aYrnPrg729gb7+9pOyy6qhj/4vcq9q8masx8vTOdh X-Received: by 2002:a05:6402:500c:b0:49e:4254:60a9 with SMTP id p12-20020a056402500c00b0049e425460a9mr8285331eda.29.1675364537603; Thu, 02 Feb 2023 11:02:17 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675364537; cv=none; d=google.com; s=arc-20160816; b=Qbe88tVhHkQ+PcR/BlkcRgddRYcy+mTx/npptB6++NPgdkiLEkHS77FlajLFeB6iFn PvUUxKbjTfZGeeKWGsJnUeFk/ujPHLbd8lIO0tc4aBdC2PUymm1SyQRn/9WzdWLiyR1o lwCDppNBJZHSFBNRKYDAni1VCu0dYDKJf54UJLsYDHvSpxiklGUO8uFecN83FPMcpzXi 4znu+09f/DOL6GJ3KYkEdRdX/6YXkcGR819cnvrqaJ5z9Ft5KC6d0iviEwLFB9rXaO9g OepvSCIIm0Lqbg3AypklEjMcBf5MVFWpbJ/BZBq70cfzEJx+EF4F6ztXFGX3xmkY4jzq T6Kg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hZDf/HLHsmXllvXlzMaBba2wF4a3xInBovmR2gll1NE=; b=MKMmUDmm66+ltWbyV2XmAcJ0304OE3pctaZ2ziIpXDO1iawmSbMU2cIPXleec8BrPZ xEHwMTdtpduQhDqZ+kIWuaUoH1UmrnHpqqTLBeUzdKXMWXc48wok3E+mU6fAquwbD6Zy N9dFNMWK+p3s9q9t6uskCGokJxp23fibMJsqYu1iou91pO4uWICM+c7Xcgm9XWqSc6xX xW7WhSUCl5bAFpMgW4jex1T7AAp0Mbzg4+EGJGCp5wizPCF6oq17QVA4TZ7yMLTIPrpn NtRhHtMNgQ68H7IWiAHuByU5eaTH/HyKAXiMXtgtYTk61LFp8fX70oTTvBP9vpocUJlq O+YA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=xaYuudaL; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id i24-20020a0564020f1800b004974112a35dsi171859eda.541.2023.02.02.11.01.49; Thu, 02 Feb 2023 11:02:17 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=xaYuudaL; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232726AbjBBSiW (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:22 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232563AbjBBSiO (ORCPT ); Thu, 2 Feb 2023 13:38:14 -0500 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 892701EBD4 for ; Thu, 2 Feb 2023 10:37:37 -0800 (PST) Received: by mail-wr1-x429.google.com with SMTP id m7so2550026wru.8 for ; Thu, 02 Feb 2023 10:37:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hZDf/HLHsmXllvXlzMaBba2wF4a3xInBovmR2gll1NE=; b=xaYuudaLyB+uAk3PVQ8DP1LP3TKOxSqkpwctcjT4Z0iVbrSjlIK7ROCuOD4TzGetXo tgqj0nGRsRQJe072REFgPgVjHQ61dQkyQ5aEa/e1iHKNSevRrsRIF1xECSFXNThvxi8q PwFwhy/U4yfMzR+lsF4xgGiPi+SKpVMSj4sxR3WM/+My7FdcSoHpJmJ23HL4wFjcipNM JTB+yER/k59c2hjSoR533p4BYEdcUx7B5RLfR0YaDmPSpm/sp83jQTcs18KIfbZhK2du ELJ9eRv3HiVXVpuad6m6/Z/hcVB7PWmib8ZJlJvx+Py4/mEjinnOAWxXh9fSxRK0LwYM NhEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hZDf/HLHsmXllvXlzMaBba2wF4a3xInBovmR2gll1NE=; b=gZvtT07qkaYXk9w3g5uyl9+WxmyW/yy1cygRreygcnEO5fM861Siipz/8Vnuhbzgih j1uE6SIbcd9v35dKxCQRkaPiJvs26Ukh2VKQ7ejWFPqSuBdp0zdu072XEEzqVebN2qEN E3unux0M35tLHfZEWSL1mR2V9xIkQXtGqQwSxa+syyDVUr2Ij9/YRPdtfhLZwGYoXeXF orSG41FgP9bNiDq8ORwTEQyXxnnM49a5PjJ05tLGH6pxU3e1XhrbCwlMpPdrxUqdakAb uYxYAGSwaGB3BURpRIQRBrha/+gqc7bwqUJH4sUKBdQrwPt3cm4y6I3DAU6ftYJDlvoP 544A== X-Gm-Message-State: AO0yUKXHR7CpMkVdlwAAMHKRr4sDC99zZDgvAmOmQVx48AqXxPuMVPWC FIjl0qorg2soABGQEcAF31bllw== X-Received: by 2002:a5d:6da3:0:b0:2bf:ae11:c40c with SMTP id u3-20020a5d6da3000000b002bfae11c40cmr7784287wrs.32.1675363054576; Thu, 02 Feb 2023 10:37:34 -0800 (PST) Received: from localhost.localdomain (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id p12-20020a5d48cc000000b00241fab5a296sm164664wrs.40.2023.02.02.10.37.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:34 -0800 (PST) From: Jerome Brunet To: Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org Subject: [PATCH 3/9] ASoC: dt-bindings: meson: convert axg tdm interface to schema Date: Thu, 2 Feb 2023 19:36:47 +0100 Message-Id: <20230202183653.486216-4-jbrunet@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230202183653.486216-1-jbrunet@baylibre.com> References: <20230202183653.486216-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756747045435851059?= X-GMAIL-MSGID: =?utf-8?q?1756747045435851059?= Convert the DT binding documentation for the Amlogic tdm interface to schema. Signed-off-by: Jerome Brunet --- .../bindings/sound/amlogic,axg-tdm-iface.txt | 22 ------- .../bindings/sound/amlogic,axg-tdm-iface.yaml | 59 +++++++++++++++++++ 2 files changed, 59 insertions(+), 22 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt deleted file mode 100644 index cabfb26a5f22..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.txt +++ /dev/null @@ -1,22 +0,0 @@ -* Amlogic Audio TDM Interfaces - -Required properties: -- compatible: 'amlogic,axg-tdm-iface' -- clocks: list of clock phandle, one for each entry clock-names. -- clock-names: should contain the following: - * "sclk" : bit clock. - * "lrclk": sample clock - * "mclk" : master clock - -> optional if the interface is in clock slave mode. -- #sound-dai-cells: must be 0. - -Example of TDM_A on the A113 SoC: - -tdmif_a: audio-controller@0 { - compatible = "amlogic,axg-tdm-iface"; - #sound-dai-cells = <0>; - clocks = <&clkc_audio AUD_CLKID_MST_A_MCLK>, - <&clkc_audio AUD_CLKID_MST_A_SCLK>, - <&clkc_audio AUD_CLKID_MST_A_LRCLK>; - clock-names = "mclk", "sclk", "lrclk"; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml new file mode 100644 index 000000000000..362414fc9a9b --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-iface.yaml @@ -0,0 +1,59 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-iface.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Audio TDM Interfaces + +maintainers: + - Jerome Brunet + +allOf: + - $ref: dai-common.yaml# + +properties: + $nodename: + pattern: "^audio-controller-.*" + + compatible: + items: + - const: 'amlogic,axg-tdm-iface' + + "#sound-dai-cells": + const: 0 + + clocks: + minItems: 2 + items: + - description: Bit clock + - description: Sample clock + - description: Master clock #optional + + clock-names: + minItems: 2 + items: + - const: sclk + - const: lrclk + - const: mclk + +required: + - compatible + - "#sound-dai-cells" + - clocks + - clock-names + +unevaluatedProperties: false + +examples: + - | + #include + + tdmif_a: audio-controller-0 { + compatible = "amlogic,axg-tdm-iface"; + #sound-dai-cells = <0>; + clocks = <&clkc_audio AUD_CLKID_MST_A_SCLK>, + <&clkc_audio AUD_CLKID_MST_A_LRCLK>, + <&clkc_audio AUD_CLKID_MST_A_MCLK>; + clock-names = "sclk", "lrclk", "mclk"; + }; From patchwork Thu Feb 2 18:36:48 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 52142 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp414119wrn; Thu, 2 Feb 2023 10:58:55 -0800 (PST) X-Google-Smtp-Source: AK7set8aMFPiYhWuCdzx2gqgcST8EE0qx0gyMmHXsYqYeyJtuZBZhBB9nYpoEcAY7iBetdDHAc9S X-Received: by 2002:a05:6a00:2181:b0:593:407b:11f0 with SMTP id h1-20020a056a00218100b00593407b11f0mr7999145pfi.34.1675364335075; Thu, 02 Feb 2023 10:58:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675364335; cv=none; d=google.com; s=arc-20160816; b=A2bi0FEGcGfmBldajDz457pq18ED64iBEwH98P+x+KfQr//9hJTl7B69p3/sj4gUED GYQbu+k2ZFNf5l+NM1cF/NgwTVOP+6y97/xRnBvogDrtsyRa4tGxPvlKQc7afgzFbUEv cfPnusA5sQOdYu7PRmU6P4PBbV2PXsMfypDsLxeyHBmVTlPkq2bckVMYvCCH8ZI8NU8O 0LLlS1/uMWQNv/SBmZRxgxM4O8iVOUtitGo7BjZUL/TsfI9Bo4OcaxTgbZh9OrDmbnQs bAGovNPwDUCmW7oItqMDKOAYzPoy3xN+DO/QhQapWi+la9U9FEr/xBtwtLNmqcmr5D+V E4fw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=AXyZIljlivZsyzzAaHca17k18SeAHW7oVhmpWiofUc0=; b=cqEihm6W4Z4YbmcYdjslZ4fNA3QbAVCs2CjuJnWE8oQI1p0nQr6aNmsxpaRVPgeU4/ TYVitvvNGy0lcBaE3mkImER3PpJsAhN4xFKXF28p0g4+U5o0r4QqkSMSKiURP/NFP8uD ywpwM5MopLPWVY30ik2IzSqrQvK+ZJEOKyKwdz3+b7bm+7JruoQ8SbIk7AAq8sETRzWg Qtbtx/Pv1vpYmeUtFjl+R0mGC2Ja2TWUWBCO2Fmp9KXCqQgUVcuIVlnwLsfw4XfKfw8F 5tD5+4FsagFG9h4pHtiR5M5p9mbTSkGB25RTAt7efasm6LQhezeubErcQZtO4XRZ9vmV xK2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=FMUtGEoR; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id k6-20020aa78206000000b00593ad652779si15343pfi.361.2023.02.02.10.58.42; Thu, 02 Feb 2023 10:58:54 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=FMUtGEoR; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232931AbjBBSiZ (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:25 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45578 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232712AbjBBSiQ (ORCPT ); Thu, 2 Feb 2023 13:38:16 -0500 Received: from mail-wr1-x430.google.com (mail-wr1-x430.google.com [IPv6:2a00:1450:4864:20::430]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3C9EFBBA7 for ; Thu, 2 Feb 2023 10:37:41 -0800 (PST) Received: by mail-wr1-x430.google.com with SMTP id y1so2575521wru.2 for ; Thu, 02 Feb 2023 10:37:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=AXyZIljlivZsyzzAaHca17k18SeAHW7oVhmpWiofUc0=; b=FMUtGEoR5wyvukeWTuN6esPODhE46k/rhSExRP7aKN1Ra7+p49TL2Ncnhq5W86gmyh YOKEodOntnVZyvdzh9rcLgnpcIb7hY/g8lFQoZ0PvE7j2+HxcLJmVewOtx3zMdj45Guc M2U7S+V4Mgjf2GkFNqh3JsxXuLqBQBY9MmCDJGn9NkOJkVZkWBVTgMNUc8H1dIg4IHA/ UCISsTW6FGVWUALFZpSZDBd6bZLzYlmM+h7Oam7TBz+T+2KcA3RTey4LdwPO9kthzgyo QBWLtHXn64XSfGpkNz21INQYWpm33vvWlutGKdXAYs2B3Abfl70vmWdqin4zd3sV/PMZ P/UA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=AXyZIljlivZsyzzAaHca17k18SeAHW7oVhmpWiofUc0=; b=fgfcp9Kc2Y53/SooHMUoVyq/AEWy+OyoaG9Gjkmbw/KIc3c+KOTQlDH0bE0F0X12Wr UlZmAsyUSjS4fJDSsrU8p0ej7lHBzM2BKcv4AQxCt380/VVaS5ZaC0n48j4YThGuqMQ4 SDhEON6hMckjaFncuNKGfD1b9Ios+4c23F1H2a6p9nJyioML0ZRPgzLohBe38aypqCh9 n4TlEsw4e1YtZewaskFRYj7XAhepxuTzwq+Q1Gl0ZPLR8Py23kKmZ4lEjH38SsgVkGdC SnZ7aqgySBtXRVNGu8PrO3p5Ms8mV/kQ8V84tmWvqUA8TymeTKKmerk0t42tvuYQ0AmN Qguw== X-Gm-Message-State: AO0yUKV/+vXwLL/KPXoYrdB8tnz5a+AuB20DkKCPgDZo/bwr05MR5I2b H4mJKO/+ygvZrxj5y+O6271FWw== X-Received: by 2002:a05:6000:1843:b0:2bf:e7a0:8b63 with SMTP id c3-20020a056000184300b002bfe7a08b63mr8342067wri.5.1675363057949; Thu, 02 Feb 2023 10:37:37 -0800 (PST) Received: from localhost.localdomain (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id p12-20020a5d48cc000000b00241fab5a296sm164664wrs.40.2023.02.02.10.37.34 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:37 -0800 (PST) From: Jerome Brunet To: Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org Subject: [PATCH 4/9] ASoC: dt-bindings: meson: convert axg tdm formatters to schema Date: Thu, 2 Feb 2023 19:36:48 +0100 Message-Id: <20230202183653.486216-5-jbrunet@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230202183653.486216-1-jbrunet@baylibre.com> References: <20230202183653.486216-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756746832640951793?= X-GMAIL-MSGID: =?utf-8?q?1756746832640951793?= Convert the DT binding documentation for the Amlogic tdm formatters to schema. Signed-off-by: Jerome Brunet --- .../sound/amlogic,axg-tdm-formatters.txt | 36 -------- .../sound/amlogic,axg-tdm-formatters.yaml | 90 +++++++++++++++++++ 2 files changed, 90 insertions(+), 36 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt deleted file mode 100644 index 5996c0cd89c2..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.txt +++ /dev/null @@ -1,36 +0,0 @@ -* Amlogic Audio TDM formatters - -Required properties: -- compatible: 'amlogic,axg-tdmin' or - 'amlogic,axg-tdmout' or - 'amlogic,g12a-tdmin' or - 'amlogic,g12a-tdmout' or - 'amlogic,sm1-tdmin' or - 'amlogic,sm1-tdmout -- reg: physical base address of the controller and length of memory - mapped region. -- clocks: list of clock phandle, one for each entry clock-names. -- clock-names: should contain the following: - * "pclk" : peripheral clock. - * "sclk" : bit clock. - * "sclk_sel" : bit clock input multiplexer. - * "lrclk" : sample clock - * "lrclk_sel": sample clock input multiplexer - -Optional property: -- resets: phandle to the dedicated reset line of the tdm formatter. - -Example of TDMOUT_A on the S905X2 SoC: - -tdmout_a: audio-controller@500 { - compatible = "amlogic,axg-tdmout"; - reg = <0x0 0x500 0x0 0x40>; - resets = <&clkc_audio AUD_RESET_TDMOUT_A>; - clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>, - <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>, - <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>, - <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>, - <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>; - clock-names = "pclk", "sclk", "sclk_sel", - "lrclk", "lrclk_sel"; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml new file mode 100644 index 000000000000..f618724411de --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-tdm-formatters.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-tdm-formatters.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Audio AXG TDM formatters + +maintainers: + - Jerome Brunet + +allOf: + - $ref: component-common.yaml# + +properties: + $nodename: + pattern: "^audio-controller@.*" + + compatible: + oneOf: + - enum: + - amlogic,g12a-tdmout + - amlogic,sm1-tdmout + - amlogic,axg-tdmout + - amlogic,g12a-tdmin + - amlogic,sm1-tdmin + - amlogic,axg-tdmin + + clocks: + items: + - description: Peripheral clock + - description: Bit clock + - description: Bit clock input multiplexer + - description: Sample clock + - description: Sample clock input multiplexer + + clock-names: + items: + - const: pclk + - const: sclk + - const: sclk_sel + - const: lrclk + - const: lrclk_sel + + reg: + maxItems: 1 + +required: + - compatible + - reg + - clocks + - clock-names + +if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-tdmin + - amlogic,sm1-tdmin + - amlogic,g12a-tdmout + - amlogic,sm1-tdmout +then: + properties: + resets: + items: + - description: Dedicated device reset line + + required: + - resets + +unevaluatedProperties: false + +examples: + - | + #include + #include + + tdmout_a: audio-controller@500 { + compatible = "amlogic,g12a-tdmout"; + reg = <0x500 0x40>; + resets = <&clkc_audio AUD_RESET_TDMOUT_A>; + clocks = <&clkc_audio AUD_CLKID_TDMOUT_A>, + <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK>, + <&clkc_audio AUD_CLKID_TDMOUT_A_SCLK_SEL>, + <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>, + <&clkc_audio AUD_CLKID_TDMOUT_A_LRCLK>; + clock-names = "pclk", "sclk", "sclk_sel", + "lrclk", "lrclk_sel"; + }; From patchwork Thu Feb 2 18:36:49 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 52145 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp415532wrn; Thu, 2 Feb 2023 11:01:18 -0800 (PST) X-Google-Smtp-Source: AK7set9IGvm8sZ9VY/M4W2nmVKbTTgNzfa6x/KtvZit/QIEGTNp3FB6+9uKnXgUk2rnpzwpV4EYg X-Received: by 2002:a05:6a00:290f:b0:593:903a:17fd with SMTP id cg15-20020a056a00290f00b00593903a17fdmr6592125pfb.0.1675364478180; Thu, 02 Feb 2023 11:01:18 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675364478; cv=none; d=google.com; s=arc-20160816; b=hS61IP6QEm6SldBp1BeWo+f4x9e/Th7xn8ucqOEqNIqYznZyeOSgYgv7+ocWFeqWRL oIKN9okGHaaIjOLJ6TUrhIVJMJ1oM5+oMI7yyIMsNTnXRQ9tZH+WBNfprgNxP/1SwyKc x3D3kfhCnYgFzzvFUtL2yum857s1sAgzqUsndC/muhEiLQT2OCOgP41VbOZQnUYsZN8K cX7XQHnd3dgjIN2AVvqT7h28DAVn/RB/mY4YAYjzcJ+zuWVoqdxBnQGC4jueqSABCwfg smkg6dZoi1gEe1L2buGoik61xWBf+rkJIZviK7ggfTTxgr7OvGRXJPPtZdg0jfMHTG/F RDEw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=8C7ku/hdu5/TzCYZjswOMzLUyQCwBVMzHPFGN9cKzy0=; b=X/aggJZxs2jCoxeLS+t9JEMtZGOWIE1itxKDxuR7aZyO/jLnFlV1o33LZej9ARX7Wm 4JgW6AjqqQDVtdZZybAdUdXIsbGn0jhy/rvETrofDDIvXOkqvJw4AkK1YHw0U4y3HDvZ keQJhEXSY9LnSj/viCLeUsi6j/quwoRO44FffGbBlQIYXiV4ayttEiR7hKljf/lnZk9P 6q7kuQq0ZZvH5ZHwAgzE1T9iHxSVB74/SRNNHP3p+RotjOPDJ9g0P2CKkK6JchA8BXYK HqEI4FGAaCwsKT24+j73dpNO2eEXvh0WGXzJoyv09HXPHAgnpVmarB+cm/De54wfKEvO omMA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=K6j+Xbgi; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id 64-20020a620543000000b0053e8d0c9909si42663pff.221.2023.02.02.11.01.03; Thu, 02 Feb 2023 11:01:18 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=K6j+Xbgi; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232870AbjBBSib (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:31 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45882 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232815AbjBBSiV (ORCPT ); Thu, 2 Feb 2023 13:38:21 -0500 Received: from mail-wr1-x433.google.com (mail-wr1-x433.google.com [IPv6:2a00:1450:4864:20::433]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 1C3DEBBAA for ; Thu, 2 Feb 2023 10:37:44 -0800 (PST) Received: by mail-wr1-x433.google.com with SMTP id q5so2606474wrv.0 for ; Thu, 02 Feb 2023 10:37:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=8C7ku/hdu5/TzCYZjswOMzLUyQCwBVMzHPFGN9cKzy0=; b=K6j+XbgiXMKA4me6MPCQUDOi7uYQTQpYaO+uCV6lbFgsRH3NnCqmx/HSMYzBbP0FlP 1AX9OXdTocgEAi76fVpp4BCazKbE2kI5j8A9zZtINn7iOm1Wr92dIs0/JqCWUObBn5sv bP6wzmFdk6YVVQrNM7TkU2WBJHqrrL1tnaIzriIckujVTXHqidrL3x7Rn8iBX60PMHRj wSLX5jlAefjq8ul/YUxbNBo4htf15B6FmN0qBCKFK8Map+JQX7NXB1YP/OY0fHb/xwSh fSog8uAtx8A0RL5EPgPudL90JFs0XWQb+xQrc960qoLDq6frjJutDeJAmNXLbv8ft0Zm PZEw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8C7ku/hdu5/TzCYZjswOMzLUyQCwBVMzHPFGN9cKzy0=; b=fUglRJpeXuphUFEkc8aM65/Mr3bv7jvfz9Q34KJ6z+5OkqLx0WjLbZSVqbYhdOYrkS mllAmwlnk+8e5Hwk4A9Ankq0ujmUJQdXHdUUbBtOUl5mP2f02XzkPFNpwHh0zwb6wDNa U0KWQIp+qSdpBAl1GyGEEYNvitgezgbHJg0wipXyeH6SwErD6aeDKFwT6KI1pqVHbYdy rBXkp90YVYqOPXbIUpVHYxKMRY/XXzY1H73Pk5NyjHC/cxLeKM/cZKZWu3qpAJaILpCc MOq4RIB33NTnWjzsRltRYnAeCOJNL4ok3sRrScctiIAKmgDpU5AkcrMYQmEzfdq17eyQ gDnA== X-Gm-Message-State: AO0yUKX/0JTqpW9/nhxlXZ6KitzhyKmhhYcjeM2B224/XK50tQWdujbd dSN8JYGlQWeNJrm89k/aDF8qCA== X-Received: by 2002:adf:c70b:0:b0:2bf:9478:a91d with SMTP id k11-20020adfc70b000000b002bf9478a91dmr6840276wrg.39.1675363061634; Thu, 02 Feb 2023 10:37:41 -0800 (PST) Received: from localhost.localdomain (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id p12-20020a5d48cc000000b00241fab5a296sm164664wrs.40.2023.02.02.10.37.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:41 -0800 (PST) From: Jerome Brunet To: Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org Subject: [PATCH 5/9] ASoC: dt-bindings: meson: convert axg pdm to schema Date: Thu, 2 Feb 2023 19:36:49 +0100 Message-Id: <20230202183653.486216-6-jbrunet@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230202183653.486216-1-jbrunet@baylibre.com> References: <20230202183653.486216-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756746983364403300?= X-GMAIL-MSGID: =?utf-8?q?1756746983364403300?= Convert the DT binding documentation for the Amlogic axg PDM device to schema. Signed-off-by: Jerome Brunet --- .../bindings/sound/amlogic,axg-pdm.txt | 29 ------- .../bindings/sound/amlogic,axg-pdm.yaml | 86 +++++++++++++++++++ 2 files changed, 86 insertions(+), 29 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt deleted file mode 100644 index 716878107a24..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.txt +++ /dev/null @@ -1,29 +0,0 @@ -* Amlogic Audio PDM input - -Required properties: -- compatible: 'amlogic,axg-pdm' or - 'amlogic,g12a-pdm' or - 'amlogic,sm1-pdm' -- reg: physical base address of the controller and length of memory - mapped region. -- clocks: list of clock phandle, one for each entry clock-names. -- clock-names: should contain the following: - * "pclk" : peripheral clock. - * "dclk" : pdm digital clock - * "sysclk" : dsp system clock -- #sound-dai-cells: must be 0. - -Optional property: -- resets: phandle to the dedicated reset line of the pdm input. - -Example of PDM on the A113 SoC: - -pdm: audio-controller@ff632000 { - compatible = "amlogic,axg-pdm"; - reg = <0x0 0xff632000 0x0 0x34>; - #sound-dai-cells = <0>; - clocks = <&clkc_audio AUD_CLKID_PDM>, - <&clkc_audio AUD_CLKID_PDM_DCLK>, - <&clkc_audio AUD_CLKID_PDM_SYSCLK>; - clock-names = "pclk", "dclk", "sysclk"; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml new file mode 100644 index 000000000000..d3da2f8ba7b1 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-pdm.yaml @@ -0,0 +1,86 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-pdm.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Audio AXG PDM input + +maintainers: + - Jerome Brunet + +allOf: + - $ref: dai-common.yaml# + +properties: + $nodename: + pattern: "^audio-controller@.*" + + compatible: + oneOf: + - items: + - enum: + - amlogic,g12a-pdm + - amlogic,sm1-pdm + - const: + amlogic,axg-pdm + - items: + - const: + amlogic,axg-pdm + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + clocks: + items: + - description: Peripheral clock + - description: PDM digital clock + - description: DSP system clock + + clock-names: + items: + - const: pclk + - const: dclk + - const: sysclk + +required: + - compatible + - reg + - "#sound-dai-cells" + - clocks + - clock-names + +if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-pdm + - amlogic,sm1-pdm +then: + properties: + resets: + items: + - description: Dedicated device reset line + + required: + - resets + +unevaluatedProperties: false + +examples: + - | + #include + + pdm: audio-controller@ff632000 { + compatible = "amlogic,axg-pdm"; + reg = <0xff632000 0x34>; + #sound-dai-cells = <0>; + clocks = <&clkc_audio AUD_CLKID_PDM>, + <&clkc_audio AUD_CLKID_PDM_DCLK>, + <&clkc_audio AUD_CLKID_PDM_SYSCLK>; + clock-names = "pclk", "dclk", "sysclk"; + }; From patchwork Thu Feb 2 18:36:50 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 52144 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp415350wrn; Thu, 2 Feb 2023 11:01:05 -0800 (PST) X-Google-Smtp-Source: AK7set+f33okFTeMlodv6+ZdakNFuSM1uwaFSfYXcgKBO/CglYyEN4LsmFAUnKh5yYKzdnAFIDCc X-Received: by 2002:a17:906:d203:b0:88a:2aeb:b14d with SMTP id w3-20020a170906d20300b0088a2aebb14dmr7581783ejz.23.1675364464810; Thu, 02 Feb 2023 11:01:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675364464; cv=none; d=google.com; s=arc-20160816; b=ibxPplMdU3VWm9HNuuuQ6Fu+1+Iqz8soeDal/SIlOSbkGxcliKBCcI96LPD0FPDJju FWU9KL2brGQyBu1kLTUF12JdZ1uD7z/Uzr3iKT99RrvOK9CzdhGVwt+EekllFxgxDrZr Q1PnoItq9wkBWSI7CdJuhyZJUGmplxgm9LuPMJOp3S9e3Zh0DsudSxyOocjk3nPXrPbq WU3NYqljQQS1Uv7b0mY/mP6pAttg2bjQ7Wp6lHAafN1CQpicT8ZmDLckALbAYRkMKCLY PCKJGOiPWPSH5sJBd/A4QZhJv1PFuqJUDnmGuM3pTks44gIltlsXYrDshraz1PsuyxOx 49Qw== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=/qzWJ+PJWjjXt1zQX9IH2K8XJiUf6DeC3wzgQPgc4GE=; b=1DYg7rodjoNVjWSpC5Cv6jYY/oK6UN778GpXo76f3bPDP7Hu6kAXUc/llLgw8hH6Jd ddyP/upcggPascqV5GrF1fQToEtnqr0gfo+dFFFlV5r9KiqnDAQ97d4vTMPv06XSKoye /J5yOvRodWuu0f29K/c6CvRbp4+4caucvRAN3jg4usJL+ykUCR8kCjT/yGRPBAMBWcN4 cw3SWUt5425GyfPEzv2ES6AkDRiyxm3FM33UXc/yIHOAnnL4dm6UxOrkvgq+tq4CWTmj yCDoaJeLysMLIqQLk13FKoWO6CyMJ5n5AwKvQ/AgKrZx8JGNb/bSBd+ra12HN6hKaOuh OYiQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=FOpoHF3f; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id fx3-20020a1709069e8300b0088965b1b479si398205ejc.394.2023.02.02.11.00.35; Thu, 02 Feb 2023 11:01:04 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=FOpoHF3f; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231936AbjBBSi2 (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:28 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45710 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232838AbjBBSiW (ORCPT ); Thu, 2 Feb 2023 13:38:22 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E1F91E9E7 for ; Thu, 2 Feb 2023 10:37:47 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id bk16so2535782wrb.11 for ; Thu, 02 Feb 2023 10:37:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=/qzWJ+PJWjjXt1zQX9IH2K8XJiUf6DeC3wzgQPgc4GE=; b=FOpoHF3f8QzmBlP4tl0/Yl5Eb99/+m1gDJTugenbzY8kup1MBbDbxZmTLbURQXOMeS Gx4qKZJIhYyjaGRlQk3ceTo2nSf+ALBZD0JZy8Ced9QTim/z7DSctzKjORaTmeMaq8He iWP7XRNFWI8I7n2V5jc/AGauFGnQy2rTKzaU+f/ZoPNbm+Gy0PfB+qR5S8kKRWxDaEra Bv8IR6aN5kFwjGQao/5nSDDu5YrHO1i7bxcRs2FGdsGt3MQpxPYhrRTxsry8t/gpw3LN pfJFNywFnH6ieUuSToVTsMyeT3QXaa58Nj7pi45zDbH07DifystOpcm7wOfCfE6NUx2o WKog== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=/qzWJ+PJWjjXt1zQX9IH2K8XJiUf6DeC3wzgQPgc4GE=; b=Nh7rTrzmuaoSF68eJ4IjTDoKYV641ruV7cnEIh/F0AUCE4fbp0XneDM6vB2zmBcT0f /Tg5Qj8WhilfOl9ZpmG1r1eDoNlPMnxHpn8NiDW5ZFsqYPyuy8Vc27F6sLLKyGNApTCv H/5SMbhITRF8Odbtnzu1w9cuQxYdCcZTJGNy8NCgd/1iLYrQQ+Cy9F2D87WmemwIAVmP GzwgglC2XEOuzAGgYEMhZbbP9+BVW7+A1FjlwRjM1lMgbH3+Zo3L+VaC3XlnLDRdds+4 kI4MjW0cZhyLgAMDsFKWa2w3+gpSoLNePOZBHVoAwpFKUbakSyLMrQ0/3r+aNtt4fpGT FoZg== X-Gm-Message-State: AO0yUKXinFFyn4wi1FvvtDtJo/wvtJC5v4d3oWnNpUkKSK27i7sewfoh p27IhYCU/DQfq7yzQ3KElAFc+g== X-Received: by 2002:a05:6000:15cd:b0:2bf:d8ed:ba46 with SMTP id y13-20020a05600015cd00b002bfd8edba46mr8007620wry.47.1675363065020; Thu, 02 Feb 2023 10:37:45 -0800 (PST) Received: from localhost.localdomain (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id p12-20020a5d48cc000000b00241fab5a296sm164664wrs.40.2023.02.02.10.37.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:44 -0800 (PST) From: Jerome Brunet To: Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org Subject: [PATCH 6/9] ASoC: dt-bindings: meson: convert axg fifo to schema Date: Thu, 2 Feb 2023 19:36:50 +0100 Message-Id: <20230202183653.486216-7-jbrunet@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230202183653.486216-1-jbrunet@baylibre.com> References: <20230202183653.486216-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756746969259204572?= X-GMAIL-MSGID: =?utf-8?q?1756746969259204572?= Convert the DT binding documentation for the Amlogic axg audio FIFOs to schema. Signed-off-by: Jerome Brunet --- .../bindings/sound/amlogic,axg-fifo.txt | 34 ----- .../bindings/sound/amlogic,axg-fifo.yaml | 116 ++++++++++++++++++ 2 files changed, 116 insertions(+), 34 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt deleted file mode 100644 index fa4545ed81ca..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.txt +++ /dev/null @@ -1,34 +0,0 @@ -* Amlogic Audio FIFO controllers - -Required properties: -- compatible: 'amlogic,axg-toddr' or - 'amlogic,axg-toddr' or - 'amlogic,g12a-frddr' or - 'amlogic,g12a-toddr' or - 'amlogic,sm1-frddr' or - 'amlogic,sm1-toddr' -- reg: physical base address of the controller and length of memory - mapped region. -- interrupts: interrupt specifier for the fifo. -- clocks: phandle to the fifo peripheral clock provided by the audio - clock controller. -- resets: list of reset phandle, one for each entry reset-names. -- reset-names: should contain the following: - * "arb" : memory ARB line (required) - * "rst" : dedicated device reset line (optional) -- #sound-dai-cells: must be 0. -- amlogic,fifo-depth: The size of the controller's fifo in bytes. This - is useful for determining certain configuration such - as the flush threshold of the fifo - -Example of FRDDR A on the A113 SoC: - -frddr_a: audio-controller@1c0 { - compatible = "amlogic,axg-frddr"; - reg = <0x0 0x1c0 0x0 0x1c>; - #sound-dai-cells = <0>; - interrupts = ; - clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; - resets = <&arb AXG_ARB_FRDDR_A>; - fifo-depth = <512>; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml new file mode 100644 index 000000000000..f6222ad08880 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-fifo.yaml @@ -0,0 +1,116 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-fifo.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic AXG Audio FIFO controllers + +maintainers: + - Jerome Brunet + +allOf: + - $ref: dai-common.yaml# + +properties: + $nodename: + pattern: "^audio-controller@.*" + + compatible: + oneOf: + - items: + - enum: + - amlogic,axg-toddr + - amlogic,axg-frddr + - items: + - enum: + - amlogic,g12a-toddr + - amlogic,sm1-toddr + - const: + amlogic,axg-toddr + - items: + - enum: + - amlogic,g12a-frddr + - amlogic,sm1-frddr + - const: + amlogic,axg-frddr + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + clocks: + items: + - description: Peripheral clock + + interrupts: + maxItems: 1 + + resets: + items: + - description: Memory ARB line + - description: Dedicated device reset line + + reset-names: true + + amlogic,fifo-depth: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Size of the controller's fifo in bytes + +required: + - compatible + - reg + - "#sound-dai-cells" + - clocks + - interrupts + - resets + - amlogic,fifo-depth + +if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-toddr + - amlogic,sm1-toddr + - amlogic,g12a-frddr + - amlogic,sm1-frddr +then: + properties: + resets: + minItems: 2 + reset-names: + items: + - const: arb + - const: rst + required: + - reset-names +else: + properties: + resets: + maxItems: 1 + reset-names: + const: arb + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + #include + #include + + frddr_a: audio-controller@1c0 { + compatible = "amlogic,g12a-frddr", "amlogic,axg-frddr"; + reg = <0x1c0 0x1c>; + #sound-dai-cells = <0>; + clocks = <&clkc_audio AUD_CLKID_FRDDR_A>; + interrupts = ; + resets = <&arb>, <&clkc_audio AUD_RESET_FRDDR_A>; + reset-names = "arb", "rst"; + amlogic,fifo-depth = <512>; + }; From patchwork Thu Feb 2 18:36:51 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 52138 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp406406wrn; Thu, 2 Feb 2023 10:41:54 -0800 (PST) X-Google-Smtp-Source: AK7set8DJiK6KTqPLaGS8YIA/2yc5zm3zFaWo8bZUXJaJ4aWccAOMz+OeOB69JbhBxtz+3ID76nd X-Received: by 2002:a17:902:f092:b0:196:3bbb:e9d7 with SMTP id p18-20020a170902f09200b001963bbbe9d7mr5533710pla.2.1675363314650; Thu, 02 Feb 2023 10:41:54 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675363314; cv=none; d=google.com; s=arc-20160816; b=vjQY/0mHTL77pV1SzzdE5wCkjT7LiO+vGcU1iycFsVZ88vyld8AXoJoO5FGjvUIjdS RtFod3b53XxLqau9R5cz8Gb6bGFbeyWTkNlQsjc+1BQNA4XZhgGGhSrS/NMK6YaFeJiz xt+znQCH+8xgHdhdU/Bw3/ay+QbFacdGE5w2jOKIY1h/Kwf8/3L1KDH9d4y9w+c4o2aa lpOwF2s+sNSOoEGxkc6PFKx5ckuhIjsrSdkHcmkYNTlGM2Zo0UNUWWMPo1w9EhqVVfyD dG3cv2QoohybmSct9mJohW6X3ExIfhH6CqarrvKGckcXjq4vI6Ywrx1hoib88cYSSP8V jd+g== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=M/DpEQ3WT95j3ahVb/iuTFbCoKMlDfa2nVQ/If2Wf7k=; b=htJoSjpVc9LqzNjRyQ+Cj4XmXJtcsMFeaDiE0Qo3Gb1vdJRYwxUmQbGmTu53+A4WOW VAHESERpf0+Bh6k9XC+norkfwESfBiGQBQyFCI0IBaLFAvNJBXGtN/EP9f56CCFAAbC0 8zi3NMvCwGpl5Scnuf/Gj5uYrXLgTn9NSEApzDRbofTVoV/k4EMZqIKWM2hhUKLTgOvs xjlpC6BlOChC47RQM/dGf6ZIJwOnSVcHkbqBP9++EPkrtnKuy09hSNdceimH9Dmo5xRM mCwuc0mtaPmo4W/BhIST8sJgoD7DVy7QdbkERZqJexrf7EMYCnZAxVqT2rGb7o0YQ424 gC0w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=XFC0aibo; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b2-20020a170902d50200b001967d895ce0si2183plg.213.2023.02.02.10.41.40; Thu, 02 Feb 2023 10:41:54 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=XFC0aibo; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233006AbjBBSil (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:41 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46002 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232930AbjBBSiY (ORCPT ); Thu, 2 Feb 2023 13:38:24 -0500 Received: from mail-wr1-x432.google.com (mail-wr1-x432.google.com [IPv6:2a00:1450:4864:20::432]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 0A86E1F937 for ; Thu, 2 Feb 2023 10:37:52 -0800 (PST) Received: by mail-wr1-x432.google.com with SMTP id t7so2566280wrp.5 for ; Thu, 02 Feb 2023 10:37:52 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=M/DpEQ3WT95j3ahVb/iuTFbCoKMlDfa2nVQ/If2Wf7k=; b=XFC0aibouZzGFjMHLXWdXmvocR41v3JmQLwFe6dfxGMv2H0B3HTHKK8LuoR2YSJ1Sz EKV3TA8m38zbc0Qza1c38ZQDYA78BnvyVqYaUXILvjDe4p+dHqK8IJjxsOX4vbcPk7BT 1PptwKV3Gv+uO6/JX0mqv5TlH7/dEP4P0vEc4Mm8qil+8v/40SdWGgXJlnBgi15twE0g Rxgsb2FqRedulHGjr/d6SliPgQ2g1LI2FySqufXW51c5llTSV8MgPNl7UebicvKdyJaF hB0HE4rLz1n79kv8+HXZMfGdmQTt6I6vceCpJA2q6p0FhSTNDQAjZgqq0RiP3D904ABh eP9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=M/DpEQ3WT95j3ahVb/iuTFbCoKMlDfa2nVQ/If2Wf7k=; b=fI2wK6hKfXFSf1fcFJS1XsMlhJWSLlFrthrEmLTUjUl6+++mPqROMCENGSoOJ0nhFk lhyf68OORXOGShW7xQmSnTfEC2doxK8BmclFk2ez/Sm4nXixtw8FvZs6o0hXcCklp0Vi Ic/Jpw3bia2D9Eo4NY5Jc2bHgiFHW22mTvL4jKzpJckZlJo23zQY4NoROXjVjAP0lFjt DXv+NRtgl3Gsvg6PawVJ7myW95YMqSPS3XMXgVK088zf6HMUCD0SXW00GfeZX1LCzdq0 QMeX4j0hjruXsFPbtvwU22pbjDk5QAdGdQ6sOzr1sGYkT+G+kkvV2XqTmc7miP3JgaFP ORhw== X-Gm-Message-State: AO0yUKWJ//oIBL1hIjQ1lsgiTURTxUvBG9PoKQDTlnc16S1abrge/s0a TNiIP+Je31kFLMORtPYewEoN1Q== X-Received: by 2002:a05:6000:982:b0:2bf:b199:c7eb with SMTP id by2-20020a056000098200b002bfb199c7ebmr6137905wrb.54.1675363069295; Thu, 02 Feb 2023 10:37:49 -0800 (PST) Received: from localhost.localdomain (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id p12-20020a5d48cc000000b00241fab5a296sm164664wrs.40.2023.02.02.10.37.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:48 -0800 (PST) From: Jerome Brunet To: Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org Subject: [PATCH 7/9] ASoC: dt-bindings: meson: convert axg spdif input to schema Date: Thu, 2 Feb 2023 19:36:51 +0100 Message-Id: <20230202183653.486216-8-jbrunet@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230202183653.486216-1-jbrunet@baylibre.com> References: <20230202183653.486216-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756745762724409723?= X-GMAIL-MSGID: =?utf-8?q?1756745762724409723?= Convert the DT binding documentation for the Amlogic axg spdif input to schema. Signed-off-by: Jerome Brunet --- .../bindings/sound/amlogic,axg-spdifin.txt | 27 ------ .../bindings/sound/amlogic,axg-spdifin.yaml | 90 +++++++++++++++++++ 2 files changed, 90 insertions(+), 27 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt deleted file mode 100644 index df92a4ecf288..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.txt +++ /dev/null @@ -1,27 +0,0 @@ -* Amlogic Audio SPDIF Input - -Required properties: -- compatible: 'amlogic,axg-spdifin' or - 'amlogic,g12a-spdifin' or - 'amlogic,sm1-spdifin' -- interrupts: interrupt specifier for the spdif input. -- clocks: list of clock phandle, one for each entry clock-names. -- clock-names: should contain the following: - * "pclk" : peripheral clock. - * "refclk" : spdif input reference clock -- #sound-dai-cells: must be 0. - -Optional property: -- resets: phandle to the dedicated reset line of the spdif input. - -Example on the A113 SoC: - -spdifin: audio-controller@400 { - compatible = "amlogic,axg-spdifin"; - reg = <0x0 0x400 0x0 0x30>; - #sound-dai-cells = <0>; - interrupts = ; - clocks = <&clkc_audio AUD_CLKID_SPDIFIN>, - <&clkc_audio AUD_CLKID_SPDIFIN_CLK>; - clock-names = "pclk", "refclk"; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml new file mode 100644 index 000000000000..4f7e4c21acc1 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifin.yaml @@ -0,0 +1,90 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-spdifin.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Audio AXG SPDIF Input + +maintainers: + - Jerome Brunet + +allOf: + - $ref: dai-common.yaml# + +properties: + $nodename: + pattern: "^audio-controller@.*" + + compatible: + oneOf: + - items: + - const: + amlogic,axg-spdifin + - items: + - enum: + - amlogic,g12a-spdifin + - amlogic,sm1-spdifin + - const: + amlogic,axg-spdifin + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + clocks: + items: + - description: Peripheral clock + - description: SPDIF input reference clock + + clock-names: + items: + - const: pclk + - const: refclk + + interrupts: + maxItems: 1 + +required: + - compatible + - reg + - "#sound-dai-cells" + - clocks + - clock-names + - interrupts + +if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-spdifin + - amlogic,sm1-spdifin +then: + properties: + resets: + items: + - description: dedicated device reset line + + required: + - resets + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + + spdifin: audio-controller@400 { + compatible = "amlogic,axg-spdifin"; + reg = <0x400 0x30>; + #sound-dai-cells = <0>; + interrupts = ; + clocks = <&clkc_audio AUD_CLKID_SPDIFIN>, + <&clkc_audio AUD_CLKID_SPDIFIN_CLK>; + clock-names = "pclk", "refclk"; + }; From patchwork Thu Feb 2 18:36:52 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 52140 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp410383wrn; Thu, 2 Feb 2023 10:50:24 -0800 (PST) X-Google-Smtp-Source: AK7set+8p2a5AwDELzzXYNzl0RnPlFJeUOXW49W3Z73/qIfFGpCyvYXdC7sLEM4diz9aTXyZYTSJ X-Received: by 2002:aa7:9618:0:b0:58b:c3b3:d3dd with SMTP id q24-20020aa79618000000b0058bc3b3d3ddmr6562215pfg.21.1675363824341; Thu, 02 Feb 2023 10:50:24 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675363824; cv=none; d=google.com; s=arc-20160816; b=guy6CkI4QuWQzv8TV6pfeDj9+DqAo1yMAh2MW6P5nQQ8z/kRK8T69paJax6sSP9mZh lAJAg4Zm/3RSpereWpXz9sQJjg1yb8DlSZr5tV8S+899AF6S2P17+ZmyzUs6oEAn9WXy Eq9onC5Kh74jw4Gh1u8xiq04XmpOy8gKneGmyRFxxs/B3ecmWo9gieZAdzEHCqxG40R8 MEH/vw4NEmiXaN0MKP1ddaHe2tDawSe3F7TBo7VWS7xN168Z8aUJ9ettwlOLuqyBsEhE HHsWmtuCl4uzLCBnVVbzoKXX58Xxt4KPiW3KJ7kmk4UAmhzVj8430AgRO4Idgo0oVV8r DRwg== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=wHcTQ2BAGg+MkacXJwMrR2edvtbJn3+EYrwBcjC/8/I=; b=eJpttLy7rjFgmG/CUOi8zbX6sKiRxZsJlz5ZVKkUmwl7TC+pB/1qmf1w0oTfpm2ekJ ZU4w+cfDUYBGwqGufNDr4Dzx7teiCwx3QI07SqNPZ/WuD5yiOJPqV813Vcex3ZUTFf1a OvaEaIvWo7s8Xg2ZKBbjn8G0+uCfmjtEh7xkV7PyZfZip3BnRj85vYNPoDDpUN1nudyB QzBX6gFZD5V9rddBulQxv9mnTF8zKh3nf0oVlwDRldEdPNQkEkQXyBRUPR6PujP1a7kG Q6ctzsNlKGahjUG3GMoU+2Cvl+QL06JzENlf/6QXaRmkMeOYRI1T8wMaNMvPHnFBYt66 YJUg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=Ol+dWYPU; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u17-20020a62d451000000b00593dd54be42si34439pfl.213.2023.02.02.10.50.11; Thu, 02 Feb 2023 10:50:24 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=Ol+dWYPU; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231954AbjBBSip (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:45 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45728 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232957AbjBBSi2 (ORCPT ); Thu, 2 Feb 2023 13:38:28 -0500 Received: from mail-wr1-x431.google.com (mail-wr1-x431.google.com [IPv6:2a00:1450:4864:20::431]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 662007ECB for ; Thu, 2 Feb 2023 10:37:58 -0800 (PST) Received: by mail-wr1-x431.google.com with SMTP id d14so2545267wrr.9 for ; Thu, 02 Feb 2023 10:37:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=wHcTQ2BAGg+MkacXJwMrR2edvtbJn3+EYrwBcjC/8/I=; b=Ol+dWYPUCPY2dBcbd6w6cExLMsMOrobov9S0aUXQoGZ5H47VaMO+UiujxXMtAhNA+F IxHEFgfw3nkxmtX5CcE4YxDlelZCEEm7uLRwyEgPQ5uTZZdNAbPXNL6U33T89LJfxQ4O ZzPmQV9FaIdMksGzccnlyJs6l+clq9ECrJOcnYm5cRI0W7YVY4bpJKbRfO0xHXO6Wcwb YLlcXWsz2N4Bzm6JQnwII4mLiMnU+eCil6OYac7GW//Crrdid3R9mfeG3+Z6n6nuHcQZ 6WQVO4QASUJMJ+9dcz6TzfGzw2eE9H8xEbaTGDfiQmPevqZeNSHM7JKYq9Hc9c8Vh0Q6 W0ww== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=wHcTQ2BAGg+MkacXJwMrR2edvtbJn3+EYrwBcjC/8/I=; b=y3ZuqMkJXpLhC+sgnN3k2YDZMbqgwbEGOotLxzPaU7CZTP3EybVpe74mHXdjKPTaml crIWU3pZoNdJc7VoxVeEe4SpHEhV4fOA7Dylzzko6EjWEe5O195jWmnnKphwK8NlZm2p 8lI651cxcofcGvdgq0Ujt7mfRV1R6tMqzyshcL4u4sEwdUXsaMbI9FPX9l69iOmxuewr IYa3aLJNx/2WRSQGB1TJcM4faONr8Y4mb7cLD0/lVANtx4FQpjWz7PmVXuyB38Khue2X sv1EdvhT/L43UgR/aqGDhE/ogjaOR89s8SJhW4RwJaF1JznvW8FpRp/x3mZXJXvJJIN7 JtoQ== X-Gm-Message-State: AO0yUKVPHWtxWzp5P8kukbkQwz7mW1SGKwqlCdq7J29rPsau7rlEikqo yE3g24VYSj/GsaWWJE3GOggLig== X-Received: by 2002:a5d:4bca:0:b0:242:800:9a7f with SMTP id l10-20020a5d4bca000000b0024208009a7fmr6275648wrt.65.1675363073190; Thu, 02 Feb 2023 10:37:53 -0800 (PST) Received: from localhost.localdomain (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id p12-20020a5d48cc000000b00241fab5a296sm164664wrs.40.2023.02.02.10.37.49 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:52 -0800 (PST) From: Jerome Brunet To: Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org Subject: [PATCH 8/9] ASoC: dt-bindings: meson: convert axg spdif output to schema Date: Thu, 2 Feb 2023 19:36:52 +0100 Message-Id: <20230202183653.486216-9-jbrunet@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230202183653.486216-1-jbrunet@baylibre.com> References: <20230202183653.486216-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756746297712487375?= X-GMAIL-MSGID: =?utf-8?q?1756746297712487375?= Convert the DT binding documentation for the Amlogic axg spdif output to schema. Signed-off-by: Jerome Brunet --- .../bindings/sound/amlogic,axg-spdifout.txt | 25 ------ .../bindings/sound/amlogic,axg-spdifout.yaml | 83 +++++++++++++++++++ 2 files changed, 83 insertions(+), 25 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt deleted file mode 100644 index 28381dd1f633..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.txt +++ /dev/null @@ -1,25 +0,0 @@ -* Amlogic Audio SPDIF Output - -Required properties: -- compatible: 'amlogic,axg-spdifout' or - 'amlogic,g12a-spdifout' or - 'amlogic,sm1-spdifout' -- clocks: list of clock phandle, one for each entry clock-names. -- clock-names: should contain the following: - * "pclk" : peripheral clock. - * "mclk" : master clock -- #sound-dai-cells: must be 0. - -Optional property: -- resets: phandle to the dedicated reset line of the spdif output. - -Example on the A113 SoC: - -spdifout: audio-controller@480 { - compatible = "amlogic,axg-spdifout"; - reg = <0x0 0x480 0x0 0x50>; - #sound-dai-cells = <0>; - clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>, - <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>; - clock-names = "pclk", "mclk"; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml new file mode 100644 index 000000000000..c661ce7f8b9d --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-spdifout.yaml @@ -0,0 +1,83 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-spdifout.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic Audio AXG SPDIF Output + +maintainers: + - Jerome Brunet + +allOf: + - $ref: dai-common.yaml# + +properties: + $nodename: + pattern: "^audio-controller@.*" + + compatible: + oneOf: + - items: + - const: + amlogic,axg-spdifout + - items: + - enum: + - amlogic,g12a-spdifout + - amlogic,sm1-spdifout + - const: + amlogic,axg-spdifout + + reg: + maxItems: 1 + + "#sound-dai-cells": + const: 0 + + clocks: + items: + - description: Peripheral clock + - description: SPDIF output master clock + + clock-names: + items: + - const: pclk + - const: mclk + +required: + - compatible + - reg + - "#sound-dai-cells" + - clocks + - clock-names + +if: + properties: + compatible: + contains: + enum: + - amlogic,g12a-spdifout + - amlogic,sm1-spdifout +then: + properties: + resets: + items: + - description: dedicated device reset line + + required: + - resets + +unevaluatedProperties: false + +examples: + - | + #include + + spdifout: audio-controller@480 { + compatible = "amlogic,axg-spdifout"; + reg = <0x480 0x50>; + #sound-dai-cells = <0>; + clocks = <&clkc_audio AUD_CLKID_SPDIFOUT>, + <&clkc_audio AUD_CLKID_SPDIFOUT_CLK>; + clock-names = "pclk", "mclk"; + }; From patchwork Thu Feb 2 18:36:53 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jerome Brunet X-Patchwork-Id: 52137 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:adf:eb09:0:0:0:0:0 with SMTP id s9csp406305wrn; Thu, 2 Feb 2023 10:41:43 -0800 (PST) X-Google-Smtp-Source: AK7set8UCYxhtNL28Tk1hN0djhes+jOZkdPPQ7VLNl3vzIamTIxZyDqsAzjfkNGf47E7U3bQ4ZAi X-Received: by 2002:a05:6a00:1905:b0:593:a800:2abc with SMTP id y5-20020a056a00190500b00593a8002abcmr8375029pfi.8.1675363303087; Thu, 02 Feb 2023 10:41:43 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1675363303; cv=none; d=google.com; s=arc-20160816; b=dZtRCLJ7cHrD8Nq6WzytYzTMSzg+2C4t77yEnHoStPOSPm2ed8Vd5wJYQpuQNZraT2 kX2wCX7YM8WvrjQ/Q8O6xQHCSeY62Af1LOF1bYwyRnWGuT8GWM53vsUmzErbdU29xOv+ hjShgaKq6mr5n5loG89okYJUdukHthmUcLCzKs/ybn/cP76L9nZG4RfTrgua1GjZzdJO OLCAaxFrmczxt9nZAyJFIROrdpv9+pMRHbkBVofgMQNwcUvyM0QUYyGxR3e2HGyNXzIP 8275vurEnw8xDjQjFgxhc33Wks1wo++ixVm1J9VhzHG46WMOPLdkO+NrJntvTQH2BE8m zhmA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=hNkK7n1gdK5bZpNBPCRIcpLI77Rcdq2rEX/DU1R2Fos=; b=Ld08wZzyTwi4qEXHlhylqSDC37XN+gHtDMiglvix/rFXvC5Ji4+OprLnei86IwffVq ogLC6uiYTDr/dO7UkAJCN8E09vB2HRh+vfK8g7Tyk1UvC3K2bQdieEkzdsHs5YvJg+Hs sWti6QQx7H0J0QwlMRIEMvp5epmJYsKmkAXtFV8jQ7nZhedCRL0LgHmI4usUMWK2tagk rCdY5SwQdNSW95iUwgtO/cFipkMeiCeGJBqS0+dgO8QlojYN2W8t1mbMANUn2FUmK37j OBXLqF54JH1CfKZWQit8cZ9ctgTlo7NFslEKffaBgFFOCuq5wbKRqvDqS2Bf1Xro4Aen v6xw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=ShNujbh7; 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 Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a25-20020a056a001d1900b00593908c7148si17621825pfx.362.2023.02.02.10.41.29; Thu, 02 Feb 2023 10:41:43 -0800 (PST) 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=@baylibre-com.20210112.gappssmtp.com header.s=20210112 header.b=ShNujbh7; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232981AbjBBSis (ORCPT + 99 others); Thu, 2 Feb 2023 13:38:48 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45760 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232757AbjBBSi2 (ORCPT ); Thu, 2 Feb 2023 13:38:28 -0500 Received: from mail-wm1-x32f.google.com (mail-wm1-x32f.google.com [IPv6:2a00:1450:4864:20::32f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id F39CD1167D for ; Thu, 2 Feb 2023 10:38:02 -0800 (PST) Received: by mail-wm1-x32f.google.com with SMTP id l37-20020a05600c1d2500b003dfe46a9801so666516wms.0 for ; Thu, 02 Feb 2023 10:38:02 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20210112.gappssmtp.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=hNkK7n1gdK5bZpNBPCRIcpLI77Rcdq2rEX/DU1R2Fos=; b=ShNujbh7Uw+FH7IY/9O1xBRK1vih2pHf3JyC1wgA29zLBNAsa5r5v0c+Eadpxho0h5 Mkn28S0O5f2FQai+81gHhAs9gkqu7Q97hDI5EXojEYF4kNR6Cm4yNvz3cEllHrM78VXu nan00ycMv1Hod9iFIK55gABsx3zwPO4k8Gtg/bpUlrbpC/kMgTJSSseJRBg/2ttGW1QO 68NcgYIHxQ95DZwyoD+YfURgFQNcl/NXOwnOxfc/ZHsyFPvZ+dL3gf1O9f429Xmb/uye enBER2iumIUfzdPjPAvjDmYrBDss3+Y9rC5pHBsY05m6YkIdXhiQzN0BMq5AP6vK6TiS nY4Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=hNkK7n1gdK5bZpNBPCRIcpLI77Rcdq2rEX/DU1R2Fos=; b=TA3gKoDHGKEYdhc/Q019ISQSY8ADfyC3+GhbltkpPOjKSiS1o7QtJs14eLt7jkrEHo X2PcGy/Iw6ml28bm10KGF8EKX3Cj4dr/jjs2LsbzKZTdWCEv+GzueLhnBZhJ7QKJhbf7 1JGuun8QqBQqcAHleCDrgwGn5TgJRcgrzpP2vOafMy4t1QICiai3FZmolViAjI8/ne3J 1d/kfCiMFraTHTE3hknklb+nVJeb0XkJ/ULF3BJXH9K5g2S942/J1AwzYYFYkRgz666v YhAFZZ+RjA6WHkp6dEZ9VDEA2Ke5fMJfzHY1U0rX9FOmYyav1GU2MqhcWw94mUbqHYRA u+9A== X-Gm-Message-State: AO0yUKWl2AXdl8PqL+6sNRhU8Mv9RYVH2P24L1EvP1QJ6MOdrJ8TsMx3 yFbJU/pZjKLNx+r4ADyt82uSiQ== X-Received: by 2002:a05:600c:474f:b0:3df:e549:bd00 with SMTP id w15-20020a05600c474f00b003dfe549bd00mr151845wmo.1.1675363077182; Thu, 02 Feb 2023 10:37:57 -0800 (PST) Received: from localhost.localdomain (82-65-169-74.subs.proxad.net. [82.65.169.74]) by smtp.googlemail.com with ESMTPSA id p12-20020a5d48cc000000b00241fab5a296sm164664wrs.40.2023.02.02.10.37.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Feb 2023 10:37:56 -0800 (PST) From: Jerome Brunet To: Mark Brown , alsa-devel@alsa-project.org, devicetree@vger.kernel.org Cc: Jerome Brunet , linux-amlogic@lists.infradead.org, Kevin Hilman , Neil Armstrong , Rob Herring , Krzysztof Kozlowski , linux-kernel@vger.kernel.org Subject: [PATCH 9/9] ASoC: dt-bindings: meson: convert axg sound card control to schema Date: Thu, 2 Feb 2023 19:36:53 +0100 Message-Id: <20230202183653.486216-10-jbrunet@baylibre.com> X-Mailer: git-send-email 2.39.0 In-Reply-To: <20230202183653.486216-1-jbrunet@baylibre.com> References: <20230202183653.486216-1-jbrunet@baylibre.com> MIME-Version: 1.0 X-Patchwork-Bot: notify X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1756745751013574715?= X-GMAIL-MSGID: =?utf-8?q?1756745751013574715?= Convert the DT binding documentation for the Amlogic axg sound card to schema. Signed-off-by: Jerome Brunet --- .../bindings/sound/amlogic,axg-sound-card.txt | 124 ------------ .../sound/amlogic,axg-sound-card.yaml | 182 ++++++++++++++++++ 2 files changed, 182 insertions(+), 124 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt create mode 100644 Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt deleted file mode 100644 index 80b411296480..000000000000 --- a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.txt +++ /dev/null @@ -1,124 +0,0 @@ -Amlogic AXG sound card: - -Required properties: - -- compatible: "amlogic,axg-sound-card" -- model : User specified audio sound card name, one string - -Optional properties: - -- audio-aux-devs : List of phandles pointing to auxiliary devices -- audio-widgets : Please refer to widgets.txt. -- audio-routing : A list of the connections between audio components. - -Subnodes: - -- dai-link: Container for dai-link level properties and the CODEC - sub-nodes. There should be at least one (and probably more) - subnode of this type. - -Required dai-link properties: - -- sound-dai: phandle and port of the CPU DAI. - -Required TDM Backend dai-link properties: -- dai-format : CPU/CODEC common audio format - -Optional TDM Backend dai-link properties: -- dai-tdm-slot-rx-mask-{0,1,2,3}: Receive direction slot masks -- dai-tdm-slot-tx-mask-{0,1,2,3}: Transmit direction slot masks - When omitted, mask is assumed to have to no - slots. A valid must have at one slot, so at - least one these mask should be provided with - an enabled slot. -- dai-tdm-slot-num : Please refer to tdm-slot.txt. - If omitted, slot number is set to accommodate the largest - mask provided. -- dai-tdm-slot-width : Please refer to tdm-slot.txt. default to 32 if omitted. -- mclk-fs : Multiplication factor between stream rate and mclk - -Backend dai-link subnodes: - -- codec: dai-link representing backend links should have at least one subnode. - One subnode for each codec of the dai-link. - dai-link representing frontend links have no codec, therefore have no - subnodes - -Required codec subnodes properties: - -- sound-dai: phandle and port of the CODEC DAI. - -Optional codec subnodes properties: - -- dai-tdm-slot-tx-mask : Please refer to tdm-slot.txt. -- dai-tdm-slot-rx-mask : Please refer to tdm-slot.txt. - -Example: - -sound { - compatible = "amlogic,axg-sound-card"; - model = "AXG-S420"; - audio-aux-devs = <&tdmin_a>, <&tdmout_c>; - audio-widgets = "Line", "Lineout", - "Line", "Linein", - "Speaker", "Speaker1 Left", - "Speaker", "Speaker1 Right"; - "Speaker", "Speaker2 Left", - "Speaker", "Speaker2 Right"; - audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", - "SPDIFOUT IN 0", "FRDDR_A OUT 3", - "TDM_C Playback", "TDMOUT_C OUT", - "TDMIN_A IN 2", "TDM_C Capture", - "TDMIN_A IN 5", "TDM_C Loopback", - "TODDR_A IN 0", "TDMIN_A OUT", - "Lineout", "Lineout AOUTL", - "Lineout", "Lineout AOUTR", - "Speaker1 Left", "SPK1 OUT_A", - "Speaker2 Left", "SPK2 OUT_A", - "Speaker1 Right", "SPK1 OUT_B", - "Speaker2 Right", "SPK2 OUT_B", - "Linein AINL", "Linein", - "Linein AINR", "Linein"; - - dai-link@0 { - sound-dai = <&frddr_a>; - }; - - dai-link@1 { - sound-dai = <&toddr_a>; - }; - - dai-link@2 { - sound-dai = <&tdmif_c>; - dai-format = "i2s"; - dai-tdm-slot-tx-mask-2 = <1 1>; - dai-tdm-slot-tx-mask-3 = <1 1>; - dai-tdm-slot-rx-mask-1 = <1 1>; - mclk-fs = <256>; - - codec@0 { - sound-dai = <&lineout>; - }; - - codec@1 { - sound-dai = <&speaker_amp1>; - }; - - codec@2 { - sound-dai = <&speaker_amp2>; - }; - - codec@3 { - sound-dai = <&linein>; - }; - - }; - - dai-link@3 { - sound-dai = <&spdifout>; - - codec { - sound-dai = <&spdif_dit>; - }; - }; -}; diff --git a/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml new file mode 100644 index 000000000000..185cd9fbeda1 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/amlogic,axg-sound-card.yaml @@ -0,0 +1,182 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/amlogic,axg-sound-card.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Amlogic AXG sound card + +maintainers: + - Jerome Brunet + +properties: + compatible: + items: + - const: amlogic,axg-sound-card + + audio-aux-devs: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: list of auxiliary devices + + audio-routing: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: |- + A list of the connections between audio components. Each entry is a + pair of strings, the first being the connection's sink, the second + being the connection's source. + + audio-widgets: + $ref: /schemas/types.yaml#/definitions/non-unique-string-array + description: |- + A list off component DAPM widget. Each entry is a pair of strings, + the first being the widget type, the second being the widget name + + model: + $ref: /schemas/types.yaml#/definitions/string + description: User specified audio sound card name + +patternProperties: + "^dai-link-[0-9]+$": + type: object + additionalProperties: false + description: |- + dai-link child nodes: + Container for dai-link level properties and the CODEC sub-nodes. + There should be at least one (and probably more) subnode of this type + + properties: + dai-format: + $ref: /schemas/types.yaml#/definitions/string + enum: [ i2s, left-j, dsp_a ] + + dai-tdm-slot-num: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Number of slots in use. If omitted, slot number is set to + accommodate the largest mask provided. + maximum: 32 + + dai-tdm-slot-width: + $ref: /schemas/types.yaml#/definitions/uint32 + description: Width in bits for each slot + enum: [ 8, 16, 20, 24, 32 ] + default: 32 + + mclk-fs: + $ref: /schemas/types.yaml#/definitions/uint32 + description: |- + Multiplication factor between the frame rate and master clock + rate + + sound-dai: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: phandle of the CPU DAI + + patternProperties: + "^dai-tdm-slot-(t|r)x-mask-[0-3]$": + $ref: /schemas/types.yaml#/definitions/uint32-array + description: |- + Transmit and receive cpu slot masks of each TDM lane + When omitted, mask is assumed to have to no slots. A valid + interface must have at least one slot, so at least one these + mask should be provided with an enabled slot. + + "^codec(-[0-9]+)?$": + type: object + additionalProperties: false + description: |- + dai-link representing backend links should have at least one subnode. + One subnode for each codec of the dai-link. dai-link representing + frontend links have no codec, therefore have no subnodes + + properties: + sound-dai: + $ref: /schemas/types.yaml#/definitions/phandle-array + description: phandle of the codec DAI + + patternProperties: + "^dai-tdm-slot-(t|r)x-mask$": + $ref: /schemas/types.yaml#/definitions/uint32-array + description: Transmit and receive codec slot masks + + required: + - sound-dai + + required: + - sound-dai + +required: + - model + - dai-link-0 + +unevaluatedProperties: false + +examples: + - | + sound { + compatible = "amlogic,axg-sound-card"; + model = "AXG-S420"; + audio-aux-devs = <&tdmin_a>, <&tdmout_c>; + audio-widgets = "Line", "Lineout", + "Line", "Linein", + "Speaker", "Speaker1 Left", + "Speaker", "Speaker1 Right", + "Speaker", "Speaker2 Left", + "Speaker", "Speaker2 Right"; + audio-routing = "TDMOUT_C IN 0", "FRDDR_A OUT 2", + "SPDIFOUT IN 0", "FRDDR_A OUT 3", + "TDM_C Playback", "TDMOUT_C OUT", + "TDMIN_A IN 2", "TDM_C Capture", + "TDMIN_A IN 5", "TDM_C Loopback", + "TODDR_A IN 0", "TDMIN_A OUT", + "Lineout", "Lineout AOUTL", + "Lineout", "Lineout AOUTR", + "Speaker1 Left", "SPK1 OUT_A", + "Speaker2 Left", "SPK2 OUT_A", + "Speaker1 Right", "SPK1 OUT_B", + "Speaker2 Right", "SPK2 OUT_B", + "Linein AINL", "Linein", + "Linein AINR", "Linein"; + + dai-link-0 { + sound-dai = <&frddr_a>; + }; + + dai-link-1 { + sound-dai = <&toddr_a>; + }; + + dai-link-2 { + sound-dai = <&tdmif_c>; + dai-format = "i2s"; + dai-tdm-slot-tx-mask-2 = <1 1>; + dai-tdm-slot-tx-mask-3 = <1 1>; + dai-tdm-slot-rx-mask-1 = <1 1>; + mclk-fs = <256>; + + codec-0 { + sound-dai = <&lineout>; + }; + + codec-1 { + sound-dai = <&speaker_amp1>; + }; + + codec-2 { + sound-dai = <&speaker_amp2>; + }; + + codec-3 { + sound-dai = <&linein>; + }; + }; + + dai-link-3 { + sound-dai = <&spdifout>; + + codec { + sound-dai = <&spdif_dit>; + }; + }; + }; +