drivers/i2c/gpiomux: Add chip driver for multiplexed I2C bus
commitbf089d2a6286eae4e25b7cb51e92633ae39252d4
authorKarthikeyan Ramasubramanian <kramasub@google.com>
Wed, 7 Oct 2020 18:42:44 +0000 (7 12:42 -0600)
committerPatrick Georgi <pgeorgi@google.com>
Mon, 19 Oct 2020 06:57:52 +0000 (19 06:57 +0000)
treeed5f1cf60b5fcdace8731cd819023e9ac9c17e82
parentcbc29a2160d93f077098a022de3f8b8971ed85a2
drivers/i2c/gpiomux: Add chip driver for multiplexed I2C bus

This chip driver adds ACPI identifiers for multiplexed I2C bus that are
selected using GPIO. The multiplexed bus device defines the address
to select the I2C lines. These ACPI identifiers are consumed by the
i2c-mux-gpio kernel driver:
https://www.kernel.org/doc/html/latest/i2c/muxes/i2c-mux-gpio.html

BUG=b:169444894
TEST=Build and boot to OS in waddledee. Ensure that the ACPI identifiers
are added in appropriate context.
Scope (\_SB.PCI0.I2C3.MUX0)
{
    Device (MXA0)
    {
        Method (_STA, 0, NotSerialized)  // _STA: Status
        {
            Return (0x0F)
        }

        Name (_ADR, Zero)  // _ADR: Address
    }
}

Scope (\_SB.PCI0.I2C3.MUX0)
{
    Device (MXA1)
    {
        Method (_STA, 0, NotSerialized)  // _STA: Status
        {
            Return (0x0F)
        }

        Name (_ADR, One)  // _ADR: Address
    }
}

Change-Id: If8b983bc8ce212ce05fe6b7f01a6d9092468e582
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46144
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
src/drivers/i2c/gpiomux/Makefile.inc
src/drivers/i2c/gpiomux/bus/Makefile.inc [new file with mode: 0644]
src/drivers/i2c/gpiomux/bus/bus.c [new file with mode: 0644]
src/drivers/i2c/gpiomux/bus/chip.h [new file with mode: 0644]