My i2c clock-frequency
values is coming from BIOS.
I have extracted the DSDT
and the i2c clock-frequency
field is as follows:
Device (I2C1)
{
Name (_ADR, 0x00160001) // _ADR: Address
Name (_DDN, "Intel(R) I2C Controller #1") // _DDN: DOS Device Name
Name (_UID, 0x02) // _UID: Unique ID
Name (LINK, "\\_SB.PCI0.I2C1")
Name (RBUF, ResourceTemplate ()
{
})
Name (_DSD, Package (0x02)
{
Buffer (0x10)
{
/* 0000 */ 0x14, 0xD8, 0xFF, 0xDA, 0xBA, 0x6E, 0x8C, 0x4D,
/* 0008 */ 0x8A, 0x91, 0xBC, 0x9B, 0xBF, 0x4A, 0xA3, 0x01
},
Package (0x01)
{
Package (0x02)
{
"clock-frequency",
IC1S
}
}
})
But there is no mention of i2c clock frequency values for different modes like 400k, 1M etc. Where are these values defined? How is it being passed from BIOS to driver?
These
i2c-clock-frequency
values have been defined in theBIOS source code
(apparently). Because since we have the options inBIOS
to select eitherStandard Mode (100k), Fast Mode (400k), Fast Plus (1M) & High Speed (3.4M)
, these values should be matched somewhere in the BIOS source code. The kernel APImatches the
"clock-frequency" propname
field inACPI
& fetches thei2c-clock-frequency
value from theACPI object
.