changeset 608:c09a1ca60d57

proper GTM900 target with TPU config per Songbosi
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 17 Jun 2019 21:18:10 +0000
parents 030ce1ddd4f7
children 238b67a785f2
files src/cs/layer1/tpu_drivers/source0/tpudrv12.h targets/gtm900.h
diffstat 2 files changed, 44 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/cs/layer1/tpu_drivers/source0/tpudrv12.h	Mon Jun 17 20:22:53 2019 +0000
+++ b/src/cs/layer1/tpu_drivers/source0/tpudrv12.h	Mon Jun 17 21:18:10 2019 +0000
@@ -370,6 +370,49 @@
   #define TU_1900    ( PA_HI_BAND | FEM_PINS ^ FEM_TX_HIGH )
   #define TD_1900    ( PA_OFF     | FEM_PINS ^ 0           )
 
+#elif defined(CONFIG_TARGET_GTM900)
+
+  /*
+   * Huawei GTM900-B is very closely based on Leonardo (2-band version),
+   * but the two FEM Tx control signals are reversed.
+   */
+
+  #define FEM_TX_LOW    BIT_1     // act1
+  #define FEM_TX_HIGH   BIT_2     // act2
+
+  #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)
+
+  #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 ^ 0          )
+  #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 ^ 0           )
+  #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
--- a/targets/gtm900.h	Mon Jun 17 20:22:53 2019 +0000
+++ b/targets/gtm900.h	Mon Jun 17 21:18:10 2019 +0000
@@ -1,6 +1,2 @@
-/*
- * Temporary test build: compile for Leonardo prior to adding
- * true GTM900 target support.
- */
-#define	CONFIG_TARGET_LEONARDO	1
+#define	CONFIG_TARGET_GTM900	1
 #define	UARTFAX_CLASSIC_DTR_DCD	1