1*4882a593SmuzhiyunDevice tree bindings for i.MX Wireless External Interface Module (WEIM) 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThe term "wireless" does not imply that the WEIM is literally an interface 4*4882a593Smuzhiyunwithout wires. It simply means that this module was originally designed for 5*4882a593Smuzhiyunwireless and mobile applications that use low-power technology. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThe actual devices are instantiated from the child nodes of a WEIM node. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunRequired properties: 10*4882a593Smuzhiyun 11*4882a593Smuzhiyun - compatible: Should contain one of the following: 12*4882a593Smuzhiyun "fsl,imx1-weim" 13*4882a593Smuzhiyun "fsl,imx27-weim" 14*4882a593Smuzhiyun "fsl,imx51-weim" 15*4882a593Smuzhiyun "fsl,imx50-weim" 16*4882a593Smuzhiyun "fsl,imx6q-weim" 17*4882a593Smuzhiyun - reg: A resource specifier for the register space 18*4882a593Smuzhiyun (see the example below) 19*4882a593Smuzhiyun - clocks: the clock, see the example below. 20*4882a593Smuzhiyun - #address-cells: Must be set to 2 to allow memory address translation 21*4882a593Smuzhiyun - #size-cells: Must be set to 1 to allow CS address passing 22*4882a593Smuzhiyun - ranges: Must be set up to reflect the memory layout with four 23*4882a593Smuzhiyun integer values for each chip-select line in use: 24*4882a593Smuzhiyun 25*4882a593Smuzhiyun <cs-number> 0 <physical address of mapping> <size> 26*4882a593Smuzhiyun 27*4882a593SmuzhiyunOptional properties: 28*4882a593Smuzhiyun 29*4882a593Smuzhiyun - fsl,weim-cs-gpr: For "fsl,imx50-weim" and "fsl,imx6q-weim" type of 30*4882a593Smuzhiyun devices, it should be the phandle to the system General 31*4882a593Smuzhiyun Purpose Register controller that contains WEIM CS GPR 32*4882a593Smuzhiyun register, e.g. IOMUXC_GPR1 on i.MX6Q. IOMUXC_GPR1[11:0] 33*4882a593Smuzhiyun should be set up as one of the following 4 possible 34*4882a593Smuzhiyun values depending on the CS space configuration. 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun IOMUXC_GPR1[11:0] CS0 CS1 CS2 CS3 37*4882a593Smuzhiyun --------------------------------------------- 38*4882a593Smuzhiyun 05 128M 0M 0M 0M 39*4882a593Smuzhiyun 033 64M 64M 0M 0M 40*4882a593Smuzhiyun 0113 64M 32M 32M 0M 41*4882a593Smuzhiyun 01111 32M 32M 32M 32M 42*4882a593Smuzhiyun 43*4882a593Smuzhiyun In case that the property is absent, the reset value or 44*4882a593Smuzhiyun what bootloader sets up in IOMUXC_GPR1[11:0] will be 45*4882a593Smuzhiyun used. 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun - fsl,burst-clk-enable For "fsl,imx50-weim" and "fsl,imx6q-weim" type of 48*4882a593Smuzhiyun devices, the presence of this property indicates that 49*4882a593Smuzhiyun the weim bus should operate in Burst Clock Mode. 50*4882a593Smuzhiyun 51*4882a593SmuzhiyunTiming property for child nodes. It is mandatory, not optional. 52*4882a593Smuzhiyun 53*4882a593Smuzhiyun - fsl,weim-cs-timing: The timing array, contains timing values for the 54*4882a593Smuzhiyun child node. We get the CS indexes from the address 55*4882a593Smuzhiyun ranges in the child node's "reg" property. 56*4882a593Smuzhiyun The number of registers depends on the selected chip: 57*4882a593Smuzhiyun For i.MX1, i.MX21 ("fsl,imx1-weim") there are two 58*4882a593Smuzhiyun registers: CSxU, CSxL. 59*4882a593Smuzhiyun For i.MX25, i.MX27, i.MX31 and i.MX35 ("fsl,imx27-weim") 60*4882a593Smuzhiyun there are three registers: CSCRxU, CSCRxL, CSCRxA. 61*4882a593Smuzhiyun For i.MX50, i.MX53 ("fsl,imx50-weim"), 62*4882a593Smuzhiyun i.MX51 ("fsl,imx51-weim") and i.MX6Q ("fsl,imx6q-weim") 63*4882a593Smuzhiyun there are six registers: CSxGCR1, CSxGCR2, CSxRCR1, 64*4882a593Smuzhiyun CSxRCR2, CSxWCR1, CSxWCR2. 65*4882a593Smuzhiyun 66*4882a593SmuzhiyunExample for an imx6q-sabreauto board, the NOR flash connected to the WEIM: 67*4882a593Smuzhiyun 68*4882a593Smuzhiyun weim: weim@21b8000 { 69*4882a593Smuzhiyun compatible = "fsl,imx6q-weim"; 70*4882a593Smuzhiyun reg = <0x021b8000 0x4000>; 71*4882a593Smuzhiyun clocks = <&clks 196>; 72*4882a593Smuzhiyun #address-cells = <2>; 73*4882a593Smuzhiyun #size-cells = <1>; 74*4882a593Smuzhiyun ranges = <0 0 0x08000000 0x08000000>; 75*4882a593Smuzhiyun fsl,weim-cs-gpr = <&gpr>; 76*4882a593Smuzhiyun 77*4882a593Smuzhiyun nor@0,0 { 78*4882a593Smuzhiyun compatible = "cfi-flash"; 79*4882a593Smuzhiyun reg = <0 0 0x02000000>; 80*4882a593Smuzhiyun #address-cells = <1>; 81*4882a593Smuzhiyun #size-cells = <1>; 82*4882a593Smuzhiyun bank-width = <2>; 83*4882a593Smuzhiyun fsl,weim-cs-timing = <0x00620081 0x00000001 0x1c022000 84*4882a593Smuzhiyun 0x0000c000 0x1404a38e 0x00000000>; 85*4882a593Smuzhiyun }; 86*4882a593Smuzhiyun }; 87*4882a593Smuzhiyun 88*4882a593SmuzhiyunExample for an imx6q-based board, a multi-chipselect device connected to WEIM: 89*4882a593Smuzhiyun 90*4882a593SmuzhiyunIn this case, both chip select 0 and 1 will be configured with the same timing 91*4882a593Smuzhiyunarray values. 92*4882a593Smuzhiyun 93*4882a593Smuzhiyun weim: weim@21b8000 { 94*4882a593Smuzhiyun compatible = "fsl,imx6q-weim"; 95*4882a593Smuzhiyun reg = <0x021b8000 0x4000>; 96*4882a593Smuzhiyun clocks = <&clks 196>; 97*4882a593Smuzhiyun #address-cells = <2>; 98*4882a593Smuzhiyun #size-cells = <1>; 99*4882a593Smuzhiyun ranges = <0 0 0x08000000 0x02000000 100*4882a593Smuzhiyun 1 0 0x0a000000 0x02000000 101*4882a593Smuzhiyun 2 0 0x0c000000 0x02000000 102*4882a593Smuzhiyun 3 0 0x0e000000 0x02000000>; 103*4882a593Smuzhiyun fsl,weim-cs-gpr = <&gpr>; 104*4882a593Smuzhiyun 105*4882a593Smuzhiyun acme@0 { 106*4882a593Smuzhiyun compatible = "acme,whatever"; 107*4882a593Smuzhiyun reg = <0 0 0x100>, <0 0x400000 0x800>, 108*4882a593Smuzhiyun <1 0x400000 0x800>; 109*4882a593Smuzhiyun fsl,weim-cs-timing = <0x024400b1 0x00001010 0x20081100 110*4882a593Smuzhiyun 0x00000000 0xa0000240 0x00000000>; 111*4882a593Smuzhiyun }; 112*4882a593Smuzhiyun }; 113