Skip to content

Commit

Permalink
Bump FPGA to v0.10.2
Browse files Browse the repository at this point in the history
host: bladerf2: Disable FPGA tuning mode if using pre-v0.10.2
FPGA.
  • Loading branch information
rtucker committed Dec 18, 2018
1 parent 1f692be commit 2227d11
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 2 deletions.
Expand Up @@ -8,7 +8,7 @@
#define FPGA_VERSION_ID 0x7777
#define FPGA_VERSION_MAJOR 0
#define FPGA_VERSION_MINOR 10
#define FPGA_VERSION_PATCH 1
#define FPGA_VERSION_PATCH 2
#define FPGA_VERSION ((uint32_t)( FPGA_VERSION_MAJOR | \
(FPGA_VERSION_MINOR << 8) | \
(FPGA_VERSION_PATCH << 16) ) )
Expand Down
Expand Up @@ -8,7 +8,7 @@
#define FPGA_VERSION_ID 0x7777
#define FPGA_VERSION_MAJOR 0
#define FPGA_VERSION_MINOR 10
#define FPGA_VERSION_PATCH 1
#define FPGA_VERSION_PATCH 2
#define FPGA_VERSION ((uint32_t)( FPGA_VERSION_MAJOR | \
(FPGA_VERSION_MINOR << 8) | \
(FPGA_VERSION_PATCH << 16) ) )
Expand Down
Expand Up @@ -33,6 +33,7 @@ const struct version_compat_table bladerf1_fw_compat_table = {fw_compat, ARRAY_S

static const struct compat fpga_compat[] = {
/* FPGA requires >= Firmware */
{ VERSION(0, 10, 2), VERSION(1, 6, 1) },
{ VERSION(0, 10, 1), VERSION(1, 6, 1) },
{ VERSION(0, 10, 0), VERSION(1, 6, 1) },
{ VERSION(0, 9, 0), VERSION(1, 6, 1) },
Expand Down
14 changes: 14 additions & 0 deletions host/libraries/libbladeRF/src/board/bladerf2/common.c
Expand Up @@ -257,6 +257,20 @@ bladerf_tuning_mode default_tuning_mode(struct bladerf *dev)
mode = BLADERF_TUNING_MODE_HOST;
}

/* Detect TX FPGA bug and report warning */
if (BLADERF_TUNING_MODE_FPGA == mode &&
have_cap(board_data->capabilities, BLADERF_CAP_FPGA_TUNING) &&
version_fields_less_than(&board_data->fpga_version, 0, 10, 2)) {
log_warning("FPGA v%u.%u.%u has errata related to FPGA tuning mode. "
"Forcing host-based tuning mode. "
"Please update to FPGA v%u.%u.%u or newer to use "
"FPGA tuning mode.\n",
board_data->fpga_version.major,
board_data->fpga_version.minor,
board_data->fpga_version.patch, 0, 10, 2);
mode = BLADERF_TUNING_MODE_HOST;
}

switch (mode) {
case BLADERF_TUNING_MODE_HOST:
log_debug("Default tuning mode: Host\n");
Expand Down
Expand Up @@ -25,6 +25,7 @@ const struct version_compat_table bladerf2_fw_compat_table = {fw_compat, ARRAY_S

static const struct compat fpga_compat[] = {
/* FPGA requires >= Firmware */
{ VERSION(0, 10, 2), VERSION(2, 1, 0) },
{ VERSION(0, 10, 1), VERSION(2, 1, 0) },
{ VERSION(0, 10, 0), VERSION(2, 1, 0) },
{ VERSION(0, 9, 0), VERSION(2, 1, 0) },
Expand Down

0 comments on commit 2227d11

Please sign in to comment.