xref: /OK3568_Linux_fs/u-boot/drivers/gpio/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1#
2# GPIO infrastructure and drivers
3#
4
5menu "GPIO Support"
6
7config DM_GPIO
8	bool "Enable Driver Model for GPIO drivers"
9	depends on DM
10	help
11	  Enable driver model for GPIO access. The standard GPIO
12	  interface (gpio_get_value(), etc.) is then implemented by
13	  the GPIO uclass. Drivers provide methods to query the
14	  particular GPIOs that they provide. The uclass interface
15	  is defined in include/asm-generic/gpio.h.
16
17config GPIO_HOG
18	bool "Enable GPIO hog support"
19	depends on DM_GPIO
20	default n
21	help
22	  Enable gpio hog support
23	  The GPIO chip may contain GPIO hog definitions. GPIO hogging
24	  is a mechanism providing automatic GPIO request and config-
25	  uration as part of the gpio-controller's driver probe function.
26
27config GPIO_NO_UC_FLAG_SEQ_ALIAS
28	bool "Disable GPIO uclass sequence themselves with aliases"
29	depends on USING_KERNEL_DTB
30	default n
31	help
32	  Disable GPIO uclass sequence, this is a workaround when kernel
33	  dtb feature is enabled. Avoid gpio device probe failed when
34	  alloc req_seq both for gpio devices from U-Boot and kernel dtb.
35
36config ALTERA_PIO
37	bool "Altera PIO driver"
38	depends on DM_GPIO
39	help
40	  Select this to enable PIO for Altera devices. Please find
41	  details on the "Embedded Peripherals IP User Guide" of Altera.
42
43config BCM6345_GPIO
44	bool "BCM6345 GPIO driver"
45	depends on DM_GPIO && ARCH_BMIPS
46	help
47	  This driver supports the GPIO banks on BCM6345 SoCs.
48
49config DWAPB_GPIO
50	bool "DWAPB GPIO driver"
51	depends on DM && DM_GPIO
52	default n
53	help
54	  Support for the Designware APB GPIO driver.
55
56config AT91_GPIO
57	bool "AT91 PIO GPIO driver"
58	depends on DM_GPIO
59	default n
60	help
61	  Say yes here to select AT91 PIO GPIO driver. AT91 PIO
62	  controller manages up to 32 fully programmable input/output
63	  lines. Each I/O line may be dedicated as a general-purpose
64	  I/O or be assigned to a function of an embedded peripheral.
65	  The assignment to a function of an embedded peripheral is
66	  the responsibility of AT91 Pinctrl driver. This driver is
67	  responsible for the general-purpose I/O.
68
69config ATMEL_PIO4
70	bool "ATMEL PIO4 driver"
71	depends on DM_GPIO
72	default n
73	help
74	  Say yes here to support the Atmel PIO4 driver.
75	  The PIO4 is new version of Atmel PIO controller, which manages
76	  up to 128 fully programmable input/output lines. Each I/O line
77	  may be dedicated as a general purpose I/O or be assigned to
78	  a function of an embedded peripheral.
79
80config INTEL_BROADWELL_GPIO
81	bool "Intel Broadwell GPIO driver"
82	depends on DM
83	help
84	  This driver supports Broadwell U devices which have an expanded
85	  GPIO feature set. The difference is large enough to merit a separate
86	  driver from the common Intel ICH6 driver. It supports a total of
87	  95 GPIOs which can be configured from the device tree.
88
89config INTEL_ICH6_GPIO
90	bool "Intel ICH6 compatible legacy GPIO driver"
91	depends on DM_GPIO
92	help
93	  Say yes here to select Intel ICH6 compatible legacy GPIO driver.
94
95config IMX_RGPIO2P
96	bool "i.MX7ULP RGPIO2P driver"
97	depends on DM
98	default n
99	help
100	  This driver supports i.MX7ULP Rapid GPIO2P controller.
101
102config LPC32XX_GPIO
103	bool "LPC32XX GPIO driver"
104	depends on DM
105	default n
106	help
107	  Support for the LPC32XX GPIO driver.
108
109config MSM_GPIO
110	bool "Qualcomm GPIO driver"
111	depends on DM_GPIO
112	default n
113	help
114	  Support GPIO controllers on Qualcomm Snapdragon family of SoCs.
115	  This controller have single bank (default name "soc"), every
116	  gpio has it's own set of registers.
117	  Only simple GPIO operations are supported (get/set, change of
118	  direction and checking pin function).
119	  Supported devices:
120	  - APQ8016
121	  - MSM8916
122
123config OMAP_GPIO
124	bool "TI OMAP GPIO driver"
125	depends on ARCH_OMAP2PLUS
126	default y
127	help
128	  Support GPIO controllers on the TI OMAP3/4/5 and related (such as
129	  AM335x/AM43xx/AM57xx/DRA7xx/etc) families of SoCs.
130
131config CMD_PCA953X
132	bool "Enable the pca953x command"
133	help
134	  Deprecated: This should be converted to driver model.
135
136	  This command provides access to a pca953x GPIO device using the
137	  legacy GPIO interface. Several subcommands are provided which mirror
138	  the standard 'gpio' command. It should use that instead.
139
140config PM8916_GPIO
141	bool "Qualcomm PM8916 PMIC GPIO/keypad driver"
142	depends on DM_GPIO && PMIC_PM8916
143	help
144	  Support for GPIO pins and power/reset buttons found on
145	  Qualcomm PM8916 PMIC.
146	  Default name for GPIO bank is "pm8916".
147	  Power and reset buttons are placed in "pm8916_key" bank and
148          have gpio numbers 0 and 1 respectively.
149
150config PCF8575_GPIO
151	bool "PCF8575 I2C GPIO Expander driver"
152	depends on DM_GPIO && DM_I2C
153	help
154	 Support for PCF8575 I2C 16-bit GPIO expander. Most of these
155	 chips are from NXP and TI.
156
157config ROCKCHIP_GPIO
158	bool "Rockchip GPIO driver"
159	depends on DM_GPIO
160	help
161	  Support GPIO access on Rockchip SoCs. The GPIOs are arranged into
162	  a number of banks (different for each SoC type) each with 32 GPIOs.
163	  The GPIOs for a device are defined in the device tree with one node
164	  for each bank.
165
166config ROCKCHIP_GPIO_V2
167	bool "Rockchip GPIO driver version 2.0"
168	depends on ROCKCHIP_GPIO
169	default n
170	help
171	  Support GPIO access on Rockchip SoCs. The GPIOs are arranged into
172	  a number of banks (different for each SoC type) each with 32 GPIOs.
173	  The GPIOs for a device are defined in the device tree with one node
174	  for each bank.
175
176	  Support version 2.0 GPIO controller, which support write enable bits
177	  for some registers, such as dr, ddr.
178
179config SANDBOX_GPIO
180	bool "Enable sandbox GPIO driver"
181	depends on SANDBOX && DM && DM_GPIO
182	help
183	  This driver supports some simulated GPIOs which can be adjusted
184	  using 'back door' functions like sandbox_gpio_set_value(). Then the
185	  GPIOs can be inspected through the normal get_get_value()
186	  interface. The purpose of this is to allow GPIOs to be used as
187	  normal in sandbox, perhaps with test code actually driving the
188	  behaviour of those GPIOs.
189
190config SANDBOX_GPIO_COUNT
191	int "Number of sandbox GPIOs"
192	depends on SANDBOX_GPIO
193	default 128
194	help
195	  The sandbox driver can support any number of GPIOs. Generally these
196	  are specified using the device tree. But you can also have a number
197	  of 'anonymous' GPIOs that do not belong to any device or bank.
198	  Select a suitable value depending on your needs.
199
200config CMD_TCA642X
201	bool "tca642x - Command to access tca642x state"
202	help
203	  DEPRECATED - This needs conversion to driver model
204
205	  This provides a way to looking at the pin state of this device.
206	  This mirrors the 'gpio' command and that should be used in preference
207	  to custom code.
208
209config TEGRA_GPIO
210	bool "Tegra20..210 GPIO driver"
211	depends on DM_GPIO
212	help
213	  Support for the GPIO controller contained in NVIDIA Tegra20 through
214	  Tegra210.
215
216config TEGRA186_GPIO
217	bool "Tegra186 GPIO driver"
218	depends on DM_GPIO
219	help
220	  Support for the GPIO controller contained in NVIDIA Tegra186. This
221	  covers both the "main" and "AON" controller instances, even though
222	  they have slightly different register layout.
223
224config GPIO_UNIPHIER
225	bool "UniPhier GPIO"
226	depends on ARCH_UNIPHIER
227	help
228	  Say yes here to support UniPhier GPIOs.
229
230config VYBRID_GPIO
231	bool "Vybrid GPIO driver"
232	depends on DM
233	default n
234	help
235	  Say yes here to support Vybrid vf610 GPIOs.
236
237config PIC32_GPIO
238	bool "Microchip PIC32 GPIO driver"
239	depends on DM_GPIO && MACH_PIC32
240	default y
241	help
242	  Say yes here to support Microchip PIC32 GPIOs.
243
244config STM32F7_GPIO
245	bool "ST STM32 GPIO driver"
246	depends on DM_GPIO && STM32
247	default y
248	help
249	  Device model driver support for STM32 GPIO controller. It should be
250	  usable on many stm32 families like stm32f4 & stm32H7.
251	  Tested on STM32F7.
252
253config MVEBU_GPIO
254	bool "Marvell MVEBU GPIO driver"
255	depends on DM_GPIO && ARCH_MVEBU
256	default y
257	help
258	  Say yes here to support Marvell MVEBU (Armada XP/38x) GPIOs.
259
260config ZYNQ_GPIO
261	bool "Zynq GPIO driver"
262	depends on DM_GPIO && (ARCH_ZYNQ || ARCH_ZYNQMP)
263	default y
264	help
265	  Supports GPIO access on Zynq SoC.
266
267config DM_74X164
268	bool "74x164 serial-in/parallel-out 8-bits shift register"
269	depends on DM_GPIO
270	help
271	  Driver for 74x164 compatible serial-in/parallel-out 8-outputs
272	  shift registers, such as 74lv165, 74hc595.
273	  This driver can be used to provide access to more gpio outputs.
274
275config DM_PCA953X
276	bool "PCA95[357]x, PCA9698, TCA64xx, and MAX7310 I/O ports"
277	depends on DM_GPIO
278	help
279	  Say yes here to provide access to several register-oriented
280	  SMBus I/O expanders, made mostly by NXP or TI.  Compatible
281	  models include:
282
283	  4 bits:	pca9536, pca9537
284
285	  8 bits:	max7310, max7315, pca6107, pca9534, pca9538, pca9554,
286			pca9556, pca9557, pca9574, tca6408, xra1202
287
288	  16 bits:	max7312, max7313, pca9535, pca9539, pca9555, pca9575,
289			tca6416
290
291	  24 bits:	tca6424
292
293	  40 bits:	pca9505, pca9698
294
295	  Now, max 24 bits chips and PCA953X compatible chips are
296	  supported
297
298config MPC85XX_GPIO
299	bool "Freescale MPC85XX GPIO driver"
300	depends on DM_GPIO
301	help
302	  This driver supports the built-in GPIO controller of MPC85XX CPUs.
303	  Each GPIO bank is identified by its own entry in the device tree,
304	  i.e.
305
306	  gpio-controller@fc00 {
307		#gpio-cells = <2>;
308		compatible = "fsl,pq3-gpio";
309		reg = <0xfc00 0x100>
310	  }
311
312	  By default, each bank is assumed to have 32 GPIOs, but the ngpios
313	  setting is honored, so the number of GPIOs for each bank is
314	  configurable to match the actual GPIO count of the SoC (e.g. the
315	  32/32/23 banks of the P1022 SoC).
316
317	  Aside from the standard functions of input/output mode, and output
318	  value setting, the open-drain feature, which can configure individual
319	  GPIOs to work as open-drain outputs, is supported.
320
321	  The driver has been tested on MPC85XX, but it is likely that other
322	  PowerQUICC III devices will work as well.
323endmenu
324