summaryrefslogtreecommitdiff
path: root/Platform/BroxtonPlatformPkg/Board
diff options
context:
space:
mode:
authorzwei4 <david.wei@intel.com>2017-05-05 18:38:36 +0800
committerGuo Mang <mang.guo@intel.com>2017-05-09 14:13:17 +0800
commitfa412a848fe9a5d4143abd05cda771a1b5a192e9 (patch)
tree12f12eb9b4dcd0994dc1c39e7b65ba9ef13026fc /Platform/BroxtonPlatformPkg/Board
parent4e9cbad6b09f579efaa4c9871590bff7e984e957 (diff)
downloadedk2-platforms-fa412a848fe9a5d4143abd05cda771a1b5a192e9.tar.xz
Use GP_CAMERASB10 as Board_ID3.
Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: zwei4 <david.wei@intel.com> CC: Mang Guo <mang.guo@intel.com> CC: Shifei Lu <shifeix.a.lu@intel.com>
Diffstat (limited to 'Platform/BroxtonPlatformPkg/Board')
-rw-r--r--Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPreMem/PlatformId.c24
-rw-r--r--Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPreMem/PlatformId.c24
2 files changed, 30 insertions, 18 deletions
diff --git a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPreMem/PlatformId.c b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPreMem/PlatformId.c
index d550fd400c..40554b95ee 100644
--- a/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPreMem/PlatformId.c
+++ b/Platform/BroxtonPlatformPkg/Board/LeafHill/BoardInitPreMem/PlatformId.c
@@ -64,24 +64,30 @@ GetEmbeddedBoardIdFabId(
padConfg0.r.PMode = 0;
padConfg0.r.GPIORxTxDis = 0x1;
GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
+
//
- // Board_ID3: PMIC_PWRGOOD
+ // Board_ID3: GP_CAMERASB10
//
- CommAndOffset = GetCommOffset (NORTHWEST, 0x00C0);
+
+ CommAndOffset = GetCommOffset (NORTH, 0x01E0);
padConfg0.padCnf0 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET);
- padConfg0.r.PMode = 0;
- padConfg0.r.GPIORxTxDis = 0x1;
+ padConfg1.padCnf1 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET);
+
+ padConfg0.r.PMode = M0; // Set to GPIO mode
+ padConfg0.r.GPIORxTxDis = GPI; // Set to GPI
GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
+
+ padConfg1.r.IOSTerm = EnPu; // Enable pull-up
+ padConfg1.r.Term = P_20K_H; // Set to 20K pull-up
+ GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
+
//
- // Set to Pull Up 20K
+ // Read out Board_ID
//
- padConfg1.r.Term = 0xC;
- GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
-
*BoardId = (UINT8) (((GpioPadRead (GetCommOffset (NORTHWEST, 0x00F0) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) | \
(((GpioPadRead (GetCommOffset (NORTHWEST, 0x00D0) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 1) | \
(((GpioPadRead (GetCommOffset (NORTHWEST, 0x00C8) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 2) | \
- (((GpioPadRead (GetCommOffset (NORTHWEST, 0x00C0) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 3));
+ (((GpioPadRead (GetCommOffset (NORTH, 0x01E0) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 3));
DEBUG ((DEBUG_INFO, "BoardId from PMIC strap: %02X\n", *BoardId));
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPreMem/PlatformId.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPreMem/PlatformId.c
index d550fd400c..bacdab1f22 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPreMem/PlatformId.c
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3/BoardInitPreMem/PlatformId.c
@@ -64,24 +64,30 @@ GetEmbeddedBoardIdFabId(
padConfg0.r.PMode = 0;
padConfg0.r.GPIORxTxDis = 0x1;
GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
+
//
- // Board_ID3: PMIC_PWRGOOD
+ // Board_ID3: GP_CAMERASB10
//
- CommAndOffset = GetCommOffset (NORTHWEST, 0x00C0);
+
+ CommAndOffset = GetCommOffset (NORTH, 0x01E0);
padConfg0.padCnf0 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET);
- padConfg0.r.PMode = 0;
- padConfg0.r.GPIORxTxDis = 0x1;
+ padConfg1.padCnf1 = GpioPadRead (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET);
+
+ padConfg0.r.PMode = M0; // Set to GPIO mode
+ padConfg0.r.GPIORxTxDis = GPI; // Set to GPI
GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF0_OFFSET, padConfg0.padCnf0);
+
+ padConfg1.r.IOSTerm = EnPu; // Enable pull-up
+ padConfg1.r.Term = P_20K_H; // Set to 20K pull-up
+ GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
+
//
- // Set to Pull Up 20K
+ // Read out Board_ID
//
- padConfg1.r.Term = 0xC;
- GpioPadWrite (CommAndOffset + BXT_GPIO_PAD_CONF1_OFFSET, padConfg1.padCnf1);
-
*BoardId = (UINT8) (((GpioPadRead (GetCommOffset (NORTHWEST, 0x00F0) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) | \
(((GpioPadRead (GetCommOffset (NORTHWEST, 0x00D0) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 1) | \
(((GpioPadRead (GetCommOffset (NORTHWEST, 0x00C8) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 2) | \
- (((GpioPadRead (GetCommOffset (NORTHWEST, 0x00C0) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 3));
+ (((GpioPadRead (GetCommOffset (NORTH, 0x01E0) + BXT_GPIO_PAD_CONF0_OFFSET) & BIT1) >> 1) << 3));
DEBUG ((DEBUG_INFO, "BoardId from PMIC strap: %02X\n", *BoardId));