view RFFE-notes @ 48:cb8d43a5023c

FC-handset-spec: vibrator documented
author Mychaela Falconia <falcon@freecalypso.org>
date Fri, 11 Jun 2021 01:47:22 +0000
parents dd94e04b9539
children
line wrap: on
line source

Every GSM phone handset or modem that is based on our beloved Calypso+Iota+Rita
chipset also contains a functional section (can be a single component or a group
of components) which we call the RFFE: radio frequency front end.  This RFFE is
the functional block that provides frequency-filtered radio Rx paths from the
antenna interface to Rita LNA inputs, as well radio Tx paths from the PA to the
antenna.  The choice of particular RFFE implementation (specifically in the Rx
direction) determines the device's GSM frequency band capabilities, i.e.,
whether your GSM phone or modem is dual-band, triband or quadband.

The least band-capable Calypso-based devices we are aware of are dual-band,
i.e., we are not aware of anyone having ever made a Calypso-based GSM device
that supports only one GSM frequency band.  The lowest-end configuration is
single-region dual-band, supporting one low band and one high band, either EU
bands or US bands.  The next step up is triband, supporting two EU bands and
one US band or vice-versa, and the best RFFE designs are quadband, supporting
all 4 possible GSM frequency bands.

There are two particular RFFE designs that enjoy the privileged status of being
most native to FreeCalypso: TI's original Leonardo+ quadband reference design
and Openmoko's derivative design that is very polished, but is only triband.
In absolute historical terms TI's Leonardo existed first and OM's version was a
later derivative work, but for FreeCalypso the two got somewhat reversed with
our peculiar timeline:

* The Mother bought her first Openmoko Neo FreeRunner in 2011, and lots of other
  people in the community have been playing with Openmoko devices - whereas TI's
  Leonardo development board has always been legendary unobtainium.

* Openmoko's PCB layout has been liberated (freely published) in 2015, whereas
  TI's Leonardo PCB design remained as elusive as ever.

* Between 2015 and 2017 we've successfully produced our FCDEV3B board based on
  Openmoko's PCB layout, featuring OM's triband RFFE, and we gained a lot of
  experience working with this RFFE as we recreated the previously lost theory
  and tools for RF calibration.

* In December of 2019 I was searching the world high and low for a real TI
  Leonardo board so I could do some CMU200 experiments with its RFFE, but
  instead I found the historical commercial Calypso modem module which we call
  Tango, which is nothing less than a mass-produced version of the core of
  Leonardo, the full quadband version.

The discovery of Tango modules has finally brought TI's original quadband RFFE
design back to its rightful place at the top of the quality hierarchy among
Calypso GSM devices, and we are finally able to study it as much as we have
studied OM's triband version in the preceding years.

Leonardo and Openmoko RF sections
=================================

The RF sections of both Leonardo/Tango and Openmoko/FCDEV3B consist of TI's
Rita RF transceiver, a standalone PA (RF3133 or RF3166) and the part we focus
on as the RFFE.  The best way to illustrate the essential divisions and
interconnections between components is with a block diagram:

                                      +-------+
                                      | RF PA |
                                      |       |
    +--------------- HB Tx path ------+-->>>--+------+
    |      +-------- LB Tx path ------+-->>>--+---+  |
    |      |                          |       |   |  |
+---+------+---+                      +-------+   |  |
| HB Tx  LB Tx |                                  |  |
|              |                                +-+--+--+
| Rita         |                                | RFFE  |
|              |                                |       |
|       LB LNA-+----- LB Rx path ---------------+-     -+-- ANTENNA
|      DCS LNA-+---- DCS Rx path ---------------+-      |
|      PCS LNA-+---- PCS Rx path ---------------+-      |
|              |                                |       |
+--------------+                                +-------+

HB = high bands (DCS & PCS, 1800 & 1900 MHz)
LB = low bands (GSM850 & EGSM, 850 & 900 MHz)

