summaryrefslogtreecommitdiff
path: root/drivers/i2c/Kconfig
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/i2c/Kconfig')
-rw-r--r--drivers/i2c/Kconfig180
1 files changed, 151 insertions, 29 deletions
diff --git a/drivers/i2c/Kconfig b/drivers/i2c/Kconfig
index 63d03a3ceb..5d27f503bf 100644
--- a/drivers/i2c/Kconfig
+++ b/drivers/i2c/Kconfig
@@ -47,6 +47,35 @@ config SPL_DM_I2C
device (bus child) info is kept as parent platdata. The interface
is defined in include/i2c.h.
+config SYS_I2C_LEGACY
+ bool "Enable legacy I2C subsystem and drivers"
+ depends on !DM_I2C
+ help
+ Enable the legacy I2C subsystem and drivers. While this is
+ deprecated in U-Boot itself, this can be useful in some situations
+ in SPL or TPL.
+
+config SPL_SYS_I2C_LEGACY
+ bool "Enable legacy I2C subsystem and drivers in SPL"
+ depends on SUPPORT_SPL && !SPL_DM_I2C
+ help
+ Enable the legacy I2C subsystem and drivers in SPL. This is useful
+ in some size constrained situations.
+
+config TPL_SYS_I2C_LEGACY
+ bool "Enable legacy I2C subsystem and drivers in TPL"
+ depends on SUPPORT_TPL && !SPL_DM_I2C
+ help
+ Enable the legacy I2C subsystem and drivers in TPL. This is useful
+ in some size constrained situations.
+
+config SYS_I2C_EARLY_INIT
+ bool "Enable legacy I2C subsystem early in boot"
+ depends on BOARD_EARLY_INIT_F && SPL_SYS_I2C_LEGACY && SYS_I2C_MXC
+ help
+ Add the function prototype for i2c_early_init_f which is called in
+ board_early_init_f.
+
config I2C_CROS_EC_TUNNEL
tristate "Chrome OS EC tunnel I2C bus"
depends on CROS_EC
@@ -124,11 +153,36 @@ config SYS_I2C_IPROC
config SYS_I2C_FSL
bool "Freescale I2C bus driver"
- depends on DM_I2C
help
Add support for Freescale I2C busses as used on MPC8240, MPC8245, and
MPC85xx processors.
+if SYS_I2C_FSL && (SYS_I2C_LEGACY || SPL_SYS_I2C_LEGACY)
+config SYS_FSL_I2C_OFFSET
+ hex "Offset from the IMMR of the address of the first I2C controller"
+
+config SYS_FSL_HAS_I2C2_OFFSET
+ bool "Support a second I2C controller"
+
+config SYS_FSL_I2C2_OFFSET
+ hex "Offset from the IMMR of the address of the second I2C controller"
+ depends on SYS_FSL_HAS_I2C2_OFFSET
+
+config SYS_FSL_HAS_I2C3_OFFSET
+ bool "Support a third I2C controller"
+
+config SYS_FSL_I2C3_OFFSET
+ hex "Offset from the IMMR of the address of the third I2C controller"
+ depends on SYS_FSL_HAS_I2C3_OFFSET
+
+config SYS_FSL_HAS_I2C4_OFFSET
+ bool "Support a fourth I2C controller"
+
+config SYS_FSL_I2C4_OFFSET
+ hex "Offset from the IMMR of the address of the fourth I2C controller"
+ depends on SYS_FSL_HAS_I2C4_OFFSET
+endif
+
config SYS_I2C_CADENCE
tristate "Cadence I2C Controller"
depends on DM_I2C
@@ -205,10 +259,7 @@ config SYS_I2C_MXC
channels and operating on standard mode up to 100 kbits/s and fast
mode up to 400 kbits/s.
-# These settings are not used with DM_I2C, however SPL doesn't use
-# DM_I2C even if DM_I2C is enabled, and so might use these settings even
-# when main u-boot does not!
-if SYS_I2C_MXC && (!DM_I2C || SPL)
+if SYS_I2C_MXC && (SYS_I2C_LEGACY || SPL_SYS_I2C_LEGACY)
config SYS_I2C_MXC_I2C1
bool "NXP MXC I2C1"
help
@@ -267,7 +318,7 @@ config SYS_MXC_I2C1_SPEED
MXC I2C Channel 1 speed
config SYS_MXC_I2C1_SLAVE
- int "I2C1 Slave"
+ hex "I2C1 Slave"
default 0
help
MXC I2C1 Slave
@@ -282,7 +333,7 @@ config SYS_MXC_I2C2_SPEED
MXC I2C Channel 2 speed
config SYS_MXC_I2C2_SLAVE
- int "I2C2 Slave"
+ hex "I2C2 Slave"
default 0
help
MXC I2C2 Slave
@@ -296,7 +347,7 @@ config SYS_MXC_I2C3_SPEED
MXC I2C Channel 3 speed
config SYS_MXC_I2C3_SLAVE
- int "I2C3 Slave"
+ hex "I2C3 Slave"
default 0
help
MXC I2C3 Slave
@@ -310,7 +361,7 @@ config SYS_MXC_I2C4_SPEED
MXC I2C Channel 4 speed
config SYS_MXC_I2C4_SLAVE
- int "I2C4 Slave"
+ hex "I2C4 Slave"
default 0
help
MXC I2C4 Slave
@@ -324,7 +375,7 @@ config SYS_MXC_I2C5_SPEED
MXC I2C Channel 5 speed
config SYS_MXC_I2C5_SLAVE
- int "I2C5 Slave"
+ hex "I2C5 Slave"
default 0
help
MXC I2C5 Slave
@@ -338,7 +389,7 @@ config SYS_MXC_I2C6_SPEED
MXC I2C Channel 6 speed
config SYS_MXC_I2C6_SLAVE
- int "I2C6 Slave"
+ hex "I2C6 Slave"
default 0
help
MXC I2C6 Slave
@@ -352,7 +403,7 @@ config SYS_MXC_I2C7_SPEED
MXC I2C Channel 7 speed
config SYS_MXC_I2C7_SLAVE
- int "I2C7 Slave"
+ hex "I2C7 Slave"
default 0
help
MXC I2C7 Slave
@@ -366,7 +417,7 @@ config SYS_MXC_I2C8_SPEED
MXC I2C Channel 8 speed
config SYS_MXC_I2C8_SLAVE
- int "I2C8 Slave"
+ hex "I2C8 Slave"
default 0
help
MXC I2C8 Slave
@@ -394,20 +445,6 @@ config SYS_I2C_OMAP24XX
help
Add support for the OMAP2+ I2C driver.
-if SYS_I2C_OMAP24XX
-config SYS_OMAP24_I2C_SLAVE
- int "I2C Slave addr channel 0"
- default 1
- help
- OMAP24xx I2C Slave address channel 0
-
-config SYS_OMAP24_I2C_SPEED
- int "I2C Slave channel 0 speed"
- default 100000
- help
- OMAP24xx Slave speed channel 0
-endif
-
config SYS_I2C_RCAR_I2C
bool "Renesas RCar I2C driver"
depends on (RCAR_GEN3 || RCAR_GEN2) && DM_I2C
@@ -437,6 +474,73 @@ config SYS_I2C_SANDBOX
bus. Devices can be attached to the bus using the device tree
which specifies the driver to use. See sandbox.dts as an example.
+config SYS_I2C_SH
+ bool "Legacy SuperH I2C interface"
+ depends on ARCH_RMOBILE && SYS_I2C_LEGACY
+ help
+ Enable the legacy SuperH I2C interface.
+
+if SYS_I2C_SH
+config SYS_I2C_SH_NUM_CONTROLLERS
+ int
+ default 5
+
+config SYS_I2C_SH_BASE0
+ hex
+ default 0xE6820000
+
+config SYS_I2C_SH_BASE1
+ hex
+ default 0xE6822000
+
+config SYS_I2C_SH_BASE2
+ hex
+ default 0xE6824000
+
+config SYS_I2C_SH_BASE3
+ hex
+ default 0xE6826000
+
+config SYS_I2C_SH_BASE4
+ hex
+ default 0xE6828000
+
+config SH_I2C_8BIT
+ bool
+ default y
+
+config SH_I2C_DATA_HIGH
+ int
+ default 4
+
+config SH_I2C_DATA_LOW
+ int
+ default 5
+
+config SH_I2C_CLOCK
+ int
+ default 104000000
+endif
+
+config SYS_I2C_SOFT
+ bool "Legacy software I2C interface"
+ help
+ Enable the legacy software defined I2C interface
+
+config SYS_I2C_SOFT_SPEED
+ int "Software I2C bus speed"
+ depends on SYS_I2C_SOFT
+ default 100000
+ help
+ Speed of the software I2C bus
+
+config SYS_I2C_SOFT_SLAVE
+ hex "Software I2C slave address"
+ depends on SYS_I2C_SOFT
+ default 0xfe
+ help
+ Slave address of the software I2C bus
+
config SYS_I2C_OCTEON
bool "Octeon II/III/TX/TX2 I2C driver"
depends on (ARCH_OCTEON || ARCH_OCTEONTX || ARCH_OCTEONTX2) && DM_I2C
@@ -449,7 +553,7 @@ config SYS_I2C_OCTEON
config SYS_I2C_S3C24X0
bool "Samsung I2C driver"
- depends on ARCH_EXYNOS4 && DM_I2C
+ depends on (ARCH_EXYNOS4 || ARCH_EXYNOS5) && DM_I2C
help
Support for Samsung I2C controller as Samsung SoCs.
@@ -511,7 +615,6 @@ config SYS_I2C_VERSATILE
config SYS_I2C_MVTWSI
bool "Marvell I2C driver"
- depends on DM_I2C
help
Support for Marvell I2C controllers as used on the orion5x and
kirkwood SoC families.
@@ -526,6 +629,25 @@ config TEGRA186_BPMP_I2C
by the BPMP, and can only be accessed by the main CPU via IPC
requests to the BPMP. This driver covers the latter case.
+config SYS_I2C_SLAVE
+ hex "I2C Slave address channel (all buses)"
+ depends on SYS_I2C_LEGACY || SPL_SYS_I2C_LEGACY || TPL_SYS_I2C_LEGACY
+ default 0xfe
+ help
+ I2C Slave address channel 0 for all buses in the legacy drivers.
+ Many boards/controllers/drivers don't support an I2C slave
+ interface so provide a default slave address for them for use in
+ common code. A real value for CONFIG_SYS_I2C_SLAVE should be
+ defined for any board which does support a slave interface and
+ this default used otherwise.
+
+config SYS_I2C_SPEED
+ int "I2C Slave channel 0 speed (all buses)"
+ depends on SYS_I2C_LEGACY || SPL_SYS_I2C_LEGACY || TPL_SYS_I2C_LEGACY
+ default 100000
+ help
+ I2C Slave speed channel 0 for all buses in the legacy drivers.
+
config SYS_I2C_BUS_MAX
int "Max I2C busses"
depends on ARCH_KEYSTONE || ARCH_OMAP2PLUS || ARCH_SOCFPGA