From 15aa4a083bfac705151390680e1649084061b04a Mon Sep 17 00:00:00 2001 From: Mychaela Falconia Date: Mon, 28 Sep 2020 21:42:10 +0000 Subject: firmware: calibration: proper support for gtm900b target GTM900-B can share almost all calibration tables with GTA0x and FCDEV3B, only the VCXO is significantly different. Related: OS#3582 Change-Id: I52b63b1d086452139b1efd308d47a4183eace745 --- src/target/firmware/board/gtm900b/afcparams.c | 47 +++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100644 src/target/firmware/board/gtm900b/afcparams.c (limited to 'src/target/firmware/board/gtm900b/afcparams.c') diff --git a/src/target/firmware/board/gtm900b/afcparams.c b/src/target/firmware/board/gtm900b/afcparams.c new file mode 100644 index 00000000..ca8908dc --- /dev/null +++ b/src/target/firmware/board/gtm900b/afcparams.c @@ -0,0 +1,47 @@ +/* + * This code was written by Mychaela Falconia + * who refuses to claim copyright on it and has released it as public domain + * instead. NO rights reserved, all rights relinquished. + * + * 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 +#include + +/* + * Here is a representative set of AFC Psi parameters that has been + * calibrated by Huawei on a GTM900-B MGC2GSMT module, as recorded + * in the /gsm/rf/afcparams file: + * + * Psi_sta_inv: 13626 + * Psi_st: 4 + * Psi_st_32: 252168 + * Psi_st_inv: 17032 + * + * The following AFC slope number is the closest OsmocomBB-style afc_slope + * integer corresponding to these Psi numbers; the true value is somewhere + * between 115 and 116. + */ +int16_t afc_slope = 115; + +/* + * The compiled-in AFC initial DAC value below is the same as was used by + * the old OsmocomBB code written for Mot C1xx phones, but it will normally + * be overridden by the per-unit factory calibration value read from the + * /gsm/rf/afcdac file in FFS. + */ +int16_t afc_initial_dac_value = -700; -- cgit v1.2.3