162306a36Sopenharmony_ciDevice tree bindings for i.MX Wireless External Interface Module (WEIM)
262306a36Sopenharmony_ci
362306a36Sopenharmony_ciThe term "wireless" does not imply that the WEIM is literally an interface
462306a36Sopenharmony_ciwithout wires. It simply means that this module was originally designed for
562306a36Sopenharmony_ciwireless and mobile applications that use low-power technology.
662306a36Sopenharmony_ci
762306a36Sopenharmony_ciThe actual devices are instantiated from the child nodes of a WEIM node.
862306a36Sopenharmony_ci
962306a36Sopenharmony_ciRequired properties:
1062306a36Sopenharmony_ci
1162306a36Sopenharmony_ci - compatible:		Should contain one of the following:
1262306a36Sopenharmony_ci			  "fsl,imx1-weim"
1362306a36Sopenharmony_ci			  "fsl,imx27-weim"
1462306a36Sopenharmony_ci			  "fsl,imx51-weim"
1562306a36Sopenharmony_ci			  "fsl,imx50-weim"
1662306a36Sopenharmony_ci			  "fsl,imx6q-weim"
1762306a36Sopenharmony_ci - reg:			A resource specifier for the register space
1862306a36Sopenharmony_ci			(see the example below)
1962306a36Sopenharmony_ci - clocks:		the clock, see the example below.
2062306a36Sopenharmony_ci - #address-cells:	Must be set to 2 to allow memory address translation
2162306a36Sopenharmony_ci - #size-cells:		Must be set to 1 to allow CS address passing
2262306a36Sopenharmony_ci - ranges:		Must be set up to reflect the memory layout with four
2362306a36Sopenharmony_ci			integer values for each chip-select line in use:
2462306a36Sopenharmony_ci
2562306a36Sopenharmony_ci			   <cs-number> 0 <physical address of mapping> <size>
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ciOptional properties:
2862306a36Sopenharmony_ci
2962306a36Sopenharmony_ci - fsl,weim-cs-gpr:	For "fsl,imx50-weim" and "fsl,imx6q-weim" type of
3062306a36Sopenharmony_ci			devices, it should be the phandle to the system General
3162306a36Sopenharmony_ci			Purpose Register controller that contains WEIM CS GPR
3262306a36Sopenharmony_ci			register, e.g. IOMUXC_GPR1 on i.MX6Q.  IOMUXC_GPR1[11:0]
3362306a36Sopenharmony_ci			should be set up as one of the following 4 possible
3462306a36Sopenharmony_ci			values depending on the CS space configuration.
3562306a36Sopenharmony_ci
3662306a36Sopenharmony_ci			IOMUXC_GPR1[11:0]    CS0    CS1    CS2    CS3
3762306a36Sopenharmony_ci			---------------------------------------------
3862306a36Sopenharmony_ci				05	    128M     0M     0M     0M
3962306a36Sopenharmony_ci				033          64M    64M     0M     0M
4062306a36Sopenharmony_ci				0113         64M    32M    32M     0M
4162306a36Sopenharmony_ci				01111        32M    32M    32M    32M
4262306a36Sopenharmony_ci
4362306a36Sopenharmony_ci			In case that the property is absent, the reset value or
4462306a36Sopenharmony_ci			what bootloader sets up in IOMUXC_GPR1[11:0] will be
4562306a36Sopenharmony_ci			used.
4662306a36Sopenharmony_ci
4762306a36Sopenharmony_ci - fsl,burst-clk-enable	For "fsl,imx50-weim" and "fsl,imx6q-weim" type of
4862306a36Sopenharmony_ci			devices, the presence of this property indicates that
4962306a36Sopenharmony_ci			the weim bus should operate in Burst Clock Mode.
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci - fsl,continuous-burst-clk	Make Burst Clock to output continuous clock.
5262306a36Sopenharmony_ci			Without this option Burst Clock will output clock
5362306a36Sopenharmony_ci			only when necessary. This takes effect only if
5462306a36Sopenharmony_ci			"fsl,burst-clk-enable" is set.
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ciTiming property for child nodes. It is mandatory, not optional.
5762306a36Sopenharmony_ci
5862306a36Sopenharmony_ci - fsl,weim-cs-timing:	The timing array, contains timing values for the
5962306a36Sopenharmony_ci			child node. We get the CS indexes from the address
6062306a36Sopenharmony_ci			ranges in the child node's "reg" property.
6162306a36Sopenharmony_ci			The number of registers depends on the selected chip:
6262306a36Sopenharmony_ci			For i.MX1, i.MX21 ("fsl,imx1-weim") there are two
6362306a36Sopenharmony_ci			registers: CSxU, CSxL.
6462306a36Sopenharmony_ci			For i.MX25, i.MX27, i.MX31 and i.MX35 ("fsl,imx27-weim")
6562306a36Sopenharmony_ci			there are three registers: CSCRxU, CSCRxL, CSCRxA.
6662306a36Sopenharmony_ci			For i.MX50, i.MX53 ("fsl,imx50-weim"),
6762306a36Sopenharmony_ci			i.MX51 ("fsl,imx51-weim") and i.MX6Q ("fsl,imx6q-weim")
6862306a36Sopenharmony_ci			there are six registers: CSxGCR1, CSxGCR2, CSxRCR1,
6962306a36Sopenharmony_ci			CSxRCR2, CSxWCR1, CSxWCR2.
7062306a36Sopenharmony_ci
7162306a36Sopenharmony_ciExample for an imx6q-sabreauto board, the NOR flash connected to the WEIM:
7262306a36Sopenharmony_ci
7362306a36Sopenharmony_ci	weim: weim@21b8000 {
7462306a36Sopenharmony_ci		compatible = "fsl,imx6q-weim";
7562306a36Sopenharmony_ci		reg = <0x021b8000 0x4000>;
7662306a36Sopenharmony_ci		clocks = <&clks 196>;
7762306a36Sopenharmony_ci		#address-cells = <2>;
7862306a36Sopenharmony_ci		#size-cells = <1>;
7962306a36Sopenharmony_ci		ranges = <0 0 0x08000000 0x08000000>;
8062306a36Sopenharmony_ci		fsl,weim-cs-gpr = <&gpr>;
8162306a36Sopenharmony_ci
8262306a36Sopenharmony_ci		nor@0,0 {
8362306a36Sopenharmony_ci			compatible = "cfi-flash";
8462306a36Sopenharmony_ci			reg = <0 0 0x02000000>;
8562306a36Sopenharmony_ci			#address-cells = <1>;
8662306a36Sopenharmony_ci			#size-cells = <1>;
8762306a36Sopenharmony_ci			bank-width = <2>;
8862306a36Sopenharmony_ci			fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000
8962306a36Sopenharmony_ci					0x0000c000 0x1404a38e 0x00000000>;
9062306a36Sopenharmony_ci		};
9162306a36Sopenharmony_ci	};
9262306a36Sopenharmony_ci
9362306a36Sopenharmony_ciExample for an imx6q-based board, a multi-chipselect device connected to WEIM:
9462306a36Sopenharmony_ci
9562306a36Sopenharmony_ciIn this case, both chip select 0 and 1 will be configured with the same timing
9662306a36Sopenharmony_ciarray values.
9762306a36Sopenharmony_ci
9862306a36Sopenharmony_ci	weim: weim@21b8000 {
9962306a36Sopenharmony_ci		compatible = "fsl,imx6q-weim";
10062306a36Sopenharmony_ci		reg = <0x021b8000 0x4000>;
10162306a36Sopenharmony_ci		clocks = <&clks 196>;
10262306a36Sopenharmony_ci		#address-cells = <2>;
10362306a36Sopenharmony_ci		#size-cells = <1>;
10462306a36Sopenharmony_ci		ranges = <0 0 0x08000000 0x02000000
10562306a36Sopenharmony_ci			  1 0 0x0a000000 0x02000000
10662306a36Sopenharmony_ci			  2 0 0x0c000000 0x02000000
10762306a36Sopenharmony_ci			  3 0 0x0e000000 0x02000000>;
10862306a36Sopenharmony_ci		fsl,weim-cs-gpr = <&gpr>;
10962306a36Sopenharmony_ci
11062306a36Sopenharmony_ci		acme@0 {
11162306a36Sopenharmony_ci			compatible = "acme,whatever";
11262306a36Sopenharmony_ci			reg = <0 0 0x100>, <0 0x400000 0x800>,
11362306a36Sopenharmony_ci				<1 0x400000 0x800>;
11462306a36Sopenharmony_ci			fsl,weim-cs-timing = <0x024400b1 0x00001010 0x20081100
11562306a36Sopenharmony_ci				0x00000000 0xa0000240 0x00000000>;
11662306a36Sopenharmony_ci		};
11762306a36Sopenharmony_ci	};
118