mb/google/poppy/variant/atlas: I2C: run trackpad at 1MHz

With this change, coreboot thinks we're running at 1MHz:
	DW I2C bus 2 at 0xd1133000 (1000 KHz)

Elan eKT3644 IC Specification (trackpad) requires:
Low Time  larger than 500ns (61 * 8.3ns = 506ns).
High Time larger than 260ns (32 * 8.3ns = 265ns),
Data Hold_time larger than 0ns.
Start Condition Hold time larger than 250ns.
Rise/Fall time of less than 120ns.

HCNT controls both High Time and Start Condition Hold time.
LCNT controls Low Time.
SDA_HOLD controls Data Hold Time.

P2 Atlas "Rise time" is 90ns and "Fall time" is 32ns and tuned
using resistors on the board and must be considered when
adjusting any of the parameters since these times are all measured
at 30 or 70% of base and peak voltages (0v/1.8v).

The eKT3644 requirements are met with LCNT=69, HCNT=33, SDA_HOLD=20
which yields the SCL at around 950KHz - suboptimal but compliant.

Lower LCNT or HCNT results in "lost arbitration" errors or not complying
with eKT3644 requirements.

Verified by gaggery.tsai@intel.corp-partner.google.com.
Scope shots posted here:
https://b.corp.google.com/issues/78601949#comment177

BUG=b:78601949
BRANCH=none
TEST=Farzam provided test points on track pad for SCL/SDA/GND.
     Waveforms measured with oscilloscope and screen shots attached
     to bug (comment #177, #155, #100).
     Operate trackpad/touchscreen
     Review dmesg (kernel) output for correct speed, parameters, and
     no errors (e.g. "lost arbitration" or "host controller timeout")

Change-Id: Iaf42ba7b8818b7cd9c8dcc657823dac705659d38
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Signed-off-by: Grant Grundler <grundler@chromium.org>
Tested-by: gaggery.tsai@intel.corp-partner.google.com
Tested-by: grundler@chromium.org
Reviewed-on: https://review.coreboot.org/29553
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@google.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Gaggery Tsai <gaggery.tsai@intel.com>
This commit is contained in:
Caveh Jalali 2018-07-31 19:30:11 -07:00 committed by Patrick Georgi
parent 80fde629cd
commit 7696290004
1 changed files with 8 additions and 6 deletions

View File

@ -208,14 +208,15 @@ chip soc/intel/skylake
.fall_time_ns = 38, .fall_time_ns = 38,
}, },
.i2c[2] = { .i2c[2] = {
.speed = I2C_SPEED_FAST, .speed = I2C_SPEED_FAST_PLUS,
.speed_config[0] = { .speed_config[0] = {
.speed = I2C_SPEED_FAST, .speed = I2C_SPEED_FAST_PLUS,
.scl_lcnt = 186, .scl_lcnt = 69,
.scl_hcnt = 93, .scl_hcnt = 33,
.sda_hold = 36, .sda_hold = 20,
}, }
}, },
.i2c[3] = { .i2c[3] = {
.speed = I2C_SPEED_FAST, .speed = I2C_SPEED_FAST,
.rise_time_ns = 98, .rise_time_ns = 98,
@ -296,6 +297,7 @@ chip soc/intel/skylake
register "generic.hid" = ""ACPI0C50"" register "generic.hid" = ""ACPI0C50""
register "generic.desc" = ""ELAN Touchpad"" register "generic.desc" = ""ELAN Touchpad""
register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_A19_IRQ)" register "generic.irq" = "ACPI_IRQ_EDGE_LOW(GPP_A19_IRQ)"
register "generic.speed" = "I2C_SPEED_FAST_PLUS"
register "generic.wake" = "GPE0_DW0_23" # GPP_A23 register "generic.wake" = "GPE0_DW0_23" # GPP_A23
register "hid_desc_reg_offset" = "0x01" register "hid_desc_reg_offset" = "0x01"
device i2c 0x15 on end device i2c 0x15 on end