Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: dt-bindings: Convert imx-audmux binding to json schema

Convert the imx-audmux binding to DT schema format using json-schema

Signed-off-by: Oleksij Rempel <o.rempel@pengutronix.de>
Reviewed-by: Rob Herring <robh@kernel.org>
Link: https://lore.kernel.org/r/20210531064752.8809-1-o.rempel@pengutronix.de
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Oleksij Rempel and committed by
Mark Brown
14aa731d b82d0759

+119 -28
-28
Documentation/devicetree/bindings/sound/imx-audmux.txt
··· 1 - Freescale Digital Audio Mux (AUDMUX) device 2 - 3 - Required properties: 4 - 5 - - compatible : "fsl,imx21-audmux" for AUDMUX version firstly used 6 - on i.MX21, or "fsl,imx31-audmux" for the version 7 - firstly used on i.MX31. 8 - 9 - - reg : Should contain AUDMUX registers location and length. 10 - 11 - An initial configuration can be setup using child nodes. 12 - 13 - Required properties of optional child nodes: 14 - 15 - - fsl,audmux-port : Integer of the audmux port that is configured by this 16 - child node. 17 - 18 - - fsl,port-config : List of configuration options for the specific port. 19 - For imx31-audmux and above, it is a list of tuples 20 - <ptcr pdcr>. For imx21-audmux it is a list of pcr 21 - values. 22 - 23 - Example: 24 - 25 - audmux@21d8000 { 26 - compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux"; 27 - reg = <0x021d8000 0x4000>; 28 - };
+119
Documentation/devicetree/bindings/sound/imx-audmux.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/sound/imx-audmux.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Freescale Digital Audio Mux device 8 + 9 + maintainers: 10 + - Oleksij Rempel <o.rempel@pengutronix.de> 11 + 12 + properties: 13 + compatible: 14 + oneOf: 15 + - items: 16 + - enum: 17 + - fsl,imx27-audmux 18 + - const: fsl,imx21-audmux 19 + - items: 20 + - enum: 21 + - fsl,imx25-audmux 22 + - fsl,imx35-audmux 23 + - fsl,imx50-audmux 24 + - fsl,imx51-audmux 25 + - fsl,imx53-audmux 26 + - fsl,imx6q-audmux 27 + - fsl,imx6sl-audmux 28 + - fsl,imx6sll-audmux 29 + - fsl,imx6sx-audmux 30 + - const: fsl,imx31-audmux 31 + 32 + reg: 33 + maxItems: 1 34 + 35 + clocks: 36 + maxItems: 1 37 + 38 + clock-names: 39 + items: 40 + - const: audmux 41 + 42 + patternProperties: 43 + "^mux-[0-9a-z]*$": 44 + type: object 45 + properties: 46 + fsl,audmux-port: 47 + $ref: /schemas/types.yaml#/definitions/uint32 48 + description: | 49 + Integer of the audmux port that is configured by this child node 50 + 51 + fsl,port-config: 52 + $ref: /schemas/types.yaml#/definitions/uint32-array 53 + description: | 54 + List of configuration options for the specific port. 55 + For imx31-audmux and above, it is a list of tuples ptcr pdcr. 56 + For imx21-audmux it is a list of pcr values. 57 + 58 + required: 59 + - fsl,audmux-port 60 + - fsl,port-config 61 + 62 + additionalProperties: false 63 + 64 + required: 65 + - compatible 66 + - reg 67 + 68 + additionalProperties: false 69 + 70 + examples: 71 + - | 72 + audmux@21d8000 { 73 + compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux"; 74 + reg = <0x021d8000 0x4000>; 75 + }; 76 + - | 77 + audmux@10016000 { 78 + compatible = "fsl,imx27-audmux", "fsl,imx21-audmux"; 79 + reg = <0x10016000 0x1000>; 80 + clocks = <&clks 1>; 81 + clock-names = "audmux"; 82 + 83 + mux-ssi0 { 84 + fsl,audmux-port = <0>; 85 + fsl,port-config = <0xcb205000>; 86 + }; 87 + 88 + mux-pins4 { 89 + fsl,audmux-port = <2>; 90 + fsl,port-config = <0x00001000>; 91 + }; 92 + }; 93 + - | 94 + #include <dt-bindings/sound/fsl-imx-audmux.h> 95 + audmux@21d8000 { 96 + compatible = "fsl,imx6q-audmux", "fsl,imx31-audmux"; 97 + reg = <0x021d8000 0x4000>; 98 + pinctrl-names = "default"; 99 + pinctrl-0 = <&pinctrl_audmux>; 100 + 101 + mux-ssi1 { 102 + fsl,audmux-port = <0>; 103 + fsl,port-config = < 104 + IMX_AUDMUX_V2_PTCR_SYN 0 105 + IMX_AUDMUX_V2_PTCR_TFSEL(2) 0 106 + IMX_AUDMUX_V2_PTCR_TCSEL(2) 0 107 + IMX_AUDMUX_V2_PTCR_TFSDIR 0 108 + IMX_AUDMUX_V2_PTCR_TCLKDIR IMX_AUDMUX_V2_PDCR_RXDSEL(2) 109 + >; 110 + }; 111 + 112 + mux-pins3 { 113 + fsl,audmux-port = <2>; 114 + fsl,port-config = < 115 + IMX_AUDMUX_V2_PTCR_SYN IMX_AUDMUX_V2_PDCR_RXDSEL(0) 116 + 0 IMX_AUDMUX_V2_PDCR_TXRXEN 117 + >; 118 + }; 119 + };