diff options
Diffstat (limited to 'src/mainboard')
-rw-r--r-- | src/mainboard/google/reef/variants/coral/mainboard.c | 66 |
1 files changed, 57 insertions, 9 deletions
diff --git a/src/mainboard/google/reef/variants/coral/mainboard.c b/src/mainboard/google/reef/variants/coral/mainboard.c index 683624ca65..ec7041d1ac 100644 --- a/src/mainboard/google/reef/variants/coral/mainboard.c +++ b/src/mainboard/google/reef/variants/coral/mainboard.c @@ -21,6 +21,13 @@ enum { SKU_14_EPAULETTE = 14, SKU_15_EPAULETTE = 15, SKU_16_EPAULETTE = 16, + SKU_28_RABBID_RUGGED = 28, + SKU_30_BABYTIGER = 30, + SKU_31_RABBID = 31, + SKU_32_RABBID = 32, + SKU_33_BABYTIGER = 33, + SKU_52_BABYMEGA = 52, + SKU_53_BABYMEGA = 53, SKU_61_ASTRONAUT = 61, SKU_62_ASTRONAUT = 62, SKU_160_NASHER = 160, @@ -51,6 +58,23 @@ void variant_nhlt_oem_overrides(const char **oem_id, *oem_revision = variant_board_sku(); } +#define DW_I2C_SPEED_CONFIG(speedval, lcnt, hcnt, hold) \ + { \ + .speed = I2C_SPEED_ ## speedval, \ + .scl_lcnt = (lcnt), \ + .scl_hcnt = (hcnt), \ + .sda_hold = (hold), \ + } + +static const struct dw_i2c_speed_config +rabbid_i2c_speed_config = DW_I2C_SPEED_CONFIG(FAST, 210, 107, 47); + +static const struct dw_i2c_speed_config +babymega_i2c_speed_config = DW_I2C_SPEED_CONFIG(FAST, 210, 107, 47); + +static const struct dw_i2c_speed_config +babytiger_i2c_speed_config = DW_I2C_SPEED_CONFIG(FAST, 210, 107, 47); + void mainboard_devtree_update(struct device *dev) { /* Override dev tree settings per board */ @@ -60,8 +84,8 @@ void mainboard_devtree_update(struct device *dev) sku_id = variant_board_sku(); switch (sku_id) { - case SKU_0_ASTRONAUT: - case SKU_1_ASTRONAUT: + case SKU_0_ASTRONAUT: + case SKU_1_ASTRONAUT: cfg->usb2eye[1].Usb20PerPortPeTxiSet = 7; cfg->usb2eye[1].Usb20PerPortTxiSet = 2; break; @@ -77,23 +101,36 @@ void mainboard_devtree_update(struct device *dev) cfg->usb2eye[1].Usb20PerPortPeTxiSet = 7; cfg->usb2eye[1].Usb20PerPortTxiSet = 2; break; - case SKU_61_ASTRONAUT: - case SKU_62_ASTRONAUT: + case SKU_28_RABBID_RUGGED: + case SKU_31_RABBID: + case SKU_32_RABBID: + cfg->common_soc_config.i2c[3].speed_config[0] = rabbid_i2c_speed_config; + cfg->common_soc_config.i2c[4].speed_config[0] = rabbid_i2c_speed_config; + break; + case SKU_30_BABYTIGER: + case SKU_33_BABYTIGER: + cfg->common_soc_config.i2c[3].speed_config[0] = babytiger_i2c_speed_config; + cfg->common_soc_config.i2c[4].speed_config[0] = babytiger_i2c_speed_config; + break; + case SKU_52_BABYMEGA: + case SKU_53_BABYMEGA: + cfg->common_soc_config.i2c[4].speed_config[0] = babymega_i2c_speed_config; + break; + case SKU_61_ASTRONAUT: + case SKU_62_ASTRONAUT: cfg->usb2eye[1].Usb20PerPortPeTxiSet = 7; cfg->usb2eye[1].Usb20PerPortTxiSet = 5; - break; + break; default: break; } } - const char *mainboard_vbt_filename(void) { int sku_id = variant_board_sku(); - switch (sku_id) { - case SKU_0_ASTRONAUT: - case SKU_1_ASTRONAUT: + case SKU_0_ASTRONAUT: + case SKU_1_ASTRONAUT: return "vbt-astronaut.bin"; break; case SKU_2_SANTA: @@ -106,6 +143,17 @@ const char *mainboard_vbt_filename(void) case SKU_16_EPAULETTE: return "vbt-epaulette.bin"; break; + case SKU_28_RABBID_RUGGED: + return "vbt-rabbid_rugged.bin"; + break; + case SKU_30_BABYTIGER: + case SKU_33_BABYTIGER: + return "vbt-babytiger.bin"; + break; + case SKU_52_BABYMEGA: + case SKU_53_BABYMEGA: + return "vbt-babymega.bin"; + break; case SKU_160_NASHER: case SKU_161_NASHER: case SKU_162_NASHER: |