summaryrefslogtreecommitdiff
path: root/Radio/HW/BladeRF/src/board/bladerf1/compatibility.c
blob: 6d76d3f0adf4f9cfd037642125b9cbc6fac16ffb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
#include "host_config.h"

#include "helpers/version.h"

/* Firmware-FPGA compatibility tables
 *
 * This list should be kept in decending order, such that the most recent
 * versions are first, and the last entry should contain the earliest version
 * that libbladeRF supports.
 */

#define VERSION(major, minor, patch) { major, minor, patch, NULL }

static const struct compat fw_compat[] = {
    /*   Firmware       requires  >=        FPGA */
    { VERSION(2, 4, 0),                 VERSION(0, 6, 0) },
    { VERSION(2, 3, 2),                 VERSION(0, 0, 2) },
    { VERSION(2, 3, 1),                 VERSION(0, 0, 2) },
    { VERSION(2, 3, 0),                 VERSION(0, 0, 2) },
    { VERSION(2, 2, 0),                 VERSION(0, 0, 2) },
    { VERSION(2, 1, 1),                 VERSION(0, 0, 2) },
    { VERSION(2, 1, 0),                 VERSION(0, 0, 2) },
    { VERSION(2, 0, 0),                 VERSION(0, 0, 2) },
    { VERSION(1, 9, 1),                 VERSION(0, 0, 2) },
    { VERSION(1, 9, 0),                 VERSION(0, 0, 2) },
    { VERSION(1, 8, 1),                 VERSION(0, 0, 2) },
    { VERSION(1, 8, 0),                 VERSION(0, 0, 2) },
    { VERSION(1, 7, 1),                 VERSION(0, 0, 2) },
    { VERSION(1, 7, 0),                 VERSION(0, 0, 2) },
    { VERSION(1, 6, 1),                 VERSION(0, 0, 2) },
    { VERSION(1, 6, 0),                 VERSION(0, 0, 1) },
};

const struct version_compat_table bladerf1_fw_compat_table = {fw_compat, ARRAY_SIZE(fw_compat)};

static const struct compat fpga_compat[] = {
    /*    FPGA          requires >=        Firmware */
    { VERSION(0, 15, 1),                VERSION(2, 4, 0) },
    { VERSION(0, 15, 0),                VERSION(2, 4, 0) },
    { VERSION(0, 14, 0),                VERSION(2, 4, 0) },
    { VERSION(0, 12, 0),                VERSION(2, 2, 0) },
    { VERSION(0, 11, 1),                VERSION(2, 1, 0) },
    { VERSION(0, 11, 0),                VERSION(1, 6, 1) },
    { 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) },
    { VERSION(0, 8, 0),                 VERSION(1, 6, 1) },
    { VERSION(0, 7, 3),                 VERSION(1, 6, 1) },
    { VERSION(0, 7, 2),                 VERSION(1, 6, 1) },
    { VERSION(0, 7, 1),                 VERSION(1, 6, 1) },
    { VERSION(0, 7, 0),                 VERSION(1, 6, 1) },
    { VERSION(0, 6, 0),                 VERSION(1, 6, 1) },
    { VERSION(0, 5, 0),                 VERSION(1, 6, 1) },
    { VERSION(0, 4, 1),                 VERSION(1, 6, 1) },
    { VERSION(0, 4, 0),                 VERSION(1, 6, 1) },
    { VERSION(0, 3, 5),                 VERSION(1, 6, 1) },
    { VERSION(0, 3, 4),                 VERSION(1, 6, 1) },
    { VERSION(0, 3, 3),                 VERSION(1, 6, 1) },
    { VERSION(0, 3, 2),                 VERSION(1, 6, 1) },
    { VERSION(0, 3, 1),                 VERSION(1, 6, 1) },
    { VERSION(0, 3, 0),                 VERSION(1, 6, 1) },
    { VERSION(0, 2, 0),                 VERSION(1, 6, 1) },
    { VERSION(0, 1, 2),                 VERSION(1, 6, 1) },
    { VERSION(0, 1, 1),                 VERSION(1, 6, 1) },
    { VERSION(0, 1, 0),                 VERSION(1, 6, 1) },
    { VERSION(0, 0, 6),                 VERSION(1, 6, 1) },
    { VERSION(0, 0, 5),                 VERSION(1, 6, 1) },
    { VERSION(0, 0, 4),                 VERSION(1, 6, 1) },
    { VERSION(0, 0, 3),                 VERSION(1, 6, 1) },
    { VERSION(0, 0, 2),                 VERSION(1, 6, 1) },
    { VERSION(0, 0, 1),                 VERSION(1, 6, 0) },
};

const struct version_compat_table bladerf1_fpga_compat_table = {fpga_compat, ARRAY_SIZE(fpga_compat)};