changeset 560:d380b62e1019

tpudrv12.h: provision for future FCFAM triband-or-quadband support
author Mychaela Falconia <falcon@freecalypso.org>
date Sat, 29 Dec 2018 04:06:37 +0000
parents 0d81d21664f5
children dc1e0a1c100f
files src/cs/layer1/tpu_drivers/source0/tpudrv12.h
diffstat 1 files changed, 54 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/layer1/tpu_drivers/source0/tpudrv12.h	Fri Dec 28 06:34:38 2018 +0000
+++ b/src/cs/layer1/tpu_drivers/source0/tpudrv12.h	Sat Dec 29 04:06:37 2018 +0000
@@ -316,6 +316,60 @@
   #define TU_1900    ( PA_HI_BAND | FEM_PINS ^ FEM_7 )
   #define TD_1900    ( PA_OFF     | FEM_PINS ^ 0     )
 
+#elif defined(CONFIG_TARGET_FCFAM)
+
+  /*
+   * In our FreeCalypso hw family, we would like to be able to use
+   * both triband and quadband RFFEs.  Our current FCDEV3B is triband,
+   * copied from Openmoko, and the same is expected to be the case for
+   * future low-cost designs, but if someone pays for a new RF layout,
+   * we can use a quadband RFFE instead.  If we ever have two different
+   * hw platforms or variants that differ in the RFFE but are otherwise
+   * firmware-compatible, we would like to have the same fw build
+   * work with both triband and quadband RFFEs.  How is it possible?
+   * The trick is that we define our set of TSPACT RFFE control signals
+   * starting with our current OM-based triband version, and add one
+   * more signal to support potential future quadband designs.
+   */
+
+  #define FEM_RX_1900   BIT_1     // act1
+  #define FEM_TX_HIGH   BIT_2     // act2
+  #define FEM_TX_LOW    BIT_4     // act4
+  #define FEM_RX_850    BIT_5     // act5
+
+  #define PA_HI_BAND    BIT_3   // act3
+  #define PA_LO_BAND    0
+  #define PA_OFF        0
+
+  #define FEM_PINS (FEM_TX_LOW | FEM_TX_HIGH | FEM_RX_850 | FEM_RX_1900)
+
+  #define FEM_OFF    ( FEM_PINS ^ 0 )
+
+  #define FEM_SLEEP  ( 0 )  
+
+  // This configuration is always inverted.
+
+  // RX_UP/DOWN and TX_UP/DOWN
+  #define RU_900     ( PA_OFF     | FEM_PINS ^ 0          )
+  #define RD_900     ( PA_OFF     | FEM_PINS ^ 0          )
+  #define TU_900     ( PA_LO_BAND | FEM_PINS ^ FEM_TX_LOW )
+  #define TD_900     ( PA_OFF     | FEM_PINS ^ 0          )
+
+  #define RU_850     ( PA_OFF     | FEM_PINS ^ FEM_RX_850 )
+  #define RD_850     ( PA_OFF     | FEM_PINS ^ 0          )
+  #define TU_850     ( PA_LO_BAND | FEM_PINS ^ FEM_TX_LOW )
+  #define TD_850     ( PA_OFF     | FEM_PINS ^ 0          )
+
+  #define RU_1800    ( PA_OFF     | FEM_PINS ^ 0           )
+  #define RD_1800    ( PA_OFF     | FEM_PINS ^ 0           )
+  #define TU_1800    ( PA_HI_BAND | FEM_PINS ^ FEM_TX_HIGH )
+  #define TD_1800    ( PA_OFF     | FEM_PINS ^ 0           )
+
+  #define RU_1900    ( PA_OFF     | FEM_PINS ^ FEM_RX_1900 )
+  #define RD_1900    ( PA_OFF     | FEM_PINS ^ 0           )
+  #define TU_1900    ( PA_HI_BAND | FEM_PINS ^ FEM_TX_HIGH )
+  #define TD_1900    ( PA_OFF     | FEM_PINS ^ 0           )
+
 #elif defined(CONFIG_TARGET_PIRELLI)
 
   #define ANTSW_RX_PCS	BIT_4