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

dt-bindings: bus: imx-weim: convert to YAML

Convert the i.MX Wireless External Interface Module binding to YAML.

Signed-off-by: Sebastian Reichel <sre@kernel.org>
Link: https://lore.kernel.org/r/20240224213240.1854709-3-sre@kernel.org
Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>
Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

authored by

Sebastian Reichel and committed by
Krzysztof Kozlowski
719e366a ae1e06fb

+237 -118
-117
Documentation/devicetree/bindings/bus/imx-weim.txt
··· 1 - Device tree bindings for i.MX Wireless External Interface Module (WEIM) 2 - 3 - The term "wireless" does not imply that the WEIM is literally an interface 4 - without wires. It simply means that this module was originally designed for 5 - wireless and mobile applications that use low-power technology. 6 - 7 - The actual devices are instantiated from the child nodes of a WEIM node. 8 - 9 - Required properties: 10 - 11 - - compatible: Should contain one of the following: 12 - "fsl,imx1-weim" 13 - "fsl,imx27-weim" 14 - "fsl,imx51-weim" 15 - "fsl,imx50-weim" 16 - "fsl,imx6q-weim" 17 - - reg: A resource specifier for the register space 18 - (see the example below) 19 - - clocks: the clock, see the example below. 20 - - #address-cells: Must be set to 2 to allow memory address translation 21 - - #size-cells: Must be set to 1 to allow CS address passing 22 - - ranges: Must be set up to reflect the memory layout with four 23 - integer values for each chip-select line in use: 24 - 25 - <cs-number> 0 <physical address of mapping> <size> 26 - 27 - Optional properties: 28 - 29 - - fsl,weim-cs-gpr: For "fsl,imx50-weim" and "fsl,imx6q-weim" type of 30 - devices, it should be the phandle to the system General 31 - Purpose Register controller that contains WEIM CS GPR 32 - register, e.g. IOMUXC_GPR1 on i.MX6Q. IOMUXC_GPR1[11:0] 33 - should be set up as one of the following 4 possible 34 - values depending on the CS space configuration. 35 - 36 - IOMUXC_GPR1[11:0] CS0 CS1 CS2 CS3 37 - --------------------------------------------- 38 - 05 128M 0M 0M 0M 39 - 033 64M 64M 0M 0M 40 - 0113 64M 32M 32M 0M 41 - 01111 32M 32M 32M 32M 42 - 43 - In case that the property is absent, the reset value or 44 - what bootloader sets up in IOMUXC_GPR1[11:0] will be 45 - used. 46 - 47 - - fsl,burst-clk-enable For "fsl,imx50-weim" and "fsl,imx6q-weim" type of 48 - devices, the presence of this property indicates that 49 - the weim bus should operate in Burst Clock Mode. 50 - 51 - - fsl,continuous-burst-clk Make Burst Clock to output continuous clock. 52 - Without this option Burst Clock will output clock 53 - only when necessary. This takes effect only if 54 - "fsl,burst-clk-enable" is set. 55 - 56 - Timing property for child nodes. It is mandatory, not optional. 57 - 58 - - fsl,weim-cs-timing: The timing array, contains timing values for the 59 - child node. We get the CS indexes from the address 60 - ranges in the child node's "reg" property. 61 - The number of registers depends on the selected chip: 62 - For i.MX1, i.MX21 ("fsl,imx1-weim") there are two 63 - registers: CSxU, CSxL. 64 - For i.MX25, i.MX27, i.MX31 and i.MX35 ("fsl,imx27-weim") 65 - there are three registers: CSCRxU, CSCRxL, CSCRxA. 66 - For i.MX50, i.MX53 ("fsl,imx50-weim"), 67 - i.MX51 ("fsl,imx51-weim") and i.MX6Q ("fsl,imx6q-weim") 68 - there are six registers: CSxGCR1, CSxGCR2, CSxRCR1, 69 - CSxRCR2, CSxWCR1, CSxWCR2. 70 - 71 - Example for an imx6q-sabreauto board, the NOR flash connected to the WEIM: 72 - 73 - weim: weim@21b8000 { 74 - compatible = "fsl,imx6q-weim"; 75 - reg = <0x021b8000 0x4000>; 76 - clocks = <&clks 196>; 77 - #address-cells = <2>; 78 - #size-cells = <1>; 79 - ranges = <0 0 0x08000000 0x08000000>; 80 - fsl,weim-cs-gpr = <&gpr>; 81 - 82 - nor@0,0 { 83 - compatible = "cfi-flash"; 84 - reg = <0 0 0x02000000>; 85 - #address-cells = <1>; 86 - #size-cells = <1>; 87 - bank-width = <2>; 88 - fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000 89 - 0x0000c000 0x1404a38e 0x00000000>; 90 - }; 91 - }; 92 - 93 - Example for an imx6q-based board, a multi-chipselect device connected to WEIM: 94 - 95 - In this case, both chip select 0 and 1 will be configured with the same timing 96 - array values. 97 - 98 - weim: weim@21b8000 { 99 - compatible = "fsl,imx6q-weim"; 100 - reg = <0x021b8000 0x4000>; 101 - clocks = <&clks 196>; 102 - #address-cells = <2>; 103 - #size-cells = <1>; 104 - ranges = <0 0 0x08000000 0x02000000 105 - 1 0 0x0a000000 0x02000000 106 - 2 0 0x0c000000 0x02000000 107 - 3 0 0x0e000000 0x02000000>; 108 - fsl,weim-cs-gpr = <&gpr>; 109 - 110 - acme@0 { 111 - compatible = "acme,whatever"; 112 - reg = <0 0 0x100>, <0 0x400000 0x800>, 113 - <1 0x400000 0x800>; 114 - fsl,weim-cs-timing = <0x024400b1 0x00001010 0x20081100 115 - 0x00000000 0xa0000240 0x00000000>; 116 - }; 117 - };
+31
Documentation/devicetree/bindings/memory-controllers/fsl/fsl,imx-weim-peripherals.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/memory-controllers/fsl/fsl,imx-weim-peripherals.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: i.MX WEIM Bus Peripheral Nodes 8 + 9 + maintainers: 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + 13 + description: 14 + This binding is meant for the child nodes of the WEIM node. The node 15 + represents any device connected to the WEIM bus. It may be a Flash chip, 16 + RAM chip or Ethernet controller, etc. These properties are meant for 17 + configuring the WEIM settings/timings and will accompany the bindings 18 + supported by the respective device. 19 + 20 + properties: 21 + reg: true 22 + 23 + fsl,weim-cs-timing: 24 + $ref: /schemas/types.yaml#/definitions/uint32-array 25 + description: 26 + Timing values for the child node. 27 + minItems: 2 28 + maxItems: 6 29 + 30 + # the WEIM child will have its own native properties 31 + additionalProperties: true
+204
Documentation/devicetree/bindings/memory-controllers/fsl/fsl,imx-weim.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/memory-controllers/fsl/fsl,imx-weim.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: i.MX Wireless External Interface Module (WEIM) 8 + 9 + maintainers: 10 + - Shawn Guo <shawnguo@kernel.org> 11 + - Sascha Hauer <s.hauer@pengutronix.de> 12 + 13 + description: 14 + The term "wireless" does not imply that the WEIM is literally an interface 15 + without wires. It simply means that this module was originally designed for 16 + wireless and mobile applications that use low-power technology. The actual 17 + devices are instantiated from the child nodes of a WEIM node. 18 + 19 + properties: 20 + $nodename: 21 + pattern: "^memory-controller@[0-9a-f]+$" 22 + 23 + compatible: 24 + oneOf: 25 + - enum: 26 + - fsl,imx1-weim 27 + - fsl,imx27-weim 28 + - fsl,imx50-weim 29 + - fsl,imx51-weim 30 + - fsl,imx6q-weim 31 + - items: 32 + - enum: 33 + - fsl,imx31-weim 34 + - fsl,imx35-weim 35 + - const: fsl,imx27-weim 36 + - items: 37 + - enum: 38 + - fsl,imx6sx-weim 39 + - fsl,imx6ul-weim 40 + - const: fsl,imx6q-weim 41 + 42 + "#address-cells": 43 + const: 2 44 + 45 + "#size-cells": 46 + const: 1 47 + 48 + reg: 49 + maxItems: 1 50 + 51 + clocks: 52 + maxItems: 1 53 + 54 + interrupts: 55 + maxItems: 1 56 + 57 + ranges: true 58 + 59 + fsl,weim-cs-gpr: 60 + $ref: /schemas/types.yaml#/definitions/phandle 61 + description: | 62 + Phandle to the system General Purpose Register controller that contains 63 + WEIM CS GPR register, e.g. IOMUXC_GPR1 on i.MX6Q. IOMUXC_GPR1[11:0] 64 + should be set up as one of the following 4 possible values depending on 65 + the CS space configuration. 66 + 67 + IOMUXC_GPR1[11:0] CS0 CS1 CS2 CS3 68 + --------------------------------------------- 69 + 05 128M 0M 0M 0M 70 + 033 64M 64M 0M 0M 71 + 0113 64M 32M 32M 0M 72 + 01111 32M 32M 32M 32M 73 + 74 + In case that the property is absent, the reset value or what bootloader 75 + sets up in IOMUXC_GPR1[11:0] will be used. 76 + 77 + fsl,burst-clk-enable: 78 + type: boolean 79 + description: 80 + The presence of this property indicates that the weim bus should operate 81 + in Burst Clock Mode. 82 + 83 + fsl,continuous-burst-clk: 84 + type: boolean 85 + description: 86 + Make Burst Clock to output continuous clock. Without this option Burst 87 + Clock will output clock only when necessary. 88 + 89 + patternProperties: 90 + "^.*@[0-7],[0-9a-f]+$": 91 + type: object 92 + description: Devices attached to chip selects are represented as subnodes. 93 + $ref: fsl,imx-weim-peripherals.yaml 94 + additionalProperties: true 95 + required: 96 + - fsl,weim-cs-timing 97 + 98 + required: 99 + - compatible 100 + - reg 101 + - clocks 102 + - "#address-cells" 103 + - "#size-cells" 104 + - ranges 105 + 106 + allOf: 107 + - if: 108 + properties: 109 + compatible: 110 + not: 111 + contains: 112 + enum: 113 + - fsl,imx50-weim 114 + - fsl,imx6q-weim 115 + then: 116 + properties: 117 + fsl,weim-cs-gpr: false 118 + fsl,burst-clk-enable: false 119 + - if: 120 + not: 121 + required: 122 + - fsl,burst-clk-enable 123 + then: 124 + properties: 125 + fsl,continuous-burst-clk: false 126 + - if: 127 + properties: 128 + compatible: 129 + contains: 130 + const: fsl,imx1-weim 131 + then: 132 + patternProperties: 133 + "^.*@[0-7],[0-9a-f]+$": 134 + properties: 135 + fsl,weim-cs-timing: 136 + items: 137 + items: 138 + - description: CSxU 139 + - description: CSxL 140 + - if: 141 + properties: 142 + compatible: 143 + contains: 144 + enum: 145 + - fsl,imx27-weim 146 + - fsl,imx31-weim 147 + - fsl,imx35-weim 148 + then: 149 + patternProperties: 150 + "^.*@[0-7],[0-9a-f]+$": 151 + properties: 152 + fsl,weim-cs-timing: 153 + items: 154 + items: 155 + - description: CSCRxU 156 + - description: CSCRxL 157 + - description: CSCRxA 158 + - if: 159 + properties: 160 + compatible: 161 + contains: 162 + enum: 163 + - fsl,imx50-weim 164 + - fsl,imx51-weim 165 + - fsl,imx6q-weim 166 + - fsl,imx6sx-weim 167 + - fsl,imx6ul-weim 168 + then: 169 + patternProperties: 170 + "^.*@[0-7],[0-9a-f]+$": 171 + properties: 172 + fsl,weim-cs-timing: 173 + items: 174 + items: 175 + - description: CSxGCR1 176 + - description: CSxGCR2 177 + - description: CSxRCR1 178 + - description: CSxRCR2 179 + - description: CSxWCR1 180 + - description: CSxWCR2 181 + 182 + additionalProperties: false 183 + 184 + examples: 185 + - | 186 + memory-controller@21b8000 { 187 + compatible = "fsl,imx6q-weim"; 188 + reg = <0x021b8000 0x4000>; 189 + clocks = <&clks 196>; 190 + #address-cells = <2>; 191 + #size-cells = <1>; 192 + ranges = <0 0 0x08000000 0x08000000>; 193 + fsl,weim-cs-gpr = <&gpr>; 194 + 195 + flash@0,0 { 196 + compatible = "cfi-flash"; 197 + reg = <0 0 0x02000000>; 198 + #address-cells = <1>; 199 + #size-cells = <1>; 200 + bank-width = <2>; 201 + fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000 202 + 0x0000c000 0x1404a38e 0x00000000>; 203 + }; 204 + };
+1
Documentation/devicetree/bindings/memory-controllers/mc-peripheral-props.yaml
··· 37 37 - $ref: ingenic,nemc-peripherals.yaml# 38 38 - $ref: intel,ixp4xx-expansion-peripheral-props.yaml# 39 39 - $ref: ti,gpmc-child.yaml# 40 + - $ref: fsl/fsl,imx-weim-peripherals.yaml 40 41 41 42 additionalProperties: true
+1 -1
drivers/staging/fieldbus/Documentation/devicetree/bindings/fieldbus/arcx,anybus-controller.txt
··· 48 48 ----------------- 49 49 50 50 This example places the bridge on top of the i.MX WEIM parallel bus, see: 51 - Documentation/devicetree/bindings/bus/imx-weim.txt 51 + Documentation/devicetree/bindings/memory-controllers/fsl/fsl,imx-weim.yaml 52 52 53 53 &weim { 54 54 controller@0,0 {