diff options
author | Sylvain Munaut <tnt@246tNt.com> | 2011-04-23 22:27:59 +0200 |
---|---|---|
committer | Sylvain Munaut <tnt@246tNt.com> | 2011-05-29 19:51:54 +0200 |
commit | a78316c8315fc075e8253fd8678e6a7b5c8bf1d8 (patch) | |
tree | 59ac9237ae92de8e3b882e2d510c167a2affeeef | |
parent | 36c2f7f420fb2fc616d1255f44c3061c1a7bcaf2 (diff) |
fw/rffe: Add function to query RF wiring
Depending on the chipset and the HW, not all ports are connected
and we need to know what we can use when we have the choice ...
Signed-off-by: Sylvain Munaut <tnt@246tNt.com>
-rw-r--r-- | src/target/firmware/board/compal/rffe_dualband.c | 12 | ||||
-rw-r--r-- | src/target/firmware/board/gta0x/rffe_gta0x_triband.c | 12 | ||||
-rw-r--r-- | src/target/firmware/board/pirelli_dpl10/rffe_dpl10_triband.c | 12 | ||||
-rw-r--r-- | src/target/firmware/include/rffe.h | 14 |
4 files changed, 50 insertions, 0 deletions
diff --git a/src/target/firmware/board/compal/rffe_dualband.c b/src/target/firmware/board/compal/rffe_dualband.c index a0e03379..d2d517dc 100644 --- a/src/target/firmware/board/compal/rffe_dualband.c +++ b/src/target/firmware/board/compal/rffe_dualband.c @@ -44,6 +44,18 @@ void rffe_mode(enum gsm_band band, int tx) tsp_act_update(tspact); } +/* Returns RF wiring */ +uint32_t rffe_get_rx_ports(void) +{ + return (1 << PORT_LO) | (1 << PORT_DCS1800); +} + +uint32_t rffe_get_tx_ports(void) +{ + return (1 << PORT_LO) | (1 << PORT_HI); +} + + #define MCU_SW_TRACE 0xfffef00e #define ARM_CONF_REG 0xfffef006 diff --git a/src/target/firmware/board/gta0x/rffe_gta0x_triband.c b/src/target/firmware/board/gta0x/rffe_gta0x_triband.c index 7a379884..63f15137 100644 --- a/src/target/firmware/board/gta0x/rffe_gta0x_triband.c +++ b/src/target/firmware/board/gta0x/rffe_gta0x_triband.c @@ -73,6 +73,18 @@ void rffe_mode(enum gsm_band band, int tx) tsp_act_update(tspact); } +/* Returns RF wiring */ +uint32_t rffe_get_rx_ports(void) +{ + return (1 << PORT_LO) | (1 << PORT_DCS1800) | (1 << PORT_PCS1900); +} + +uint32_t rffe_get_tx_ports(void) +{ + return (1 << PORT_LO) | (1 << PORT_HI); +} + + #define MCU_SW_TRACE 0xfffef00e #define ARM_CONF_REG 0xfffef006 diff --git a/src/target/firmware/board/pirelli_dpl10/rffe_dpl10_triband.c b/src/target/firmware/board/pirelli_dpl10/rffe_dpl10_triband.c index 8d249288..00f10892 100644 --- a/src/target/firmware/board/pirelli_dpl10/rffe_dpl10_triband.c +++ b/src/target/firmware/board/pirelli_dpl10/rffe_dpl10_triband.c @@ -72,6 +72,18 @@ void rffe_mode(enum gsm_band band, int tx) tsp_act_update(tspact); } +/* Returns RF wiring */ +uint32_t rffe_get_rx_ports(void) +{ + return (1 << PORT_LO) | (1 << PORT_DCS1800) | (1 << PORT_PCS1900); +} + +uint32_t rffe_get_tx_ports(void) +{ + return (1 << PORT_LO) | (1 << PORT_HI); +} + + #define MCU_SW_TRACE 0xfffef00e #define ARM_CONF_REG 0xfffef006 #define ASIC_CONF_REG 0xfffef008 diff --git a/src/target/firmware/include/rffe.h b/src/target/firmware/include/rffe.h index a21d183f..c28c696f 100644 --- a/src/target/firmware/include/rffe.h +++ b/src/target/firmware/include/rffe.h @@ -11,6 +11,20 @@ void rffe_init(void); /* switch RF Frontend Mode */ void rffe_mode(enum gsm_band band, int tx); +/* query RF wiring */ +enum rffe_port +{ + PORT_LO = 0, /* Combined 850/900 port */ + PORT_HI = 1, /* Combined 1800/1900 port */ + PORT_GSM850 = 2, + PORT_GSM900 = 3, + PORT_DCS1800 = 4, + PORT_PCS1900 = 5, +}; + +uint32_t rffe_get_rx_ports(void); +uint32_t rffe_get_tx_ports(void); + /* get current gain of RF frontend (anything between antenna and baseband in dBm */ uint8_t rffe_get_gain(void); |