The block marked as RFFE on the above block diagram is the one that differs
between Leonardo/Tango and Openmoko/FCDEV3B, and it is this block that makes
one quadband and the other only triband.  In the original Leonardo+ quadband
reference design the RFFE block is a single component (Epcos M034F) that is
called a Front End Module (FEM), whereas Openmoko replaced this integrated FEM
with an Antenna Switch Module (ASM) plus 3 discrete SAW filters.  Both RFFE
designs implement the following functions:

* They switch the antenna interface between Rx and Tx - a GSM MS never needs to
  receive and transmit at the same time, thus an antenna switch is used instead
  of more expensive duplexer or diplexer arrangements.

* They accept RF Tx signal from one of two separate inputs (one for LB, one for
  HB), and they provide the necessary low pass filters to suppress unwanted
  harmonics present in the PA output.

* Rx signals are fed to the RF transceiver on one of 3 separate Rx signal paths
  as appropriate for the band in which reception takes place (LB, DCS or PCS),
  and for each supported band the incoming signal is passed through an
  appropriate SAW - a very narrow frequency-specific bandpass filter.

RF Tx paths
===========

There are only two RF Tx paths: one for GSM850 and EGSM (850 & 900 MHz) bands
combined, and the other for DCS and PCS (1800 & 1900 MHz) bands combined.  Thus
the RF Tx section of a Calypso+Iota+Rita GSM phone or modem is exactly the same
between dual-band, triband and quadband designs - only Rx paths differ.

Both Leonardo/Tango and Openmoko/FCDEV3B use PAs from the same family by RFMD,
just different evolutionary versions: Leonardo and Tango use the slightly older
RF3133 PA whereas OM and FCDEV3B use the slightly newer RF3166.  The two PAs
have exactly the same controls, and they are wired in exactly the same way
between Leonardo and Openmoko.

Besides PA controls, there are two very important Tx path control signals that
are driven by Calypso and go to the FEM or ASM: RFFE LB & HB Tx switch controls.
Both the M034F FEM used in Leonardo and Openmoko's triband ASM have two
baseband-controlled internal switches selecting between Rx and Tx.  When these
switches are inactive (no voltage applied), both LB and HB RF paths are set up
for Rx; one of these Tx switches enables LB Tx path and the other enables HB Tx
path.  There is also a third switch present both in M034F and in OM's ASM, but
that one is for different Rx bands as explained later in this article.

RF Rx paths
===========

TI's Rita RF transceiver supports all 4 GSM frequency bands internally for both
Rx and Tx, but in the Rx direction it has only 3 LNA inputs.  GSM850 and EGSM
share the same LNA input, whereas each of DCS and PCS gets its own.  There is
also a requirement that whenever reception takes place in a given band, the Rx
signal has to pass through a SAW filter specific to that band: thus dual-band
designs have two SAW filters in them somewhere, triband designs have 3 and
quadband designs have 4 of them.

Triband design with Rita and other similar transceivers like Silabs Aero I/I+
is straightforward: the antenna switch module (ASM) puts out 3 Rx paths
corresponding to LB, DCS or PCS, each of the 3 is passed through its own SAW
filter, and then they go to the 3 LNA inputs.  SAW filters in the DCS and PCS
Rx paths are unambiguous, whereas the third SAW filter in the LB Rx path can be
populated in one of two ways: populating an EGSM downlink band filter produces
a tri900 GSM device, populating a GSM850 DL band filter produces a tri850 GSM
device.  Openmoko's triband RFFE which we've reproduced on our FCDEV3B is built
in exactly this manner.

Quadband design with the same Rita transceiver is more complicated: there need
to be a total of 4 SAW filters, but they need to go to just 3 Rita LNA inputs.
One can make a discrete design: use an antenna switch module that puts out 4
switched Rx paths, pass them through 4 discrete SAW filters, and then somehow
combine the outputs of GSM850 and EGSM filters onto the single LB LNA input.
Huawei's MG01GSMT design appears to do something similar (except that it
supports a non-standard band in the place of GSM850), but I don't really
understand how this magic works in terms of PCB layout.

The M034F integrated FEM that was chosen by TI Back In The Day is much neater:
it is a quadband FEM, containing 4 SAW filters inside, but it was specifically
designed to interface with transceivers like TI Rita or Silabs Aero that have 3
Rx input paths - thus the magic that combines the output of GSM850 and EGSM SAW
filters is contained inside this FEM component.

