diff options
author | Mary Ruthven <mruthven@google.com> | 2019-02-22 11:24:56 -0800 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2019-03-05 18:06:10 -0800 |
commit | 049ab52a120f3bff4e862fd2e98098bc66ef1b03 (patch) | |
tree | 71fa4d5365906b2e6c7f778d9839251680169fe1 /extra | |
parent | 3fbe166bd408941407ee1f706bf20c41360fcead (diff) | |
download | chrome-ec-049ab52a120f3bff4e862fd2e98098bc66ef1b03.tar.gz |
cr50: use board prop to mask straps if config is ambiguous
Cr50 tries to determine SPI vs I2C by checking that there are pullups on
only the I2C or SPI straps. If there are pullups on both, it can't use
the straps to determine SPI vs I2C, so it just defaults to the default
board properties (I2C and PLT_RST_L).
This change uses last board properties to determine I2C vs SPI if the
straps can't be used to make this determination. The actual strap pins
are only connected to the pullup or pulldown being used for the straps.
It's pretty likely these strap readings are correct. The unused straps
are connected to the AP which can interfere with these readings if it
has a pullup on any of these signals. This change uses the last board
property configuration to determine I2C vs SPI and mask unused straps to
try and remove signals the AP is interfering with. If this masked config
isn't valid, then cr50 will still fall back to using I2C and PLT_RST_L.
BUG=b:124777847
BRANCH=cr50
TEST=manual
flash mistral. Reboot cr50. Make sure it doesn't switch to I2C
config
# Verify cr50 selects spi
Ambiguous strap config. Use spi based on old brdprop.
Use DBG image to set invalid I2C and SPI board property settings
rollback to the image that checks if I2C and SPI brdprop
settings are invalid. Verify Mistral can't find a valid strap
and uses I2C.
Use DBG image to select SPI and I2C board properties. Make sure
this is rejected as invalid.
# enable writing to long life scratch 1
rw 0x40000128 2
# write old board properties with i2c and spi
rw 0x40000130 (OLD_BRDPROP | 3)
for mistral - rw 0x40000130 0x811143
# rollback to image that checks old board properties if
# straps are ambiguous
rollback
# Verify Mistral doesn't use old AP bus setting and
# defaults to the default properties.
Invalid strap pins! Default properties = 0x42
Use DBG image to select neither the SPI or I2C board property.
Make sure this is rejected as invalid.
# enable writing to long life scratch 1
rw 0x40000128 2
# write old board properties without i2c or spi
rw 0x40000130 (OLD_BRDPROP & ~3)
for mistral - rw 0x40000130 0x811140
# rollback to image that checks old board properties if
# straps are ambiguous
rollback
# Verify Mistral doesn't use old AP bus setting and
# defaults to the default properties.
Invalid strap pins! Default properties = 0x42
Use dbg image to modify board properties to select I2C. rollback
and make sure Cr50 continues using I2C.
# enable writing to long life scratch 1
rw 0x40000128 2
# write old board properties with i2c
for mistral - rw 0x40000130 0x811142
# write old board properties with i2c
rollback
# Verify cr50 selects i2c
Ambiguous strap config. Use i2c based on old brdprop.
Change-Id: I409e2f3ab1339aafe450b35259adc3c4c5d870ae
Signed-off-by: Mary Ruthven <mruthven@google.com>
Reviewed-on: https://chromium-review.googlesource.com/1483816
Commit-Ready: ChromeOS CL Exonerator Bot <chromiumos-cl-exonerator@appspot.gserviceaccount.com>
Tested-by: Mary Ruthven <mruthven@chromium.org>
Reviewed-by: Keith Short <keithshort@chromium.org>
Diffstat (limited to 'extra')
0 files changed, 0 insertions, 0 deletions