fsl,imx-pinctrl.txt 4.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. * Freescale IOMUX Controller (IOMUXC) for i.MX
  2. The IOMUX Controller (IOMUXC), together with the IOMUX, enables the IC
  3. to share one PAD to several functional blocks. The sharing is done by
  4. multiplexing the PAD input/output signals. For each PAD there are up to
  5. 8 muxing options (called ALT modes). Since different modules require
  6. different PAD settings (like pull up, keeper, etc) the IOMUXC controls
  7. also the PAD settings parameters.
  8. Please refer to pinctrl-bindings.txt in this directory for details of the
  9. common pinctrl bindings used by client devices, including the meaning of the
  10. phrase "pin configuration node".
  11. Freescale IMX pin configuration node is a node of a group of pins which can be
  12. used for a specific device or function. This node represents both mux and config
  13. of the pins in that group. The 'mux' selects the function mode(also named mux
  14. mode) this pin can work on and the 'config' configures various pad settings
  15. such as pull-up, open drain, drive strength, etc.
  16. Required properties for iomux controller:
  17. - compatible: "fsl,<soc>-iomuxc"
  18. Please refer to each fsl,<soc>-pinctrl.txt binding doc for supported SoCs.
  19. Required properties for pin configuration node:
  20. - fsl,pins: two integers array, represents a group of pins mux and config
  21. setting. The format is fsl,pins = <PIN_FUNC_ID CONFIG>, PIN_FUNC_ID is a
  22. pin working on a specific function, which consists of a tuple of
  23. <mux_reg conf_reg input_reg mux_val input_val>. CONFIG is the pad setting
  24. value like pull-up on this pin.
  25. Bits used for CONFIG:
  26. NO_PAD_CTL(1 << 31): indicate this pin does not need config.
  27. SION(1 << 30): Software Input On Field.
  28. Force the selected mux mode input path no matter of MUX_MODE functionality.
  29. By default the input path is determined by functionality of the selected
  30. mux mode (regular).
  31. Other bits are used for PAD setting.
  32. Please refer to each fsl,<soc>-pinctrl,txt binding doc for SoC specific part
  33. of bits definitions.
  34. NOTE:
  35. Some requirements for using fsl,imx-pinctrl binding:
  36. 1. We have pin function node defined under iomux controller node to represent
  37. what pinmux functions this SoC supports.
  38. 2. The pin configuration node intends to work on a specific function should
  39. to be defined under that specific function node.
  40. The function node's name should represent well about what function
  41. this group of pins in this pin configuration node are working on.
  42. 3. The driver can use the function node's name and pin configuration node's
  43. name describe the pin function and group hierarchy.
  44. For example, Linux IMX pinctrl driver takes the function node's name
  45. as the function name and pin configuration node's name as group name to
  46. create the map table.
  47. 4. Each pin configuration node should have a phandle, devices can set pins
  48. configurations by referring to the phandle of that pin configuration node.
  49. Examples:
  50. usdhc@0219c000 { /* uSDHC4 */
  51. non-removable;
  52. vmmc-supply = <&reg_3p3v>;
  53. status = "okay";
  54. pinctrl-names = "default";
  55. pinctrl-0 = <&pinctrl_usdhc4_1>;
  56. };
  57. iomuxc@020e0000 {
  58. compatible = "fsl,imx6q-iomuxc";
  59. reg = <0x020e0000 0x4000>;
  60. /* shared pinctrl settings */
  61. usdhc4 {
  62. pinctrl_usdhc4_1: usdhc4grp-1 {
  63. fsl,pins = <1386 0x17059 /* MX6Q_PAD_SD4_CMD__USDHC4_CMD */
  64. 1392 0x10059 /* MX6Q_PAD_SD4_CLK__USDHC4_CLK */
  65. 1462 0x17059 /* MX6Q_PAD_SD4_DAT0__USDHC4_DAT0 */
  66. 1470 0x17059 /* MX6Q_PAD_SD4_DAT1__USDHC4_DAT1 */
  67. 1478 0x17059 /* MX6Q_PAD_SD4_DAT2__USDHC4_DAT2 */
  68. 1486 0x17059 /* MX6Q_PAD_SD4_DAT3__USDHC4_DAT3 */
  69. 1493 0x17059 /* MX6Q_PAD_SD4_DAT4__USDHC4_DAT4 */
  70. 1501 0x17059 /* MX6Q_PAD_SD4_DAT5__USDHC4_DAT5 */
  71. 1509 0x17059 /* MX6Q_PAD_SD4_DAT6__USDHC4_DAT6 */
  72. 1517 0x17059>; /* MX6Q_PAD_SD4_DAT7__USDHC4_DAT7 */
  73. };
  74. };
  75. ....
  76. };
  77. Refer to the IOMUXC controller chapter in imx6q datasheet,
  78. 0x17059 means enable hysteresis, 47KOhm Pull Up, 50Mhz speed,
  79. 80Ohm driver strength and Fast Slew Rate.
  80. User should refer to each SoC spec to set the correct value.
  81. TODO: when dtc macro support is available, we can change above raw data
  82. to dt macro which can get better readability in dts file.