18c2ecf20Sopenharmony_ci* Freescale IOMUX Controller (IOMUXC) for i.MX 28c2ecf20Sopenharmony_ci 38c2ecf20Sopenharmony_ciThe IOMUX Controller (IOMUXC), together with the IOMUX, enables the IC 48c2ecf20Sopenharmony_cito share one PAD to several functional blocks. The sharing is done by 58c2ecf20Sopenharmony_cimultiplexing the PAD input/output signals. For each PAD there are up to 68c2ecf20Sopenharmony_ci8 muxing options (called ALT modes). Since different modules require 78c2ecf20Sopenharmony_cidifferent PAD settings (like pull up, keeper, etc) the IOMUXC controls 88c2ecf20Sopenharmony_cialso the PAD settings parameters. 98c2ecf20Sopenharmony_ci 108c2ecf20Sopenharmony_ciPlease refer to pinctrl-bindings.txt in this directory for details of the 118c2ecf20Sopenharmony_cicommon pinctrl bindings used by client devices, including the meaning of the 128c2ecf20Sopenharmony_ciphrase "pin configuration node". 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ciFreescale IMX pin configuration node is a node of a group of pins which can be 158c2ecf20Sopenharmony_ciused for a specific device or function. This node represents both mux and config 168c2ecf20Sopenharmony_ciof the pins in that group. The 'mux' selects the function mode(also named mux 178c2ecf20Sopenharmony_cimode) this pin can work on and the 'config' configures various pad settings 188c2ecf20Sopenharmony_cisuch as pull-up, open drain, drive strength, etc. 198c2ecf20Sopenharmony_ci 208c2ecf20Sopenharmony_ciRequired properties for iomux controller: 218c2ecf20Sopenharmony_ci- compatible: "fsl,<soc>-iomuxc" 228c2ecf20Sopenharmony_ci Please refer to each fsl,<soc>-pinctrl.txt binding doc for supported SoCs. 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ciRequired properties for pin configuration node: 258c2ecf20Sopenharmony_ci- fsl,pins: each entry consists of 6 integers and represents the mux and config 268c2ecf20Sopenharmony_ci setting for one pin. The first 5 integers <mux_reg conf_reg input_reg mux_val 278c2ecf20Sopenharmony_ci input_val> are specified using a PIN_FUNC_ID macro, which can be found in 288c2ecf20Sopenharmony_ci imx*-pinfunc.h under device tree source folder. The last integer CONFIG is 298c2ecf20Sopenharmony_ci the pad setting value like pull-up on this pin. And that's why fsl,pins entry 308c2ecf20Sopenharmony_ci looks like <PIN_FUNC_ID CONFIG> in the example below. 318c2ecf20Sopenharmony_ci 328c2ecf20Sopenharmony_ciBits used for CONFIG: 338c2ecf20Sopenharmony_ciNO_PAD_CTL(1 << 31): indicate this pin does not need config. 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ciSION(1 << 30): Software Input On Field. 368c2ecf20Sopenharmony_ciForce the selected mux mode input path no matter of MUX_MODE functionality. 378c2ecf20Sopenharmony_ciBy default the input path is determined by functionality of the selected 388c2ecf20Sopenharmony_cimux mode (regular). 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ciOther bits are used for PAD setting. 418c2ecf20Sopenharmony_ciPlease refer to each fsl,<soc>-pinctrl,txt binding doc for SoC specific part 428c2ecf20Sopenharmony_ciof bits definitions. 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ciNOTE: 458c2ecf20Sopenharmony_ciSome requirements for using fsl,imx-pinctrl binding: 468c2ecf20Sopenharmony_ci1. We have pin function node defined under iomux controller node to represent 478c2ecf20Sopenharmony_ci what pinmux functions this SoC supports. 488c2ecf20Sopenharmony_ci2. The pin configuration node intends to work on a specific function should 498c2ecf20Sopenharmony_ci to be defined under that specific function node. 508c2ecf20Sopenharmony_ci The function node's name should represent well about what function 518c2ecf20Sopenharmony_ci this group of pins in this pin configuration node are working on. 528c2ecf20Sopenharmony_ci3. The driver can use the function node's name and pin configuration node's 538c2ecf20Sopenharmony_ci name describe the pin function and group hierarchy. 548c2ecf20Sopenharmony_ci For example, Linux IMX pinctrl driver takes the function node's name 558c2ecf20Sopenharmony_ci as the function name and pin configuration node's name as group name to 568c2ecf20Sopenharmony_ci create the map table. 578c2ecf20Sopenharmony_ci4. Each pin configuration node should have a phandle, devices can set pins 588c2ecf20Sopenharmony_ci configurations by referring to the phandle of that pin configuration node. 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ciExamples: 618c2ecf20Sopenharmony_ciusdhc@219c000 { /* uSDHC4 */ 628c2ecf20Sopenharmony_ci non-removable; 638c2ecf20Sopenharmony_ci vmmc-supply = <®_3p3v>; 648c2ecf20Sopenharmony_ci pinctrl-names = "default"; 658c2ecf20Sopenharmony_ci pinctrl-0 = <&pinctrl_usdhc4_1>; 668c2ecf20Sopenharmony_ci}; 678c2ecf20Sopenharmony_ci 688c2ecf20Sopenharmony_ciiomuxc@20e0000 { 698c2ecf20Sopenharmony_ci compatible = "fsl,imx6q-iomuxc"; 708c2ecf20Sopenharmony_ci reg = <0x020e0000 0x4000>; 718c2ecf20Sopenharmony_ci 728c2ecf20Sopenharmony_ci /* shared pinctrl settings */ 738c2ecf20Sopenharmony_ci usdhc4 { 748c2ecf20Sopenharmony_ci pinctrl_usdhc4_1: usdhc4grp-1 { 758c2ecf20Sopenharmony_ci fsl,pins = < 768c2ecf20Sopenharmony_ci MX6QDL_PAD_SD4_CMD__SD4_CMD 0x17059 778c2ecf20Sopenharmony_ci MX6QDL_PAD_SD4_CLK__SD4_CLK 0x10059 788c2ecf20Sopenharmony_ci MX6QDL_PAD_SD4_DAT0__SD4_DATA0 0x17059 798c2ecf20Sopenharmony_ci MX6QDL_PAD_SD4_DAT1__SD4_DATA1 0x17059 808c2ecf20Sopenharmony_ci MX6QDL_PAD_SD4_DAT2__SD4_DATA2 0x17059 818c2ecf20Sopenharmony_ci MX6QDL_PAD_SD4_DAT3__SD4_DATA3 0x17059 828c2ecf20Sopenharmony_ci MX6QDL_PAD_SD4_DAT4__SD4_DATA4 0x17059 838c2ecf20Sopenharmony_ci MX6QDL_PAD_SD4_DAT5__SD4_DATA5 0x17059 848c2ecf20Sopenharmony_ci MX6QDL_PAD_SD4_DAT6__SD4_DATA6 0x17059 858c2ecf20Sopenharmony_ci MX6QDL_PAD_SD4_DAT7__SD4_DATA7 0x17059 868c2ecf20Sopenharmony_ci >; 878c2ecf20Sopenharmony_ci }; 888c2ecf20Sopenharmony_ci .... 898c2ecf20Sopenharmony_ci}; 908c2ecf20Sopenharmony_ciRefer to the IOMUXC controller chapter in imx6q datasheet, 918c2ecf20Sopenharmony_ci0x17059 means enable hysteresis, 47KOhm Pull Up, 50Mhz speed, 928c2ecf20Sopenharmony_ci80Ohm driver strength and Fast Slew Rate. 938c2ecf20Sopenharmony_ciUser should refer to each SoC spec to set the correct value. 94