diff options
author | Sean Rhodes <sean@starlabs.systems> | 2024-03-19 14:31:09 +0000 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-07-29 20:24:41 +0000 |
commit | 89282af63e879bab47639d2f71de64033978ec10 (patch) | |
tree | 1a9f7e2be91514a527f967ae1d9de35d421dd681 /src/drivers/i2c/generic/generic.c | |
parent | e822d4b09315274d9820b507ba59644b1cec7e75 (diff) |
i2c/drivers/generic: Add support for including a CDM
Chip Direct Mapping is exclusive to Windows; it allows specifying the
position where a chip is mounted. There are 8 positions and a _CDM
method should return 0xabcd0X, where X is the position.
Tested by booting Windows 11 on the StarLite Mk V, rotating the device
and checking the orientation is correct, where previously, it was
inverted.
Change-Id: If70c25288d835df7064b4051c43abeb2d6531f3b
Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/81409
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Diffstat (limited to 'src/drivers/i2c/generic/generic.c')
-rw-r--r-- | src/drivers/i2c/generic/generic.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/drivers/i2c/generic/generic.c b/src/drivers/i2c/generic/generic.c index 98c59e6a05..1875bacb2d 100644 --- a/src/drivers/i2c/generic/generic.c +++ b/src/drivers/i2c/generic/generic.c @@ -165,6 +165,13 @@ void i2c_generic_fill_ssdt(const struct device *dev, acpigen_pop_len(); } + /* Chip Direct Mapping */ + if (config->cdm_index != CDM_NOT_PRESENT) { + acpigen_write_method("_CDM", 1); + acpigen_write_return_integer(0xabcd00 | config->cdm_index); + acpigen_pop_len(); + } + /* Callback if any. */ if (callback) callback(dev); |