Permalink
Browse files

Bump FPGA to v0.10.2

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 2227d110ab30e4b2340a89eacb4d035380bb0e5e
@@ -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) ) )
@@ -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) ) )
@@ -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) },
@@ -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");
@@ -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) },

0 comments on commit 2227d11

Please sign in to comment.