1*4882a593Smuzhiyun* Freescale IOMUX Controller (IOMUXC) for i.MX 2*4882a593Smuzhiyun 3*4882a593SmuzhiyunThe IOMUX Controller (IOMUXC), together with the IOMUX, enables the IC 4*4882a593Smuzhiyunto share one PAD to several functional blocks. The sharing is done by 5*4882a593Smuzhiyunmultiplexing the PAD input/output signals. For each PAD there are up to 6*4882a593Smuzhiyun8 muxing options (called ALT modes). Since different modules require 7*4882a593Smuzhiyundifferent PAD settings (like pull up, keeper, etc) the IOMUXC controls 8*4882a593Smuzhiyunalso the PAD settings parameters. 9*4882a593Smuzhiyun 10*4882a593SmuzhiyunPlease refer to pinctrl-bindings.txt in this directory for details of the 11*4882a593Smuzhiyuncommon pinctrl bindings used by client devices, including the meaning of the 12*4882a593Smuzhiyunphrase "pin configuration node". 13*4882a593Smuzhiyun 14*4882a593SmuzhiyunFreescale IMX pin configuration node is a node of a group of pins which can be 15*4882a593Smuzhiyunused for a specific device or function. This node represents both mux and config 16*4882a593Smuzhiyunof the pins in that group. The 'mux' selects the function mode(also named mux 17*4882a593Smuzhiyunmode) this pin can work on and the 'config' configures various pad settings 18*4882a593Smuzhiyunsuch as pull-up, open drain, drive strength, etc. 19*4882a593Smuzhiyun 20*4882a593SmuzhiyunRequired properties for iomux controller: 21*4882a593Smuzhiyun- compatible: "fsl,<soc>-iomuxc" 22*4882a593Smuzhiyun Please refer to each fsl,<soc>-pinctrl.txt binding doc for supported SoCs. 23*4882a593Smuzhiyun 24*4882a593SmuzhiyunRequired properties for pin configuration node: 25*4882a593Smuzhiyun- fsl,pins: each entry consists of 6 integers and represents the mux and config 26*4882a593Smuzhiyun setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val 27*4882a593Smuzhiyun input_val> are specified using a PIN_FUNC_ID macro, which can be found in 28*4882a593Smuzhiyun imx*-pinfunc.h under device tree source folder. The last integer CONFIG is 29*4882a593Smuzhiyun the pad setting value like pull-up on this pin. And that's why fsl,pins entry 30*4882a593Smuzhiyun looks like <PIN_FUNC_ID CONFIG> in the example below. 31*4882a593Smuzhiyun 32*4882a593SmuzhiyunBits used for CONFIG: 33*4882a593SmuzhiyunNO_PAD_CTL(1 << 31): indicate this pin does not need config. 34*4882a593Smuzhiyun 35*4882a593SmuzhiyunSION(1 << 30): Software Input On Field. 36*4882a593SmuzhiyunForce the selected mux mode input path no matter of MUX_MODE functionality. 37*4882a593SmuzhiyunBy default the input path is determined by functionality of the selected 38*4882a593Smuzhiyunmux mode (regular). 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunOther bits are used for PAD setting. 41*4882a593SmuzhiyunPlease refer to each fsl,<soc>-pinctrl,txt binding doc for SoC specific part 42*4882a593Smuzhiyunof bits definitions. 43*4882a593Smuzhiyun 44*4882a593SmuzhiyunNOTE: 45*4882a593SmuzhiyunSome requirements for using fsl,imx-pinctrl binding: 46*4882a593Smuzhiyun1. We have pin function node defined under iomux controller node to represent 47*4882a593Smuzhiyun what pinmux functions this SoC supports. 48*4882a593Smuzhiyun2. The pin configuration node intends to work on a specific function should 49*4882a593Smuzhiyun to be defined under that specific function node. 50*4882a593Smuzhiyun The function node's name should represent well about what function 51*4882a593Smuzhiyun this group of pins in this pin configuration node are working on. 52*4882a593Smuzhiyun3. The driver can use the function node's name and pin configuration node's 53*4882a593Smuzhiyun name describe the pin function and group hierarchy. 54*4882a593Smuzhiyun For example, Linux IMX pinctrl driver takes the function node's name 55*4882a593Smuzhiyun as the function name and pin configuration node's name as group name to 56*4882a593Smuzhiyun create the map table. 57*4882a593Smuzhiyun4. Each pin configuration node should have a phandle, devices can set pins 58*4882a593Smuzhiyun configurations by referring to the phandle of that pin configuration node. 59*4882a593Smuzhiyun 60*4882a593SmuzhiyunExamples: 61*4882a593Smuzhiyunusdhc@219c000 { /* uSDHC4 */ 62*4882a593Smuzhiyun non-removable; 63*4882a593Smuzhiyun vmmc-supply = <®_3p3v>; 64*4882a593Smuzhiyun pinctrl-names = "default"; 65*4882a593Smuzhiyun pinctrl-0 = <&pinctrl_usdhc4_1>; 66*4882a593Smuzhiyun}; 67*4882a593Smuzhiyun 68*4882a593Smuzhiyuniomuxc@20e0000 { 69*4882a593Smuzhiyun compatible = "fsl,imx6q-iomuxc"; 70*4882a593Smuzhiyun reg = <0x020e0000 0x4000>; 71*4882a593Smuzhiyun 72*4882a593Smuzhiyun /* shared pinctrl settings */ 73*4882a593Smuzhiyun usdhc4 { 74*4882a593Smuzhiyun pinctrl_usdhc4_1: usdhc4grp-1 { 75*4882a593Smuzhiyun fsl,pins = < 76*4882a593Smuzhiyun MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059 77*4882a593Smuzhiyun MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059 78*4882a593Smuzhiyun MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059 79*4882a593Smuzhiyun MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059 80*4882a593Smuzhiyun MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059 81*4882a593Smuzhiyun MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059 82*4882a593Smuzhiyun MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059 83*4882a593Smuzhiyun MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059 84*4882a593Smuzhiyun MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059 85*4882a593Smuzhiyun MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059 86*4882a593Smuzhiyun >; 87*4882a593Smuzhiyun }; 88*4882a593Smuzhiyun .... 89*4882a593Smuzhiyun}; 90*4882a593SmuzhiyunRefer to the IOMUXC controller chapter in imx6q datasheet, 91*4882a593Smuzhiyun0x17059 means enable hysteresis, 47KOhm Pull Up, 50Mhz speed, 92*4882a593Smuzhiyun80Ohm driver strength and Fast Slew Rate. 93*4882a593SmuzhiyunUser should refer to each SoC spec to set the correct value. 94