coreboot/src/soc
Duncan Laurie fa3fe1d85e UPSTREAM: skylake: Support common LPSS I2C driver
Support the common Intel LPSS I2C driver for the 6 I2C bus controllers
that are present on the Skylake-LP PCH with a 120 mHz clock. The
required lpss_i2c_base_address() method is implemented separately for
verstage/romstage and ramstage environments.

This provides methods to convert to and from "struct device" and the
I2C controller bus number for that device. These are used to provide
support for the "I2C Bus Operations" that are present in the coreboot
devicetree.

To support the I2C controller before ramstage an early init function
is provided to do minimal initializaiton of the PCI device and assign
a temporary base address for use before memory. The final base
address is assigned during device enumeration and used during ramstage.

Because it is usually not necessary to enable I2C controllers before
ramstage a config register for the devicetree is provided to perform
early initialization of this controller. In addition the bus speed
can be set in the devicetree and that speed will be applied when the
device is initialized. If not provided the default speed is set to
I2C_SPEED_FAST.

This was tested with the google/chell mainboard by reading and writing
from the trackpad and codec devices during both verstage and ramstage.

BUG=None
BRANCH=None
TEST=None

Change-Id: Ia0270adfaf2843a3be4e00c732c85401a3401ef5
Original-Signed-off-by: Duncan Laurie <dlaurie@chromium.org>
Original-Reviewed-on: https://review.coreboot.org/15105
Original-Reviewed-by: Aaron Durbin <adurbin@chromium.org>
Original-Tested-by: build bot (Jenkins)
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/351373
Reviewed-by: Duncan Laurie <dlaurie@chromium.org>
2016-06-10 00:17:53 -07:00
..
broadcom/cygnus soc/*: fix uart's regwidth specification in cbtables 2016-02-21 12:26:05 +01:00
dmp/vortex86ex dmp/vortex86ex: Merge northbridge and southbridge into soc 2016-05-05 20:06:33 +02:00
imgtec/pistachio drivers/uart: Use uart_platform_refclk for all UART models 2016-05-09 18:45:44 +02:00
intel UPSTREAM: skylake: Support common LPSS I2C driver 2016-06-10 00:17:53 -07:00
marvell drivers/uart: Use uart_platform_refclk for all UART models 2016-05-09 18:45:44 +02:00
mediatek/mt8173 mt8173: dram: Add more sample points to improve dram timing margin. 2016-06-01 20:37:06 -07:00
nvidia Kconfig: Set VBOOT_OPROM_MATTERS for relevant non-x86 devices 2016-06-01 20:37:02 -07:00
qualcomm Gale board: Moving TPM setup function to verstage.c 2016-05-12 15:45:03 -06:00
rdc/r8610 rdc/r8610: Move to src/soc 2016-05-05 20:08:58 +02:00
rockchip UPSTREAM: rk3288: Remove duplicate timestamp_init() 2016-06-07 20:37:18 -07:00
samsung soc/samsung: Don't compile in unused uart divider tables 2016-05-11 21:21:41 +02:00
ucb/riscv