Received: by 2002:a05:6500:1b45:b0:1f5:f2ab:c469 with SMTP id cz5csp653025lqb; Wed, 17 Apr 2024 07:16:32 -0700 (PDT) X-Forwarded-Encrypted: i=2; AJvYcCUe1drGysWQpyqGIv5Sr2AISpuI9XGaCjbQDhzrYfauKBAOSiqc8uWNz/fgzMq1O8ySts6yQohUqPc7DX87pJt8xAgoHBKpp4Wq0OOauQ== X-Google-Smtp-Source: AGHT+IHbwBCciSuUVaft79lA+JMHHIjtWWYUt1QQyX0TE6nn/AbcE/Uj0oeMVWtwtQH6Ixs7mttQ X-Received: by 2002:a05:6870:b007:b0:232:fb5e:c23b with SMTP id y7-20020a056870b00700b00232fb5ec23bmr20399590oae.26.1713363392497; Wed, 17 Apr 2024 07:16:32 -0700 (PDT) Return-Path: Received: from sv.mirrors.kernel.org (sv.mirrors.kernel.org. [139.178.88.99]) by mx.google.com with ESMTPS id u20-20020a632354000000b005d55aec96b2si11427346pgm.41.2024.04.17.07.16.32 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 17 Apr 2024 07:16:32 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel+bounces-148663-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) client-ip=139.178.88.99; Authentication-Results: mx.google.com; dkim=neutral (body hash did not verify) header.i=@kernel.org header.s=k20201202 header.b=B8LbVcby; arc=fail (body hash mismatch); spf=pass (google.com: domain of linux-kernel+bounces-148663-linux.lists.archive=gmail.com@vger.kernel.org designates 139.178.88.99 as permitted sender) smtp.mailfrom="linux-kernel+bounces-148663-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sv.mirrors.kernel.org (Postfix) with ESMTPS id 22974281CB2 for ; Wed, 17 Apr 2024 14:16:32 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5C92C1422C5; Wed, 17 Apr 2024 14:16:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="B8LbVcby" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2F1011411EE; Wed, 17 Apr 2024 14:16:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713363361; cv=none; b=eCc2O0iRDefxSb+v4NdBd2pO6SU5/dWtj26lcDpesXdGGxRvmxzhJYWeREOhltjVTzD9A5OzL1tGGJYbIOuopofu4/Q9S/UmJb3ayOkIZSrt0Z9TwpEuRI0BoaVuseWoDtgGmwxAtfjTQmq8TCiIsc8pBYiGW7XI847/1wNNyXE= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1713363361; c=relaxed/simple; bh=f39lfsHN5Os0P7FTVoBlrkp1C5yLiIyaNXce6Srsymw=; h=Message-ID:Date:MIME-Version:Subject:To:References:From: In-Reply-To:Content-Type; b=LQz5XnHTUtuu9JjrIFllfVuTJ97/7dCo1ZiII0wJ46cRfnlVDVurWCkvUMGCJ/aQ2KxRSkZjJ/HBSzm+E/pXdKiCI9ScxtuFSIRW8qygOZyT8t6KM0RvgsTMlPZkoqwaUCBNWwcXcxl2e0B0+I68nbmZY8Pjpf97XmlT/DhPC68= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=B8LbVcby; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id D60B2C116B1; Wed, 17 Apr 2024 14:16:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1713363361; bh=f39lfsHN5Os0P7FTVoBlrkp1C5yLiIyaNXce6Srsymw=; h=Date:Subject:To:References:From:In-Reply-To:From; b=B8LbVcbyQmYQhv/ZuWhvwQ1lAitYwRhlKa/SmQXictKX7bC6JPUgUPOFJZmY0pwps divUejga0QX9/kzk6Nkl0gJgXfEUGppzx5fArDF8vyys9iS644LxwvZyO2B2EWW+2D 5S0/NnVrt90WT5Sg4Slc3+S/wRLlVu1DJzjHg+1QCgjIZ5jpSZkU22pVH0qzeriEOa rYkR7xujtCTLNzQEXr4wWZyx9wa8Yy9aOnHhe2LjRPG8qjRPH/Yfg/o/JEbGaIyy64 8xEejozNXhW/tN7z/hg7I7zylSzBfXEhjaMYM7Yk+v9nfCPgR6OrzB9DzkL8EmiKPd ZrPGcBqNBzwiQ== Message-ID: Date: Wed, 17 Apr 2024 16:16:00 +0200 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH] ASoC: dt-bindings: fsl,ssi: Convert to YAML To: Shengjiu Wang , lgirdwood@gmail.com, broonie@kernel.org, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, shengjiu.wang@gmail.com, linux-sound@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org References: <1713345932-6408-1-git-send-email-shengjiu.wang@nxp.com> Content-Language: en-US From: Krzysztof Kozlowski Autocrypt: addr=krzk@kernel.org; keydata= xsFNBFVDQq4BEAC6KeLOfFsAvFMBsrCrJ2bCalhPv5+KQF2PS2+iwZI8BpRZoV+Bd5kWvN79 cFgcqTTuNHjAvxtUG8pQgGTHAObYs6xeY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vXVFBYIGmpyNPYzRm0QPwARAQABwsF8BBgBCgAmAhsMFiEEm9B+DgxR+NWWd7dUG5NDfTtB YpsFAmA872oFCRRflLYACgkQG5NDfTtBYpvScw/9GrqBrVLuJoJ52qBBKUBDo4E+5fU1bjt0 Gv0nh/hNJuecuRY6aemU6HOPNc2t8QHMSvwbSF+Vp9ZkOvrM36yUOufctoqON+wXrliEY0J4 ksR89ZILRRAold9Mh0YDqEJc1HmuxYLJ7lnbLYH1oui8bLbMBM8S2Uo9RKqV2GROLi44enVt vdrDvo+CxKj2K+d4cleCNiz5qbTxPUW/cgkwG0lJc4I4sso7l4XMDKn95c7JtNsuzqKvhEVS oic5by3fbUnuI0cemeizF4QdtX2uQxrP7RwHFBd+YUia7zCcz0//rv6FZmAxWZGy5arNl6Vm lQqNo7/Poh8WWfRS+xegBxc6hBXahpyUKphAKYkah+m+I0QToCfnGKnPqyYIMDEHCS/RfqA5 t8F+O56+oyLBAeWX7XcmyM6TGeVfb+OZVMJnZzK0s2VYAuI0Rl87FBFYgULdgqKV7R7WHzwD uZwJCLykjad45hsWcOGk3OcaAGQS6NDlfhM6O9aYNwGL6tGt/6BkRikNOs7VDEa4/HlbaSJo 7FgndGw1kWmkeL6oQh7wBvYll2buKod4qYntmNKEicoHGU+x91Gcan8mCoqhJkbqrL7+nXG2 5Q/GS5M9RFWS+nYyJh+c3OcfKqVcZQNANItt7+ULzdNJuhvTRRdC3g9hmCEuNSr+CLMdnRBY fv0= In-Reply-To: <1713345932-6408-1-git-send-email-shengjiu.wang@nxp.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit On 17/04/2024 11:25, Shengjiu Wang wrote: > Convert the fsl,ssi binding to YAML. > .. > +description: > + Notes on fsl,playback-dma and fsl,capture-dma > + On SOCs that have an SSI, specific DMA channels are hard-wired for playback > + and capture. On the MPC8610, for example, SSI1 must use DMA channel 0 for > + playback and DMA channel 1 for capture. SSI2 must use DMA channel 2 for > + playback and DMA channel 3 for capture. The developer can choose which > + DMA controller to use, but the channels themselves are hard-wired. The > + purpose of these two properties is to represent this hardware design. > + > + The device tree nodes for the DMA channels that are referenced by > + "fsl,playback-dma" and "fsl,capture-dma" must be marked as compatible with > + "fsl,ssi-dma-channel". The SOC-specific compatible string (e.g. > + "fsl,mpc8610-dma-channel") can remain. If these nodes are left as > + "fsl,elo-dma-channel" or "fsl,eloplus-dma-channel", then the generic Elo DMA > + drivers (fsldma) will attempt to use them, and it will conflict with the > + sound drivers. > + > +properties: > + compatible: > + oneOf: > + - items: > + - enum: > + - fsl,imx50-ssi > + - fsl,imx53-ssi > + - enum: > + - fsl,imx51-ssi > + - enum: > + - fsl,imx21-ssi That's a mess... you cannot have enums as fallbacks. > + - items: > + - enum: > + - fsl,imx25-ssi > + - fsl,imx27-ssi > + - fsl,imx35-ssi > + - fsl,imx51-ssi > + - fsl,imx6q-ssi > + - fsl,imx6sl-ssi > + - fsl,imx6sx-ssi > + - enum: > + - fsl,imx21-ssi > + - fsl,imx51-ssi > + - items: > + - const: fsl,mpc8610-ssi > + > + cell-index: > + $ref: /schemas/types.yaml#/definitions/uint32 > + enum: [0, 1, 2] > + description: The SSI index > + > + reg: > + maxItems: 1 > + > + interrupts: > + maxItems: 1 > + > + fsl,fifo-depth: > + $ref: /schemas/types.yaml#/definitions/uint32 > + description: > + The number of elements in the transmit and receive FIFOs. > + This number is the maximum allowed value for SFCSR[TFWM0]. > + > + clocks: > + items: > + - description: The ipg clock for register access > + - description: clock for SSI master mode > + minItems: 1 > + > + clock-names: > + items: > + - const: ipg > + - const: baud > + minItems: 1 > + > + dmas: > + oneOf: > + - items: > + - description: DMA controller phandle and request line for RX > + - description: DMA controller phandle and request line for TX > + - items: > + - description: DMA controller phandle and request line for RX0 > + - description: DMA controller phandle and request line for TX0 > + - description: DMA controller phandle and request line for RX1 > + - description: DMA controller phandle and request line for TX1 > + > + dma-names: > + oneOf: > + - items: > + - const: rx > + - const: tx > + - items: > + - const: rx0 > + - const: tx0 > + - const: rx1 > + - const: tx1 > + > + codec-handle: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: > + Phandle to a 'codec' node that defines an audio > + codec connected to this SSI. This node is typically > + a child of an I2C or other control node. > + > + fsl,fiq-stream-filter: > + type: boolean > + description: > + Disabled DMA and use FIQ instead to filter the codec stream. > + This is necessary for some boards where an incompatible codec > + is connected to this SSI, e.g. on pca100 and pcm043. > + > + fsl,mode: > + $ref: /schemas/types.yaml#/definitions/string > + enum: [ ac97-slave, ac97-master, i2s-slave, i2s-master, > + lj-slave, lj-master, rj-slave, rj-master ] > + description: | > + "ac97-slave" - AC97 mode, SSI is clock slave > + "ac97-master" - AC97 mode, SSI is clock master > + "i2s-slave" - I2S mode, SSI is clock slave > + "i2s-master" - I2S mode, SSI is clock master > + "lj-slave" - Left justified mode, SSI is clock slave > + "lj-master" - Left justified mode, SSI is clock master > + "rj-slave" - Right justified mode, SSI is clock slave > + "rj-master" - Right justified mode, SSI is clock master > + > + fsl,ssi-asynchronous: > + type: boolean > + description: If specified, the SSI is to be programmed in asynchronous > + mode. In this mode, pins SRCK, STCK, SRFS, and STFS must > + all be connected to valid signals. In synchronous mode, > + SRCK and SRFS are ignored. Asynchronous mode allows > + playback and capture to use different sample sizes and > + sample rates. Some drivers may require that SRCK and STCK > + be connected together, and SRFS and STFS be connected > + together. This would still allow different sample sizes, > + but not different sample rates. > + > + fsl,playback-dma: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: Phandle to a node for the DMA channel to use for > + playback of audio. This is typically dictated by SOC > + design. Only used on Power Architecture. > + > + fsl,capture-dma: > + $ref: /schemas/types.yaml#/definitions/phandle > + description: Phandle to a node for the DMA channel to use for > + capture (recording) of audio. This is typically dictated > + by SOC design. Only used on Power Architecture. > + > + "#sound-dai-cells": > + const: 0 > + description: optional, some dts node didn't add it. The question is: is this DAI or not? > + > +required: > + - compatible > + - reg > + - interrupts > + - fsl,fifo-depth > + > +unevaluatedProperties: false This must be additionalProperties:false. Use example-schema as reference... unless you want to reference dai-common.yaml, but then that one is missing. Best regards, Krzysztof