18c2ecf20Sopenharmony_ciDevice tree bindings for i.MX Wireless External Interface Module (WEIM)
28c2ecf20Sopenharmony_ci
38c2ecf20Sopenharmony_ciThe term "wireless" does not imply that the WEIM is literally an interface
48c2ecf20Sopenharmony_ciwithout wires. It simply means that this module was originally designed for
58c2ecf20Sopenharmony_ciwireless and mobile applications that use low-power technology.
68c2ecf20Sopenharmony_ci
78c2ecf20Sopenharmony_ciThe actual devices are instantiated from the child nodes of a WEIM node.
88c2ecf20Sopenharmony_ci
98c2ecf20Sopenharmony_ciRequired properties:
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ci - compatible:		Should contain one of the following:
128c2ecf20Sopenharmony_ci			  "fsl,imx1-weim"
138c2ecf20Sopenharmony_ci			  "fsl,imx27-weim"
148c2ecf20Sopenharmony_ci			  "fsl,imx51-weim"
158c2ecf20Sopenharmony_ci			  "fsl,imx50-weim"
168c2ecf20Sopenharmony_ci			  "fsl,imx6q-weim"
178c2ecf20Sopenharmony_ci - reg:			A resource specifier for the register space
188c2ecf20Sopenharmony_ci			(see the example below)
198c2ecf20Sopenharmony_ci - clocks:		the clock, see the example below.
208c2ecf20Sopenharmony_ci - #address-cells:	Must be set to 2 to allow memory address translation
218c2ecf20Sopenharmony_ci - #size-cells:		Must be set to 1 to allow CS address passing
228c2ecf20Sopenharmony_ci - ranges:		Must be set up to reflect the memory layout with four
238c2ecf20Sopenharmony_ci			integer values for each chip-select line in use:
248c2ecf20Sopenharmony_ci
258c2ecf20Sopenharmony_ci			   <cs-number> 0 <physical address of mapping> <size>
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciOptional properties:
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ci - fsl,weim-cs-gpr:	For "fsl,imx50-weim" and "fsl,imx6q-weim" type of
308c2ecf20Sopenharmony_ci			devices, it should be the phandle to the system General
318c2ecf20Sopenharmony_ci			Purpose Register controller that contains WEIM CS GPR
328c2ecf20Sopenharmony_ci			register, e.g. IOMUXC_GPR1 on i.MX6Q.  IOMUXC_GPR1[11:0]
338c2ecf20Sopenharmony_ci			should be set up as one of the following 4 possible
348c2ecf20Sopenharmony_ci			values depending on the CS space configuration.
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ci			IOMUXC_GPR1[11:0]    CS0    CS1    CS2    CS3
378c2ecf20Sopenharmony_ci			---------------------------------------------
388c2ecf20Sopenharmony_ci				05	    128M     0M     0M     0M
398c2ecf20Sopenharmony_ci				033          64M    64M     0M     0M
408c2ecf20Sopenharmony_ci				0113         64M    32M    32M     0M
418c2ecf20Sopenharmony_ci				01111        32M    32M    32M    32M
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ci			In case that the property is absent, the reset value or
448c2ecf20Sopenharmony_ci			what bootloader sets up in IOMUXC_GPR1[11:0] will be
458c2ecf20Sopenharmony_ci			used.
468c2ecf20Sopenharmony_ci
478c2ecf20Sopenharmony_ci - fsl,burst-clk-enable	For "fsl,imx50-weim" and "fsl,imx6q-weim" type of
488c2ecf20Sopenharmony_ci			devices, the presence of this property indicates that
498c2ecf20Sopenharmony_ci			the weim bus should operate in Burst Clock Mode.
508c2ecf20Sopenharmony_ci
518c2ecf20Sopenharmony_ciTiming property for child nodes. It is mandatory, not optional.
528c2ecf20Sopenharmony_ci
538c2ecf20Sopenharmony_ci - fsl,weim-cs-timing:	The timing array, contains timing values for the
548c2ecf20Sopenharmony_ci			child node. We get the CS indexes from the address
558c2ecf20Sopenharmony_ci			ranges in the child node's "reg" property.
568c2ecf20Sopenharmony_ci			The number of registers depends on the selected chip:
578c2ecf20Sopenharmony_ci			For i.MX1, i.MX21 ("fsl,imx1-weim") there are two
588c2ecf20Sopenharmony_ci			registers: CSxU, CSxL.
598c2ecf20Sopenharmony_ci			For i.MX25, i.MX27, i.MX31 and i.MX35 ("fsl,imx27-weim")
608c2ecf20Sopenharmony_ci			there are three registers: CSCRxU, CSCRxL, CSCRxA.
618c2ecf20Sopenharmony_ci			For i.MX50, i.MX53 ("fsl,imx50-weim"),
628c2ecf20Sopenharmony_ci			i.MX51 ("fsl,imx51-weim") and i.MX6Q ("fsl,imx6q-weim")
638c2ecf20Sopenharmony_ci			there are six registers: CSxGCR1, CSxGCR2, CSxRCR1,
648c2ecf20Sopenharmony_ci			CSxRCR2, CSxWCR1, CSxWCR2.
658c2ecf20Sopenharmony_ci
668c2ecf20Sopenharmony_ciExample for an imx6q-sabreauto board, the NOR flash connected to the WEIM:
678c2ecf20Sopenharmony_ci
688c2ecf20Sopenharmony_ci	weim: weim@21b8000 {
698c2ecf20Sopenharmony_ci		compatible = "fsl,imx6q-weim";
708c2ecf20Sopenharmony_ci		reg = <0x021b8000 0x4000>;
718c2ecf20Sopenharmony_ci		clocks = <&clks 196>;
728c2ecf20Sopenharmony_ci		#address-cells = <2>;
738c2ecf20Sopenharmony_ci		#size-cells = <1>;
748c2ecf20Sopenharmony_ci		ranges = <0 0 0x08000000 0x08000000>;
758c2ecf20Sopenharmony_ci		fsl,weim-cs-gpr = <&gpr>;
768c2ecf20Sopenharmony_ci
778c2ecf20Sopenharmony_ci		nor@0,0 {
788c2ecf20Sopenharmony_ci			compatible = "cfi-flash";
798c2ecf20Sopenharmony_ci			reg = <0 0 0x02000000>;
808c2ecf20Sopenharmony_ci			#address-cells = <1>;
818c2ecf20Sopenharmony_ci			#size-cells = <1>;
828c2ecf20Sopenharmony_ci			bank-width = <2>;
838c2ecf20Sopenharmony_ci			fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000
848c2ecf20Sopenharmony_ci					0x0000c000 0x1404a38e 0x00000000>;
858c2ecf20Sopenharmony_ci		};
868c2ecf20Sopenharmony_ci	};
878c2ecf20Sopenharmony_ci
888c2ecf20Sopenharmony_ciExample for an imx6q-based board, a multi-chipselect device connected to WEIM:
898c2ecf20Sopenharmony_ci
908c2ecf20Sopenharmony_ciIn this case, both chip select 0 and 1 will be configured with the same timing
918c2ecf20Sopenharmony_ciarray values.
928c2ecf20Sopenharmony_ci
938c2ecf20Sopenharmony_ci	weim: weim@21b8000 {
948c2ecf20Sopenharmony_ci		compatible = "fsl,imx6q-weim";
958c2ecf20Sopenharmony_ci		reg = <0x021b8000 0x4000>;
968c2ecf20Sopenharmony_ci		clocks = <&clks 196>;
978c2ecf20Sopenharmony_ci		#address-cells = <2>;
988c2ecf20Sopenharmony_ci		#size-cells = <1>;
998c2ecf20Sopenharmony_ci		ranges = <0 0 0x08000000 0x02000000
1008c2ecf20Sopenharmony_ci			  1 0 0x0a000000 0x02000000
1018c2ecf20Sopenharmony_ci			  2 0 0x0c000000 0x02000000
1028c2ecf20Sopenharmony_ci			  3 0 0x0e000000 0x02000000>;
1038c2ecf20Sopenharmony_ci		fsl,weim-cs-gpr = <&gpr>;
1048c2ecf20Sopenharmony_ci
1058c2ecf20Sopenharmony_ci		acme@0 {
1068c2ecf20Sopenharmony_ci			compatible = "acme,whatever";
1078c2ecf20Sopenharmony_ci			reg = <0 0 0x100>, <0 0x400000 0x800>,
1088c2ecf20Sopenharmony_ci				<1 0x400000 0x800>;
1098c2ecf20Sopenharmony_ci			fsl,weim-cs-timing = <0x024400b1 0x00001010 0x20081100
1108c2ecf20Sopenharmony_ci				0x00000000 0xa0000240 0x00000000>;
1118c2ecf20Sopenharmony_ci		};
1128c2ecf20Sopenharmony_ci	};
113