xref: /OK3568_Linux_fs/u-boot/drivers/i2c/Kconfig (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun#
2*4882a593Smuzhiyun# I2C subsystem configuration
3*4882a593Smuzhiyun#
4*4882a593Smuzhiyun
5*4882a593Smuzhiyunmenu "I2C support"
6*4882a593Smuzhiyun
7*4882a593Smuzhiyunconfig DM_I2C
8*4882a593Smuzhiyun	bool "Enable Driver Model for I2C drivers"
9*4882a593Smuzhiyun	depends on DM
10*4882a593Smuzhiyun	help
11*4882a593Smuzhiyun	  Enable driver model for I2C. The I2C uclass interface: probe, read,
12*4882a593Smuzhiyun	  write and speed, is implemented with the bus drivers operations,
13*4882a593Smuzhiyun	  which provide methods for bus setting and data transfer. Each chip
14*4882a593Smuzhiyun	  device (bus child) info is kept as parent platdata. The interface
15*4882a593Smuzhiyun	  is defined in include/i2c.h. When i2c bus driver supports the i2c
16*4882a593Smuzhiyun	  uclass, but the device drivers not, then DM_I2C_COMPAT config can
17*4882a593Smuzhiyun	  be used as compatibility layer.
18*4882a593Smuzhiyun
19*4882a593Smuzhiyunconfig DM_I2C_COMPAT
20*4882a593Smuzhiyun	bool "Enable I2C compatibility layer"
21*4882a593Smuzhiyun	depends on DM
22*4882a593Smuzhiyun	help
23*4882a593Smuzhiyun	  Enable old-style I2C functions for compatibility with existing code.
24*4882a593Smuzhiyun	  This option can be enabled as a temporary measure to avoid needing
25*4882a593Smuzhiyun	  to convert all code for a board in a single commit. It should not
26*4882a593Smuzhiyun	  be enabled for any board in an official release.
27*4882a593Smuzhiyun
28*4882a593Smuzhiyunconfig I2C_CROS_EC_TUNNEL
29*4882a593Smuzhiyun	tristate "Chrome OS EC tunnel I2C bus"
30*4882a593Smuzhiyun	depends on CROS_EC
31*4882a593Smuzhiyun	help
32*4882a593Smuzhiyun	  This provides an I2C bus that will tunnel i2c commands through to
33*4882a593Smuzhiyun	  the other side of the Chrome OS EC to the I2C bus connected there.
34*4882a593Smuzhiyun	  This will work whatever the interface used to talk to the EC (SPI,
35*4882a593Smuzhiyun	  I2C or LPC). Some Chromebooks use this when the hardware design
36*4882a593Smuzhiyun	  does not allow direct access to the main PMIC from the AP.
37*4882a593Smuzhiyun
38*4882a593Smuzhiyunconfig I2C_CROS_EC_LDO
39*4882a593Smuzhiyun	bool "Provide access to LDOs on the Chrome OS EC"
40*4882a593Smuzhiyun	depends on CROS_EC
41*4882a593Smuzhiyun	---help---
42*4882a593Smuzhiyun	On many Chromebooks the main PMIC is inaccessible to the AP. This is
43*4882a593Smuzhiyun	often dealt with by using an I2C pass-through interface provided by
44*4882a593Smuzhiyun	the EC. On some unfortunate models (e.g. Spring) the pass-through
45*4882a593Smuzhiyun	is not available, and an LDO message is available instead. This
46*4882a593Smuzhiyun	option enables a driver which provides very basic access to those
47*4882a593Smuzhiyun	regulators, via the EC. We implement this as an I2C bus	which
48*4882a593Smuzhiyun	emulates just the TPS65090 messages we know about. This is done to
49*4882a593Smuzhiyun	avoid duplicating the logic in the TPS65090 regulator driver for
50*4882a593Smuzhiyun	enabling/disabling an LDO.
51*4882a593Smuzhiyun
52*4882a593Smuzhiyunconfig I2C_SET_DEFAULT_BUS_NUM
53*4882a593Smuzhiyun	bool "Set default I2C bus number"
54*4882a593Smuzhiyun	depends on DM_I2C
55*4882a593Smuzhiyun	help
56*4882a593Smuzhiyun	  Set default number of I2C bus to be accessed. This option provides
57*4882a593Smuzhiyun	  behaviour similar to old (i.e. pre DM) I2C bus driver.
58*4882a593Smuzhiyun
59*4882a593Smuzhiyunconfig I2C_DEFAULT_BUS_NUMBER
60*4882a593Smuzhiyun	hex "I2C default bus number"
61*4882a593Smuzhiyun	depends on I2C_SET_DEFAULT_BUS_NUM
62*4882a593Smuzhiyun	default 0x0
63*4882a593Smuzhiyun	help
64*4882a593Smuzhiyun	  Number of default I2C bus to use
65*4882a593Smuzhiyun
66*4882a593Smuzhiyunconfig DM_I2C_GPIO
67*4882a593Smuzhiyun	bool "Enable Driver Model for software emulated I2C bus driver"
68*4882a593Smuzhiyun	depends on DM_I2C && DM_GPIO
69*4882a593Smuzhiyun	help
70*4882a593Smuzhiyun	  Enable the i2c bus driver emulation by using the GPIOs. The bus GPIO
71*4882a593Smuzhiyun	  configuration is given by the device tree. Kernel-style device tree
72*4882a593Smuzhiyun	  bindings are supported.
73*4882a593Smuzhiyun	  Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt
74*4882a593Smuzhiyun
75*4882a593Smuzhiyunconfig SYS_I2C_AT91
76*4882a593Smuzhiyun	bool "Atmel I2C driver"
77*4882a593Smuzhiyun	depends on DM_I2C && ARCH_AT91
78*4882a593Smuzhiyun	help
79*4882a593Smuzhiyun	  Add support for the Atmel I2C driver. A serious problem is that there
80*4882a593Smuzhiyun	  is no documented way to issue repeated START conditions for more than
81*4882a593Smuzhiyun	  two messages, as needed to support combined I2C messages. Use the
82*4882a593Smuzhiyun	  i2c-gpio driver unless your system can cope with this limitation.
83*4882a593Smuzhiyun	  Binding info: doc/device-tree-bindings/i2c/i2c-at91.txt
84*4882a593Smuzhiyun
85*4882a593Smuzhiyunconfig SYS_I2C_FSL
86*4882a593Smuzhiyun       bool "Freescale I2C bus driver"
87*4882a593Smuzhiyun       depends on DM_I2C
88*4882a593Smuzhiyun       help
89*4882a593Smuzhiyun	  Add support for Freescale I2C busses as used on MPC8240, MPC8245, and
90*4882a593Smuzhiyun	  MPC85xx processors.
91*4882a593Smuzhiyun
92*4882a593Smuzhiyunconfig SYS_I2C_CADENCE
93*4882a593Smuzhiyun	tristate "Cadence I2C Controller"
94*4882a593Smuzhiyun	depends on DM_I2C && (ARCH_ZYNQ || ARM64)
95*4882a593Smuzhiyun	help
96*4882a593Smuzhiyun	  Say yes here to select Cadence I2C Host Controller. This controller is
97*4882a593Smuzhiyun	  e.g. used by Xilinx Zynq.
98*4882a593Smuzhiyun
99*4882a593Smuzhiyunconfig SYS_I2C_DW
100*4882a593Smuzhiyun	bool "Designware I2C Controller"
101*4882a593Smuzhiyun	default n
102*4882a593Smuzhiyun	help
103*4882a593Smuzhiyun	  Say yes here to select the Designware I2C Host Controller. This
104*4882a593Smuzhiyun	  controller is used in various SoCs, e.g. the ST SPEAr, Altera
105*4882a593Smuzhiyun	  SoCFPGA, Synopsys ARC700 and some Intel x86 SoCs.
106*4882a593Smuzhiyun
107*4882a593Smuzhiyunconfig SYS_I2C_DW_ENABLE_STATUS_UNSUPPORTED
108*4882a593Smuzhiyun	bool "DW I2C Enable Status Register not supported"
109*4882a593Smuzhiyun	depends on SYS_I2C_DW && (TARGET_SPEAR300 || TARGET_SPEAR310 || \
110*4882a593Smuzhiyun		TARGET_SPEAR320 || TARGET_SPEAR600 || TARGET_X600)
111*4882a593Smuzhiyun	default y
112*4882a593Smuzhiyun	help
113*4882a593Smuzhiyun	  Some versions of the Designware I2C controller do not support the
114*4882a593Smuzhiyun	  enable status register. This config option can be enabled in such
115*4882a593Smuzhiyun	  cases.
116*4882a593Smuzhiyun
117*4882a593Smuzhiyunconfig SYS_I2C_ASPEED
118*4882a593Smuzhiyun	bool "Aspeed I2C Controller"
119*4882a593Smuzhiyun	depends on DM_I2C && ARCH_ASPEED
120*4882a593Smuzhiyun	help
121*4882a593Smuzhiyun	  Say yes here to select Aspeed I2C Host Controller. The driver
122*4882a593Smuzhiyun	  supports AST2500 and AST2400 controllers, but is very limited.
123*4882a593Smuzhiyun	  Only single master mode is supported and only byte-by-byte
124*4882a593Smuzhiyun	  synchronous reads and writes are supported, no Pool Buffers or DMA.
125*4882a593Smuzhiyun
126*4882a593Smuzhiyunconfig SYS_I2C_INTEL
127*4882a593Smuzhiyun	bool "Intel I2C/SMBUS driver"
128*4882a593Smuzhiyun	depends on DM_I2C
129*4882a593Smuzhiyun	help
130*4882a593Smuzhiyun	  Add support for the Intel SMBUS driver. So far this driver is just
131*4882a593Smuzhiyun	  a stub which perhaps some basic init. There is no implementation of
132*4882a593Smuzhiyun	  the I2C API meaning that any I2C operations will immediately fail
133*4882a593Smuzhiyun	  for now.
134*4882a593Smuzhiyun
135*4882a593Smuzhiyunconfig SYS_I2C_IMX_LPI2C
136*4882a593Smuzhiyun	bool "NXP i.MX LPI2C driver"
137*4882a593Smuzhiyun	help
138*4882a593Smuzhiyun	  Add support for the NXP i.MX LPI2C driver.
139*4882a593Smuzhiyun
140*4882a593Smuzhiyunconfig SYS_I2C_MXC
141*4882a593Smuzhiyun	bool "NXP i.MX I2C driver"
142*4882a593Smuzhiyun	depends on MX6
143*4882a593Smuzhiyun	help
144*4882a593Smuzhiyun	  Add support for the NXP i.MX I2C driver. This supports upto for bus
145*4882a593Smuzhiyun	  channels and operating on standard mode upto 100 kbits/s and fast
146*4882a593Smuzhiyun	  mode upto 400 kbits/s.
147*4882a593Smuzhiyun
148*4882a593Smuzhiyunconfig SYS_I2C_OMAP24XX
149*4882a593Smuzhiyun	bool "TI OMAP2+ I2C driver"
150*4882a593Smuzhiyun	depends on ARCH_OMAP2PLUS
151*4882a593Smuzhiyun	help
152*4882a593Smuzhiyun	  Add support for the OMAP2+ I2C driver.
153*4882a593Smuzhiyun
154*4882a593Smuzhiyunconfig SYS_I2C_ROCKCHIP
155*4882a593Smuzhiyun	bool "Rockchip I2C driver"
156*4882a593Smuzhiyun	depends on DM_I2C
157*4882a593Smuzhiyun	help
158*4882a593Smuzhiyun	  Add support for the Rockchip I2C driver. This is used with various
159*4882a593Smuzhiyun	  Rockchip parts such as RK3126, RK3128, RK3036 and RK3288. All chips
160*4882a593Smuzhiyun	  have several I2C ports and all are provided, controled by the
161*4882a593Smuzhiyun	  device tree.
162*4882a593Smuzhiyun
163*4882a593Smuzhiyunconfig SYS_I2C_SANDBOX
164*4882a593Smuzhiyun	bool "Sandbox I2C driver"
165*4882a593Smuzhiyun	depends on SANDBOX && DM_I2C
166*4882a593Smuzhiyun	help
167*4882a593Smuzhiyun	  Enable I2C support for sandbox. This is an emulation of a real I2C
168*4882a593Smuzhiyun	  bus. Devices can be attached to the bus using the device tree
169*4882a593Smuzhiyun	  which specifies the driver to use.  See sandbox.dts as an example.
170*4882a593Smuzhiyun
171*4882a593Smuzhiyunconfig SYS_I2C_S3C24X0
172*4882a593Smuzhiyun	bool "Samsung I2C driver"
173*4882a593Smuzhiyun	depends on ARCH_EXYNOS4 && DM_I2C
174*4882a593Smuzhiyun	help
175*4882a593Smuzhiyun	  Support for Samsung I2C controller as Samsung SoCs.
176*4882a593Smuzhiyun
177*4882a593Smuzhiyunconfig SYS_I2C_STM32F7
178*4882a593Smuzhiyun	bool "STMicroelectronics STM32F7 I2C support"
179*4882a593Smuzhiyun	depends on (STM32F7 || STM32H7) && DM_I2C
180*4882a593Smuzhiyun	help
181*4882a593Smuzhiyun	  Enable this option to add support for STM32 I2C controller
182*4882a593Smuzhiyun	  introduced with STM32F7/H7 SoCs. This I2C controller supports :
183*4882a593Smuzhiyun	   _ Slave and master modes
184*4882a593Smuzhiyun	   _ Multimaster capability
185*4882a593Smuzhiyun	   _ Standard-mode (up to 100 kHz)
186*4882a593Smuzhiyun	   _ Fast-mode (up to 400 kHz)
187*4882a593Smuzhiyun	   _ Fast-mode Plus (up to 1 MHz)
188*4882a593Smuzhiyun	   _ 7-bit and 10-bit addressing mode
189*4882a593Smuzhiyun	   _ Multiple 7-bit slave addresses (2 addresses, 1 with configurable mask)
190*4882a593Smuzhiyun	   _ All 7-bit addresses acknowledge mode
191*4882a593Smuzhiyun	   _ General call
192*4882a593Smuzhiyun	   _ Programmable setup and hold times
193*4882a593Smuzhiyun	   _ Easy to use event management
194*4882a593Smuzhiyun	   _ Optional clock stretching
195*4882a593Smuzhiyun	   _ Software reset
196*4882a593Smuzhiyun
197*4882a593Smuzhiyunconfig SYS_I2C_UNIPHIER
198*4882a593Smuzhiyun	bool "UniPhier I2C driver"
199*4882a593Smuzhiyun	depends on ARCH_UNIPHIER && DM_I2C
200*4882a593Smuzhiyun	default y
201*4882a593Smuzhiyun	help
202*4882a593Smuzhiyun	  Support for UniPhier I2C controller driver.  This I2C controller
203*4882a593Smuzhiyun	  is used on PH1-LD4, PH1-sLD8 or older UniPhier SoCs.
204*4882a593Smuzhiyun
205*4882a593Smuzhiyunconfig SYS_I2C_UNIPHIER_F
206*4882a593Smuzhiyun	bool "UniPhier FIFO-builtin I2C driver"
207*4882a593Smuzhiyun	depends on ARCH_UNIPHIER && DM_I2C
208*4882a593Smuzhiyun	default y
209*4882a593Smuzhiyun	help
210*4882a593Smuzhiyun	  Support for UniPhier FIFO-builtin I2C controller driver.
211*4882a593Smuzhiyun	  This I2C controller is used on PH1-Pro4 or newer UniPhier SoCs.
212*4882a593Smuzhiyun
213*4882a593Smuzhiyunconfig SYS_I2C_MVTWSI
214*4882a593Smuzhiyun	bool "Marvell I2C driver"
215*4882a593Smuzhiyun	depends on DM_I2C
216*4882a593Smuzhiyun	help
217*4882a593Smuzhiyun	  Support for Marvell I2C controllers as used on the orion5x and
218*4882a593Smuzhiyun	  kirkwood SoC families.
219*4882a593Smuzhiyun
220*4882a593Smuzhiyunconfig TEGRA186_BPMP_I2C
221*4882a593Smuzhiyun	bool "Enable Tegra186 BPMP-based I2C driver"
222*4882a593Smuzhiyun	depends on TEGRA186_BPMP
223*4882a593Smuzhiyun	help
224*4882a593Smuzhiyun	  Support for Tegra I2C controllers managed by the BPMP (Boot and
225*4882a593Smuzhiyun	  Power Management Processor). On Tegra186, some I2C controllers are
226*4882a593Smuzhiyun	  directly controlled by the main CPU, whereas others are controlled
227*4882a593Smuzhiyun	  by the BPMP, and can only be accessed by the main CPU via IPC
228*4882a593Smuzhiyun	  requests to the BPMP. This driver covers the latter case.
229*4882a593Smuzhiyun
230*4882a593Smuzhiyunconfig SYS_I2C_BUS_MAX
231*4882a593Smuzhiyun	int "Max I2C busses"
232*4882a593Smuzhiyun	depends on ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_SOCFPGA
233*4882a593Smuzhiyun	default 2 if TI816X
234*4882a593Smuzhiyun	default 3 if OMAP34XX || AM33XX || AM43XX || ARCH_KEYSTONE
235*4882a593Smuzhiyun	default 4 if ARCH_SOCFPGA || OMAP44XX || TI814X
236*4882a593Smuzhiyun	default 5 if OMAP54XX
237*4882a593Smuzhiyun	help
238*4882a593Smuzhiyun	  Define the maximum number of available I2C buses.
239*4882a593Smuzhiyun
240*4882a593Smuzhiyunsource "drivers/i2c/muxes/Kconfig"
241*4882a593Smuzhiyun
242*4882a593Smuzhiyunendmenu
243