diff options
author | Aaron Durbin <adurbin@chromium.org> | 2013-10-16 09:21:55 -0700 |
---|---|---|
committer | Aaron Durbin <adurbin@google.com> | 2014-02-16 20:37:55 +0100 |
commit | 6c52ba77797c2ac62dcdb74e1bdd898003b9bc3b (patch) | |
tree | ba99becdfa3dcf02b8455591c1dd5ab842cec8d2 /src | |
parent | f3f409bf5592dc093dc7f2dc1448ad21879c466e (diff) | |
download | coreboot-6c52ba77797c2ac62dcdb74e1bdd898003b9bc3b.tar.xz |
rambi: disable internal pullups on ram_id[2:0]
The ram_id[2:0] signals have stuffing options for pull up/down
with values of 10K. However, the default pulldown values for these
pads are 20K. Therefore, one can't read a high value because of
the high voltage threshold is 0.65 * Vref. Therefore the high
signals are marginal at best.
Fix this issue by disabling the internal pull for the pads connected
to ram_id[2:0].
BUG=chrome-os-partner:23350
BRANCH=None
TEST=Built and checked that ram_id[2:0] is properly read now.
Change-Id: Ib414d5798b472574337d1b71b87a4cf92f40c762
Signed-off-by: Aaron Durbin <adurbin@chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/173211
Reviewed-by: Shawn Nematbakhsh <shawnn@chromium.org>
Reviewed-by: Bernie Thompson <bhthompson@chromium.org>
Reviewed-on: http://review.coreboot.org/4885
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <patrick@georgi-clan.de>
Diffstat (limited to 'src')
-rw-r--r-- | src/mainboard/google/rambi/romstage.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/mainboard/google/rambi/romstage.c b/src/mainboard/google/rambi/romstage.c index d15a21dc2d..369ebad445 100644 --- a/src/mainboard/google/rambi/romstage.c +++ b/src/mainboard/google/rambi/romstage.c @@ -37,14 +37,29 @@ #define GPIO_SSUS_38_PAD 50 #define GPIO_SSUS_39_PAD 58 +static inline void disable_internal_pull(int pad) +{ + const int pull_mask = ~(0xf << 7); + write32(ssus_pconf0(pad), read32(ssus_pconf0(pad)) & pull_mask); +} + static void *get_spd_pointer(char *spd_file_content, int total_spds) { int ram_id = 0; + /* The ram_id[2:0] pullups on rambi are too large for the default 20K + * pulldown on the pad. Therefore, disable the internal pull resistor to + * read high values correctly. */ + disable_internal_pull(GPIO_SSUS_37_PAD); + disable_internal_pull(GPIO_SSUS_38_PAD); + disable_internal_pull(GPIO_SSUS_39_PAD); + ram_id |= (ssus_get_gpio(GPIO_SSUS_37_PAD) << 0); ram_id |= (ssus_get_gpio(GPIO_SSUS_38_PAD) << 1); ram_id |= (ssus_get_gpio(GPIO_SSUS_39_PAD) << 2); + printk(BIOS_DEBUG, "ram_id=%d, total_spds: %d\n", ram_id, total_spds); + if (ram_id >= total_spds) return NULL; |