public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "Wei, David" <david.wei@intel.com>
To: "Steele, Kelly" <kelly.steele@intel.com>,
	"edk2-devel@lists.01.org" <edk2-devel@lists.01.org>
Subject: Re: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Update platform ID
Date: Wed, 26 Sep 2018 14:30:20 +0000	[thread overview]
Message-ID: <89954A0B46707A448411A627AD4EEE346911E16E@SHSMSX101.ccr.corp.intel.com> (raw)
In-Reply-To: <E6EF8131FBAF5A44BF17D9E2B45E20755FBE662D@ORSMSX114.amr.corp.intel.com>

Reviewed-by: David Wei <david.wei@intel.com<mailto:david.wei@intel.com>>

Thanks,
David  Wei

Intel SSG/STO/UEFI BIOS

From: Steele, Kelly
Sent: Saturday, September 22, 2018 2:27 AM
To: edk2-devel@lists.01.org
Cc: Wei, David <david.wei@intel.com>; Guo, Mang <mang.guo@intel.com>
Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Update platform ID

>From 35666684ac675af11249d5e9aa525288ff5b8efa Mon Sep 17 00:00:00 2001
From: Kelly Steele <kelly.steele@intel.com<mailto:kelly.steele@intel.com>>
Date: Fri, 21 Sep 2018 11:23:08 -0700
Subject: [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Update
platform ID

Since no platform uses PMIC_PWRGOOD to determine platform ID, I removed
it from the platform ID code.

Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Kelly Steele <kelly.steele@intel.com<mailto:kelly.steele@intel.com>>
---
.../BoardInitPreMem/BoardInitMiscs.c               |   2 +-
.../BoardInitPreMem/PlatformId.c                   | 174 +++++++++++----------
.../BoardInitPreMem/PlatformId.h                   |  16 +-
3 files changed, 99 insertions(+), 93 deletions(-)

diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/BoardInitMiscs.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/BoardInitMiscs.c
index 8d8db8131e..6cd4bdf18f 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/BoardInitMiscs.c
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/BoardInitMiscs.c
@@ -166,7 +166,7 @@ Mb3MUpdateFspmUpd (
   //
   // Translate into Memory Type
   //
-  MemoryType = (UINT8) ((HwconfStraps & HWCONF_MEMORY_MASK) >> HWCONF_MEMORY);
+  MemoryType = (UINT8) ((HwconfStraps & MB3M_HWCONF_MEMORY_MASK) >> MB3M_HWCONF_MEMORY);
   if (MemoryType == 0) {
     DEBUG ((DEBUG_INFO, "**** MB3 Module - SPD based memory init requested, but converted into Memory Profile type #4!\n"));
     MemoryType = 4; // LPDDR4 16Gbit 4 channels
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.c b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.c
index f81a1bffcf..558627cdbf 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.c
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.c
@@ -19,96 +19,102 @@
#include <Library/GpioLib.h>
#include "PlatformId.h"

-PAD_ID_INFO gRawBoardIdPadInfo[] = {
+PAD_ID_INFO gMB3MRawBoardIdPadInfo[] = {
   {NW_PMIC_STDBY,   EnPd, P_20K_L}, // bit 0
   {NW_GPIO_213,     EnPd, P_20K_L}, // bit 1
   {NW_PMIC_RESET_B, EnPd, P_20K_L}, // bit 2
-  {NW_PMIC_PWRGOOD, EnPd, P_20K_L}, // bit 3
-  {N_GPIO_27,       EnPd, P_20K_L}, // bit 4
-  {N_GPIO_72,       EnPd, P_20K_L}, // bit 5
-  {N_GPIO_64,       EnPd, P_20K_L}  // bit 6
+  {N_GPIO_27,       EnPd, P_20K_L}, // bit 3
+  {N_GPIO_72,       EnPd, P_20K_L}, // bit 4
+  {N_GPIO_64,       EnPd, P_20K_L}  // bit 5
};

 //
-// MinnowBoard v3 = 0x00000017
-//===========================================
-// NW_PMIC_STDBY   - BOARD_ID0 - 10k PU -> 1   xxxxxxx1
-// NW_GPIO_213     - BOARD_ID1 - 10k PU -> 1   xxxxxx1x
-// NW_PMIC_RESET_B - BOARD_ID2 - 10k PU -> 1   xxxxx1xx
-// NW_PMIC_PWRGOOD -           - 10k PD -> 0   xxxx0xxx
-// N_GPIO_27       - BOARD_ID3 - 10k PU -> 1   xxx1xxxx
-// N_GPIO_72       -           - Float  -> 0   xx0xxxxx
-// N_GPIO_64       -           - Float  -> 0   x0xxxxxx
-//===========================================  00010111b
-
-// Benson Glacier = 0x00000024
-//===========================================
-// NW_PMIC_STDBY   - BOARD_ID0 - 10k PD -> 0   xxxxxxx0
-// NW_GPIO_213     - BOARD_ID1 - 10k PD -> 0   xxxxxx0x
-// NW_PMIC_RESET_B - BOARD_ID2 - 10k PU -> 1   xxxxx1xx
-// NW_PMIC_PWRGOOD -           - Float  -> 0   xxxx0xxx
-// N_GPIO_27       -           - Float  -> 0   xxx0xxxx
-// N_GPIO_72       - BOARD_ID3 - 10k PU -> 1   xx1xxxxx
-// N_GPIO_64       -           - Float  -> 0   x0xxxxxx
-//===========================================  00100100b
-
-// Aurora Glacier = 0x00000026
-//===========================================
-// NW_PMIC_STDBY   - BOARD_ID0 - 10k PD -> 0   xxxxxxx0
-// NW_GPIO_213     - BOARD_ID1 - 10k PU -> 1   xxxxxx1x
-// NW_PMIC_RESET_B - BOARD_ID2 - 10k PU -> 1   xxxxx1xx
-// NW_PMIC_PWRGOOD -           - Float  -> 0   xxxx0xxx
-// N_GPIO_27       -           - Float  -> 0   xxx0xxxx
-// N_GPIO_72       - BOARD_ID3 - 10k PU -> 1   xx1xxxxx
-// N_GPIO_64       -           - Float  -> 0   x0xxxxxx
-//===========================================  00100110b
-
-// MinnowBoard v3 Module = 0x00000040
-//===========================================
-// NW_PMIC_STDBY   -           - Float  -> 0   xxxxxxx0
-// NW_GPIO_213     -           - Float  -> 0   xxxxxx0x
-// NW_PMIC_RESET_B -           - Float  -> 0   xxxxx0xx
-// NW_PMIC_PWRGOOD -           - Float  -> 0   xxxx0xxx
-// N_GPIO_27       -           - Float  -> 0   xxx0xxxx
-// N_GPIO_72       -           - Float  -> 0   xx0xxxxx
-// N_GPIO_64       -           - 10k PU -> 1   x1xxxxxx
-//===========================================  01000000b
-
-// LeafHill = 0x00000047
-//===========================================
-// NW_PMIC_STDBY   - BOARD_ID0 - 10k PU -> 1   xxxxxxx1
-// NW_GPIO_213     - BOARD_ID1 - 10k PU -> 1   xxxxxx1x
-// NW_PMIC_RESET_B - BOARD_ID2 - 10k PU -> 1   xxxxx1xx
-// NW_PMIC_PWRGOOD - BOARD_ID3 - 10k PD -> 0   xxxx0xxx
-// N_GPIO_27       -           - Float  -> 0   xxx0xxxx
-// N_GPIO_72       -           - Float  -> 0   xx0xxxxx
-// N_GPIO_64       -           - 0k PU  -> 1   x1xxxxxx
-//===========================================  01000111b
-
-TRANSLATE_ID_INFO gBoardIdInfo[] = {
-  {0x00000017, BOARD_ID_MINNOW,        "Minnow Board v3"},
-  {0x00000024, BOARD_ID_BENSON,        "Benson Glacier"},
-  {0x00000026, BOARD_ID_AURORA,        "Aurora Glacier"},
-  {0x00000040, BOARD_ID_MINNOW_MODULE, "Minnow Board v3 Module"},
-  {0x00000047, BOARD_ID_LFH_CRB,       "Leafhill"},
+// MinnowBoard v3 = 0x0000000F
+//======================================================
+// NW_PMIC_STDBY   - BOARD_ID0           - 10k PU  -> 1   xxxxxxx1
+// NW_GPIO_213     - BOARD_ID1           - 10k PU  -> 1   xxxxxx1x
+// NW_PMIC_RESET_B - BOARD_ID2           - 10k PU  -> 1   xxxxx1xx
+// N_GPIO_27       - BOARD_ID3           - 10k PU  -> 1   xxxx1xxx
+// N_GPIO_72       - GP_CAMERA_GP72      - Float   -> 0   xxx0xxxx
+// N_GPIO_64       - GP_CAMERA_GP64      - Float   -> 0   xx0xxxxx
+//======================================================  00001111b
+
+// UpSquared = 0x00000010/11
+//======================================================
+// NW_PMIC_STDBY   - DDR_CH              - Unknown -> 1   xxxxxxx?
+// NW_GPIO_213     - mSATA_PCIe_SEL_N    - Float   -> 0   xxxxxx0x
+// NW_PMIC_RESET_B - NC                  - Float   -> 0   xxxxx0xx
+// N_GPIO_27       - FPGA_fw_reload      - Float   -> 0   xxxx0xxx
+// N_GPIO_72       - GP_CAMERASB10       - 1K PU   -> 1   xxx1xxxx
+// N_GPIO_64       - GP_CAMERASB2        - Float   -> 0   xx0xxxxx
+//======================================================  0001000?b
+
+// Benson Glacier = 0x00000014
+//======================================================
+// NW_PMIC_STDBY   - BOARD_ID0           - 10k PD  -> 0   xxxxxxx0
+// NW_GPIO_213     - BOARD_ID1           - 10k PD  -> 0   xxxxxx0x
+// NW_PMIC_RESET_B - BOARD_ID2           - 10k PU  -> 1   xxxxx1xx
+// N_GPIO_27       - NC                  - Float   -> 0   xxxx0xxx
+// N_GPIO_72       - BOARD_ID3           - 10k PU  -> 1   xxx1xxxx
+// N_GPIO_64       - NC                  - Float   -> 0   xx0xxxxx
+//======================================================  00010100b
+
+// Aurora Glacier = 0x00000016
+//======================================================
+// NW_PMIC_STDBY   - BOARD_ID0           - 10k PD  -> 0   xxxxxxx0
+// NW_GPIO_213     - BOARD_ID1           - 10k PU  -> 1   xxxxxx1x
+// NW_PMIC_RESET_B - BOARD_ID2           - 10k PU  -> 1   xxxxx1xx
+// N_GPIO_27       - NC                  - Float   -> 0   xxxx0xxx
+// N_GPIO_72       - BOARD_ID3           - 10k PU  -> 1   xxx1xxxx
+// N_GPIO_64       - NC                  - Float   -> 0   xx0xxxxx
+//======================================================  00010110b
+
+// MinnowBoard v3 Module = 0x00000020
+//======================================================
+// NW_PMIC_STDBY   - NC                  - Float   -> 0   xxxxxxx0
+// NW_GPIO_213     - NC                  - Float   -> 0   xxxxxx0x
+// NW_PMIC_RESET_B - NC                  - Float   -> 0   xxxxx0xx
+// N_GPIO_27       - NC                  - Float   -> 0   xxxx0xxx
+// N_GPIO_72       - NC                  - Float   -> 0   xxx0xxxx
+// N_GPIO_64       - CAM0_RST#           - 10k PU  -> 1   xx1xxxxx
+//======================================================  00100000b
+
+// LeafHill = 0x00000027
+//======================================================
+// NW_PMIC_STDBY   - BOARD_ID0           - 10k PU  -> 1   xxxxxxx1
+// NW_GPIO_213     - BOARD_ID1           - 10k PU  -> 1   xxxxxx1x
+// NW_PMIC_RESET_B - BOARD_ID2           - 10k PU  -> 1   xxxxx1xx
+// N_GPIO_27       - SOC_GPIO27          - Float   -> 0   xxxx0xxx
+// N_GPIO_72       - NC                  - Float   -> 0   xxx0xxxx
+// N_GPIO_64       - MCSI1_XSHUTDN       - 0k PU   -> 1   xx1xxxxx
+//======================================================  00100111b
+
+TRANSLATE_ID_INFO gMB3MBoardIdInfo[] = {
+  {0x0000000F, BOARD_ID_MINNOW,        "Minnow Board v3"},
+  {0x00000010, BOARD_ID_UP2,           "Up Squared"},
+  {0x00000011, BOARD_ID_UP2,           "Up Squared"},
+  {0x00000014, BOARD_ID_BENSON,        "Benson Glacier"},
+  {0x00000016, BOARD_ID_AURORA,        "Aurora Glacier"},
+  {0x00000020, BOARD_ID_MINNOW_MODULE, "Minnow Board v3 Module"},
+  {0x00000027, BOARD_ID_LFH_CRB,       "Leafhill"},
   {0xFFFFFFFF, BOARD_ID_APL_UNKNOWN,   "Unknown Board ID"}
};

-PAD_ID_INFO gRawFabIdPadInfo[] = {
+PAD_ID_INFO gMB3MRawFabIdPadInfo[] = {
   {SW_GPIO_207,     EnPd, P_20K_L}  // bit 0 - GPIO 207
};

 // MinnowBoard v3 Module, Fab A = 0x00000000
-//===========================================
-// SW_GPIO_207                 - Float  -> 0   xxxxxxx0
-//===========================================  00000000b
+//======================================================
+// SW_GPIO_207     - NC                  - Float   -> 0   xxxxxxx0
+//======================================================  00000000b

 // MinnowBoard v3 Module, Fab C = 0x00000001
-//===========================================
-// SW_GPIO_207                 - 10k PU -> 1   xxxxxxx1
-//===========================================  00000001b
+//======================================================
+// SW_GPIO_207     - PCIE_WAKE_LAN1_1V8# - 10k PU  -> 1   xxxxxxx1
+//======================================================  00000001b

-TRANSLATE_ID_INFO gFabIdInfo[] = {
+TRANSLATE_ID_INFO gMB3MFabIdInfo[] = {
   {0x00000000,     FAB_ID_A, "Fab ID A"},
   {0x00000001,     FAB_ID_C, "Fab ID C"},
   {0xFFFFFFFF,  UNKNOWN_FAB, "Unknown Fab ID"}
@@ -199,16 +205,16 @@ Minnow3ModuleGetCommonBoardId (
   //
   // Get BoardId
   //
-  RawBoardId = Minnow3ModuleGetId (gRawBoardIdPadInfo, sizeof (gRawBoardIdPadInfo) / sizeof (gRawBoardIdPadInfo[0]));
+  RawBoardId = Minnow3ModuleGetId (gMB3MRawBoardIdPadInfo, sizeof (gMB3MRawBoardIdPadInfo) / sizeof (gMB3MRawBoardIdPadInfo[0]));
   DEBUG ((DEBUG_INFO, "%a(#%3d) - Raw BoardId: %02X\n", __FUNCTION__, __LINE__, RawBoardId));

   //
   // Convert from a 32-bit raw BoardId to an 8-bit one.
   //
-  for (index = 0; index < sizeof (gBoardIdInfo) / sizeof (gBoardIdInfo[0]); index++) {
-    if ((gBoardIdInfo[index].RawId == RawBoardId) || (gBoardIdInfo[index].RawId == 0xFFFFFFFF)) {
-      BoardId = gBoardIdInfo[index].TranslatedId;
-      DEBUG ((DEBUG_INFO, "%a(#%3d) - BoardId: %02X = %a\n", __FUNCTION__, __LINE__, BoardId, gBoardIdInfo[index].Description));
+  for (index = 0; index < sizeof (gMB3MBoardIdInfo) / sizeof (gMB3MBoardIdInfo[0]); index++) {
+    if ((gMB3MBoardIdInfo[index].RawId == RawBoardId) || (gMB3MBoardIdInfo[index].RawId == 0xFFFFFFFF)) {
+      BoardId = gMB3MBoardIdInfo[index].TranslatedId;
+      DEBUG ((DEBUG_INFO, "%a(#%3d) - BoardId: %02X = %a\n", __FUNCTION__, __LINE__, BoardId, gMB3MBoardIdInfo[index].Description));
       break;
     }
   }
@@ -230,16 +236,16 @@ Minnow3ModuleGetCommonFabId (
   //
   // Get FabId
   //
-  RawFabId = Minnow3ModuleGetId (gRawFabIdPadInfo, sizeof (gRawFabIdPadInfo) / sizeof (gRawFabIdPadInfo[0]));
+  RawFabId = Minnow3ModuleGetId (gMB3MRawFabIdPadInfo, sizeof (gMB3MRawFabIdPadInfo) / sizeof (gMB3MRawFabIdPadInfo[0]));
   DEBUG ((DEBUG_INFO, "%a(#%3d) - Raw FabId: %02X\n", __FUNCTION__, __LINE__, RawFabId));

   //
   // Convert from a 32-bit raw FabId to an 8-bit one.
   //
-  for (index = 0; index < sizeof (gFabIdInfo) / sizeof (gFabIdInfo[0]); index++) {
-    if ((gFabIdInfo[index].RawId == RawFabId) || (gFabIdInfo[index].RawId == 0xFFFFFFFF)) {
-      FabId = gFabIdInfo[index].TranslatedId;
-      DEBUG ((DEBUG_INFO, "%a(#%3d) - FabId: %02X = %a\n", __FUNCTION__, __LINE__, FabId, gFabIdInfo[index].Description));
+  for (index = 0; index < sizeof (gMB3MFabIdInfo) / sizeof (gMB3MFabIdInfo[0]); index++) {
+    if ((gMB3MFabIdInfo[index].RawId == RawFabId) || (gMB3MFabIdInfo[index].RawId == 0xFFFFFFFF)) {
+      FabId = gMB3MFabIdInfo[index].TranslatedId;
+      DEBUG ((DEBUG_INFO, "%a(#%3d) - FabId: %02X = %a\n", __FUNCTION__, __LINE__, FabId, gMB3MFabIdInfo[index].Description));
       break;
     }
   }
diff --git a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.h b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.h
index fbaac3504c..76e4546f36 100644
--- a/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.h
+++ b/Platform/BroxtonPlatformPkg/Board/MinnowBoard3Module/BoardInitPreMem/PlatformId.h
@@ -21,14 +21,14 @@
//
// HWCONF defines. Low = off & high = on
//
-#define HWCONF_COMx     BIT0
-#define HWCONF_ECC      BIT1
-//#define HWCONF_COMx     BIT2
-//#define HWCONF_COMx     BIT3
-#define HWCONF_USB3     BIT4
-#define HWCONF_CAMERA   BIT5
-#define HWCONF_MEMORY   6
-#define HWCONF_MEMORY_MASK   (BIT6 | BIT7 | BIT8)
+#define MB3M_HWCONF_COMx     BIT0
+#define MB3M_HWCONF_ECC      BIT1
+//#define MB3M_HWCONF_COMx     BIT2
+//#define MB3M_HWCONF_COMx     BIT3
+#define MB3M_HWCONF_USB3     BIT4
+#define MB3M_HWCONF_CAMERA   BIT5
+#define MB3M_HWCONF_MEMORY   6
+#define MB3M_HWCONF_MEMORY_MASK   (BIT6 | BIT7 | BIT8)

 typedef struct {
   UINT32   CommAndOffset;
--
2.11.0.windows.1



      reply	other threads:[~2018-09-26 14:30 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-09-21 18:26 [PATCH] [edk2-platforms/devel-IntelAtomProcessorE3900] Update platform ID Steele, Kelly
2018-09-26 14:30 ` Wei, David [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=89954A0B46707A448411A627AD4EEE346911E16E@SHSMSX101.ccr.corp.intel.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox