summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMychaela Falconia <mychaela.falconia@gmail.com>2019-02-12 14:46:39 +0700
committerVadim Yanitskiy <axilirator@gmail.com>2019-02-13 18:06:38 +0700
commitaf2a12ed676f74ff5ee01dbc358dc1c2dd2e41c8 (patch)
tree6e116bbfcf6b6aa0f25bdd8e5e8d76db57ab630a
parent432dbdf3b446b292e4445e0483c40bac07e11776 (diff)
firmware/board/compal: indicate both DCS and PCS Rx ports as connected
Each given Mot C1xx phone is made either for 900+1800 MHz, in which case only the DCS Rx port is connected, or for 850+1900 MHz, in which case only the PCS Rx port is connected. Let's tell the TRF6151 driver that both DCS and PCS ports are connected, so that the same binary build can be used on both EU-band and US-band C1xx phones. If one needs to tune the TRF6151 receiver out of spec, or at least outside of the DCS/PCS Rx SAW filter's legitimate passband (or if the SAW filter was changed or removed), then the rffe_get_rx_ports() function might be changed to indicate which Rx port is physically connected: PORT_DCS1800 only or PORT_PCS1900 only. Change-Id: I620084c33ad165faffbbfc45923faedad77aafb2
-rw-r--r--src/target/firmware/board/compal/rffe_dualband.c24
-rw-r--r--src/target/firmware/board/compal_e86/rffe_dualband_e86.c24
2 files changed, 44 insertions, 4 deletions
diff --git a/src/target/firmware/board/compal/rffe_dualband.c b/src/target/firmware/board/compal/rffe_dualband.c
index de16189..faa68ff 100644
--- a/src/target/firmware/board/compal/rffe_dualband.c
+++ b/src/target/firmware/board/compal/rffe_dualband.c
@@ -44,10 +44,30 @@ void rffe_mode(enum gsm_band band, int tx)
tsp_act_update(tspact);
}
-/* Returns RF wiring */
+/*
+ * Each given Mot C1xx phone is made either for 900+1800 MHz, in which
+ * case only the DCS Rx port is connected, or for 850+1900 MHz, in which
+ * case only the PCS Rx port is connected. Here we tell the TRF6151 driver
+ * that both DCS and PCS ports are connected, so that the same binary
+ * build can be used on both EU-band and US-band C1xx phones.
+ *
+ * If you are using your phone the way it was meant to be used, i.e.,
+ * listening to EGSM and DCS downlinks only with EU-band phones or
+ * listening to GSM850 and PCS downlinks only with US-band phones, then
+ * the same standard binary build will work on both: the TRF6151 driver
+ * will use the DCS Rx port when trying to receive DCS downlink or the
+ * PCS Rx port when trying to receive PCS downlink, and everything will
+ * just work. However, if you are interested in using OsmocomBB for
+ * various hacking purposes (its original and primary intended use)
+ * and you need to tune your phone's TRF6151 receiver out of spec or
+ * at least outside of the DCS/PCS Rx SAW filter's legitimate passband
+ * (or if you have changed or removed that SAW filter), then you need
+ * to change the following rffe_get_rx_ports() function to match your
+ * specific hw version, i.e., PORT_DCS1800 only or PORT_PCS1900 only.
+ */
uint32_t rffe_get_rx_ports(void)
{
- return (1 << PORT_LO) | (1 << PORT_DCS1800);
+ return (1 << PORT_LO) | (1 << PORT_DCS1800) | (1 << PORT_PCS1900);
}
uint32_t rffe_get_tx_ports(void)
diff --git a/src/target/firmware/board/compal_e86/rffe_dualband_e86.c b/src/target/firmware/board/compal_e86/rffe_dualband_e86.c
index 4ad85dc..c6dccd3 100644
--- a/src/target/firmware/board/compal_e86/rffe_dualband_e86.c
+++ b/src/target/firmware/board/compal_e86/rffe_dualband_e86.c
@@ -48,10 +48,30 @@ void rffe_mode(enum gsm_band band, int tx)
tsp_act_update(tspact);
}
-/* Returns RF wiring */
+/*
+ * Each given Mot C1xx phone is made either for 900+1800 MHz, in which
+ * case only the DCS Rx port is connected, or for 850+1900 MHz, in which
+ * case only the PCS Rx port is connected. Here we tell the TRF6151 driver
+ * that both DCS and PCS ports are connected, so that the same binary
+ * build can be used on both EU-band and US-band C1xx phones.
+ *
+ * If you are using your phone the way it was meant to be used, i.e.,
+ * listening to EGSM and DCS downlinks only with EU-band phones or
+ * listening to GSM850 and PCS downlinks only with US-band phones, then
+ * the same standard binary build will work on both: the TRF6151 driver
+ * will use the DCS Rx port when trying to receive DCS downlink or the
+ * PCS Rx port when trying to receive PCS downlink, and everything will
+ * just work. However, if you are interested in using OsmocomBB for
+ * various hacking purposes (its original and primary intended use)
+ * and you need to tune your phone's TRF6151 receiver out of spec or
+ * at least outside of the DCS/PCS Rx SAW filter's legitimate passband
+ * (or if you have changed or removed that SAW filter), then you need
+ * to change the following rffe_get_rx_ports() function to match your
+ * specific hw version, i.e., PORT_DCS1800 only or PORT_PCS1900 only.
+ */
uint32_t rffe_get_rx_ports(void)
{
- return (1 << PORT_LO) | (1 << PORT_DCS1800);
+ return (1 << PORT_LO) | (1 << PORT_DCS1800) | (1 << PORT_PCS1900);
}
uint32_t rffe_get_tx_ports(void)