Received: by 2002:a05:6a10:206:0:0:0:0 with SMTP id 6csp1068668pxj; Fri, 21 May 2021 05:52:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzrQQbSYToWUQ28FBLVrhblkCRcSWSQh7/1Fo43P0WdH/9HIruwuW670hRx6o4tWoErujKA X-Received: by 2002:a17:906:f283:: with SMTP id gu3mr10119722ejb.91.1621601562392; Fri, 21 May 2021 05:52:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1621601562; cv=none; d=google.com; s=arc-20160816; b=HNs0rD54SIUQwyxYgojPbDuyeWtSiCiZwRoLQJiHG8Kkzp6zzNVfKwt93XCtZgzsCS pkhae3NUHXKPsfbfsYIJYGLff77qr3uBdytdkSgVnJpb7Fy0AAND2/mPT8cbAGMn+ToR kcGJjjt24y7V6xEFd1pi5mWRifeYdH9ZeJcgj3sgpbKiA4vGj9fE6rh11kqgPtyvM7fO 4jBWNbX7vJ9wXbX8p/pAsnemHhNeKS+0nwGx7jSuLT/485xwyHNdidEPs72dl2OM9LM5 FXClTUAcnMM2gLn1fOlKOXmGrusLVVsu7DDf1kzy9zlJ9Tr6U4kw48bDGMT0jGBKSntZ KIkg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from; bh=rKy6YtIGY0HWqlc6AD8esPyAXTwf4OOGdgKlfv2y0LU=; b=ufXtNA/A+v5ToDe9iKjFf/kif1+xe/vkK8ljKh/apgWxERNEd3kRH2Gi3170lnUCu7 NfbiT6M2FmYteR2/yK2XFtTn0EZzIFNIRTO9cKoJoxS0ZKLTQ2zroCTBQCD9pPKGwax9 nEHgt489sx7rKouJcWiifl6C5myRhPpSsRJCOenoisKXTfHkaP8pd5qS+TRa0z6uwSlA 4jHGsR3P0Z07KzHP7aIjwHSI0bimmOoKKtL73uZL0PUzWkuqTvvlnSHRmuLIKzVXHl0Y KR3yapAP8xbTAOsI3I4TTk1St1DGaXzjXZ2zX16wCKnWP14S4Pm7YQC1keM+WNHy9Grw MDGA== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id j6si4991084edv.294.2021.05.21.05.52.18; Fri, 21 May 2021 05:52:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230358AbhEUMXC (ORCPT + 99 others); Fri, 21 May 2021 08:23:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40744 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230290AbhEUMW6 (ORCPT ); Fri, 21 May 2021 08:22:58 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id DF07FC061763 for ; Fri, 21 May 2021 05:21:33 -0700 (PDT) Received: from dude.hi.pengutronix.de ([2001:67c:670:100:1d::7]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lk49k-0001uY-5Z; Fri, 21 May 2021 14:21:32 +0200 Received: from ore by dude.hi.pengutronix.de with local (Exim 4.92) (envelope-from ) id 1lk49i-0000NB-Rf; Fri, 21 May 2021 14:21:30 +0200 From: Oleksij Rempel To: Shawn Guo , Sascha Hauer , Rob Herring Cc: Oleksij Rempel , kernel@pengutronix.de, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, alsa-devel@alsa-project.org, Liam Girdwood , Mark Brown , Fabio Estevam , NXP Linux Team Subject: [PATCH v1] ASoC: dt-bindings: Convert imx-audmux binding to json schema Date: Fri, 21 May 2021 14:21:29 +0200 Message-Id: <20210521122129.1371-1-o.rempel@pengutronix.de> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-SA-Exim-Connect-IP: 2001:67c:670:100:1d::7 X-SA-Exim-Mail-From: ore@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Convert the imx-audmux binding to DT schema format using json-schema Signed-off-by: Oleksij Rempel --- .../devicetree/bindings/sound/imx-audmux.txt | 28 ----- .../devicetree/bindings/sound/imx-audmux.yaml | 119 ++++++++++++++++++ 2 files changed, 119 insertions(+), 28 deletions(-) delete mode 100644 Documentation/devicetree/bindings/sound/imx-audmux.txt create mode 100644 Documentation/devicetree/bindings/sound/imx-audmux.yaml diff --git a/Documentation/devicetree/bindings/sound/imx-audmux.txt b/Documentation/devicetree/bindings/sound/imx-audmux.txt deleted file mode 100644 index 2db4dcbee1b9..000000000000 --- a/Documentation/devicetree/bindings/sound/imx-audmux.txt +++ /dev/null @@ -1,28 +0,0 @@ -Freescale Digital Audio Mux (AUDMUX) device - -Required properties: - - - compatible : "fsl,imx21-audmux" for AUDMUX version firstly used - on i.MX21, or "fsl,imx31-audmux" for the version - firstly used on i.MX31. - - - reg : Should contain AUDMUX registers location and length. - -An initial configuration can be setup using child nodes. - -Required properties of optional child nodes: - - - fsl,audmux-port : Integer of the audmux port that is configured by this - child node. - - - fsl,port-config : List of configuration options for the specific port. - For imx31-audmux and above, it is a list of tuples - . For imx21-audmux it is a list of pcr - values. - -Example: - -audmux@21d8000 { - compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux"; - reg = <0x021d8000 0x4000>; -}; diff --git a/Documentation/devicetree/bindings/sound/imx-audmux.yaml b/Documentation/devicetree/bindings/sound/imx-audmux.yaml new file mode 100644 index 000000000000..6078ce13bd46 --- /dev/null +++ b/Documentation/devicetree/bindings/sound/imx-audmux.yaml @@ -0,0 +1,119 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/sound/imx-audmux.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Freescale Digital Audio Mux device + +maintainers: + - Oleksij Rempel + +properties: + compatible: + oneOf: + - items: + - enum: + - fsl,imx27-audmux + - const: fsl,imx21-audmux + - items: + - enum: + - fsl,imx25-audmux + - fsl,imx35-audmux + - fsl,imx50-audmux + - fsl,imx51-audmux + - fsl,imx53-audmux + - fsl,imx6q-audmux + - fsl,imx6sl-audmux + - fsl,imx6sll-audmux + - fsl,imx6sx-audmux + - const: fsl,imx31-audmux + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: audmux + +patternProperties: + "^mux-[0-9a-z]*$": + type: object + properties: + fsl,audmux-port: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + Integer of the audmux port that is configured by this child node + + fsl,port-config: + $ref: /schemas/types.yaml#/definitions/uint32-array + description: | + List of configuration options for the specific port. + For imx31-audmux and above, it is a list of tuples ptcr pdcr. + For imx21-audmux it is a list of pcr values. + + required: + - fsl,audmux-port + - fsl,port-config + + additionalProperties: false + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + audmux@21d8000 { + compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux"; + reg = <0x021d8000 0x4000>; + }; + - | + audmux@10016000 { + compatible = "fsl,imx27-audmux", "fsl,imx21-audmux"; + reg = <0x10016000 0x1000>; + clocks = <&clks 1>; + clock-names = "audmux"; + + mux-ssi0 { + fsl,audmux-port = <0>; + fsl,port-config = <0xcb205000>; + }; + + mux-pins4 { + fsl,audmux-port = <2>; + fsl,port-config = <0x00001000>; + }; + }; + - | + #include + audmux@21d8000 { + compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux"; + reg = <0x021d8000 0x4000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_audmux>; + + mux-ssi1 { + fsl,audmux-port = <0>; + fsl,port-config = < + IMX_AUDMUX_V2_PTCR_SYN 0 + IMX_AUDMUX_V2_PTCR_TFSEL(2) 0 + IMX_AUDMUX_V2_PTCR_TCSEL(2) 0 + IMX_AUDMUX_V2_PTCR_TFSDIR 0 + IMX_AUDMUX_V2_PTCR_TCLKDIR IMX_AUDMUX_V2_PDCR_RXDSEL(2) + >; + }; + + mux-pins3 { + fsl,audmux-port = <2>; + fsl,port-config = < + IMX_AUDMUX_V2_PTCR_SYN IMX_AUDMUX_V2_PDCR_RXDSEL(0) + 0 IMX_AUDMUX_V2_PDCR_TXRXEN + >; + }; + }; -- 2.29.2