diff options
author | Sean Rhodes <sean@starlabs.systems> | 2024-08-12 10:19:34 +0100 |
---|---|---|
committer | Sean Rhodes <sean@starlabs.systems> | 2024-10-11 11:27:08 +0000 |
commit | 4094ae369d1b6f62b4e608c583723353664e3b3d (patch) | |
tree | 73461264bf612f5476454aa067bdd4dddc128ab4 /src/mainboard/starlabs/starlite_adl | |
parent | 7f66fa4299ff5f64c94093a2a19b688dd5e80078 (diff) |
mb/starlabs/starlite_adl: Make I2C speed configurable
Make the I2C speed user configurable from CMOS. Both the touchscreen
and accelerometer support running at 100MHz or 400MHz. They perform
better at 400MHz but use more power - this patch lets the user choose.
Change-Id: Ia1b08d7ec6212418bb95d0a52077f01c930f8830
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83882
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Diffstat (limited to 'src/mainboard/starlabs/starlite_adl')
-rw-r--r-- | src/mainboard/starlabs/starlite_adl/variants/mk_v/devicetree.cb | 9 | ||||
-rw-r--r-- | src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c | 6 |
2 files changed, 6 insertions, 9 deletions
diff --git a/src/mainboard/starlabs/starlite_adl/variants/mk_v/devicetree.cb b/src/mainboard/starlabs/starlite_adl/variants/mk_v/devicetree.cb index fc21f18d74..c1af6475b4 100644 --- a/src/mainboard/starlabs/starlite_adl/variants/mk_v/devicetree.cb +++ b/src/mainboard/starlabs/starlite_adl/variants/mk_v/devicetree.cb @@ -1,13 +1,4 @@ chip soc/intel/alderlake - register "common_soc_config" = "{ - .i2c[0] = { - .speed = I2C_SPEED_FAST, - }, - .i2c[2] = { - .speed = I2C_SPEED_FAST, - }, - }" - # FSP UPDs register "cnvi_bt_audio_offload" = "true" register "cnvi_bt_core" = "true" diff --git a/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c b/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c index 7184cdbc4c..331bc7f25b 100644 --- a/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c +++ b/src/mainboard/starlabs/starlite_adl/variants/mk_v/devtree.c @@ -63,4 +63,10 @@ void devtree_update(void) /* Enable/Disable Accelerometer based on CMOS settings */ if (get_uint_option("accelerometer", 1) == 0) accelerometer_dev->enabled = 0; + + /* Set I2C devices speed to fast based on CMOS settings */ + if (get_uint_option("i2c_speed_fast", 0) == 1) { + common_config->i2c[0].speed = I2C_SPEED_FAST; + common_config->i2c[2].speed = I2C_SPEED_FAST; + } } |