xref: /openbmc/u-boot/drivers/i2c/Kconfig (revision 34374699)
10b11dbf7SMasahiro Yamada#
20b11dbf7SMasahiro Yamada# I2C subsystem configuration
30b11dbf7SMasahiro Yamada#
40b11dbf7SMasahiro Yamada
50b11dbf7SMasahiro Yamadamenu "I2C support"
60b11dbf7SMasahiro Yamada
7b6036bcdSMasahiro Yamadaconfig DM_I2C
8b6036bcdSMasahiro Yamada	bool "Enable Driver Model for I2C drivers"
9b6036bcdSMasahiro Yamada	depends on DM
10b6036bcdSMasahiro Yamada	help
11705fcf4dSPrzemyslaw Marczak	  Enable driver model for I2C. The I2C uclass interface: probe, read,
12705fcf4dSPrzemyslaw Marczak	  write and speed, is implemented with the bus drivers operations,
13705fcf4dSPrzemyslaw Marczak	  which provide methods for bus setting and data transfer. Each chip
14705fcf4dSPrzemyslaw Marczak	  device (bus child) info is kept as parent platdata. The interface
15705fcf4dSPrzemyslaw Marczak	  is defined in include/i2c.h. When i2c bus driver supports the i2c
16705fcf4dSPrzemyslaw Marczak	  uclass, but the device drivers not, then DM_I2C_COMPAT config can
17705fcf4dSPrzemyslaw Marczak	  be used as compatibility layer.
1826f820f3SMasahiro Yamada
194bba9d3fSSimon Glassconfig DM_I2C_COMPAT
204bba9d3fSSimon Glass	bool "Enable I2C compatibility layer"
214bba9d3fSSimon Glass	depends on DM
224bba9d3fSSimon Glass	help
234bba9d3fSSimon Glass	  Enable old-style I2C functions for compatibility with existing code.
244bba9d3fSSimon Glass	  This option can be enabled as a temporary measure to avoid needing
254bba9d3fSSimon Glass	  to convert all code for a board in a single commit. It should not
264bba9d3fSSimon Glass	  be enabled for any board in an official release.
274bba9d3fSSimon Glass
28cc456bd7SSimon Glassconfig I2C_CROS_EC_TUNNEL
29cc456bd7SSimon Glass	tristate "Chrome OS EC tunnel I2C bus"
30cc456bd7SSimon Glass	depends on CROS_EC
31cc456bd7SSimon Glass	help
32cc456bd7SSimon Glass	  This provides an I2C bus that will tunnel i2c commands through to
33cc456bd7SSimon Glass	  the other side of the Chrome OS EC to the I2C bus connected there.
34cc456bd7SSimon Glass	  This will work whatever the interface used to talk to the EC (SPI,
35cc456bd7SSimon Glass	  I2C or LPC). Some Chromebooks use this when the hardware design
36cc456bd7SSimon Glass	  does not allow direct access to the main PMIC from the AP.
37cc456bd7SSimon Glass
38f48eaf01SSimon Glassconfig I2C_CROS_EC_LDO
39f48eaf01SSimon Glass	bool "Provide access to LDOs on the Chrome OS EC"
40f48eaf01SSimon Glass	depends on CROS_EC
41f48eaf01SSimon Glass	---help---
42f48eaf01SSimon Glass	On many Chromebooks the main PMIC is inaccessible to the AP. This is
43f48eaf01SSimon Glass	often dealt with by using an I2C pass-through interface provided by
44f48eaf01SSimon Glass	the EC. On some unfortunate models (e.g. Spring) the pass-through
45f48eaf01SSimon Glass	is not available, and an LDO message is available instead. This
46f48eaf01SSimon Glass	option enables a driver which provides very basic access to those
47f48eaf01SSimon Glass	regulators, via the EC. We implement this as an I2C bus	which
48f48eaf01SSimon Glass	emulates just the TPS65090 messages we know about. This is done to
49f48eaf01SSimon Glass	avoid duplicating the logic in the TPS65090 regulator driver for
50f48eaf01SSimon Glass	enabling/disabling an LDO.
51cc456bd7SSimon Glass
52c54473cbSPrzemyslaw Marczakconfig DM_I2C_GPIO
53c54473cbSPrzemyslaw Marczak	bool "Enable Driver Model for software emulated I2C bus driver"
54c54473cbSPrzemyslaw Marczak	depends on DM_I2C && DM_GPIO
55c54473cbSPrzemyslaw Marczak	help
56c54473cbSPrzemyslaw Marczak	  Enable the i2c bus driver emulation by using the GPIOs. The bus GPIO
57c54473cbSPrzemyslaw Marczak	  configuration is given by the device tree. Kernel-style device tree
58c54473cbSPrzemyslaw Marczak	  bindings are supported.
59c54473cbSPrzemyslaw Marczak	  Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt
60c54473cbSPrzemyslaw Marczak
61*34374699SSimon Glassconfig SYS_I2C_ROCKCHIP
62*34374699SSimon Glass	bool "Rockchip I2C driver"
63*34374699SSimon Glass	depends on DM_I2C
64*34374699SSimon Glass	help
65*34374699SSimon Glass	  Add support for the Rockchip I2C driver. This is used with various
66*34374699SSimon Glass	  Rockchip parts such as RK3126, RK3128, RK3036 and RK3288. All chips
67*34374699SSimon Glass	  have several I2C ports and all are provided, controled by the
68*34374699SSimon Glass	  device tree.
69*34374699SSimon Glass
701174aadaSSimon Glassconfig SYS_I2C_SANDBOX
711174aadaSSimon Glass	bool "Sandbox I2C driver"
721174aadaSSimon Glass	depends on SANDBOX && DM_I2C
731174aadaSSimon Glass	help
741174aadaSSimon Glass	  Enable I2C support for sandbox. This is an emulation of a real I2C
751174aadaSSimon Glass	  bus. Devices can be attached to the bus using the device tree
761174aadaSSimon Glass	  which specifies the driver to use. As an example, see this device
771174aadaSSimon Glass	  tree fragment from sandbox.dts. It shows that the I2C bus has a
781174aadaSSimon Glass	  single EEPROM at address 0x2c (7-bit address) which is emulated by
791174aadaSSimon Glass	  the driver for "sandbox,i2c-eeprom", which is in
801174aadaSSimon Glass	  drivers/misc/i2c_eeprom_emul.c.
811174aadaSSimon Glass
821174aadaSSimon Glass	  i2c@0 {
831174aadaSSimon Glass		#address-cells = <1>;
841174aadaSSimon Glass		#size-cells = <0>;
851174aadaSSimon Glass		reg = <0>;
861174aadaSSimon Glass		compatible = "sandbox,i2c";
871174aadaSSimon Glass		clock-frequency = <400000>;
881174aadaSSimon Glass		eeprom@2c {
891174aadaSSimon Glass			reg = <0x2c>;
901174aadaSSimon Glass			compatible = "i2c-eeprom";
911174aadaSSimon Glass			emul {
921174aadaSSimon Glass				compatible = "sandbox,i2c-eeprom";
931174aadaSSimon Glass				sandbox,filename = "i2c.bin";
941174aadaSSimon Glass				sandbox,size = <128>;
951174aadaSSimon Glass			};
961174aadaSSimon Glass		};
971174aadaSSimon Glass	};
981174aadaSSimon Glass
991174aadaSSimon Glass
10026f820f3SMasahiro Yamadaconfig SYS_I2C_UNIPHIER
10126f820f3SMasahiro Yamada	bool "UniPhier I2C driver"
10226f820f3SMasahiro Yamada	depends on ARCH_UNIPHIER && DM_I2C
10326f820f3SMasahiro Yamada	default y
10426f820f3SMasahiro Yamada	help
105b6ef3a3fSMasahiro Yamada	  Support for UniPhier I2C controller driver.  This I2C controller
106b6ef3a3fSMasahiro Yamada	  is used on PH1-LD4, PH1-sLD8 or older UniPhier SoCs.
107238bd0b8SMasahiro Yamada
108238bd0b8SMasahiro Yamadaconfig SYS_I2C_UNIPHIER_F
109238bd0b8SMasahiro Yamada	bool "UniPhier FIFO-builtin I2C driver"
110238bd0b8SMasahiro Yamada	depends on ARCH_UNIPHIER && DM_I2C
111238bd0b8SMasahiro Yamada	default y
112238bd0b8SMasahiro Yamada	help
113b6ef3a3fSMasahiro Yamada	  Support for UniPhier FIFO-builtin I2C controller driver.
114238bd0b8SMasahiro Yamada	  This I2C controller is used on PH1-Pro4 or newer UniPhier SoCs.
1153d1957f0SSimon Glass
1163d1957f0SSimon Glasssource "drivers/i2c/muxes/Kconfig"
1170b11dbf7SMasahiro Yamada
1180b11dbf7SMasahiro Yamadaendmenu
119