1b6036bcdSMasahiro Yamadaconfig DM_I2C 2b6036bcdSMasahiro Yamada bool "Enable Driver Model for I2C drivers" 3b6036bcdSMasahiro Yamada depends on DM 4b6036bcdSMasahiro Yamada help 5705fcf4dSPrzemyslaw Marczak Enable driver model for I2C. The I2C uclass interface: probe, read, 6705fcf4dSPrzemyslaw Marczak write and speed, is implemented with the bus drivers operations, 7705fcf4dSPrzemyslaw Marczak which provide methods for bus setting and data transfer. Each chip 8705fcf4dSPrzemyslaw Marczak device (bus child) info is kept as parent platdata. The interface 9705fcf4dSPrzemyslaw Marczak is defined in include/i2c.h. When i2c bus driver supports the i2c 10705fcf4dSPrzemyslaw Marczak uclass, but the device drivers not, then DM_I2C_COMPAT config can 11705fcf4dSPrzemyslaw Marczak be used as compatibility layer. 1226f820f3SMasahiro Yamada 134bba9d3fSSimon Glassconfig DM_I2C_COMPAT 144bba9d3fSSimon Glass bool "Enable I2C compatibility layer" 154bba9d3fSSimon Glass depends on DM 164bba9d3fSSimon Glass help 174bba9d3fSSimon Glass Enable old-style I2C functions for compatibility with existing code. 184bba9d3fSSimon Glass This option can be enabled as a temporary measure to avoid needing 194bba9d3fSSimon Glass to convert all code for a board in a single commit. It should not 204bba9d3fSSimon Glass be enabled for any board in an official release. 214bba9d3fSSimon Glass 22*cc456bd7SSimon Glassconfig I2C_CROS_EC_TUNNEL 23*cc456bd7SSimon Glass tristate "Chrome OS EC tunnel I2C bus" 24*cc456bd7SSimon Glass depends on CROS_EC 25*cc456bd7SSimon Glass help 26*cc456bd7SSimon Glass This provides an I2C bus that will tunnel i2c commands through to 27*cc456bd7SSimon Glass the other side of the Chrome OS EC to the I2C bus connected there. 28*cc456bd7SSimon Glass This will work whatever the interface used to talk to the EC (SPI, 29*cc456bd7SSimon Glass I2C or LPC). Some Chromebooks use this when the hardware design 30*cc456bd7SSimon Glass does not allow direct access to the main PMIC from the AP. 31*cc456bd7SSimon Glass 32*cc456bd7SSimon Glass 33c54473cbSPrzemyslaw Marczakconfig DM_I2C_GPIO 34c54473cbSPrzemyslaw Marczak bool "Enable Driver Model for software emulated I2C bus driver" 35c54473cbSPrzemyslaw Marczak depends on DM_I2C && DM_GPIO 36c54473cbSPrzemyslaw Marczak help 37c54473cbSPrzemyslaw Marczak Enable the i2c bus driver emulation by using the GPIOs. The bus GPIO 38c54473cbSPrzemyslaw Marczak configuration is given by the device tree. Kernel-style device tree 39c54473cbSPrzemyslaw Marczak bindings are supported. 40c54473cbSPrzemyslaw Marczak Binding info: doc/device-tree-bindings/i2c/i2c-gpio.txt 41c54473cbSPrzemyslaw Marczak 421174aadaSSimon Glassconfig SYS_I2C_SANDBOX 431174aadaSSimon Glass bool "Sandbox I2C driver" 441174aadaSSimon Glass depends on SANDBOX && DM_I2C 451174aadaSSimon Glass help 461174aadaSSimon Glass Enable I2C support for sandbox. This is an emulation of a real I2C 471174aadaSSimon Glass bus. Devices can be attached to the bus using the device tree 481174aadaSSimon Glass which specifies the driver to use. As an example, see this device 491174aadaSSimon Glass tree fragment from sandbox.dts. It shows that the I2C bus has a 501174aadaSSimon Glass single EEPROM at address 0x2c (7-bit address) which is emulated by 511174aadaSSimon Glass the driver for "sandbox,i2c-eeprom", which is in 521174aadaSSimon Glass drivers/misc/i2c_eeprom_emul.c. 531174aadaSSimon Glass 541174aadaSSimon Glass i2c@0 { 551174aadaSSimon Glass #address-cells = <1>; 561174aadaSSimon Glass #size-cells = <0>; 571174aadaSSimon Glass reg = <0>; 581174aadaSSimon Glass compatible = "sandbox,i2c"; 591174aadaSSimon Glass clock-frequency = <400000>; 601174aadaSSimon Glass eeprom@2c { 611174aadaSSimon Glass reg = <0x2c>; 621174aadaSSimon Glass compatible = "i2c-eeprom"; 631174aadaSSimon Glass emul { 641174aadaSSimon Glass compatible = "sandbox,i2c-eeprom"; 651174aadaSSimon Glass sandbox,filename = "i2c.bin"; 661174aadaSSimon Glass sandbox,size = <128>; 671174aadaSSimon Glass }; 681174aadaSSimon Glass }; 691174aadaSSimon Glass }; 701174aadaSSimon Glass 711174aadaSSimon Glass 7226f820f3SMasahiro Yamadaconfig SYS_I2C_UNIPHIER 7326f820f3SMasahiro Yamada bool "UniPhier I2C driver" 7426f820f3SMasahiro Yamada depends on ARCH_UNIPHIER && DM_I2C 7526f820f3SMasahiro Yamada default y 7626f820f3SMasahiro Yamada help 77b6ef3a3fSMasahiro Yamada Support for UniPhier I2C controller driver. This I2C controller 78b6ef3a3fSMasahiro Yamada is used on PH1-LD4, PH1-sLD8 or older UniPhier SoCs. 79238bd0b8SMasahiro Yamada 80238bd0b8SMasahiro Yamadaconfig SYS_I2C_UNIPHIER_F 81238bd0b8SMasahiro Yamada bool "UniPhier FIFO-builtin I2C driver" 82238bd0b8SMasahiro Yamada depends on ARCH_UNIPHIER && DM_I2C 83238bd0b8SMasahiro Yamada default y 84238bd0b8SMasahiro Yamada help 85b6ef3a3fSMasahiro Yamada Support for UniPhier FIFO-builtin I2C controller driver. 86238bd0b8SMasahiro Yamada This I2C controller is used on PH1-Pro4 or newer UniPhier SoCs. 873d1957f0SSimon Glass 883d1957f0SSimon Glasssource "drivers/i2c/muxes/Kconfig" 89