2019-11-01 20:45:29 +08:00
|
|
|
# I2C configuration options
|
2015-08-27 05:56:43 +08:00
|
|
|
|
|
|
|
# Copyright (c) 2015 Intel Corporation
|
2017-01-19 09:01:01 +08:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
2015-08-27 05:56:43 +08:00
|
|
|
|
|
|
|
#
|
|
|
|
# I2C options
|
|
|
|
#
|
2015-09-20 11:20:52 +08:00
|
|
|
menuconfig I2C
|
2018-02-28 18:27:46 +08:00
|
|
|
bool "I2C Drivers"
|
2019-10-22 21:22:35 +08:00
|
|
|
select HAS_DTS_I2C
|
2015-09-20 11:20:52 +08:00
|
|
|
help
|
2017-04-24 17:06:58 +08:00
|
|
|
Enable I2C Driver Configuration
|
2015-08-27 05:56:43 +08:00
|
|
|
|
2017-04-08 06:53:37 +08:00
|
|
|
if I2C
|
|
|
|
|
2020-01-09 06:36:01 +08:00
|
|
|
config I2C_SHELL
|
|
|
|
bool "Enable I2C Shell"
|
|
|
|
default y
|
|
|
|
depends on SHELL
|
|
|
|
help
|
|
|
|
Enable I2C Shell.
|
|
|
|
|
|
|
|
The I2C shell currently support scanning.
|
|
|
|
|
Kconfig: Use the first default with a satisfied condition
Up until now, Zephyr has patched Kconfig to use the last 'default' with
a satisfied condition, instead of the first one. I'm not sure why the
patch was added (it predates Kconfiglib), but I suspect it's related to
Kconfig.defconfig files.
There are at least three problems with the patch:
1. It's inconsistent with how Kconfig works in other projects, which
might confuse newcomers.
2. Due to oversights, earlier 'range' properties are still preferred,
as well as earlier 'default' properties on choices.
In addition to being inconsistent, this makes it impossible to
override 'range' properties and choice 'default' properties if the
base definition of the symbol/choice already has 'range'/'default'
properties.
I've seen errors caused by the inconsistency, and I suspect there
are more.
3. A fork of Kconfiglib that adds the patch needs to be maintained.
Get rid of the patch and go back to standard Kconfig behavior, as
follows:
1. Include the Kconfig.defconfig files first instead of last in
Kconfig.zephyr.
2. Include boards/Kconfig and arch/<arch>/Kconfig first instead of
last in arch/Kconfig.
3. Include arch/<arch>/soc/*/Kconfig first instead of last in
arch/<arch>/Kconfig.
4. Swap a few other 'source's to preserve behavior for some scattered
symbols with multiple definitions.
Swap 'source's in some no-op cases too, where it might match the
intent.
5. Reverse the defaults on symbol definitions that have more than one
default.
Skip defaults that are mutually exclusive, e.g. where each default
has an 'if <some board>' condition. They are already safe.
6. Remove the prefer-later-defaults patch from Kconfiglib.
Testing was done with a Python script that lists all Kconfig
symbols/choices with multiple defaults, along with a whitelist of fixed
symbols. The script also verifies that there are no "unreachable"
defaults hidden by defaults without conditions
As an additional test, zephyr/.config was generated before and after the
change for several samples and checked to be identical (after sorting).
This commit includes some default-related cleanups as well:
- Simplify some symbol definitions, e.g. where a default has 'if FOO'
when the symbol already has 'depends on FOO'.
- Remove some redundant 'default ""' for string symbols. This is the
implicit default.
Piggyback fixes for swapped ranges on BT_L2CAP_RX_MTU and
BT_L2CAP_TX_MTU (caused by confusing inconsistency).
Piggyback some fixes for style nits too, e.g. unindented help texts.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-30 16:57:47 +08:00
|
|
|
# Include these first so that any properties (e.g. defaults) below can be
|
2019-06-19 02:45:40 +08:00
|
|
|
# overridden (by defining symbols in multiple locations)
|
2019-04-24 04:33:18 +08:00
|
|
|
source "drivers/i2c/Kconfig.cc13xx_cc26xx"
|
Kconfig: Use the first default with a satisfied condition
Up until now, Zephyr has patched Kconfig to use the last 'default' with
a satisfied condition, instead of the first one. I'm not sure why the
patch was added (it predates Kconfiglib), but I suspect it's related to
Kconfig.defconfig files.
There are at least three problems with the patch:
1. It's inconsistent with how Kconfig works in other projects, which
might confuse newcomers.
2. Due to oversights, earlier 'range' properties are still preferred,
as well as earlier 'default' properties on choices.
In addition to being inconsistent, this makes it impossible to
override 'range' properties and choice 'default' properties if the
base definition of the symbol/choice already has 'range'/'default'
properties.
I've seen errors caused by the inconsistency, and I suspect there
are more.
3. A fork of Kconfiglib that adds the patch needs to be maintained.
Get rid of the patch and go back to standard Kconfig behavior, as
follows:
1. Include the Kconfig.defconfig files first instead of last in
Kconfig.zephyr.
2. Include boards/Kconfig and arch/<arch>/Kconfig first instead of
last in arch/Kconfig.
3. Include arch/<arch>/soc/*/Kconfig first instead of last in
arch/<arch>/Kconfig.
4. Swap a few other 'source's to preserve behavior for some scattered
symbols with multiple definitions.
Swap 'source's in some no-op cases too, where it might match the
intent.
5. Reverse the defaults on symbol definitions that have more than one
default.
Skip defaults that are mutually exclusive, e.g. where each default
has an 'if <some board>' condition. They are already safe.
6. Remove the prefer-later-defaults patch from Kconfiglib.
Testing was done with a Python script that lists all Kconfig
symbols/choices with multiple defaults, along with a whitelist of fixed
symbols. The script also verifies that there are no "unreachable"
defaults hidden by defaults without conditions
As an additional test, zephyr/.config was generated before and after the
change for several samples and checked to be identical (after sorting).
This commit includes some default-related cleanups as well:
- Simplify some symbol definitions, e.g. where a default has 'if FOO'
when the symbol already has 'depends on FOO'.
- Remove some redundant 'default ""' for string symbols. This is the
implicit default.
Piggyback fixes for swapped ranges on BT_L2CAP_RX_MTU and
BT_L2CAP_TX_MTU (caused by confusing inconsistency).
Piggyback some fixes for style nits too, e.g. unindented help texts.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-30 16:57:47 +08:00
|
|
|
source "drivers/i2c/Kconfig.dw"
|
|
|
|
source "drivers/i2c/Kconfig.esp32"
|
|
|
|
source "drivers/i2c/slave/Kconfig"
|
|
|
|
source "drivers/i2c/Kconfig.gpio"
|
2019-05-08 06:41:54 +08:00
|
|
|
source "drivers/i2c/Kconfig.xec"
|
Kconfig: Use the first default with a satisfied condition
Up until now, Zephyr has patched Kconfig to use the last 'default' with
a satisfied condition, instead of the first one. I'm not sure why the
patch was added (it predates Kconfiglib), but I suspect it's related to
Kconfig.defconfig files.
There are at least three problems with the patch:
1. It's inconsistent with how Kconfig works in other projects, which
might confuse newcomers.
2. Due to oversights, earlier 'range' properties are still preferred,
as well as earlier 'default' properties on choices.
In addition to being inconsistent, this makes it impossible to
override 'range' properties and choice 'default' properties if the
base definition of the symbol/choice already has 'range'/'default'
properties.
I've seen errors caused by the inconsistency, and I suspect there
are more.
3. A fork of Kconfiglib that adds the patch needs to be maintained.
Get rid of the patch and go back to standard Kconfig behavior, as
follows:
1. Include the Kconfig.defconfig files first instead of last in
Kconfig.zephyr.
2. Include boards/Kconfig and arch/<arch>/Kconfig first instead of
last in arch/Kconfig.
3. Include arch/<arch>/soc/*/Kconfig first instead of last in
arch/<arch>/Kconfig.
4. Swap a few other 'source's to preserve behavior for some scattered
symbols with multiple definitions.
Swap 'source's in some no-op cases too, where it might match the
intent.
5. Reverse the defaults on symbol definitions that have more than one
default.
Skip defaults that are mutually exclusive, e.g. where each default
has an 'if <some board>' condition. They are already safe.
6. Remove the prefer-later-defaults patch from Kconfiglib.
Testing was done with a Python script that lists all Kconfig
symbols/choices with multiple defaults, along with a whitelist of fixed
symbols. The script also verifies that there are no "unreachable"
defaults hidden by defaults without conditions
As an additional test, zephyr/.config was generated before and after the
change for several samples and checked to be identical (after sorting).
This commit includes some default-related cleanups as well:
- Simplify some symbol definitions, e.g. where a default has 'if FOO'
when the symbol already has 'depends on FOO'.
- Remove some redundant 'default ""' for string symbols. This is the
implicit default.
Piggyback fixes for swapped ranges on BT_L2CAP_RX_MTU and
BT_L2CAP_TX_MTU (caused by confusing inconsistency).
Piggyback some fixes for style nits too, e.g. unindented help texts.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-30 16:57:47 +08:00
|
|
|
source "drivers/i2c/Kconfig.nrfx"
|
|
|
|
source "drivers/i2c/Kconfig.sbcon"
|
2018-11-28 07:02:13 +08:00
|
|
|
source "drivers/i2c/Kconfig.sifive"
|
Kconfig: Use the first default with a satisfied condition
Up until now, Zephyr has patched Kconfig to use the last 'default' with
a satisfied condition, instead of the first one. I'm not sure why the
patch was added (it predates Kconfiglib), but I suspect it's related to
Kconfig.defconfig files.
There are at least three problems with the patch:
1. It's inconsistent with how Kconfig works in other projects, which
might confuse newcomers.
2. Due to oversights, earlier 'range' properties are still preferred,
as well as earlier 'default' properties on choices.
In addition to being inconsistent, this makes it impossible to
override 'range' properties and choice 'default' properties if the
base definition of the symbol/choice already has 'range'/'default'
properties.
I've seen errors caused by the inconsistency, and I suspect there
are more.
3. A fork of Kconfiglib that adds the patch needs to be maintained.
Get rid of the patch and go back to standard Kconfig behavior, as
follows:
1. Include the Kconfig.defconfig files first instead of last in
Kconfig.zephyr.
2. Include boards/Kconfig and arch/<arch>/Kconfig first instead of
last in arch/Kconfig.
3. Include arch/<arch>/soc/*/Kconfig first instead of last in
arch/<arch>/Kconfig.
4. Swap a few other 'source's to preserve behavior for some scattered
symbols with multiple definitions.
Swap 'source's in some no-op cases too, where it might match the
intent.
5. Reverse the defaults on symbol definitions that have more than one
default.
Skip defaults that are mutually exclusive, e.g. where each default
has an 'if <some board>' condition. They are already safe.
6. Remove the prefer-later-defaults patch from Kconfiglib.
Testing was done with a Python script that lists all Kconfig
symbols/choices with multiple defaults, along with a whitelist of fixed
symbols. The script also verifies that there are no "unreachable"
defaults hidden by defaults without conditions
As an additional test, zephyr/.config was generated before and after the
change for several samples and checked to be identical (after sorting).
This commit includes some default-related cleanups as well:
- Simplify some symbol definitions, e.g. where a default has 'if FOO'
when the symbol already has 'depends on FOO'.
- Remove some redundant 'default ""' for string symbols. This is the
implicit default.
Piggyback fixes for swapped ranges on BT_L2CAP_RX_MTU and
BT_L2CAP_TX_MTU (caused by confusing inconsistency).
Piggyback some fixes for style nits too, e.g. unindented help texts.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-30 16:57:47 +08:00
|
|
|
source "drivers/i2c/Kconfig.stm32"
|
2019-03-07 09:03:48 +08:00
|
|
|
source "drivers/i2c/Kconfig.sam0"
|
2019-07-09 21:37:17 +08:00
|
|
|
source "drivers/i2c/Kconfig.litex"
|
Kconfig: Use the first default with a satisfied condition
Up until now, Zephyr has patched Kconfig to use the last 'default' with
a satisfied condition, instead of the first one. I'm not sure why the
patch was added (it predates Kconfiglib), but I suspect it's related to
Kconfig.defconfig files.
There are at least three problems with the patch:
1. It's inconsistent with how Kconfig works in other projects, which
might confuse newcomers.
2. Due to oversights, earlier 'range' properties are still preferred,
as well as earlier 'default' properties on choices.
In addition to being inconsistent, this makes it impossible to
override 'range' properties and choice 'default' properties if the
base definition of the symbol/choice already has 'range'/'default'
properties.
I've seen errors caused by the inconsistency, and I suspect there
are more.
3. A fork of Kconfiglib that adds the patch needs to be maintained.
Get rid of the patch and go back to standard Kconfig behavior, as
follows:
1. Include the Kconfig.defconfig files first instead of last in
Kconfig.zephyr.
2. Include boards/Kconfig and arch/<arch>/Kconfig first instead of
last in arch/Kconfig.
3. Include arch/<arch>/soc/*/Kconfig first instead of last in
arch/<arch>/Kconfig.
4. Swap a few other 'source's to preserve behavior for some scattered
symbols with multiple definitions.
Swap 'source's in some no-op cases too, where it might match the
intent.
5. Reverse the defaults on symbol definitions that have more than one
default.
Skip defaults that are mutually exclusive, e.g. where each default
has an 'if <some board>' condition. They are already safe.
6. Remove the prefer-later-defaults patch from Kconfiglib.
Testing was done with a Python script that lists all Kconfig
symbols/choices with multiple defaults, along with a whitelist of fixed
symbols. The script also verifies that there are no "unreachable"
defaults hidden by defaults without conditions
As an additional test, zephyr/.config was generated before and after the
change for several samples and checked to be identical (after sorting).
This commit includes some default-related cleanups as well:
- Simplify some symbol definitions, e.g. where a default has 'if FOO'
when the symbol already has 'depends on FOO'.
- Remove some redundant 'default ""' for string symbols. This is the
implicit default.
Piggyback fixes for swapped ranges on BT_L2CAP_RX_MTU and
BT_L2CAP_TX_MTU (caused by confusing inconsistency).
Piggyback some fixes for style nits too, e.g. unindented help texts.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
2018-07-30 16:57:47 +08:00
|
|
|
|
2015-10-27 03:56:02 +08:00
|
|
|
config I2C_INIT_PRIORITY
|
2018-02-28 18:27:46 +08:00
|
|
|
int "Init priority"
|
2015-12-19 21:23:50 +08:00
|
|
|
default 60
|
2015-10-27 03:56:02 +08:00
|
|
|
help
|
2017-04-24 17:06:58 +08:00
|
|
|
I2C device driver initialization priority.
|
2015-10-27 03:56:02 +08:00
|
|
|
|
2018-09-18 02:24:08 +08:00
|
|
|
|
|
|
|
module = I2C
|
|
|
|
module-str = i2c
|
|
|
|
source "subsys/logging/Kconfig.template.log_config"
|
2016-01-29 01:16:53 +08:00
|
|
|
|
2016-05-07 19:53:48 +08:00
|
|
|
config I2C_0
|
2017-04-24 17:06:58 +08:00
|
|
|
bool "Enable I2C Port 0"
|
2016-05-07 19:53:48 +08:00
|
|
|
|
|
|
|
config I2C_1
|
2016-05-25 07:17:13 +08:00
|
|
|
bool "Enable I2C Port 1"
|
2016-05-07 19:53:48 +08:00
|
|
|
|
2017-03-31 19:08:16 +08:00
|
|
|
config I2C_2
|
|
|
|
bool "Enable I2C Port 2"
|
|
|
|
|
2017-06-23 16:51:27 +08:00
|
|
|
config I2C_3
|
|
|
|
bool "Enable I2C Port 3"
|
|
|
|
|
2018-05-17 21:45:50 +08:00
|
|
|
config I2C_4
|
|
|
|
bool "Enable I2C Port 4"
|
|
|
|
|
2018-07-24 06:02:57 +08:00
|
|
|
config I2C_5
|
|
|
|
bool "Enable I2C Port 5"
|
|
|
|
|
|
|
|
config I2C_6
|
|
|
|
bool "Enable I2C Port 6"
|
|
|
|
|
|
|
|
config I2C_7
|
|
|
|
bool "Enable I2C Port 7"
|
|
|
|
|
2018-12-12 21:42:39 +08:00
|
|
|
config I2C_GECKO
|
|
|
|
bool "Gecko I2C driver"
|
|
|
|
depends on HAS_SILABS_GECKO
|
2018-12-12 23:30:00 +08:00
|
|
|
select SOC_GECKO_I2C
|
2018-12-12 21:42:39 +08:00
|
|
|
help
|
|
|
|
Enable the SiLabs Gecko I2C bus driver.
|
|
|
|
|
2018-02-28 18:27:46 +08:00
|
|
|
config I2C_SAM_TWIHS
|
|
|
|
bool "Atmel SAM (TWIHS) I2C driver"
|
|
|
|
depends on SOC_FAMILY_SAM
|
2016-11-29 09:37:30 +08:00
|
|
|
help
|
2018-02-28 18:27:46 +08:00
|
|
|
Enable Atmel SAM MCU Family (TWIHS) I2C bus driver.
|
2016-11-29 09:37:30 +08:00
|
|
|
|
2018-02-28 18:27:46 +08:00
|
|
|
config I2C_SAM_TWI
|
|
|
|
bool "Atmel SAM (TWI) I2C driver"
|
|
|
|
depends on SOC_FAMILY_SAM
|
2016-11-29 09:37:30 +08:00
|
|
|
help
|
2018-02-28 18:27:46 +08:00
|
|
|
Enable Atmel SAM MCU Family (TWI) I2C bus driver.
|
2016-11-29 09:37:30 +08:00
|
|
|
|
2018-02-28 18:27:46 +08:00
|
|
|
config I2C_MCUX
|
|
|
|
bool "MCUX I2C driver"
|
|
|
|
depends on HAS_MCUX
|
2016-08-12 08:15:51 +08:00
|
|
|
help
|
2018-02-28 18:27:46 +08:00
|
|
|
Enable the mcux I2C driver.
|
2016-08-12 08:15:51 +08:00
|
|
|
|
2019-12-09 03:50:41 +08:00
|
|
|
config I2C_MCUX_FLEXCOMM
|
|
|
|
bool "MCUX FLEXCOMM I2C driver"
|
|
|
|
depends on HAS_MCUX_FLEXCOMM
|
|
|
|
help
|
|
|
|
Enable the mcux flexcomm i2c driver.
|
|
|
|
|
2019-01-17 05:11:45 +08:00
|
|
|
config I2C_MCUX_LPI2C
|
|
|
|
bool "MCUX LPI2C driver"
|
|
|
|
depends on HAS_MCUX_LPI2C && CLOCK_CONTROL
|
|
|
|
help
|
|
|
|
Enable the mcux LPI2C driver.
|
|
|
|
|
2018-07-04 00:20:19 +08:00
|
|
|
config I2C_IMX
|
|
|
|
bool "i.MX I2C driver"
|
|
|
|
depends on HAS_IMX_I2C
|
|
|
|
help
|
|
|
|
Enable the i.MX I2C driver.
|
|
|
|
|
2018-02-28 18:27:46 +08:00
|
|
|
config I2C_CC32XX
|
|
|
|
bool "CC32XX I2C driver"
|
|
|
|
depends on SOC_SERIES_CC32XX
|
2016-11-29 09:37:30 +08:00
|
|
|
help
|
2018-02-28 18:27:46 +08:00
|
|
|
Enable the CC32XX I2C driver.
|
2016-11-29 09:37:30 +08:00
|
|
|
|
2018-02-28 18:27:46 +08:00
|
|
|
config I2C_BITBANG
|
|
|
|
bool
|
2016-08-12 08:15:51 +08:00
|
|
|
help
|
2018-02-28 18:27:46 +08:00
|
|
|
Enable library used for software driven (bit banging) I2C support
|
2016-08-12 08:15:51 +08:00
|
|
|
|
2018-02-28 18:27:46 +08:00
|
|
|
config I2C_NIOS2
|
|
|
|
bool "Nios-II I2C driver"
|
|
|
|
depends on HAS_ALTERA_HAL
|
2016-08-12 08:15:51 +08:00
|
|
|
help
|
2018-02-28 18:27:46 +08:00
|
|
|
Enable the Nios-II I2C driver.
|
2016-08-12 08:15:51 +08:00
|
|
|
|
2019-10-22 21:21:41 +08:00
|
|
|
config I2C_0_IRQ_PRI
|
|
|
|
int "Port 0 interrupt priority"
|
|
|
|
depends on I2C_NIOS2
|
|
|
|
help
|
|
|
|
IRQ priority.
|
|
|
|
|
2019-04-02 03:09:44 +08:00
|
|
|
config I2C_RV32M1_LPI2C
|
|
|
|
bool "RV32M1 LPI2C driver"
|
|
|
|
depends on HAS_RV32M1_LPI2C && CLOCK_CONTROL
|
|
|
|
help
|
|
|
|
Enable the RV32M1 LPI2C driver.
|
|
|
|
|
2017-04-24 17:06:58 +08:00
|
|
|
endif # I2C
|