diff options
-rw-r--r-- | baseboard/trogdor/baseboard.c | 18 | ||||
-rw-r--r-- | board/coachz/board.c | 18 | ||||
-rw-r--r-- | board/lazor/board.c | 16 | ||||
-rw-r--r-- | board/pompom/board.c | 14 | ||||
-rw-r--r-- | board/trogdor/board.c | 16 |
5 files changed, 64 insertions, 18 deletions
diff --git a/baseboard/trogdor/baseboard.c b/baseboard/trogdor/baseboard.c index abe6ff72e7..ecc8dc59f7 100644 --- a/baseboard/trogdor/baseboard.c +++ b/baseboard/trogdor/baseboard.c @@ -52,24 +52,6 @@ const struct power_signal_info power_signal_list[] = { }; BUILD_ASSERT(ARRAY_SIZE(power_signal_list) == POWER_SIGNAL_COUNT); -/* I2C port map */ -const struct i2c_port_t i2c_ports[] = { - {"power", I2C_PORT_POWER, 100, GPIO_EC_I2C_POWER_SCL, - GPIO_EC_I2C_POWER_SDA}, - {"tcpc0", I2C_PORT_TCPC0, 1000, GPIO_EC_I2C_USB_C0_PD_SCL, - GPIO_EC_I2C_USB_C0_PD_SDA}, -#if CONFIG_USB_PD_PORT_MAX_COUNT > 1 - {"tcpc1", I2C_PORT_TCPC1, 1000, GPIO_EC_I2C_USB_C1_PD_SCL, - GPIO_EC_I2C_USB_C1_PD_SDA}, -#endif - {"eeprom", I2C_PORT_EEPROM, 400, GPIO_EC_I2C_EEPROM_SCL, - GPIO_EC_I2C_EEPROM_SDA}, - {"sensor", I2C_PORT_SENSOR, 400, GPIO_EC_I2C_SENSOR_SCL, - GPIO_EC_I2C_SENSOR_SDA}, -}; - -const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); - const struct charger_config_t chg_chips[] = { { .i2c_port = I2C_PORT_CHARGER, diff --git a/board/coachz/board.c b/board/coachz/board.c index 9b7bbb6c48..6790138526 100644 --- a/board/coachz/board.c +++ b/board/coachz/board.c @@ -101,6 +101,24 @@ static void board_connect_c0_sbu(enum gpio_signal s) hook_call_deferred(&board_connect_c0_sbu_deferred_data, 0); } +/* I2C port map */ +const struct i2c_port_t i2c_ports[] = { + {"power", I2C_PORT_POWER, 100, GPIO_EC_I2C_POWER_SCL, + GPIO_EC_I2C_POWER_SDA}, + {"tcpc0", I2C_PORT_TCPC0, 1000, GPIO_EC_I2C_USB_C0_PD_SCL, + GPIO_EC_I2C_USB_C0_PD_SDA}, + {"tcpc1", I2C_PORT_TCPC1, 1000, GPIO_EC_I2C_USB_C1_PD_SCL, + GPIO_EC_I2C_USB_C1_PD_SDA}, + {"wlc", I2C_PORT_WLC, 1000, GPIO_EC_I2C_WLC_SCL, + GPIO_EC_I2C_WLC_SDA}, + {"eeprom", I2C_PORT_EEPROM, 400, GPIO_EC_I2C_EEPROM_SCL, + GPIO_EC_I2C_EEPROM_SDA}, + {"sensor", I2C_PORT_SENSOR, 400, GPIO_EC_I2C_SENSOR_SCL, + GPIO_EC_I2C_SENSOR_SDA}, +}; + +const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); + /* ADC channels */ const struct adc_t adc_channels[] = { /* Measure VBUS through a 1/10 voltage divider */ diff --git a/board/lazor/board.c b/board/lazor/board.c index 3f1c166c30..e9d5831147 100644 --- a/board/lazor/board.c +++ b/board/lazor/board.c @@ -110,6 +110,22 @@ static void switchcap_interrupt(enum gpio_signal signal) ln9310_interrupt(signal); } +/* I2C port map */ +const struct i2c_port_t i2c_ports[] = { + {"power", I2C_PORT_POWER, 100, GPIO_EC_I2C_POWER_SCL, + GPIO_EC_I2C_POWER_SDA}, + {"tcpc0", I2C_PORT_TCPC0, 1000, GPIO_EC_I2C_USB_C0_PD_SCL, + GPIO_EC_I2C_USB_C0_PD_SDA}, + {"tcpc1", I2C_PORT_TCPC1, 1000, GPIO_EC_I2C_USB_C1_PD_SCL, + GPIO_EC_I2C_USB_C1_PD_SDA}, + {"eeprom", I2C_PORT_EEPROM, 400, GPIO_EC_I2C_EEPROM_SCL, + GPIO_EC_I2C_EEPROM_SDA}, + {"sensor", I2C_PORT_SENSOR, 400, GPIO_EC_I2C_SENSOR_SCL, + GPIO_EC_I2C_SENSOR_SDA}, +}; + +const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); + /* ADC channels */ const struct adc_t adc_channels[] = { /* Measure VBUS through a 1/10 voltage divider */ diff --git a/board/pompom/board.c b/board/pompom/board.c index 271784e898..f159b9fa83 100644 --- a/board/pompom/board.c +++ b/board/pompom/board.c @@ -89,6 +89,20 @@ static void board_connect_c0_sbu(enum gpio_signal s) hook_call_deferred(&board_connect_c0_sbu_deferred_data, 0); } +/* I2C port map */ +const struct i2c_port_t i2c_ports[] = { + {"power", I2C_PORT_POWER, 100, GPIO_EC_I2C_POWER_SCL, + GPIO_EC_I2C_POWER_SDA}, + {"tcpc0", I2C_PORT_TCPC0, 1000, GPIO_EC_I2C_USB_C0_PD_SCL, + GPIO_EC_I2C_USB_C0_PD_SDA}, + {"eeprom", I2C_PORT_EEPROM, 400, GPIO_EC_I2C_EEPROM_SCL, + GPIO_EC_I2C_EEPROM_SDA}, + {"sensor", I2C_PORT_SENSOR, 400, GPIO_EC_I2C_SENSOR_SCL, + GPIO_EC_I2C_SENSOR_SDA}, +}; + +const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); + /* ADC channels */ const struct adc_t adc_channels[] = { /* Measure VBUS through a 1/10 voltage divider */ diff --git a/board/trogdor/board.c b/board/trogdor/board.c index b011364078..36e4e4452a 100644 --- a/board/trogdor/board.c +++ b/board/trogdor/board.c @@ -102,6 +102,22 @@ static void board_connect_c0_sbu(enum gpio_signal s) hook_call_deferred(&board_connect_c0_sbu_deferred_data, 0); } +/* I2C port map */ +const struct i2c_port_t i2c_ports[] = { + {"power", I2C_PORT_POWER, 100, GPIO_EC_I2C_POWER_SCL, + GPIO_EC_I2C_POWER_SDA}, + {"tcpc0", I2C_PORT_TCPC0, 1000, GPIO_EC_I2C_USB_C0_PD_SCL, + GPIO_EC_I2C_USB_C0_PD_SDA}, + {"tcpc1", I2C_PORT_TCPC1, 1000, GPIO_EC_I2C_USB_C1_PD_SCL, + GPIO_EC_I2C_USB_C1_PD_SDA}, + {"eeprom", I2C_PORT_EEPROM, 400, GPIO_EC_I2C_EEPROM_SCL, + GPIO_EC_I2C_EEPROM_SDA}, + {"sensor", I2C_PORT_SENSOR, 400, GPIO_EC_I2C_SENSOR_SCL, + GPIO_EC_I2C_SENSOR_SDA}, +}; + +const unsigned int i2c_ports_used = ARRAY_SIZE(i2c_ports); + /* ADC channels */ const struct adc_t adc_channels[] = { /* Measure VBUS through a 1/10 voltage divider */ |