2017-04-05 18:22:41 +08:00
|
|
|
#
|
|
|
|
# Copyright (c) 2017 Linaro Ltd.
|
|
|
|
#
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
#
|
|
|
|
|
|
|
|
config I2C_GPIO
|
|
|
|
bool "GPIO bit banging I2C support"
|
|
|
|
select I2C_BITBANG
|
|
|
|
help
|
|
|
|
Enable software driven (bit banging) I2C support using GPIO pins
|
|
|
|
|
|
|
|
# ---------- Port 0 ----------
|
|
|
|
|
|
|
|
config I2C_GPIO_0
|
|
|
|
bool "Enable GPIO Bit Bang I2C device 0"
|
|
|
|
depends on I2C_GPIO
|
|
|
|
help
|
|
|
|
This tells the driver to configure the I2C device at boot, depending
|
|
|
|
on the additional configuration options below.
|
|
|
|
|
2018-08-02 21:55:22 +08:00
|
|
|
if I2C_GPIO_0
|
|
|
|
|
2017-04-05 18:22:41 +08:00
|
|
|
config I2C_GPIO_0_NAME
|
|
|
|
string "GPIO Bit Bang I2C device 0 device name"
|
|
|
|
default "I2C_0"
|
|
|
|
help
|
|
|
|
This is the device name for the I2C device, and is included in the
|
|
|
|
device struct.
|
|
|
|
|
|
|
|
config I2C_GPIO_0_GPIO
|
|
|
|
string "Bit Bang I2C device 0 GPIO name"
|
|
|
|
help
|
|
|
|
This is the name of the GPIO device that controls the I2C lines.
|
|
|
|
|
|
|
|
config I2C_GPIO_0_SCL_PIN
|
|
|
|
int "Bit Bang I2C device 0 GPIO pin number for SCL"
|
|
|
|
help
|
|
|
|
This is the GPIO pin number for the I2S SCL line
|
|
|
|
|
|
|
|
config I2C_GPIO_0_SDA_PIN
|
|
|
|
int "Bit Bang I2C device 0 GPIO pin number for SDA"
|
|
|
|
help
|
|
|
|
This is the GPIO pin number for the I2S SDA line
|
|
|
|
|
2018-08-02 21:55:22 +08:00
|
|
|
endif # I2C_GPIO_0
|
|
|
|
|
2017-04-05 18:22:41 +08:00
|
|
|
# ---------- Port 1 ----------
|
|
|
|
|
|
|
|
config I2C_GPIO_1
|
|
|
|
bool "Enable GPIO Bit Bang I2C device 1"
|
|
|
|
depends on I2C_GPIO
|
|
|
|
help
|
|
|
|
This tells the driver to configure the I2C device at boot, depending
|
|
|
|
on the additional configuration options below.
|
|
|
|
|
2018-08-02 21:55:22 +08:00
|
|
|
if I2C_GPIO_1
|
|
|
|
|
2017-04-05 18:22:41 +08:00
|
|
|
config I2C_GPIO_1_NAME
|
|
|
|
string "Bit Bang I2C device 1 device name"
|
|
|
|
default "I2C_1"
|
|
|
|
help
|
|
|
|
This is the device name for the I2C device, and is included in the
|
|
|
|
device struct.
|
|
|
|
|
|
|
|
config I2C_GPIO_1_GPIO
|
|
|
|
string "Bit Bang I2C device 1 GPIO name"
|
|
|
|
help
|
|
|
|
This is the name of the GPIO device that controls the I2C lines.
|
|
|
|
|
|
|
|
config I2C_GPIO_1_SCL_PIN
|
|
|
|
int "Bit Bang I2C device 1 GPIO pin number for SCL"
|
|
|
|
help
|
|
|
|
This is the GPIO pin number for the I2S SCL line
|
|
|
|
|
|
|
|
config I2C_GPIO_1_SDA_PIN
|
|
|
|
int "Bit Bang I2C device 1 GPIO pin number for SDA"
|
|
|
|
help
|
|
|
|
This is the GPIO pin number for the I2S SDA line
|
|
|
|
|
2018-08-02 21:55:22 +08:00
|
|
|
endif # I2C_GPIO_1
|
|
|
|
|
2017-04-05 18:22:41 +08:00
|
|
|
# ---------- Port 2 ----------
|
|
|
|
|
|
|
|
config I2C_GPIO_2
|
|
|
|
bool "Enable GPIO Bit Bang I2C device 2"
|
|
|
|
depends on I2C_GPIO
|
|
|
|
help
|
|
|
|
This tells the driver to configure the I2C device at boot, depending
|
|
|
|
on the additional configuration options below.
|
|
|
|
|
2018-08-02 21:55:22 +08:00
|
|
|
if I2C_GPIO_2
|
|
|
|
|
2017-04-05 18:22:41 +08:00
|
|
|
config I2C_GPIO_2_NAME
|
|
|
|
string "Bit Bang I2C device 2 device name"
|
|
|
|
default "I2C_2"
|
|
|
|
help
|
|
|
|
This is the device name for the I2C device, and is included in the
|
|
|
|
device struct.
|
|
|
|
|
|
|
|
config I2C_GPIO_2_GPIO
|
|
|
|
string "Bit Bang I2C device 2 GPIO name"
|
|
|
|
help
|
|
|
|
This is the name of the GPIO device that controls the I2C lines.
|
|
|
|
|
|
|
|
config I2C_GPIO_2_SCL_PIN
|
|
|
|
int "Bit Bang I2C device 2 GPIO pin number for SCL"
|
|
|
|
help
|
|
|
|
This is the GPIO pin number for the I2S SCL line
|
|
|
|
|
|
|
|
config I2C_GPIO_2_SDA_PIN
|
|
|
|
int "Bit Bang I2C device 2 GPIO pin number for SDA"
|
|
|
|
help
|
|
|
|
This is the GPIO pin number for the I2S SDA line
|
|
|
|
|
2018-08-02 21:55:22 +08:00
|
|
|
endif # I2C_GPIO_2
|
|
|
|
|
2017-04-05 18:22:41 +08:00
|
|
|
# ---------- Port 3 ----------
|
|
|
|
|
|
|
|
config I2C_GPIO_3
|
|
|
|
bool "Enable GPIO Bit Bang I2C device 3"
|
|
|
|
depends on I2C_GPIO
|
|
|
|
help
|
|
|
|
This tells the driver to configure the I2C device at boot, depending
|
|
|
|
on the additional configuration options below.
|
|
|
|
|
2018-08-02 21:55:22 +08:00
|
|
|
if I2C_GPIO_3
|
|
|
|
|
2017-04-05 18:22:41 +08:00
|
|
|
config I2C_GPIO_3_NAME
|
|
|
|
string "Bit Bang I2C device 3 device name"
|
|
|
|
default "I2C_3"
|
|
|
|
help
|
|
|
|
This is the device name for the I2C device, and is included in the
|
|
|
|
device struct.
|
|
|
|
|
|
|
|
config I2C_GPIO_3_GPIO
|
|
|
|
string "Bit Bang I2C device 3 GPIO name"
|
|
|
|
help
|
|
|
|
This is the name of the GPIO device that controls the I2C lines.
|
|
|
|
|
|
|
|
config I2C_GPIO_3_SCL_PIN
|
|
|
|
int "Bit Bang I2C device 3 GPIO pin number for SCL"
|
|
|
|
help
|
2018-05-27 04:17:11 +08:00
|
|
|
This is the GPIO pin number for the I2C SCL line
|
2017-04-05 18:22:41 +08:00
|
|
|
|
|
|
|
config I2C_GPIO_3_SDA_PIN
|
|
|
|
int "Bit Bang I2C device 3 GPIO pin number for SDA"
|
|
|
|
help
|
2018-05-27 04:17:11 +08:00
|
|
|
This is the GPIO pin number for the I2C SDA line
|
2017-04-05 18:22:41 +08:00
|
|
|
|
2018-08-02 21:55:22 +08:00
|
|
|
endif # I2C_GPIO_3
|