From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE,SPF_PASS, URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id F14C8C35247 for ; Thu, 6 Feb 2020 20:47:29 +0000 (UTC) Received: from alsa0.perex.cz (alsa0.perex.cz [77.48.224.243]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 7B7B721775 for ; Thu, 6 Feb 2020 20:47:29 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (1024-bit key) header.d=alsa-project.org header.i=@alsa-project.org header.b="q7u/w34K" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 7B7B721775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=alsa-devel-bounces@alsa-project.org Received: from alsa1.perex.cz (alsa1.perex.cz [207.180.221.201]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by alsa0.perex.cz (Postfix) with ESMTPS id 9DFD616CC; Thu, 6 Feb 2020 21:46:37 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa0.perex.cz 9DFD616CC DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=alsa-project.org; s=default; t=1581022047; bh=JGOWcq/bRA5huNG6SA4YeDbMtwQOZMBsf9SIk277MI0=; h=Date:From:To:References:In-Reply-To:Cc:Subject:List-Id: List-Unsubscribe:List-Archive:List-Post:List-Help:List-Subscribe: From; b=q7u/w34KoxR3I+5M9t9BW2+reCOQsD8fhLFhJ+MzPcvhqoeXK7ploI/rtW6rO/3XC n6MXE1PRUm4KbOi2P6/jRGEWdKOrVC/oKykToFnQUf/l3klN74/R6Bh43+3Ifp0r4n BP9uUAEuS3gfxZzr4L7Ts+q0GpwMsyaQU+PcmgH0= Received: from alsa1.perex.cz (localhost.localdomain [127.0.0.1]) by alsa1.perex.cz (Postfix) with ESMTP id 14F1FF8015B; Thu, 6 Feb 2020 21:46:37 +0100 (CET) Received: by alsa1.perex.cz (Postfix, from userid 50401) id 870FAF801DB; Thu, 6 Feb 2020 21:46:35 +0100 (CET) Received: from mail-pl1-f196.google.com (mail-pl1-f196.google.com [209.85.214.196]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by alsa1.perex.cz (Postfix) with ESMTPS id D86ADF80059 for ; Thu, 6 Feb 2020 21:46:31 +0100 (CET) DKIM-Filter: OpenDKIM Filter v2.11.0 alsa1.perex.cz D86ADF80059 Received: by mail-pl1-f196.google.com with SMTP id t6so39530plj.5 for ; Thu, 06 Feb 2020 12:46:31 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+JpCejRz9cTdKzvN/s1Lqz/r+3bLOvKPVHP2ixVIjaA=; b=WUcS3tHfVKlUD8APq9LPTkuda5ZyyKSxmQ3897q+133CRx0OI7Eb2sYQlSKjsKI13Y DUn3y+IqiV2SUJ1joVFEoQRm7wfdajx4XP/WBi4b/aK2+o1gPxO61thkBh2CDGPis7nW qPA7EfNuDNeYtC31ZGPFaJD6AwZO+JR5wmbnmiNhCMccgKFLqNByjI1ghSeUP/QAHxht y8Pn3ogji0xCm4lTkn4SYiR1tGpLoRWIV30ST5qAuil4f2zr9QEHtjczzquO2kzwkLZG VrLuWnX2bRggUvTqUlWwVqRdoqzZSxNm7UGjIYy9lAYr3ipOTORnfWU4kZY8YESmPSvR m4cA== X-Gm-Message-State: APjAAAWNMyV34n6elxMlZCBObXfnmQ6+u1X4Q1974tJNXqQembvVKgkw Pn6A/5D5ZDT/Vo1celZ1kQ== X-Google-Smtp-Source: APXvYqwbC73hm+Agme/rCp48d6/0xYRA1eDWiKJsCgthOldvBiGk6RxTKAWpaJjx1M145Mgn2+p7Ag== X-Received: by 2002:a17:902:504:: with SMTP id 4mr5425237plf.276.1581021989698; Thu, 06 Feb 2020 12:46:29 -0800 (PST) Received: from rob-hp-laptop (63-158-47-182.dia.static.qwest.net. [63.158.47.182]) by smtp.gmail.com with ESMTPSA id g7sm288861pfq.33.2020.02.06.12.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 12:46:29 -0800 (PST) Received: (nullmailer pid 9682 invoked by uid 1000); Thu, 06 Feb 2020 18:21:25 -0000 Date: Thu, 6 Feb 2020 18:21:25 +0000 From: Rob Herring To: Olivier Moysan Message-ID: <20200206182125.GA23274@bogus> References: <20200130135040.22575-1-olivier.moysan@st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200130135040.22575-1-olivier.moysan@st.com> User-Agent: Mutt/1.10.1 (2018-07-13) Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, alexandre.torgue@st.com, linux-kernel@vger.kernel.org, tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org, mcoquelin.stm32@gmail.com, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Subject: Re: [alsa-devel] [PATCH] ASoC: dt-bindings: stm32: convert sai to json-schema X-BeenThere: alsa-devel@alsa-project.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: "Alsa-devel mailing list for ALSA developers - http://www.alsa-project.org" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: alsa-devel-bounces@alsa-project.org Sender: "Alsa-devel" On Thu, Jan 30, 2020 at 02:50:40PM +0100, Olivier Moysan wrote: > Convert the STM32 SAI bindings to DT schema format using json-schema. > > Signed-off-by: Olivier Moysan > --- > .../bindings/sound/st,stm32-sai.txt | 107 ---------- > .../bindings/sound/st,stm32-sai.yaml | 193 ++++++++++++++++++ > 2 files changed, 193 insertions(+), 107 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/sound/st,stm32-sai.txt > create mode 100644 Documentation/devicetree/bindings/sound/st,stm32-sai.yaml > diff --git a/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml b/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml > new file mode 100644 > index 000000000000..33dca007fc86 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml > @@ -0,0 +1,193 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/st,stm32-sai.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: STMicroelectronics STM32 Serial Audio Interface (SAI) > + > +maintainers: > + - Olivier Moysan > + > +description: > + The SAI interface (Serial Audio Interface) offers a wide set of audio > + protocols as I2S standards, LSB or MSB-justified, PCM/DSP, TDM, and AC'97. > + The SAI contains two independent audio sub-blocks. Each sub-block has > + its own clock generator and I/O lines controller. > + > +properties: > + compatible: > + enum: > + - st,stm32f4-sai > + - st,stm32h7-sai > + > + reg: > + items: > + - description: Base address and size of SAI common register set. > + - description: Base address and size of SAI identification register set. > + minItems: 1 > + maxItems: 2 > + > + ranges: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 1 > + > + clocks: > + items: > + - description: pclk feeds the peripheral bus interface. > + - description: x8k, SAI parent clock for sampling rates multiple of 8kHz. > + - description: x11k, SAI parent clock for sampling rates multiple of 11.025kHz. > + > + clock-names: > + items: > + enum: [ pclk, x8k, x11k ] > + minItems: 3 > + maxItems: 3 > + > +required: > + - compatible > + - reg > + - ranges > + - "#address-cells" > + - "#size-cells" > + - clocks > + - clock-names > + > +patternProperties: > + "^audio-controller@[0-9a-f]+$": > + type: object > + description: > + Two subnodes corresponding to SAI sub-block instances A et B > + can be defined. Subnode can be omitted for unsused sub-block. > + > + properties: > + compatible: > + description: Compatible for SAI sub-block A or B. > + enum: > + - st,stm32-sai-sub-a > + - st,stm32-sai-sub-b pattern: 'st,stm32-sai-sub-[ab]' > + > + "#sound-dai-cells": > + const: 0 > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: sai_ck clock feeding the internal clock generator. > + - description: MCLK clock from a SAI set as master clock provider. > + minItems: 1 > + maxItems: 2 > + > + clock-names: > + items: > + - const: sai_ck > + - const: MCLK > + minItems: 1 > + maxItems: 2 > + > + dmas: > + items: > + - description: SAI sub-block is configured as a capture DAI. > + - description: SAI sub-block is configured as a playback DAI. > + minItems: 1 > + maxItems: 1 This is defining that dmas has 2 entries, but then limits it to the 1st entry only. > + > + dma-names: > + items: > + - enum: [ rx, tx ] > + > + st,sync: > + description: > + Configure the SAI sub-block as slave of another SAI sub-block. > + By default SAI sub-block is in asynchronous mode. > + Must contain the phandle and index of the SAI sub-block providing > + the synchronization. > + allOf: > + - $ref: /schemas/types.yaml#definitions/phandle-array > + - maxItems: 1 > + > + st,iec60958: > + description: > + If set, support S/PDIF IEC6958 protocol for playback. > + IEC60958 protocol is not available for capture. > + By default, custom protocol is assumed, meaning that protocol is > + configured according to protocol defined in related DAI link node, > + such as i2s, left justified, right justified, dsp and pdm protocols. > + allOf: > + - $ref: /schemas/types.yaml#definitions/flag > + > + "#clock-cells": > + description: Configure the SAI device as master clock provider. > + const: 0 > + > + required: > + - compatible > + - "#sound-dai-cells" > + - reg > + - clocks > + - clock-names > + - dmas > + - dma-names additionalProperties: false. > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: st,stm32f4-sai > + > + - then: > + properties: > + clocks: > + minItems: 2 > + maxItems: 2 > + > + clock-names: > + items: > + enum: [ x8k, x11k ] Define the order. > + minItems: 2 > + maxItems: 2 > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + sai1: sai@4400a000 { > + compatible = "st,stm32h7-sai"; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0 0x4400a000 0x400>; > + reg = <0x4400a000 0x4>, <0x4400a3f0 0x10>; > + interrupts = ; > + clocks = <&rcc SAI1>, <&rcc PLL1_Q>, <&rcc PLL2_P>; > + clock-names = "pclk", "x8k", "x11k"; > + resets = <&rcc SAI1_R>; > + > + sai1a: audio-controller@4400a004 { > + compatible = "st,stm32-sai-sub-a"; > + #sound-dai-cells = <0>; > + reg = <0x4 0x1c>; > + clocks = <&rcc SAI1_K>; > + clock-names = "sai_ck"; > + dmas = <&dmamux1 87 0x400 0x01>; > + dma-names = "tx"; > + }; > + }; > + > +... > -- > 2.17.1 > _______________________________________________ Alsa-devel mailing list Alsa-devel@alsa-project.org https://mailman.alsa-project.org/mailman/listinfo/alsa-devel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.5 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY,SPF_HELO_NONE, SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 16DD4C35247 for ; Thu, 6 Feb 2020 20:48:08 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id D967521775 for ; Thu, 6 Feb 2020 20:48:07 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="ILMO+otr" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org D967521775 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=kernel.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:Cc:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:References: Message-ID:Subject:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=IbkFdy3TN4Ti1gOhEtkIfASTmgMvVuYxVURlfSIjRHg=; b=ILMO+otryeUppL zHgIMLCo0M1BItVP6LQHKzOOPPRg2b5kv/UzE8jb/XM5Z1KNpnc27UmVwtiwe9SdVlnMUwfcg5yPW MAzktFSgb7t+TbSHX+FBalk+ETOT8SC5Pqj8U5ny81z/uOc4HuNpjaawbllcRO6q5RGcMg5UN0oLE Qxry1Cj1Y6mpNRHOtioKf4bof3XwVDBE16GQd36Qhyj1Mc4rDX4TxshopZ+3WTz6T8o+oIQhOvlve tHExdFviPh+OC09essz0PK/iO0kjr34EoRQJLo2uJQH4lo9Z3PJ+yAua5A2juDcqVWydV3i4UWUk5 x7EUw3cl8BoQuLzHgU0w==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1izo4A-0001Pu-AE; Thu, 06 Feb 2020 20:48:02 +0000 Received: from mail-pl1-f196.google.com ([209.85.214.196]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1izo2h-0008L0-9g for linux-arm-kernel@lists.infradead.org; Thu, 06 Feb 2020 20:46:33 +0000 Received: by mail-pl1-f196.google.com with SMTP id e8so31039plt.9 for ; Thu, 06 Feb 2020 12:46:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+JpCejRz9cTdKzvN/s1Lqz/r+3bLOvKPVHP2ixVIjaA=; b=aDA/SYX+rcFDXves86enPj1VIST8Rsb/WdGnHJ7t6xt3C7GvYrVW/261iYDDN5FGyo DiNYRfBhHgNklxXTJA37FE9ZdxziOhu8YqZQ+dnvF8m8U2e4cHqLWueeFLCiR8LMhvL6 mMVdQ0lZIcWVuoKDCAoMftXy/V4pe5lqTAdUFAmujvcVascc+7i+2cmB5DQtQ+DIlzaI FxvkebZzV9miRVOX2MmmdOXcjBjzo0AtpzQtKm+FaDTmXi5bqjwkodIEdHzq0noUHpVK UAeyRuIsrgg8qRn+OHN5H3hBCXD9Md2XNR80TQ4pLcZ+r1EOs4dV/AzZy+23vlc5ZuXp exVQ== X-Gm-Message-State: APjAAAVKRnsN6SxAaRNeI2q9haGYa6tX/4U933Y0garEvc2KausRGaXs IDK1XZgmbd4pf/JjpFoQ5A== X-Google-Smtp-Source: APXvYqwbC73hm+Agme/rCp48d6/0xYRA1eDWiKJsCgthOldvBiGk6RxTKAWpaJjx1M145Mgn2+p7Ag== X-Received: by 2002:a17:902:504:: with SMTP id 4mr5425237plf.276.1581021989698; Thu, 06 Feb 2020 12:46:29 -0800 (PST) Received: from rob-hp-laptop (63-158-47-182.dia.static.qwest.net. [63.158.47.182]) by smtp.gmail.com with ESMTPSA id g7sm288861pfq.33.2020.02.06.12.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 12:46:29 -0800 (PST) Received: (nullmailer pid 9682 invoked by uid 1000); Thu, 06 Feb 2020 18:21:25 -0000 Date: Thu, 6 Feb 2020 18:21:25 +0000 From: Rob Herring To: Olivier Moysan Subject: Re: [PATCH] ASoC: dt-bindings: stm32: convert sai to json-schema Message-ID: <20200206182125.GA23274@bogus> References: <20200130135040.22575-1-olivier.moysan@st.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20200130135040.22575-1-olivier.moysan@st.com> User-Agent: Mutt/1.10.1 (2018-07-13) X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200206_124631_341040_9F7EE96B X-CRM114-Status: GOOD ( 19.59 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: mark.rutland@arm.com, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, alexandre.torgue@st.com, linux-kernel@vger.kernel.org, tiwai@suse.com, lgirdwood@gmail.com, broonie@kernel.org, mcoquelin.stm32@gmail.com, perex@perex.cz, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Thu, Jan 30, 2020 at 02:50:40PM +0100, Olivier Moysan wrote: > Convert the STM32 SAI bindings to DT schema format using json-schema. > > Signed-off-by: Olivier Moysan > --- > .../bindings/sound/st,stm32-sai.txt | 107 ---------- > .../bindings/sound/st,stm32-sai.yaml | 193 ++++++++++++++++++ > 2 files changed, 193 insertions(+), 107 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/sound/st,stm32-sai.txt > create mode 100644 Documentation/devicetree/bindings/sound/st,stm32-sai.yaml > diff --git a/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml b/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml > new file mode 100644 > index 000000000000..33dca007fc86 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml > @@ -0,0 +1,193 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/st,stm32-sai.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: STMicroelectronics STM32 Serial Audio Interface (SAI) > + > +maintainers: > + - Olivier Moysan > + > +description: > + The SAI interface (Serial Audio Interface) offers a wide set of audio > + protocols as I2S standards, LSB or MSB-justified, PCM/DSP, TDM, and AC'97. > + The SAI contains two independent audio sub-blocks. Each sub-block has > + its own clock generator and I/O lines controller. > + > +properties: > + compatible: > + enum: > + - st,stm32f4-sai > + - st,stm32h7-sai > + > + reg: > + items: > + - description: Base address and size of SAI common register set. > + - description: Base address and size of SAI identification register set. > + minItems: 1 > + maxItems: 2 > + > + ranges: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 1 > + > + clocks: > + items: > + - description: pclk feeds the peripheral bus interface. > + - description: x8k, SAI parent clock for sampling rates multiple of 8kHz. > + - description: x11k, SAI parent clock for sampling rates multiple of 11.025kHz. > + > + clock-names: > + items: > + enum: [ pclk, x8k, x11k ] > + minItems: 3 > + maxItems: 3 > + > +required: > + - compatible > + - reg > + - ranges > + - "#address-cells" > + - "#size-cells" > + - clocks > + - clock-names > + > +patternProperties: > + "^audio-controller@[0-9a-f]+$": > + type: object > + description: > + Two subnodes corresponding to SAI sub-block instances A et B > + can be defined. Subnode can be omitted for unsused sub-block. > + > + properties: > + compatible: > + description: Compatible for SAI sub-block A or B. > + enum: > + - st,stm32-sai-sub-a > + - st,stm32-sai-sub-b pattern: 'st,stm32-sai-sub-[ab]' > + > + "#sound-dai-cells": > + const: 0 > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: sai_ck clock feeding the internal clock generator. > + - description: MCLK clock from a SAI set as master clock provider. > + minItems: 1 > + maxItems: 2 > + > + clock-names: > + items: > + - const: sai_ck > + - const: MCLK > + minItems: 1 > + maxItems: 2 > + > + dmas: > + items: > + - description: SAI sub-block is configured as a capture DAI. > + - description: SAI sub-block is configured as a playback DAI. > + minItems: 1 > + maxItems: 1 This is defining that dmas has 2 entries, but then limits it to the 1st entry only. > + > + dma-names: > + items: > + - enum: [ rx, tx ] > + > + st,sync: > + description: > + Configure the SAI sub-block as slave of another SAI sub-block. > + By default SAI sub-block is in asynchronous mode. > + Must contain the phandle and index of the SAI sub-block providing > + the synchronization. > + allOf: > + - $ref: /schemas/types.yaml#definitions/phandle-array > + - maxItems: 1 > + > + st,iec60958: > + description: > + If set, support S/PDIF IEC6958 protocol for playback. > + IEC60958 protocol is not available for capture. > + By default, custom protocol is assumed, meaning that protocol is > + configured according to protocol defined in related DAI link node, > + such as i2s, left justified, right justified, dsp and pdm protocols. > + allOf: > + - $ref: /schemas/types.yaml#definitions/flag > + > + "#clock-cells": > + description: Configure the SAI device as master clock provider. > + const: 0 > + > + required: > + - compatible > + - "#sound-dai-cells" > + - reg > + - clocks > + - clock-names > + - dmas > + - dma-names additionalProperties: false. > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: st,stm32f4-sai > + > + - then: > + properties: > + clocks: > + minItems: 2 > + maxItems: 2 > + > + clock-names: > + items: > + enum: [ x8k, x11k ] Define the order. > + minItems: 2 > + maxItems: 2 > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + sai1: sai@4400a000 { > + compatible = "st,stm32h7-sai"; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0 0x4400a000 0x400>; > + reg = <0x4400a000 0x4>, <0x4400a3f0 0x10>; > + interrupts = ; > + clocks = <&rcc SAI1>, <&rcc PLL1_Q>, <&rcc PLL2_P>; > + clock-names = "pclk", "x8k", "x11k"; > + resets = <&rcc SAI1_R>; > + > + sai1a: audio-controller@4400a004 { > + compatible = "st,stm32-sai-sub-a"; > + #sound-dai-cells = <0>; > + reg = <0x4 0x1c>; > + clocks = <&rcc SAI1_K>; > + clock-names = "sai_ck"; > + dmas = <&dmamux1 87 0x400 0x01>; > + dma-names = "tx"; > + }; > + }; > + > +... > -- > 2.17.1 > _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-8.6 required=3.0 tests=DKIMWL_WL_HIGH,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED,USER_AGENT_SANE_1 autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2A2C2C35247 for ; Thu, 6 Feb 2020 20:46:35 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id E765C218AC for ; Thu, 6 Feb 2020 20:46:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1581021995; bh=RIXzSC/Yx6TSAl43hZuBU3X4Fmg/LdplpGCerMtOYEI=; h=Date:From:To:Cc:Subject:References:In-Reply-To:List-ID:From; b=XCvt5d8QVL+uLyo9tHCk42bxnksw4WU67a/8k7NZkepDJhFa5lEwxj+VTuXIoWxba S+ZkUspC9BOrA+teQ+1mQyaBlKpiaOkPGUhJiJ5EzrORYaQdauMliLSLHnt5NeqUu8 YDxJBv1LZU6hcKr0Xt5vqNzeu3t7+9bUC8X5IKQU= Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728240AbgBFUqd (ORCPT ); Thu, 6 Feb 2020 15:46:33 -0500 Received: from mail-pj1-f66.google.com ([209.85.216.66]:34089 "EHLO mail-pj1-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728259AbgBFUqb (ORCPT ); Thu, 6 Feb 2020 15:46:31 -0500 Received: by mail-pj1-f66.google.com with SMTP id f2so655852pjq.1; Thu, 06 Feb 2020 12:46:30 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=+JpCejRz9cTdKzvN/s1Lqz/r+3bLOvKPVHP2ixVIjaA=; b=mVWTbWIJa+9uidc0xClrpGq9nebOy0fSzasU8gzahG9t41Yn4VFswlgqSbhU5hj6rd Ik1hXM3UrpI6Ageki0wRLXtXr/w2zWiv8nvcZ1qnK6YzaTtDffuxvFyek3aIKQJoeYwH s2ihrvUJh4y/xB9GD/Z11gWOqEIwwTPtp69Rwb8PV2eK/GjDk1pJmZdJ5VAAF+hTW9LJ PB3kzlEZgeUTI5qY1X9mf6v7J0u7JwFNKmfZQuGKaRLmL4dnWRxptCezKnSa5a7BQ5E7 uUlpkGOANciVIccMdRUS3uMg7DNLJnOMHMuF4Ll+rmmmLUwyDYBpI9YAuK01dVTA+PJW J/mQ== X-Gm-Message-State: APjAAAWe+rYTGAk6zO/sy77vc4uvnmEfNP0yeQwuHW7wxKaCKKBOtBP2 TEFJMvI7YdqInvEjeKKX3w== X-Google-Smtp-Source: APXvYqwbC73hm+Agme/rCp48d6/0xYRA1eDWiKJsCgthOldvBiGk6RxTKAWpaJjx1M145Mgn2+p7Ag== X-Received: by 2002:a17:902:504:: with SMTP id 4mr5425237plf.276.1581021989698; Thu, 06 Feb 2020 12:46:29 -0800 (PST) Received: from rob-hp-laptop (63-158-47-182.dia.static.qwest.net. [63.158.47.182]) by smtp.gmail.com with ESMTPSA id g7sm288861pfq.33.2020.02.06.12.46.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 06 Feb 2020 12:46:29 -0800 (PST) Received: (nullmailer pid 9682 invoked by uid 1000); Thu, 06 Feb 2020 18:21:25 -0000 Date: Thu, 6 Feb 2020 18:21:25 +0000 From: Rob Herring To: Olivier Moysan Cc: lgirdwood@gmail.com, broonie@kernel.org, perex@perex.cz, tiwai@suse.com, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, alsa-devel@alsa-project.org, mark.rutland@arm.com, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-stm32@st-md-mailman.stormreply.com, linux-kernel@vger.kernel.org Subject: Re: [PATCH] ASoC: dt-bindings: stm32: convert sai to json-schema Message-ID: <20200206182125.GA23274@bogus> References: <20200130135040.22575-1-olivier.moysan@st.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20200130135040.22575-1-olivier.moysan@st.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: devicetree-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org On Thu, Jan 30, 2020 at 02:50:40PM +0100, Olivier Moysan wrote: > Convert the STM32 SAI bindings to DT schema format using json-schema. > > Signed-off-by: Olivier Moysan > --- > .../bindings/sound/st,stm32-sai.txt | 107 ---------- > .../bindings/sound/st,stm32-sai.yaml | 193 ++++++++++++++++++ > 2 files changed, 193 insertions(+), 107 deletions(-) > delete mode 100644 Documentation/devicetree/bindings/sound/st,stm32-sai.txt > create mode 100644 Documentation/devicetree/bindings/sound/st,stm32-sai.yaml > diff --git a/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml b/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml > new file mode 100644 > index 000000000000..33dca007fc86 > --- /dev/null > +++ b/Documentation/devicetree/bindings/sound/st,stm32-sai.yaml > @@ -0,0 +1,193 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/sound/st,stm32-sai.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: STMicroelectronics STM32 Serial Audio Interface (SAI) > + > +maintainers: > + - Olivier Moysan > + > +description: > + The SAI interface (Serial Audio Interface) offers a wide set of audio > + protocols as I2S standards, LSB or MSB-justified, PCM/DSP, TDM, and AC'97. > + The SAI contains two independent audio sub-blocks. Each sub-block has > + its own clock generator and I/O lines controller. > + > +properties: > + compatible: > + enum: > + - st,stm32f4-sai > + - st,stm32h7-sai > + > + reg: > + items: > + - description: Base address and size of SAI common register set. > + - description: Base address and size of SAI identification register set. > + minItems: 1 > + maxItems: 2 > + > + ranges: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + resets: > + maxItems: 1 > + > + "#address-cells": > + const: 1 > + > + "#size-cells": > + const: 1 > + > + clocks: > + items: > + - description: pclk feeds the peripheral bus interface. > + - description: x8k, SAI parent clock for sampling rates multiple of 8kHz. > + - description: x11k, SAI parent clock for sampling rates multiple of 11.025kHz. > + > + clock-names: > + items: > + enum: [ pclk, x8k, x11k ] > + minItems: 3 > + maxItems: 3 > + > +required: > + - compatible > + - reg > + - ranges > + - "#address-cells" > + - "#size-cells" > + - clocks > + - clock-names > + > +patternProperties: > + "^audio-controller@[0-9a-f]+$": > + type: object > + description: > + Two subnodes corresponding to SAI sub-block instances A et B > + can be defined. Subnode can be omitted for unsused sub-block. > + > + properties: > + compatible: > + description: Compatible for SAI sub-block A or B. > + enum: > + - st,stm32-sai-sub-a > + - st,stm32-sai-sub-b pattern: 'st,stm32-sai-sub-[ab]' > + > + "#sound-dai-cells": > + const: 0 > + > + reg: > + maxItems: 1 > + > + clocks: > + items: > + - description: sai_ck clock feeding the internal clock generator. > + - description: MCLK clock from a SAI set as master clock provider. > + minItems: 1 > + maxItems: 2 > + > + clock-names: > + items: > + - const: sai_ck > + - const: MCLK > + minItems: 1 > + maxItems: 2 > + > + dmas: > + items: > + - description: SAI sub-block is configured as a capture DAI. > + - description: SAI sub-block is configured as a playback DAI. > + minItems: 1 > + maxItems: 1 This is defining that dmas has 2 entries, but then limits it to the 1st entry only. > + > + dma-names: > + items: > + - enum: [ rx, tx ] > + > + st,sync: > + description: > + Configure the SAI sub-block as slave of another SAI sub-block. > + By default SAI sub-block is in asynchronous mode. > + Must contain the phandle and index of the SAI sub-block providing > + the synchronization. > + allOf: > + - $ref: /schemas/types.yaml#definitions/phandle-array > + - maxItems: 1 > + > + st,iec60958: > + description: > + If set, support S/PDIF IEC6958 protocol for playback. > + IEC60958 protocol is not available for capture. > + By default, custom protocol is assumed, meaning that protocol is > + configured according to protocol defined in related DAI link node, > + such as i2s, left justified, right justified, dsp and pdm protocols. > + allOf: > + - $ref: /schemas/types.yaml#definitions/flag > + > + "#clock-cells": > + description: Configure the SAI device as master clock provider. > + const: 0 > + > + required: > + - compatible > + - "#sound-dai-cells" > + - reg > + - clocks > + - clock-names > + - dmas > + - dma-names additionalProperties: false. > + > +allOf: > + - if: > + properties: > + compatible: > + contains: > + const: st,stm32f4-sai > + > + - then: > + properties: > + clocks: > + minItems: 2 > + maxItems: 2 > + > + clock-names: > + items: > + enum: [ x8k, x11k ] Define the order. > + minItems: 2 > + maxItems: 2 > + > +additionalProperties: false > + > +examples: > + - | > + #include > + #include > + #include > + sai1: sai@4400a000 { > + compatible = "st,stm32h7-sai"; > + #address-cells = <1>; > + #size-cells = <1>; > + ranges = <0 0x4400a000 0x400>; > + reg = <0x4400a000 0x4>, <0x4400a3f0 0x10>; > + interrupts = ; > + clocks = <&rcc SAI1>, <&rcc PLL1_Q>, <&rcc PLL2_P>; > + clock-names = "pclk", "x8k", "x11k"; > + resets = <&rcc SAI1_R>; > + > + sai1a: audio-controller@4400a004 { > + compatible = "st,stm32-sai-sub-a"; > + #sound-dai-cells = <0>; > + reg = <0x4 0x1c>; > + clocks = <&rcc SAI1_K>; > + clock-names = "sai_ck"; > + dmas = <&dmamux1 87 0x400 0x01>; > + dma-names = "tx"; > + }; > + }; > + > +... > -- > 2.17.1 >