diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2010-09-22 22:22:18 +0200 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2010-09-26 20:05:22 +0200 |
commit | daa86304682cf23dc4d165c4cef4c94ed80a74b3 (patch) | |
tree | bfd2e4c6905f72328908eb971a7489ac93e8cde7 /src/target/firmware/board | |
parent | 1ca0ce1a5c44172014830cd2ea752c1f84579132 (diff) |
target/layer1: Implement host-driven Tx power control
It's up to L23 to change the parameters using the appropriate
L1CTL call.
This is a mix between Harald's version and Dieter's version of
the TX control code.
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
Diffstat (limited to 'src/target/firmware/board')
-rw-r--r-- | src/target/firmware/board/compal/rf_power.c | 62 | ||||
-rw-r--r-- | src/target/firmware/board/gta0x/rf_power.c | 63 |
2 files changed, 125 insertions, 0 deletions
diff --git a/src/target/firmware/board/compal/rf_power.c b/src/target/firmware/board/compal/rf_power.c new file mode 100644 index 00000000..71033aea --- /dev/null +++ b/src/target/firmware/board/compal/rf_power.c @@ -0,0 +1,62 @@ +/* Tx RF power calibration for the Compal/Motorola dualband phones */ + +/* (C) 2010 by Harald Welte <laforge@gnumonks.org> + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include <stdint.h> +#include <osmocore/utils.h> + +/* GSM900 ARFCN 33, Measurements by Steve Markgraf / May 2010 */ +const int16_t dbm2apc_gsm900[] = { + [0] = 151, + [1] = 152, + [2] = 153, + [3] = 155, + [4] = 156, + [5] = 158, + [6] = 160, + [7] = 162, + [8] = 164, + [9] = 167, + [10] = 170, + [11] = 173, + [12] = 177, + [13] = 182, + [14] = 187, + [15] = 192, + [16] = 199, + [17] = 206, + [18] = 214, + [19] = 223, + [20] = 233, + [21] = 244, + [22] = 260, + [23] = 271, + [24] = 288, + [25] = 307, + [26] = 327, + [27] = 350, + [28] = 376, + [29] = 407, + [30] = 456, + [31] = 575, +}; + +const int dbm2apc_gsm900_max = ARRAY_SIZE(dbm2apc_gsm900) - 1; diff --git a/src/target/firmware/board/gta0x/rf_power.c b/src/target/firmware/board/gta0x/rf_power.c new file mode 100644 index 00000000..645c8a39 --- /dev/null +++ b/src/target/firmware/board/gta0x/rf_power.c @@ -0,0 +1,63 @@ +/* Tx RF power calibration for the FIC GTA0x phones */ + +/* (C) 2010 by Harald Welte <laforge@gnumonks.org> + * + * All Rights Reserved + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License along + * with this program; if not, write to the Free Software Foundation, Inc., + * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + * + */ + +#include <stdint.h> +#include <osmocore/utils.h> + +/* GSM900 ARFCN 33, Measurements by Steve Markgraf / May 2010 */ +/* FIXME those are from compal ... need real GTA calibration */ +const int16_t dbm2apc_gsm900[] = { + [0] = 151, + [1] = 152, + [2] = 153, + [3] = 155, + [4] = 156, + [5] = 158, + [6] = 160, + [7] = 162, + [8] = 164, + [9] = 167, + [10] = 170, + [11] = 173, + [12] = 177, + [13] = 182, + [14] = 187, + [15] = 192, + [16] = 199, + [17] = 206, + [18] = 214, + [19] = 223, + [20] = 233, + [21] = 244, + [22] = 260, + [23] = 271, + [24] = 288, + [25] = 307, + [26] = 327, + [27] = 350, + [28] = 376, + [29] = 407, + [30] = 456, + [31] = 575, +}; + +const int dbm2apc_gsm900_max = ARRAY_SIZE(dbm2apc_gsm900) - 1; |