img,tz1090-pdc-pinctrl.txt 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127
  1. ImgTec TZ1090 PDC pin controller
  2. Required properties:
  3. - compatible: "img,tz1090-pdc-pinctrl"
  4. - reg: Should contain the register physical address and length of the
  5. SOC_GPIO_CONTROL registers in the PDC register region.
  6. Please refer to pinctrl-bindings.txt in this directory for details of the
  7. common pinctrl bindings used by client devices, including the meaning of the
  8. phrase "pin configuration node".
  9. TZ1090-PDC's pin configuration nodes act as a container for an arbitrary number
  10. of subnodes. Each of these subnodes represents some desired configuration for a
  11. pin, a group, or a list of pins or groups. This configuration can include the
  12. mux function to select on those pin(s)/group(s), and various pin configuration
  13. parameters, such as pull-up, drive strength, etc.
  14. The name of each subnode is not important; all subnodes should be enumerated
  15. and processed purely based on their content.
  16. Each subnode only affects those parameters that are explicitly listed. In
  17. other words, a subnode that lists a mux function but no pin configuration
  18. parameters implies no information about any pin configuration parameters.
  19. Similarly, a pin subnode that describes a pullup parameter implies no
  20. information about e.g. the mux function. For this reason, even seemingly boolean
  21. values are actually tristates in this binding: unspecified, off, or on.
  22. Unspecified is represented as an absent property, and off/on are represented as
  23. integer values 0 and 1.
  24. Required subnode-properties:
  25. - tz1090,pins : An array of strings. Each string contains the name of a pin or
  26. group. Valid values for these names are listed below.
  27. Optional subnode-properties:
  28. - tz1090,function: A string containing the name of the function to mux to the
  29. pin or group. Valid values for function names are listed below, including
  30. which pingroups can be muxed to them.
  31. - supported generic pinconfig properties (for further details see
  32. Documentation/devicetree/bindings/pinctrl/pinctrl-bindings.txt):
  33. - bias-disable
  34. - bias-high-impedance
  35. - bias-bus-hold
  36. - bias-pull-up
  37. - bias-pull-down
  38. - input-schmitt-enable
  39. - input-schmitt-disable
  40. - drive-strength: Integer, control drive strength of pins in mA.
  41. 2: 2mA
  42. 4: 4mA
  43. 8: 8mA
  44. 12: 12mA
  45. - low-power-enable: Flag, power-on-start weak pull-down for invalid power.
  46. - low-power-disable: Flag, power-on-start weak pull-down disabled.
  47. Note that many of these properties are only valid for certain specific pins
  48. or groups. See the TZ1090 TRM for complete details regarding which groups
  49. support which functionality. The Linux pinctrl driver may also be a useful
  50. reference.
  51. Valid values for pin and group names are:
  52. pins:
  53. These all support bias-high-impediance, bias-pull-up, bias-pull-down, and
  54. bias-bus-hold (which can also be provided to any of the groups below to set
  55. it for all gpio pins in that group).
  56. gpio0, gpio1, sys_wake0, sys_wake1, sys_wake2, ir_data, ext_power.
  57. mux groups:
  58. These all support function.
  59. gpio0
  60. pins: gpio0.
  61. function: ir_mod_stable_out.
  62. gpio1
  63. pins: gpio1.
  64. function: ir_mod_power_out.
  65. drive groups:
  66. These support input-schmitt-enable, input-schmitt-disable,
  67. drive-strength, low-power-enable, and low-power-disable.
  68. pdc
  69. pins: gpio0, gpio1, sys_wake0, sys_wake1, sys_wake2, ir_data,
  70. ext_power.
  71. Example:
  72. pinctrl_pdc: pinctrl@02006500 {
  73. #gpio-range-cells = <3>;
  74. compatible = "img,tz1090-pdc-pinctrl";
  75. reg = <0x02006500 0x100>;
  76. };
  77. Example board file extracts:
  78. &pinctrl_pdc {
  79. pinctrl-names = "default";
  80. pinctrl-0 = <&syswake_default>;
  81. syswake_default: syswakes {
  82. syswake_cfg {
  83. tz1090,pins = "sys_wake0",
  84. "sys_wake1",
  85. "sys_wake2";
  86. pull-up;
  87. };
  88. };
  89. irmod_default: irmod {
  90. gpio0_cfg {
  91. tz1090,pins = "gpio0";
  92. tz1090,function = "ir_mod_stable_out";
  93. };
  94. gpio1_cfg {
  95. tz1090,pins = "gpio1";
  96. tz1090,function = "ir_mod_power_out";
  97. };
  98. };
  99. };
  100. ir: ir@02006200 {
  101. pinctrl-names = "default";
  102. pinctrl-0 = <&irmod_default>;
  103. };