Received: by 2002:a05:7412:3b8b:b0:fc:a2b0:25d7 with SMTP id nd11csp1289714rdb; Fri, 9 Feb 2024 17:24:34 -0800 (PST) X-Google-Smtp-Source: AGHT+IHmJQfh3OVvo38wbkJSi6i3gldR9QdhfnM06x7RGsYJ43ubxpfS7gBMzuiwm/2uI/Re9pcu X-Received: by 2002:a05:6358:7628:b0:178:7701:2860 with SMTP id r40-20020a056358762800b0017877012860mr1676764rwg.14.1707528273936; Fri, 09 Feb 2024 17:24:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1707528273; cv=pass; d=google.com; s=arc-20160816; b=b0SirkE+9We3Naykm0SQDI3+tTalY87LHKNF++GVWzyn9LHT6dtV3Gp78TQ8HE67DD dqizoYJef1O4ZZ+gFeWbMe4mLRhmjUKs5XSpxjd2lTSVtQ8vghMEPpMO8NZaRjDkXfE3 FM5JAaVCDuwWVgcSERGHQ9hIPH0cjEuDjs0WeqUS3bT2MizzwVA3j8CmZGQrwACqFUqV 9wQd45pmx/GDfx9aFAWCN8bimVcDuS90QSdWTTSG+ub2hvsq7VUW2QpWlRmuQ4AHx0yC pIOYJ4DYQbq0m3EW1CWhrzFGATjd9XLglsqXAHMfP95vgx3HbuKxbOWaAPg36GYhXEc+ Sfvg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:in-reply-to:message-id :date:subject:cc:to:from:dkim-signature; bh=hF2fAh600VptGaqJziRCb1LlgYUNNaaaJNrDTKytYJo=; fh=4Pgk8AEcUXWwcMbUG0fbJH00CcMuqblOHT1vS1fAzPg=; b=UQavsH+6BqXVlFkX1Gnpvm3ZY/uXPDb6a9KgNFT2n8uxJXE4h2Tgh5AMVN9gXX0NTg 0eStwHmm5Nn8id8pu/bmTowrR7o33PmpjFVugUhi33lIYcw69ZTGPI8d+uvWmZJ14dGc mfEgAVnOVIlTnUz2dwiH3BkViIG9B5dhf8IukJ5f8aHviHWSTJ2FJNkj9MFpoBposP6B 1wVhcX4F++TDBZzku7KuOPLeXT/pciRq4HhOu+BcauhFr4O+/WPTSR94aP7BIA5Phqq0 e6eQgMx4yqzuBoNfcft97sjo0TLo+kXNkjhwUEymqpKZpU2LdoFfoXnG0WGz2SpKraNK XZag==; dara=google.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PBe392Sm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-60217-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60217-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org X-Forwarded-Encrypted: i=2; AJvYcCV2WdIIuAU8uYZFoudRaNdPkv93VJmxNxlZZ6bxY+K77zomIPyPLEnnaiJKPU9B4d5H6zd4b6XarD1BN3RG9PccYlY95Um6cwBKr7fm2A== Return-Path: Received: from sy.mirrors.kernel.org (sy.mirrors.kernel.org. [147.75.48.161]) by mx.google.com with ESMTPS id bq9-20020a056a02044900b005dbedb5cbaesi2822081pgb.443.2024.02.09.17.24.33 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 09 Feb 2024 17:24:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-60217-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) client-ip=147.75.48.161; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=PBe392Sm; arc=pass (i=1 dkim=pass dkdomain=kernel.org); spf=pass (google.com: domain of linux-kernel+bounces-60217-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.48.161 as permitted sender) smtp.mailfrom="linux-kernel+bounces-60217-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 sy.mirrors.kernel.org (Postfix) with ESMTPS id E2690B2744B for ; Sat, 10 Feb 2024 01:21:51 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 4E0076AB7; Sat, 10 Feb 2024 01:21:20 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="PBe392Sm" 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 1BE3620F1; Sat, 10 Feb 2024 01:21:18 +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=1707528079; cv=none; b=albn0MbPd1b33WPNHir7OeFVThT7WdHtqu2rZ25m7Ys48XPALKA6n+FUEzJ6BhCLBiClJi1gGFLF6SVTlSlTX8pHA5n75+NGMdBLEsWLinwj0/IQEp5QzPilXBdsDYZlGQCF80YZXCA6InSd7C74HOuQ1L7WT8gjZ9yWo1kTR7E= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1707528079; c=relaxed/simple; bh=YxQ5LMsMzEjuOZcPovgNYIQMKbIBxJn4ha0PHBzpGcw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=myTF4afF2S554wsKmidv4Vu2zUXztJ6Sc/pIo60TyLUHnOW0C1/1MB8f0MyV37B/RgVADH2VvaJvPnMsiNH+52j+bKl461+BGmX4dzM3FRY2UNpCTWiuIAIWkrrTW8Wpu7DSqzBspYwKT4m43sGHfITN1qQQ6vgel5GevklkgSc= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=PBe392Sm; arc=none smtp.client-ip=10.30.226.201 Received: by smtp.kernel.org (Postfix) with ESMTPSA id 765D8C43390; Sat, 10 Feb 2024 01:21:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1707528078; bh=YxQ5LMsMzEjuOZcPovgNYIQMKbIBxJn4ha0PHBzpGcw=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=PBe392SmZd26CtDKNzpqe+91/ErPLtAEgyR7/4OIymBD7veyr5eyKlddEAgR/8wYV KnUEoXqJf4MZKrN4TB/vMS7usnqqdcXwz38VtKi/xycZsfd1GxDFRP4sr6BRNriOXM gKMS+WM3gbeM9+Ph81dVLPBS+SkezE44XE07e9svrDRUQQs41cUOh4VI1pE1SGpvLD XPCyZdaVB55onRLmrh5ua8UslempSMUDwgmkOAy/EJQ9D81MNaEtxfxJ1K9fEhp7qV 7X9w0klJ1ailo8zJN8UdZt5tJ/fJqCey8feS3eCBgcQru7zs1XX4mHBLzxYxgOhQzO 5rbJK8x41yBkA== Received: by mercury (Postfix, from userid 1000) id DA48D106861A; Sat, 10 Feb 2024 02:21:15 +0100 (CET) From: Sebastian Reichel To: Sebastian Reichel , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Fabio Estevam , Pengutronix Kernel Team , NXP Linux Team Cc: Dong Aisheng , Linus Walleij , Dmitry Torokhov , Mark Brown , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 03/14] dt-bindings: sound: fsl,imx-asrc: convert to YAML Date: Sat, 10 Feb 2024 02:18:07 +0100 Message-ID: <20240210012114.489102-4-sre@kernel.org> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20240210012114.489102-1-sre@kernel.org> References: <20240210012114.489102-1-sre@kernel.org> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Convert the i.MX ASRC DT binding to YAML. Signed-off-by: Sebastian Reichel --- .../devicetree/bindings/sound/fsl,asrc.txt | 80 --------- .../bindings/sound/fsl,imx-asrc.yaml | 159 ++++++++++++++++++ 2 files changed, 159 insertions(+), 80 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/fsl,asrc.txt create mode 100644 Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml diff --git a/Documentation/devicetree/bindings/sound/fsl,asrc.txt b/Documentation/devicetree/bindings/sound/fsl,asrc.txt deleted file mode 100644 index 998b4c8a7f78..000000000000 --- a/Documentation/devicetree/bindings/sound/fsl,asrc.txt +++ /dev/null @@ -1,80 +0,0 @@ -Freescale Asynchronous Sample Rate Converter (ASRC) Controller - -The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of a -signal associated with an input clock into a signal associated with a different -output clock. The driver currently works as a Front End of DPCM with other Back -Ends Audio controller such as ESAI, SSI and SAI. It has three pairs to support -three substreams within totally 10 channels. - -Required properties: - - - compatible : Compatible list, should contain one of the following - compatibles: - "fsl,imx35-asrc", - "fsl,imx53-asrc", - "fsl,imx8qm-asrc", - "fsl,imx8qxp-asrc", - - - reg : Offset and length of the register set for the device. - - - interrupts : Contains the spdif interrupt. - - - dmas : Generic dma devicetree binding as described in - Documentation/devicetree/bindings/dma/dma.txt. - - - dma-names : Contains "rxa", "rxb", "rxc", "txa", "txb" and "txc". - - - clocks : Contains an entry for each entry in clock-names. - - - clock-names : Contains the following entries - "mem" Peripheral access clock to access registers. - "ipg" Peripheral clock to driver module. - "asrck_<0-f>" Clock sources for input and output clock. - "spba" The spba clock is required when ASRC is placed as a - bus slave of the Shared Peripheral Bus and when two - or more bus masters (CPU, DMA or DSP) try to access - it. This property is optional depending on the SoC - design. - - - fsl,asrc-rate : Defines a mutual sample rate used by DPCM Back Ends. - - - fsl,asrc-width : Defines a mutual sample width used by DPCM Back Ends. - - - fsl,asrc-clk-map : Defines clock map used in driver. which is required - by imx8qm/imx8qxp platform - <0> - select the map for asrc0 in imx8qm/imx8qxp - <1> - select the map for asrc1 in imx8qm/imx8qxp - -Optional properties: - - - big-endian : If this property is absent, the little endian mode - will be in use as default. Otherwise, the big endian - mode will be in use for all the device registers. - - - fsl,asrc-format : Defines a mutual sample format used by DPCM Back - Ends, which can replace the fsl,asrc-width. - The value is 2 (S16_LE), or 6 (S24_LE). - -Example: - -asrc: asrc@2034000 { - compatible = "fsl,imx53-asrc"; - reg = <0x02034000 0x4000>; - interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>; - clocks = <&clks 107>, <&clks 107>, <&clks 0>, - <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, - <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, - <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, - <&clks 107>, <&clks 0>, <&clks 0>; - clock-names = "mem", "ipg", "asrck0", - "asrck_1", "asrck_2", "asrck_3", "asrck_4", - "asrck_5", "asrck_6", "asrck_7", "asrck_8", - "asrck_9", "asrck_a", "asrck_b", "asrck_c", - "asrck_d", "asrck_e", "asrck_f"; - dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>, - <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>; - dma-names = "rxa", "rxb", "rxc", - "txa", "txb", "txc"; - fsl,asrc-rate = <48000>; - fsl,asrc-width = <16>; -}; diff --git a/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml new file mode 100644 index 000000000000..bc1607ecf345 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/fsl,imx-asrc.yaml @@ -0,0 +1,159 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/fsl,imx-asrc.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Asynchronous Sample Rate Converter (ASRC) Controller + +description: + The Asynchronous Sample Rate Converter (ASRC) converts the sampling rate of + a signal associated with an input clock into a signal associated with a + different output clock. The driver currently works as a Front End of DPCM + with other Back Ends Audio controller such as ESAI, SSI and SAI. It has + three pairs to support three substreams within totally 10 channels. + +maintainers: + - Shawn Guo + - Sascha Hauer + +properties: + compatible: + oneOf: + - enum: + - fsl,imx35-asrc + - fsl,imx53-asrc + - fsl,imx8qm-asrc + - fsl,imx8qxp-asrc + - items: + - enum: + - fsl,imx6sx-asrc + - fsl,imx6ul-asrc + - const: fsl,imx53-asrc + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + dmas: + maxItems: 6 + + dma-names: + items: + - const: rxa + - const: rxb + - const: rxc + - const: txa + - const: txb + - const: txc + + clocks: + maxItems: 19 + + clock-names: + items: + - const: mem + - const: ipg + - const: asrck_0 + - const: asrck_1 + - const: asrck_2 + - const: asrck_3 + - const: asrck_4 + - const: asrck_5 + - const: asrck_6 + - const: asrck_7 + - const: asrck_8 + - const: asrck_9 + - const: asrck_a + - const: asrck_b + - const: asrck_c + - const: asrck_d + - const: asrck_e + - const: asrck_f + - const: spba + + fsl,asrc-rate: + $ref: /schemas/types.yaml#/definitions/uint32 + description: The mutual sample rate used by DPCM Back Ends + + fsl,asrc-width: + $ref: /schemas/types.yaml#/definitions/uint32 + description: The mutual sample width used by DPCM Back Ends + + fsl,asrc-clk-map: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Defines clock map used in driver + <0> - select the map for asrc0 in imx8qm/imx8qxp + <1> - select the map for asrc1 in imx8qm/imx8qxp + + big-endian: + type: boolean + description: + If this property is absent, the little endian mode will be in use as + default. Otherwise, the big endian mode will be in use for all the + device registers. + + fsl,asrc-format: + $ref: /schemas/types.yaml#/definitions/uint32 + description: + Defines a mutual sample format used by DPCM Back Ends, which can + replace the fsl,asrc-width. The value is 2 (S16_LE), or 6 (S24_LE). + +required: + - compatible + - reg + - interrupts + - dmas + - dma-names + - clocks + - clock-names + - fsl,asrc-rate + - fsl,asrc-width + +allOf: + - if: + properties: + compatible: + contains: + enum: + - fsl,imx8qm-asrc + - fsl,imx8qxp-asrc + then: + required: + - fsl,asrc-clk-map + else: + properties: + fsl,asrc-clk-map: false + +additionalProperties: false + +examples: + - | + #include + #include + asrc: asrc@2034000 { + compatible = "fsl,imx53-asrc"; + reg = <0x02034000 0x4000>; + interrupts = <0 50 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clks IMX6QDL_CLK_ASRC_IPG>, + <&clks IMX6QDL_CLK_ASRC_MEM>, <&clks 0>, + <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, + <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, + <&clks 0>, <&clks 0>, <&clks 0>, <&clks 0>, + <&clks IMX6QDL_CLK_ASRC>, <&clks 0>, <&clks 0>, + <&clks IMX6QDL_CLK_SPBA>; + clock-names = "mem", "ipg", "asrck_0", + "asrck_1", "asrck_2", "asrck_3", "asrck_4", + "asrck_5", "asrck_6", "asrck_7", "asrck_8", + "asrck_9", "asrck_a", "asrck_b", "asrck_c", + "asrck_d", "asrck_e", "asrck_f", "spba"; + dmas = <&sdma 17 23 1>, <&sdma 18 23 1>, <&sdma 19 23 1>, + <&sdma 20 23 1>, <&sdma 21 23 1>, <&sdma 22 23 1>; + dma-names = "rxa", "rxb", "rxc", + "txa", "txb", "txc"; + fsl,asrc-rate = <48000>; + fsl,asrc-width = <16>; + }; -- 2.43.0