coreboot/src/include
Julius Werner 8f71503dbb i2c: Add software_i2c driver for I2C debugging and emulation
This patch adds I2C emulation in software through raw toggling of the
SDA/SCL lines. Platforms need to provide bindings to toggle their
respective I2C busses for this to work (e.g. by pinmuxing them as GPIOs,
currently only enabled for Tegra).

This is mostly useful as a debugging feature, to drive unusual states on
a bus and closely monitor the device output without the need of a bus
analyzer. It provides a few functions to "wedge" an I2C bus by aborting
a transaction at certain points, which can be used to test if a system
can correctly recover from an ill-timed reboot. However, it can also
dynamically replace the existing I2C transfer functions and drive
some/all I2C transfers on the system, which might be useful if a driver
for the actual I2C controller hardware is not (yet) available.

Based on original code by Doug Anderson <dianders@chromium.org> and
Hung-ying Tyan <tyanh@chromium.org> for the ChromeOS embedded
controller project.

BRANCH=None
BUG=chrome-os-partner:28323
TEST=Spread tegra_software_i2c_init()/tegra_software_i2c_disable()
through the code and see that everything still works.

Change-Id: I9ee7ccbd1efb38206669a35d0c3318af16f8be63
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/198791
Reviewed-by: Doug Anderson <dianders@chromium.org>
Reviewed-by: Tom Warren <twarren@nvidia.com>
Reviewed-by: Stefan Reinauer <reinauer@chromium.org>
2014-05-19 20:34:31 +00:00
..
boot cbmem: Export ACPI GNVS cbmem pointer in coreboot table 2013-12-13 03:55:46 +00:00
console vboot: Add a new post code for TPM failure 2014-05-12 22:12:41 +00:00
cpu rmodules: add support for rmodtool 2014-03-31 22:25:57 +00:00
device i2c: Add software_i2c driver for I2C debugging and emulation 2014-05-19 20:34:31 +00:00
pc80 rtc: Add an RTC API, and implement it for x86. 2014-05-02 23:55:47 +00:00
smp Clean up #ifs 2012-05-08 00:34:34 +02:00
assert.h gen: Add "assert" in assert.h. 2014-02-27 05:38:28 +00:00
bcd.h rtc: Add an RTC API, and implement it for x86. 2014-05-02 23:55:47 +00:00
bootstate.h Rename hardwaremain() to main() 2013-05-10 11:55:20 -07:00
cbfs.h BACKPORT: boot state: rebalance payload load vs actual boot 2013-05-01 14:30:44 -07:00
cbfs_core.h libpayload/libcbfs: add a function to return all the payload headers 2013-12-19 16:19:52 +00:00
cbmem.h cbmem: use a single id to name mapping table 2014-05-14 22:53:16 +00:00
delay.h coreboot ARM: Get rid of HAVE_INIT_TIMER config option 2014-05-07 23:30:33 +00:00
edid.h Peppy graphics 2013-09-27 23:07:14 +00:00
ehci.h Drop prototype guarding for romcc 2013-05-10 11:55:20 -07:00
elog.h elog: Add event type for CPU thermal trip 2014-05-12 22:12:36 +00:00
endian.h Extend CBFS to support arbitrary ROM source media. 2013-01-30 17:58:32 +01:00
fallback.h Make set_boot_successful depend on PC80_SYSTEM 2012-11-30 21:33:35 +01:00
inttypes.h x86: provide more C standard environment 2013-03-20 04:20:25 +01:00
ip_checksum.h Drop prototype guarding for romcc 2013-05-10 11:55:20 -07:00
kconfig.h Add config_enabled() from Linux 2012-05-08 00:36:09 +02:00
lib.h Add simple hexdump function 2013-07-30 15:25:06 -07:00
memrange.h memrange: add 2 new range_entry routines 2013-03-29 20:11:28 +01:00
ramstage_cache.h ramstage_cache: allow ramstage usage add valid helper 2013-12-13 00:07:08 +00:00
reg_script.h reg_script: Fix bug in IO macros 2014-04-23 02:50:42 +00:00
reset.h Drop prototype guarding for romcc 2013-05-10 11:55:20 -07:00
rmodule-defs.h rmodules: add support for rmodtool 2014-03-31 22:25:57 +00:00
rmodule.h rmodules: add support for rmodtool 2014-03-31 22:25:57 +00:00
romstage_handoff.h coreboot: dynamic cbmem requirement 2013-03-22 00:13:42 +01:00
rtc.h rtc: Add an RTC API, and implement it for x86. 2014-05-02 23:55:47 +00:00
sdram_mode.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
smbios.h smbios: Add generic type41 write function 2013-05-24 14:02:57 -07:00
spd.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
spd_ddr2.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
spi-generic.h spi: Change spi_xfer to work in units of bytes instead of bits. 2014-04-02 04:25:16 +00:00
spi_flash.h spi: Remove unused parameters from spi_flash_probe and setup_spi_slave. 2014-04-01 23:21:22 +00:00
stddef.h Add check_member macro to allow clean and easy struct offset checking 2013-12-11 22:12:25 +00:00
stdlib.h exynos5420: Fix mmc clock source. 2013-08-22 16:03:17 -07:00
string.h BACKPORT: string: Add STRINGIFY macro 2013-05-01 14:29:58 -07:00
swab.h Add macros for 64bit byte order swapping 2011-10-21 14:13:19 +02:00
thread.h Possible thread stack implementation. 2013-08-23 10:38:10 -07:00
timer.h timer: Add functions to initialize absolute timer structures. 2013-08-09 11:18:51 -07:00
timestamp.h Timestamp implementation for ARMv7 2013-08-02 12:16:42 -07:00
tpm.h tpm: Clean up I2C TPM driver 2013-11-11 23:47:09 +00:00
trace.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
types.h GPLv2 notice: Unify all files to just use one space in »MA 02110-1301« 2013-03-01 10:16:08 +01:00
uart.h ipq8064: prepare include files before adding UART driver 2014-04-25 01:48:53 +00:00
uart8250.h UART 8250: Unconditionally provide register constants and use UART8250 prefix. 2013-10-02 09:18:38 +00:00
usb_ch9.h USB Debug Port related license header fixes (trivial). 2010-09-23 18:16:46 +00:00
usbdebug.h Drop prototype guarding for romcc 2013-05-10 11:55:20 -07:00
vbe.h Peppy graphics 2013-09-27 23:07:14 +00:00
version.h coreboot: Introduce stage-specific architecture for coreboot 2014-05-09 04:41:47 +00:00
watchdog.h watchdog.h: Fix compile time error on disabling watchdog handling 2013-03-12 12:06:43 +01:00