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