the following patch was just integrated into master: commit 2b239485358ec063a4803f248c88378076810e24 Author: Julius Werner jwerner@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@chromium.org Reviewed-on: https://review.coreboot.org/14116 Tested-by: build bot (Jenkins) Reviewed-by: David Hendricks dhendrix@chromium.org Reviewed-by: Aaron Durbin adurbin@chromium.org
See https://review.coreboot.org/14116 for details.
-gerrit