the following patch was just integrated into master:
commit 316ded82f5f9b51333e96cd1d002e60a6c8ce8c7
Author: henryc.chen <henryc.chen(a)mediatek.com>
Date: Fri Mar 11 14:55:30 2016 +0800
google/oak: Move external buck initialization to coreboot
Remove the code which is passing parameters to ARMTF and move external
buck initilizaton from ARMTF to coreboot.
BRANCH=none
BUG=none
TEST=verified on Oak rev4/rev5
Change-Id: I4f4b30acbee9b42a202b326f2fe4517cb4b9d83c
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 37bec54b4d8a3bce38878e292e4821da3959026a
Original-Change-Id: Ib81709812a064f6daf13c9b4d6525f1858c81393
Original-Signed-off-by: henryc.chen <henryc.chen(a)mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/332343
Original-Commit-Ready: Yidi Lin <yidi.lin(a)mediatek.com>
Original-Tested-by: Yidi Lin <yidi.lin(a)mediatek.com>
Original-Reviewed-by: Julius Werner <jwerner(a)chromium.org>
Reviewed-on: https://review.coreboot.org/14123
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/14123 for details.
-gerrit
the following patch was just integrated into master:
commit 0bb292e384ba540f9b0c4901f75a9bf2db1413ec
Author: henryc.chen <henryc.chen(a)mediatek.com>
Date: Wed Mar 2 15:51:44 2016 +0800
mediatek/mt8173: Add da9212 driver
Add secondary PMIC for external buck control on Oak rev0/1/2/5
BRANCH=none
BUG=none
TEST=verified on Oak rev4/rev5
Change-Id: Ia000b0c7d61e8396856656247f9627e33b21b19b
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 241508e7d781fac8ee085ee81962043dd654c52d
Original-Change-Id: I6c75e2462363a5523bf1ebb03af7a36740293624
Original-Signed-off-by: henryc.chen <henryc.chen(a)mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/332342
Original-Commit-Ready: Yidi Lin <yidi.lin(a)mediatek.com>
Original-Tested-by: Yidi Lin <yidi.lin(a)mediatek.com>
Original-Reviewed-by: Julius Werner <jwerner(a)chromium.org>
Reviewed-on: https://review.coreboot.org/14122
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/14122 for details.
-gerrit
the following patch was just integrated into master:
commit 7c54d2a760c278412c0b2002ddcb555413f96231
Author: henryc.chen <henryc.chen(a)mediatek.com>
Date: Wed Mar 2 15:49:52 2016 +0800
mediatek/mt8173: Add mt6311 driver
Add secondary PMIC for external buck control on Oak rev3/4
BRANCH=none
BUG=none
TEST=verified on Oak rev4/rev5
Change-Id: I24c18a1cf71fc57deacedcbeb6a100b131c28077
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 7f7f8ceac795d8193194a6918a73c4b391009025
Original-Change-Id: I312d8281d2c09d8bc43f092edef3e405d51ee7d0
Original-Signed-off-by: henryc.chen <henryc.chen(a)mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/332341
Original-Commit-Ready: Yidi Lin <yidi.lin(a)mediatek.com>
Original-Tested-by: Yidi Lin <yidi.lin(a)mediatek.com>
Original-Reviewed-by: Julius Werner <jwerner(a)chromium.org>
Reviewed-on: https://review.coreboot.org/14121
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See https://review.coreboot.org/14121 for details.
-gerrit
the following patch was just integrated into master:
commit d33ebd13741b7473e93a1a6780edbb1e2dca8258
Author: Yidi Lin <yidi.lin(a)mediatek.com>
Date: Tue Mar 15 14:38:44 2016 +0800
device: Add i2c read/write register field API
i2c_read_field() - read the value from the specific register field
i2c_write_field() - write the value to the specific register field
BRANCH=none
BUG=none
TEST=none
Change-Id: I2098715b4583c1936c93b3ff45ec330910964304
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Original-Commit-Id: 0817fc76d07491b39c066f1393a6435f0831b50c
Original-Change-Id: I92c187a89d10cfcecf3dfd9291e0bc015459c393
Original-Signed-off-by: Yidi Lin <yidi.lin(a)mediatek.com>
Original-Reviewed-on: https://chromium-review.googlesource.com/332712
Original-Reviewed-by: Julius Werner <jwerner(a)chromium.org>
Reviewed-on: https://review.coreboot.org/14105
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/14105 for details.
-gerrit
Julius Werner (jwerner(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/14116
-gerrit
commit 790a3836203d35a9d425628b1e64aec1f68ff2d8
Author: Julius Werner <jwerner(a)chromium.org>
Date: Wed Mar 16 17:11:55 2016 -0700
gpio: Add support for binary_first base3 number system
This patch adds support for an alternative ternary number system in
which group of GPIOs can be interpreted. In this system, the digit
combinations that would form a binary number (i.e. that contain no 'Z'
state) are used to represent the lower values in the way they're used in
the normal binary system, and all the combinations that do contain a 'Z'
are used to represent values above those. We can use this for boards
that originally get strapped with binary board IDs but eventually
require more revisions than that representation allows. We can switch
their code to binary_first base3 and all old revisions with already
produced boards will still get read as the correct numbers.
Credit for the algorithm idea goes to Haran Talmon.
BRANCH=None
BUG=None
TEST=Stubbed out the actual GPIO reading and simulated all combinations
of 4 ternary digits for both number systems.
Change-Id: Ib5127656455f97f890ce2999ba5ac5f58a20cf93
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
---
src/include/gpio.h | 36 +++++++++++++++++++++++++++++++++++-
src/lib/gpio.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++--
2 files changed, 82 insertions(+), 3 deletions(-)
diff --git a/src/include/gpio.h b/src/include/gpio.h
index ea03a23..4627e44 100644
--- a/src/include/gpio.h
+++ b/src/include/gpio.h
@@ -29,6 +29,7 @@ void gpio_input_pulldown(gpio_t gpio);
void gpio_input_pullup(gpio_t gpio);
void gpio_input(gpio_t gpio);
void gpio_output(gpio_t gpio, int value);
+int _gpio_base3_value(gpio_t gpio[], int num_gpio, int binary_first);
/*
* Read the value presented by the set of GPIOs, when each pin is interpreted
@@ -48,6 +49,39 @@ int gpio_base2_value(gpio_t gpio[], int num_gpio);
* gpio[]: pin positions to read. gpio[0] is less significant than gpio[1].
* num_gpio: number of pins to read.
*/
-int gpio_base3_value(gpio_t gpio[], int num_gpio);
+static inline int gpio_base3_value(gpio_t gpio[], int num_gpio)
+{
+ return _gpio_base3_value(gpio, num_gpio, 0);
+}
+
+/*
+ * Read the value presented by the set of GPIOs, when each pin is interpreted
+ * as a base-3 digit (LOW = 0, HIGH = 1, Z/floating = 2) in a non-standard
+ * ternary number system where the first 2^n natural numbers are represented
+ * as they would be in a binary system (without any Z digits), and the following
+ * 3^n-2^n numbers use the remaining ternary representations in the normal
+ * ternary system order (skipping the values that were already used up).
+ * This is useful for boards which initially used a binary board ID and later
+ * decided to switch to tri-state after some revisions have already been built.
+ * Example: For num_gpio = 2 we get the following representation:
+ *
+ * Number X1 X0
+ * 0 0 0
+ * 1 0 1
+ * 2 1 0
+ * 3 1 1 // Start counting ternaries back at 0 after this
+ * 4 0 2 // Skipping 00 and 01 which are already used up
+ * 5 1 2 // Skipping 10 and 11 which are already used up
+ * 6 2 0
+ * 7 2 1
+ * 8 2 2
+ *
+ * gpio[]: pin positions to read. gpio[0] is less significant than gpio[1].
+ * num_gpio: number of pins to read.
+ */
+static inline int gpio_binary_first_base3_value(gpio_t gpio[], int num_gpio)
+{
+ return _gpio_base3_value(gpio, num_gpio, 1);
+}
#endif /* __SRC_INCLUDE_GPIO_H__ */
diff --git a/src/lib/gpio.c b/src/lib/gpio.c
index 5147cfe..2e34595 100644
--- a/src/lib/gpio.c
+++ b/src/lib/gpio.c
@@ -35,7 +35,7 @@ int gpio_base2_value(gpio_t gpio[], int num_gpio)
return result;
}
-int gpio_base3_value(gpio_t gpio[], int num_gpio)
+int _gpio_base3_value(gpio_t gpio[], int num_gpio, int binary_first)
{
/*
* GPIOs which are tied to stronger external pull up or pull down
@@ -50,6 +50,8 @@ int gpio_base3_value(gpio_t gpio[], int num_gpio)
int temp;
int index;
int result = 0;
+ int has_z = 0;
+ int binary_below = 0;
char value[32];
assert(num_gpio <= 32);
@@ -85,8 +87,51 @@ int gpio_base3_value(gpio_t gpio[], int num_gpio)
temp |= ((value[index] ^ temp) << 1);
printk(BIOS_DEBUG, "%c ", tristate_char[temp]);
result = (result * 3) + temp;
+
+ /*
+ * For binary_first we keep track of the normal ternary result
+ * and whether we found any pin that was a Z. We also determine
+ * the amount of numbers that can be represented with only
+ * binary digits (no Z) whose value in the normal ternary system
+ * is lower than the one we are parsing. Counting from the left,
+ * we add 2^i for any '1' digit to account for the binary
+ * numbers whose values would be below it if all following
+ * digits we parsed would be '0'. As soon as we find a '2' digit
+ * we can total the remaining binary numbers below as 2^(i+1)
+ * because we know that all binary representations counting only
+ * this and following digits must have values below our number
+ * (since 1xxx is always smaller than 2xxx).
+ *
+ * Example: 1 0 2 1 (counting from the left / most significant)
+ * '1' at 3^3: Add 2^3 = 8 to account for binaries 0000-0111
+ * '0' at 3^2: Ignore (not all binaries 1000-1100 are below us)
+ * '2' at 3^1: Add 2^(1+1) = 4 to account for binaries 1000-1011
+ * Stop adding for lower digits (3^0), all already accounted
+ * now. We know that there can be no binary numbers 1020-102X.
+ */
+ if (binary_first && !has_z) {
+ switch(temp) {
+ case 0: /* Ignore '0' digits. */
+ break;
+ case 1: /* Account for binaries 0 to 2^index - 1. */
+ binary_below += 1 << index;
+ break;
+ case 2: /* Account for binaries 0 to 2^(index+1) - 1. */
+ binary_below += 1 << (index + 1);
+ has_z = 1;
+ }
+ }
+ }
+
+ if (binary_first) {
+ if (has_z)
+ result = result + (1 << num_gpio) - binary_below;
+ else /* binary_below is normal binary system value if !has_z. */
+ result = binary_below;
}
- printk(BIOS_DEBUG, "= %d\n", result);
+
+ printk(BIOS_DEBUG, "= %d (%s base3 number system)\n", result,
+ binary_first ? "binary_first" : "standard");
/* Disable pull up / pull down to conserve power */
for (index = 0; index < num_gpio; ++index)
the following patch was just integrated into master:
commit f7d4f73053f0c26bfe411a9f3ef86f98389538b5
Author: Timothy Pearson <tpearson(a)raptorengineeringinc.com>
Date: Sun Mar 20 14:21:53 2016 -0500
nb/amd/amdmct/mct_ddr3: Ensure BlockRxDqsLock does not remain set
Under certain conditions (training abort) BlockRxDqsLock could
remain set in violation of the BKDG. Ensure BlockRxDqsLock is
reset to 0 after a lane training abort.
Change-Id: I1a49a24d02b2b7cacae074794ec274a424a9e66b
Reviewed-on: https://review.coreboot.org/14144
Tested-by: build bot (Jenkins)
Tested-by: Raptor Engineering Automated Test Stand <noreply(a)raptorengineeringinc.com>
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/14144 for details.
-gerrit
the following patch was just integrated into master:
commit a4d81809137b8b53903303b201c2d1bfbc615143
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Sun Jan 31 12:19:13 2016 -0800
Documentation: x86 MTRR setup, TempRamExit and MTRR loading
Document how to test TempRamExit and verify the MTRR setup and loading.
TEST=None
Change-Id: I57a604fa139edac4b05453547d3caf185db491e0
Signed-off-by: Lee Leahy <leroy.p.leahy(a)intel.com>
Reviewed-on: https://review.coreboot.org/14113
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/14113 for details.
-gerrit
the following patch was just integrated into master:
commit b953d05e604917ad2acb935e06bcc0344f8a09a1
Author: Lee Leahy <leroy.p.leahy(a)intel.com>
Date: Wed Mar 16 08:58:01 2016 -0700
Documentation/Intel: Add more Galileo Gen2 links
Add datasheet links for the components supporting GPIO. This includes
I2C I/O ports, I2C PWMs, bus buffers and multiplexers.
TEST=None
Change-Id: I0a1d222d6f9bdbd824b78edf2338cd797e83ebba
Signed-off-by: Lee Leahy <leroy.p.leahy(a)intel.com>
Reviewed-on: https://review.coreboot.org/14114
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth(a)google.com>
See https://review.coreboot.org/14114 for details.
-gerrit