We do have an M034F.pdf datasheet for this magic component (came along with
Calypso and Leonardo docs), and the block diagram on page 6 shows the magic
quite clearly: there is a baseband-controlled switch selecting between EGSM Rx
and GSM850 Rx (in addition to the two usual Tx switches), this switch directs
the low band Rx path toward one of two different SAW filters, and the outputs
of those two filters are then joined.  The high band Rx path always goes to both
DCS and PCS band SAW filters, and each of those high band Rx SAW filters gets
its own output going to its own dedicated Rita LNA input.  Note the lack of a
baseband-controlled switch between DCS and PCS in the high band Rx path!

For a long time prior to the 2019-12 breakthrough I was concerned about this
lack of a baseband-controlled switch between DCS and PCS in the high band Rx
path: this switch is present in every triband RFFE design I am familiar with,
including the one we got from Openmoko, and I was concerned that feeding the
high band Rx path to both DCS and PCS SAW filters without a switch would
introduce a 3 dB penalty into these high band Rx paths.  But when I got my
hands on the newly discovered Tango modem modules, looked at the GMagic numbers
written into their FFS as part of the manufacturer's production calibration and
then independently verified them with our CMU200, all fears were dispelled: the
Rx performance of this M034 FEM in all 4 bands is exactly the same as our
current Openmoko-based triband RFFE, with GMagic around 200 half-dB units.

RFFE switches and control signals
=================================

Both our new quadband M034F and our more mature OM-based triband ASM have 3
baseband-controlled switches inside: two Tx switches (one for LB Tx, one for HB
Tx) and one Rx band steering switch.  The Rx switch is entirely different
between the two RFFE designs:

* Our OM-based triband ASM has an Rx path steering switch between DCS and PCS
  just like every other triband RFFE design I have seen, and of course being
  triband, it has no capability of switching between GSM850 and EGSM.

* Epcos M034F has a baseband-controlled Rx path steering switch between GSM850
  and EGSM (seems unavoidably necessary in this architecture), but it has NO
  switch between DCS and PCS - instead both high band Rx paths are "always on".

All 3 RFFE switches are controlled by Calypso TSPACT signals passed through PNP
transistors that act as inverting buffers.  The assignments of which Calypso
TSPACT controls which RFFE switch were made by people who came before us, and
these assignments are different (incompatible) between Leonardo/Tango and
Openmoko/FCDEV3B.

Leonardo RFFE control signal assignments (used on Tango) are as follows:

TSPACT1 = Tx high bands
TSPACT2 = Tx low bands
TSPACT4 = Rx GSM850 band

Openmoko's version (used on FCDEV3B) is as follows:

TSPACT1 = Rx PCS band
TSPACT2 = Tx high bands
TSPACT4 = Tx low bands

In the now-seemingly-unlikely event that we end up building a new FreeCalypso
GSM device (not Tango) with M034F quadband FEM, we have two sensible choices
for TSPACT control signal wiring.  One option would be to copy Leonardo and
Tango, and the other option would be to use the following novel assignment:

TSPACT2 = Tx high bands
TSPACT4 = Tx low bands
TSPACT5 = Rx GSM850 band

The latter option can be made firmware-compatible with our current OM-based
triband RFFE, by having our firmware drive the signals as follows:

TSPACT1 = Rx PCS band
TSPACT2 = Tx high bands
TSPACT4 = Tx low bands
TSPACT5 = Rx GSM850 band

Right now this consideration is purely academic because there presently exists
no business case for building new FreeCalypso hardware, given the existence of
Tango modules.

RF magic glue: Rx paths
=======================

RF signal paths coming out of the 3 Rx SAW filters in our current OM-based
design or out of M034F Rx pins are differential pairs; Rita LNA inputs to which
these signal paths go are also differential.  But these RF signal paths are not
simple pairs of PCB traces going from one chip to the other, instead every
existing design features "RF magic glue" matching networks in these signal
paths, made up of inductors and/or capacitors.  These "magic glue" LC networks
exist in a seemingly endless number of permutations: every historical design I
got a chance to examine exhibits a slightly different LC network topology among
the 3 Rx signal paths that are present.  Sometimes the same LC network topology
is replicated for all 3 Rx signal paths, othertimes the same board will feature
different LC network topologies for different Rx band signal paths.

