fsl,mxs-pinctrl.txt 5.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. * Freescale MXS Pin Controller
  2. The pins controlled by mxs pin controller are organized in banks, each bank
  3. has 32 pins. Each pin has 4 multiplexing functions, and generally, the 4th
  4. function is GPIO. The configuration on the pins includes drive strength,
  5. voltage and pull-up.
  6. Required properties:
  7. - compatible: "fsl,imx23-pinctrl" or "fsl,imx28-pinctrl"
  8. - reg: Should contain the register physical address and length for the
  9. pin controller.
  10. Please refer to pinctrl-bindings.txt in this directory for details of the
  11. common pinctrl bindings used by client devices.
  12. The node of mxs pin controller acts as a container for an arbitrary number of
  13. subnodes. Each of these subnodes represents some desired configuration for
  14. a group of pins, and only affects those parameters that are explicitly listed.
  15. In other words, a subnode that describes a drive strength parameter implies no
  16. information about pull-up. For this reason, even seemingly boolean values are
  17. actually tristates in this binding: unspecified, off, or on. Unspecified is
  18. represented as an absent property, and off/on are represented as integer
  19. values 0 and 1.
  20. Those subnodes under mxs pin controller node will fall into two categories.
  21. One is to set up a group of pins for a function, both mux selection and pin
  22. configurations, and it's called group node in the binding document. The other
  23. one is to adjust the pin configuration for some particular pins that need a
  24. different configuration than what is defined in group node. The binding
  25. document calls this type of node config node.
  26. On mxs, there is no hardware pin group. The pin group in this binding only
  27. means a group of pins put together for particular peripheral to work in
  28. particular function, like SSP0 functioning as mmc0-8bit. That said, the
  29. group node should include all the pins needed for one function rather than
  30. having these pins defined in several group nodes. It also means each of
  31. "pinctrl-*" phandle in client device node should only have one group node
  32. pointed in there, while the phandle can have multiple config node referenced
  33. there to adjust configurations for some pins in the group.
  34. Required subnode-properties:
  35. - fsl,pinmux-ids: An integer array. Each integer in the array specify a pin
  36. with given mux function, with bank, pin and mux packed as below.
  37. [15..12] : bank number
  38. [11..4] : pin number
  39. [3..0] : mux selection
  40. This integer with mux selection packed is used as an entity by both group
  41. and config nodes to identify a pin. The mux selection in the integer takes
  42. effects only on group node, and will get ignored by driver with config node,
  43. since config node is only meant to set up pin configurations.
  44. Valid values for these integers are listed below.
  45. - reg: Should be the index of the group nodes for same function. This property
  46. is required only for group nodes, and should not be present in any config
  47. nodes.
  48. Optional subnode-properties:
  49. - fsl,drive-strength: Integer.
  50. 0: MXS_DRIVE_4mA
  51. 1: MXS_DRIVE_8mA
  52. 2: MXS_DRIVE_12mA
  53. 3: MXS_DRIVE_16mA
  54. - fsl,voltage: Integer.
  55. 0: MXS_VOLTAGE_LOW - 1.8 V
  56. 1: MXS_VOLTAGE_HIGH - 3.3 V
  57. - fsl,pull-up: Integer.
  58. 0: MXS_PULL_DISABLE - Disable the internal pull-up
  59. 1: MXS_PULL_ENABLE - Enable the internal pull-up
  60. Note that when enabling the pull-up, the internal pad keeper gets disabled.
  61. Also, some pins doesn't have a pull up, in that case, setting the fsl,pull-up
  62. will only disable the internal pad keeper.
  63. Examples:
  64. pinctrl@80018000 {
  65. #address-cells = <1>;
  66. #size-cells = <0>;
  67. compatible = "fsl,imx28-pinctrl";
  68. reg = <0x80018000 2000>;
  69. mmc0_8bit_pins_a: mmc0-8bit@0 {
  70. reg = <0>;
  71. fsl,pinmux-ids = <
  72. MX28_PAD_SSP0_DATA0__SSP0_D0
  73. MX28_PAD_SSP0_DATA1__SSP0_D1
  74. MX28_PAD_SSP0_DATA2__SSP0_D2
  75. MX28_PAD_SSP0_DATA3__SSP0_D3
  76. MX28_PAD_SSP0_DATA4__SSP0_D4
  77. MX28_PAD_SSP0_DATA5__SSP0_D5
  78. MX28_PAD_SSP0_DATA6__SSP0_D6
  79. MX28_PAD_SSP0_DATA7__SSP0_D7
  80. MX28_PAD_SSP0_CMD__SSP0_CMD
  81. MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT
  82. MX28_PAD_SSP0_SCK__SSP0_SCK
  83. >;
  84. fsl,drive-strength = <MXS_DRIVE_4mA>;
  85. fsl,voltage = <MXS_VOLTAGE_HIGH>;
  86. fsl,pull-up = <MXS_PULL_ENABLE>;
  87. };
  88. mmc_cd_cfg: mmc-cd-cfg {
  89. fsl,pinmux-ids = <MX28_PAD_SSP0_DETECT__SSP0_CARD_DETECT>;
  90. fsl,pull-up = <MXS_PULL_DISABLE>;
  91. };
  92. mmc_sck_cfg: mmc-sck-cfg {
  93. fsl,pinmux-ids = <MX28_PAD_SSP0_SCK__SSP0_SCK>;
  94. fsl,drive-strength = <MXS_DRIVE_12mA>;
  95. fsl,pull-up = <MXS_PULL_DISABLE>;
  96. };
  97. };
  98. In this example, group node mmc0-8bit defines a group of pins for mxs SSP0
  99. to function as a 8-bit mmc device, with 8mA, 3.3V and pull-up configurations
  100. applied on all these pins. And config nodes mmc-cd-cfg and mmc-sck-cfg are
  101. adjusting the configuration for pins card-detection and clock from what group
  102. node mmc0-8bit defines. Only the configuration properties to be adjusted need
  103. to be listed in the config nodes.
  104. Valid values for i.MX28/i.MX23 pinmux-id are defined in
  105. arch/arm/boot/dts/imx28-pinfunc.h and arch/arm/boot/dts/imx23-pinfunc.h.
  106. The definitions for the padconfig properties can be found in
  107. arch/arm/boot/dts/mxs-pinfunc.h.