img,pistachio-pinctrl.txt 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217
  1. Imagination Technologies Pistachio SoC pin controllers
  2. ======================================================
  3. The pin controllers on Pistachio are a combined GPIO controller, (GPIO)
  4. interrupt controller, and pinmux + pinconf device. The system ("east") pin
  5. controller on Pistachio has 99 pins, 90 of which are MFIOs which can be
  6. configured as GPIOs. The 90 GPIOs are divided into 6 banks of up to 16 GPIOs
  7. each. The GPIO banks are represented as sub-nodes of the pad controller node.
  8. Please refer to pinctrl-bindings.txt, ../gpio/gpio.txt, and
  9. ../interrupt-controller/interrupts.txt for generic information regarding
  10. pin controller, GPIO, and interrupt bindings.
  11. Required properties for pin controller node:
  12. --------------------------------------------
  13. - compatible: "img,pistachio-system-pinctrl".
  14. - reg: Address range of the pinctrl registers.
  15. Required properties for GPIO bank sub-nodes:
  16. --------------------------------------------
  17. - interrupts: Interrupt line for the GPIO bank.
  18. - gpio-controller: Indicates the device is a GPIO controller.
  19. - #gpio-cells: Must be two. The first cell is the GPIO pin number and the
  20. second cell indicates the polarity. See <dt-bindings/gpio/gpio.h> for
  21. a list of possible values.
  22. - interrupt-controller: Indicates the device is an interrupt controller.
  23. - #interrupt-cells: Must be two. The first cell is the GPIO pin number and
  24. the second cell encodes the interrupt flags. See
  25. <dt-bindings/interrupt-controller/irq.h> for a list of valid flags.
  26. Note that the N GPIO bank sub-nodes *must* be named gpio0, gpio1, ... gpioN-1.
  27. Required properties for pin configuration sub-nodes:
  28. ----------------------------------------------------
  29. - pins: List of pins to which the configuration applies. See below for a
  30. list of possible pins.
  31. Optional properties for pin configuration sub-nodes:
  32. ----------------------------------------------------
  33. - function: Mux function for the specified pins. This is not applicable for
  34. non-MFIO pins. See below for a list of valid functions for each pin.
  35. - bias-high-impedance: Enable high-impedance mode.
  36. - bias-pull-up: Enable weak pull-up.
  37. - bias-pull-down: Enable weak pull-down.
  38. - bias-bus-hold: Enable bus-keeper mode.
  39. - drive-strength: Drive strength in mA. Supported values: 2, 4, 8, 12.
  40. - input-schmitt-enable: Enable Schmitt trigger.
  41. - input-schmitt-disable: Disable Schmitt trigger.
  42. - slew-rate: Slew rate control. 0 for slow, 1 for fast.
  43. Pin Functions
  44. --- ---------
  45. mfio0 spim1
  46. mfio1 spim1, spim0, uart1
  47. mfio2 spim1, spim0, uart1
  48. mfio3 spim1
  49. mfio4 spim1
  50. mfio5 spim1
  51. mfio6 spim1
  52. mfio7 spim1
  53. mfio8 spim0
  54. mfio9 spim0
  55. mfio10 spim0
  56. mfio11 spis
  57. mfio12 spis
  58. mfio13 spis
  59. mfio14 spis
  60. mfio15 sdhost, mips_trace_clk, mips_trace_data
  61. mfio16 sdhost, mips_trace_dint, mips_trace_data
  62. mfio17 sdhost, mips_trace_trigout, mips_trace_data
  63. mfio18 sdhost, mips_trace_trigin, mips_trace_data
  64. mfio19 sdhost, mips_trace_dm, mips_trace_data
  65. mfio20 sdhost, mips_trace_probe_n, mips_trace_data
  66. mfio21 sdhost, mips_trace_data
  67. mfio22 sdhost, mips_trace_data
  68. mfio23 sdhost
  69. mfio24 sdhost
  70. mfio25 sdhost
  71. mfio26 sdhost
  72. mfio27 sdhost
  73. mfio28 i2c0, spim0
  74. mfio29 i2c0, spim0
  75. mfio30 i2c1, spim0
  76. mfio31 i2c1, spim1
  77. mfio32 i2c2
  78. mfio33 i2c2
  79. mfio34 i2c3
  80. mfio35 i2c3
  81. mfio36 i2s_out, audio_clk_in
  82. mfio37 i2s_out, debug_raw_cca_ind
  83. mfio38 i2s_out, debug_ed_sec20_cca_ind
  84. mfio39 i2s_out, debug_ed_sec40_cca_ind
  85. mfio40 i2s_out, debug_agc_done_0
  86. mfio41 i2s_out, debug_agc_done_1
  87. mfio42 i2s_out, debug_ed_cca_ind
  88. mfio43 i2s_out, debug_s2l_done
  89. mfio44 i2s_out
  90. mfio45 i2s_dac_clk, audio_sync
  91. mfio46 audio_trigger
  92. mfio47 i2s_in
  93. mfio48 i2s_in
  94. mfio49 i2s_in
  95. mfio50 i2s_in
  96. mfio51 i2s_in
  97. mfio52 i2s_in
  98. mfio53 i2s_in
  99. mfio54 i2s_in, spdif_in
  100. mfio55 uart0, spim0, spim1
  101. mfio56 uart0, spim0, spim1
  102. mfio57 uart0, spim0, spim1
  103. mfio58 uart0, spim1
  104. mfio59 uart1
  105. mfio60 uart1
  106. mfio61 spdif_out
  107. mfio62 spdif_in
  108. mfio63 eth, mips_trace_clk, mips_trace_data
  109. mfio64 eth, mips_trace_dint, mips_trace_data
  110. mfio65 eth, mips_trace_trigout, mips_trace_data
  111. mfio66 eth, mips_trace_trigin, mips_trace_data
  112. mfio67 eth, mips_trace_dm, mips_trace_data
  113. mfio68 eth, mips_trace_probe_n, mips_trace_data
  114. mfio69 eth, mips_trace_data
  115. mfio70 eth, mips_trace_data
  116. mfio71 eth
  117. mfio72 ir
  118. mfio73 pwmpdm, mips_trace_clk, sram_debug
  119. mfio74 pwmpdm, mips_trace_dint, sram_debug
  120. mfio75 pwmpdm, mips_trace_trigout, rom_debug
  121. mfio76 pwmpdm, mips_trace_trigin, rom_debug
  122. mfio77 mdc_debug, mips_trace_dm, rpu_debug
  123. mfio78 mdc_debug, mips_trace_probe_n, rpu_debug
  124. mfio79 ddr_debug, mips_trace_data, mips_debug
  125. mfio80 ddr_debug, mips_trace_data, mips_debug
  126. mfio81 dreq0, mips_trace_data, eth_debug
  127. mfio82 dreq1, mips_trace_data, eth_debug
  128. mfio83 mips_pll_lock, mips_trace_data, usb_debug
  129. mfio84 audio_pll_lock, mips_trace_data, usb_debug
  130. mfio85 rpu_v_pll_lock, mips_trace_data, sdhost_debug
  131. mfio86 rpu_l_pll_lock, mips_trace_data, sdhost_debug
  132. mfio87 sys_pll_lock, dreq2, socif_debug
  133. mfio88 wifi_pll_lock, dreq3, socif_debug
  134. mfio89 bt_pll_lock, dreq4, dreq5
  135. tck
  136. trstn
  137. tdi
  138. tms
  139. tdo
  140. jtag_comply
  141. safe_mode
  142. por_disable
  143. resetn
  144. Example:
  145. --------
  146. pinctrl@18101C00 {
  147. compatible = "img,pistachio-system-pinctrl";
  148. reg = <0x18101C00 0x400>;
  149. gpio0: gpio0 {
  150. interrupts = <GIC_SHARED 71 IRQ_TYPE_LEVEL_HIGH>;
  151. gpio-controller;
  152. #gpio-cells = <2>;
  153. interrupt-controller;
  154. #interrupt-cells = <2>;
  155. };
  156. ...
  157. gpio5: gpio5 {
  158. interrupts = <GIC_SHARED 76 IRQ_TYPE_LEVEL_HIGH>;
  159. gpio-controller;
  160. #gpio-cells = <2>;
  161. interrupt-controller;
  162. #interrupt-cells = <2>;
  163. };
  164. ...
  165. uart0_xfer: uart0-xfer {
  166. uart0-rxd {
  167. pins = "mfio55";
  168. function = "uart0";
  169. };
  170. uart0-txd {
  171. pins = "mfio56";
  172. function = "uart0";
  173. };
  174. };
  175. uart0_rts_cts: uart0-rts-cts {
  176. uart0-rts {
  177. pins = "mfio57";
  178. function = "uart0";
  179. };
  180. uart0-cts {
  181. pins = "mfio58";
  182. function = "uart0";
  183. };
  184. };
  185. };
  186. uart@... {
  187. ...
  188. pinctrl-names = "default";
  189. pinctrl-0 = <&uart0_xfer>, <&uart0_rts_cts>;
  190. ...
  191. };
  192. usb_vbus: fixed-regulator {
  193. ...
  194. gpio = <&gpio5 6 GPIO_ACTIVE_HIGH>;
  195. ...
  196. };