mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2026-01-01 21:02:27 +00:00
zoombini: Add support for sensor i2c bus.
BUG=None BRANCH=None TEST=make -j buildall. Change-Id: I7f79e01fe2d2004a3e9df733852f25bd89033d58 Signed-off-by: Aseda Aboagye <aaboagye@google.com> Reviewed-on: https://chromium-review.googlesource.com/666289 Commit-Ready: Aseda Aboagye <aaboagye@chromium.org> Tested-by: Aseda Aboagye <aaboagye@chromium.org> Reviewed-by: Shawn N <shawnn@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
a26ddda387
commit
0697132df7
@@ -94,6 +94,7 @@ BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT);
|
||||
const struct i2c_port_t i2c_ports[] = {
|
||||
{"power", I2C_PORT_POWER, 400, GPIO_I2C0_SCL, GPIO_I2C0_SDA},
|
||||
{"pmic", I2C_PORT_PMIC, 400, GPIO_I2C3_SCL, GPIO_I2C3_SDA},
|
||||
{"sensor", I2C_PORT_SENSOR, 400, GPIO_I2C7_SCL, GPIO_I2C7_SDA},
|
||||
{"tcpc0", I2C_PORT_TCPC0, 1000, GPIO_I2C5_SCL, GPIO_I2C5_SDA},
|
||||
{"tcpc1", I2C_PORT_TCPC1, 1000, GPIO_I2C1_SCL, GPIO_I2C1_SDA},
|
||||
{"tcpc2", I2C_PORT_TCPC2, 1000, GPIO_I2C2_SCL, GPIO_I2C2_SDA},
|
||||
|
||||
@@ -110,6 +110,7 @@
|
||||
#define I2C_PORT_CHARGER I2C_PORT_POWER
|
||||
#define I2C_PORT_POWER NPCX_I2C_PORT0_0
|
||||
#define I2C_PORT_PMIC NPCX_I2C_PORT3_0
|
||||
#define I2C_PORT_SENSOR NPCX_I2C_PORT7_0
|
||||
#define I2C_PORT_TCPC0 NPCX_I2C_PORT5_0
|
||||
#define I2C_PORT_TCPC1 NPCX_I2C_PORT1_0
|
||||
#define I2C_PORT_TCPC2 NPCX_I2C_PORT2_0
|
||||
|
||||
@@ -59,6 +59,8 @@ GPIO(I2C3_SCL, PIN(D, 1), GPIO_INPUT)
|
||||
GPIO(I2C3_SDA, PIN(D, 0), GPIO_INPUT)
|
||||
GPIO(I2C5_SCL, PIN(3, 3), GPIO_INPUT)
|
||||
GPIO(I2C5_SDA, PIN(3, 6), GPIO_INPUT)
|
||||
GPIO(I2C7_SCL, PIN(B, 3), GPIO_INPUT)
|
||||
GPIO(I2C7_SDA, PIN(B, 2), GPIO_INPUT)
|
||||
|
||||
GPIO(BAT_PRESENT_L, PIN(E, 5), GPIO_INPUT)
|
||||
GPIO(USB_PD_RST_L, PIN(F, 1), GPIO_ODR_HIGH)
|
||||
@@ -93,6 +95,7 @@ ALTERNATE(PIN_MASK(9, 0x07), 1, MODULE_I2C, GPIO_PULL_UP) /* I2C1 SDA / I2C2 */
|
||||
ALTERNATE(PIN_MASK(8, 0x80), 1, MODULE_I2C, GPIO_PULL_UP) /* I2C1 SCL */
|
||||
ALTERNATE(PIN_MASK(D, 0x03), 1, MODULE_I2C, GPIO_PULL_UP) /* I2C3 */
|
||||
ALTERNATE(PIN_MASK(3, 0x48), 1, MODULE_I2C, GPIO_PULL_UP) /* I2C5 */
|
||||
ALTERNATE(PIN_MASK(B, 0x0C), 1, MODULE_I2C, GPIO_PULL_UP) /* I2C7 */
|
||||
|
||||
/* Keyboard Pins */
|
||||
/* KSI_00-01 */
|
||||
|
||||
Reference in New Issue
Block a user