Openmoko's Rx path "magic glue" networks look neat and tidy, with the same
topology in all 3 Rx band signal paths.  This topology consists of a series
inductor in each trace (6 of them in total for 3 differential pairs) and shunt
capacitor footprints both before and after these series inductors - but all of
these shunt capacitor footprints are left unpopulated.  Inductor values are
naturally a little different for each frequency band.

Prior to the discovery of Tango modules, when I was thinking about designing
and building new FreeCalypso hw with our long-desired M034F quadband FEM, I had
the big dilemma of deciding what topology should be implemented for the "RF
magic glue" matching networks.  OM's version looks very neat and tidy and it is
known to work well with OM's triband RFFE, but would it still work well if that
triband RFFE were to be replaced with M034F?  The answer is very uncertain,
especially considering that the output impedance specifications given in our
only available M034F.pdf datasheet look very weird.

The discovery of Tango has saved the day in this department.  The "magic glue"
Rx path matching networks implemented on this module are exactly the same as
what is depicted on our available Leonardo schematics (the ones we've had since
2011), and the fact that these modules once were a successful mass-produced
commercial product gives a huge confidence boost to what was previously just a
schematic drawing of completely unknown working quality.  These Leonardo Rx path
matching networks score very low on the scale of understandability (and they
feature entirely different topology for each of the 3 Rx band signal paths),
but the fact that we have a working reference in the form of Tango is all that
matters at the end of the day...

RF magic glue: Tx paths
=======================

RF Tx signal paths running from the PA to the FEM or ASM also pass through
matching networks made up of inductors and/or capacitors.  The two versions of
most interest to FreeCalypso are once again Leonardo and Openmoko.  The version
of Leonardo that has been mass-produced as Tango has the same T network topology
in both LB and HB Tx paths:

PA_OUT-----C1--+--C2-----FEM_IN
               |
               C3
               |
              GND

LB: C1=C2=47pF, C3 is unpopulated
HB: C1=C2=12pF, C3 is unpopulated

It needs to be noted that with the cap-to-ground leg unpopulated, the T network
is degenerate and is equivalent to a single series capacitor.  It needs to be
understood that TI were not in the business of selling finished GSM phones or
modems - instead their primary business was selling chips, and their secondary
business was providing support for these chips, support that included reference
and development boards.  Because Leonardo was a reference board rather than a
finished product, it appears that TI designed this board with a provision for a
possible matching network - the comment on the schematic drawing says "PA
matching possible" - but apparently no matching was needed, hence a degenerate
T network was populated.  It is certainly a little strange that the makers of
Tango kept this degenerate T network and did not replace it with a single
series capacitor, but what do we know...

Openmoko used pi networks instead:

LB: PA_OUT-----+--10nH--+-----ASM_IN
               |        |
              1pF       NC
               |        |
              GND      GND

HB: PA_OUT-----+--33pF--+-----ASM_IN
               |        |
               NC       NC
               |        |
              GND      GND

The HB pi network is degenerate, reduced to a single series capacitor, and the
LB pi network is almost degenerate given how small that 1 pF cap to ground is.
But pi networks have this advantage: a degenerate pi network is reduced to just
one component, whereas a degenerate T network requires two components to be
populated.

It is also worth noting that both "from" and "to" components connected by these
matching networks are different between Leonardo and OM: Leonardo and Tango use
RF3133 PA, OM's version has RF3166; Leonardo FEM is M034F, OM's version has a
Darfon ASM instead.

In the now-seemingly-unlikely event that we end up building a new FreeCalypso
GSM device (not Tango) with M034F quadband FEM, which PA are we going to use,
and what "RF magic glue" matching network topology for PA-to-FEM RF Tx paths?
The Mother's current preference is to use RF3166 and OM-style pi networks,
preferably with a consultation with some better-than-me RF expert - but all
such plans are extremely nebulous, written with forks on water.