laforge has submitted this change. ( https://gerrit.osmocom.org/c/osmocom-bb/+/42605?usp=email ) Change subject: firmware/se_k2xx: add board specific AFC params ...................................................................... firmware/se_k2xx: add board specific AFC params Set afc_slope to 405 and afc_initial_dac_value to -370, derived from AFC parameter averages computed across TIFFS readings of 7 unique SE K2xx units (5 x K200i + 1 x K205i + 1 x K220i). Change-Id: Iee2569c124dd0160f16457e0171cfd48d961045e Related: OS#5822 --- M src/target/firmware/Makefile A src/target/firmware/board/se_k2xx/afcparams.c 2 files changed, 45 insertions(+), 1 deletion(-) Approvals: falconia: Looks good to me, but someone else must approve laforge: Looks good to me, approved Jenkins Builder: Verified diff --git a/src/target/firmware/Makefile b/src/target/firmware/Makefile index f057410..64ed667 100644 --- a/src/target/firmware/Makefile +++ b/src/target/firmware/Makefile @@ -113,7 +113,7 @@ BOARD_se_k2xx_OBJS=$(calypso_COMMON_OBJS) board/se_k2xx/init.o \ board/se_k2xx/rffe_k2xx.o \ board/se_k2xx/rf_tables.o \ - board/gta0x/afcparams.o \ + board/se_k2xx/afcparams.o \ board/common/readcal_tiffs.o battery/dummy.o $(FB_k2xx_OBJS) BOARD_se_k2xx_ENVIRONMENTS=highram diff --git a/src/target/firmware/board/se_k2xx/afcparams.c b/src/target/firmware/board/se_k2xx/afcparams.c new file mode 100644 index 0000000..d6fd1a7 --- /dev/null +++ b/src/target/firmware/board/se_k2xx/afcparams.c @@ -0,0 +1,44 @@ +/* + * (C) 2026 by Vadim Yanitskiy <fixeria@osmocom.org> + * + * All Rights Reserved + * + * SPDX-License-Identifier: GPL-2.0+ + * + * 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. + * + */ + +#include <stdint.h> + +/* + * The following AFC Psi parameters are averages computed from TIFFS readings + * across 7 unique SE K2xx units (5 x K200 + 1 x K205 + 1 x K220): + * + * Psi_sta_inv: 3880 + * Psi_st: 14 + * Psi_st_32: 885779 + * Psi_st_inv: 4850 + * + * The following AFC slope number is the closest OsmocomBB-style afc_slope + * integer corresponding to these Psi numbers. + */ +int16_t afc_slope = 405; + +/* + * The compiled-in AFC initial DAC value below is derived from the average + * dac_center computed from TIFFS readings across the same 7 unique SE K2xx + * units. Note that TI's afcparams dac_center is in fixed-point format with + * 3 fractional bits, hence the actual DAC value is -2957 >> 3 = -370. + * 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 = -370; -- To view, visit https://gerrit.osmocom.org/c/osmocom-bb/+/42605?usp=email To unsubscribe, or for help writing mail filters, visit https://gerrit.osmocom.org/settings?usp=email Gerrit-MessageType: merged Gerrit-Project: osmocom-bb Gerrit-Branch: master Gerrit-Change-Id: Iee2569c124dd0160f16457e0171cfd48d961045e Gerrit-Change-Number: 42605 Gerrit-PatchSet: 3 Gerrit-Owner: fixeria <vyanitskiy@sysmocom.de> Gerrit-Reviewer: Jenkins Builder Gerrit-Reviewer: falconia <falcon@freecalypso.org> Gerrit-Reviewer: laforge <laforge@osmocom.org>