comparison gsm-fw/L1/tpudrv/tpudrv12.h @ 930:5a826938d005

gsm-fw: experimental support for Compal targets in tpudrv12.[ch]
author Mychaela Falconia <falcon@ivan.Harhan.ORG>
date Sat, 31 Oct 2015 02:09:48 +0000
parents 7f305eb3c530
children 4c80a6e6723f
comparison
equal deleted inserted replaced
929:ad6f1504465d 930:5a826938d005
233 #define RF_SER_OFF 0 233 #define RF_SER_OFF 0
234 234
235 #define TEST_TX_ON 0 235 #define TEST_TX_ON 0
236 #define TEST_RX_ON 0 236 #define TEST_RX_ON 0
237 237
238 #if CONFIG_TARGET_GTAMODEM || CONFIG_TARGET_LEONARDO 238 #if CONFIG_TARGET_LEONARDO || CONFIG_TARGET_ESAMPLE
239 239
240 // 4-band config (E-sample, P2, Leonardo) 240 // 4-band config (E-sample, P2, Leonardo)
241 #define FEM_7 BIT_2 // act2 241 #define FEM_7 BIT_2 // act2
242 #define FEM_8 BIT_1 // act1 242 #define FEM_8 BIT_1 // act1
243 #define FEM_9 BIT_4 // act4 243 #define FEM_9 BIT_4 // act4
253 #define FEM_SLEEP ( 0 ) 253 #define FEM_SLEEP ( 0 )
254 254
255 // This configuration is always inverted. 255 // This configuration is always inverted.
256 256
257 // RX_UP/DOWN and TX_UP/DOWN 257 // RX_UP/DOWN and TX_UP/DOWN
258 #if CONFIG_TARGET_GTAMODEM 258 #define RU_900 ( PA_OFF | FEM_PINS ^ 0 )
259 // Openmoko's hobbled triband hardware 259 #define RD_900 ( PA_OFF | FEM_PINS ^ 0 )
260 #define RU_900 ( PA_OFF | FEM_PINS ^ 0 ) 260 #define TU_900 ( PA_LO_BAND | FEM_PINS ^ FEM_7 )
261 #define RD_900 ( PA_OFF | FEM_PINS ^ 0 ) 261 #define TD_900 ( PA_OFF | FEM_PINS ^ 0 )
262 #define TU_900 ( PA_LO_BAND | FEM_PINS ^ FEM_9 ) 262
263 #define TD_900 ( PA_OFF | FEM_PINS ^ 0 ) 263 #define RU_850 ( PA_OFF | FEM_PINS ^ FEM_9 )
264 264 #define RD_850 ( PA_OFF | FEM_PINS ^ 0 )
265 #define RU_850 ( PA_OFF | FEM_PINS ^ 0 ) 265 #define TU_850 ( PA_LO_BAND | FEM_PINS ^ FEM_7 )
266 #define RD_850 ( PA_OFF | FEM_PINS ^ 0 ) 266 #define TD_850 ( PA_OFF | FEM_PINS ^ 0 )
267 #define TU_850 ( PA_LO_BAND | FEM_PINS ^ FEM_9 ) 267
268 #define TD_850 ( PA_OFF | FEM_PINS ^ 0 ) 268 #define RU_1800 ( PA_OFF | FEM_PINS ^ 0 )
269 269 #define RD_1800 ( PA_OFF | FEM_PINS ^ 0 )
270 #define RU_1800 ( PA_OFF | FEM_PINS ^ 0 ) 270 #define TU_1800 ( PA_HI_BAND | FEM_PINS ^ FEM_8 )
271 #define RD_1800 ( PA_OFF | FEM_PINS ^ 0 ) 271 #define TD_1800 ( PA_OFF | FEM_PINS ^ 0 )
272 #define TU_1800 ( PA_HI_BAND | FEM_PINS ^ FEM_7 ) 272
273 #define TD_1800 ( PA_OFF | FEM_PINS ^ 0 ) 273 #define RU_1900 ( PA_OFF | FEM_PINS ^ 0 )
274 274 #define RD_1900 ( PA_OFF | FEM_PINS ^ 0 )
275 #define RU_1900 ( PA_OFF | FEM_PINS ^ FEM_8 ) 275 #define TU_1900 ( PA_HI_BAND | FEM_PINS ^ FEM_8 )
276 #define RD_1900 ( PA_OFF | FEM_PINS ^ 0 ) 276 #define TD_1900 ( PA_OFF | FEM_PINS ^ 0 )
277 #define TU_1900 ( PA_HI_BAND | FEM_PINS ^ FEM_7 ) 277
278 #define TD_1900 ( PA_OFF | FEM_PINS ^ 0 ) 278 #elif CONFIG_TARGET_GTAMODEM
279 #else 279
280 // original quadband arrangement 280 // Openmoko's triband configuration is a bastardized version
281 #define RU_900 ( PA_OFF | FEM_PINS ^ 0 ) 281 // of TI's quadband one from Leonardo/E-Sample
282 #define RD_900 ( PA_OFF | FEM_PINS ^ 0 ) 282
283 #define TU_900 ( PA_LO_BAND | FEM_PINS ^ FEM_7 ) 283 #define FEM_7 BIT_2 // act2
284 #define TD_900 ( PA_OFF | FEM_PINS ^ 0 ) 284 #define FEM_8 BIT_1 // act1
285 285 #define FEM_9 BIT_4 // act4
286 #define RU_850 ( PA_OFF | FEM_PINS ^ FEM_9 ) 286
287 #define RD_850 ( PA_OFF | FEM_PINS ^ 0 ) 287 #define PA_HI_BAND BIT_3 // act3
288 #define TU_850 ( PA_LO_BAND | FEM_PINS ^ FEM_7 ) 288 #define PA_LO_BAND 0
289 #define TD_850 ( PA_OFF | FEM_PINS ^ 0 ) 289 #define PA_OFF 0
290 290
291 #define RU_1800 ( PA_OFF | FEM_PINS ^ 0 ) 291 #define FEM_PINS (FEM_7 | FEM_8 | FEM_9)
292 #define RD_1800 ( PA_OFF | FEM_PINS ^ 0 ) 292
293 #define TU_1800 ( PA_HI_BAND | FEM_PINS ^ FEM_8 ) 293 #define FEM_OFF ( FEM_PINS ^ 0 )
294 #define TD_1800 ( PA_OFF | FEM_PINS ^ 0 ) 294
295 295 #define FEM_SLEEP ( 0 )
296 #define RU_1900 ( PA_OFF | FEM_PINS ^ 0 ) 296
297 #define RD_1900 ( PA_OFF | FEM_PINS ^ 0 ) 297 // This configuration is always inverted.
298 #define TU_1900 ( PA_HI_BAND | FEM_PINS ^ FEM_8 ) 298
299 #define TD_1900 ( PA_OFF | FEM_PINS ^ 0 ) 299 // RX_UP/DOWN and TX_UP/DOWN
300 #endif 300 #define RU_900 ( PA_OFF | FEM_PINS ^ 0 )
301 #define RD_900 ( PA_OFF | FEM_PINS ^ 0 )
302 #define TU_900 ( PA_LO_BAND | FEM_PINS ^ FEM_9 )
303 #define TD_900 ( PA_OFF | FEM_PINS ^ 0 )
304
305 #define RU_850 ( PA_OFF | FEM_PINS ^ 0 )
306 #define RD_850 ( PA_OFF | FEM_PINS ^ 0 )
307 #define TU_850 ( PA_LO_BAND | FEM_PINS ^ FEM_9 )
308 #define TD_850 ( PA_OFF | FEM_PINS ^ 0 )
309
310 #define RU_1800 ( PA_OFF | FEM_PINS ^ 0 )
311 #define RD_1800 ( PA_OFF | FEM_PINS ^ 0 )
312 #define TU_1800 ( PA_HI_BAND | FEM_PINS ^ FEM_7 )
313 #define TD_1800 ( PA_OFF | FEM_PINS ^ 0 )
314
315 #define RU_1900 ( PA_OFF | FEM_PINS ^ FEM_8 )
316 #define RD_1900 ( PA_OFF | FEM_PINS ^ 0 )
317 #define TU_1900 ( PA_HI_BAND | FEM_PINS ^ FEM_7 )
318 #define TD_1900 ( PA_OFF | FEM_PINS ^ 0 )
301 319
302 #elif CONFIG_TARGET_PIRELLI 320 #elif CONFIG_TARGET_PIRELLI
303 321
304 #define ANTSW_RX_PCS BIT_4 322 #define ANTSW_RX_PCS BIT_4
305 #define ANTSW_TX_HIGH BIT_10 323 #define ANTSW_TX_HIGH BIT_10
335 353
336 #define RU_1900 ( PA_OFF | ANTSW_RX_PCS ) 354 #define RU_1900 ( PA_OFF | ANTSW_RX_PCS )
337 #define RD_1900 ( PA_OFF | 0 ) 355 #define RD_1900 ( PA_OFF | 0 )
338 #define TU_1900 ( PA_HI_BAND | ANTSW_TX_HIGH ) 356 #define TU_1900 ( PA_HI_BAND | ANTSW_TX_HIGH )
339 #define TD_1900 ( PA_OFF | 0 ) 357 #define TD_1900 ( PA_OFF | 0 )
358
359 #elif CONFIG_TARGET_COMPAL
360
361 #define PA_HI_BAND BIT_8 // act8
362 #define PA_LO_BAND 0
363 #define PA_OFF 0
364
365 #define PA_ENABLE BIT_1
366
367 // FEM control signals are active low
368 #define FEM_PINS (BIT_6 | BIT_2)
369
370 #define FEM_OFF ( FEM_PINS ^ 0 )
371
372 #define FEM_SLEEP ( 0 )
373
374 #define FEM_TX_HIGH BIT_6
375 #if USE_TSPACT2_FOR_TXLOW
376 #define FEM_TX_LOW BIT_2
377 #else
378 #define FEM_TX_LOW BIT_6
379 #endif
380
381 // RX_UP/DOWN and TX_UP/DOWN
382 #define RU_900 ( PA_OFF | FEM_PINS ^ 0 )
383 #define RD_900 ( PA_OFF | FEM_PINS ^ 0 )
384 #define TU_900 ( PA_LO_BAND | FEM_PINS ^ FEM_TX_LOW )
385 #define TD_900 ( PA_OFF | FEM_PINS ^ 0 )
386
387 #define RU_850 ( PA_OFF | FEM_PINS ^ 0 )
388 #define RD_850 ( PA_OFF | FEM_PINS ^ 0 )
389 #define TU_850 ( PA_LO_BAND | FEM_PINS ^ FEM_TX_LOW )
390 #define TD_850 ( PA_OFF | FEM_PINS ^ 0 )
391
392 #define RU_1800 ( PA_OFF | FEM_PINS ^ 0 )
393 #define RD_1800 ( PA_OFF | FEM_PINS ^ 0 )
394 #define TU_1800 ( PA_HI_BAND | FEM_PINS ^ FEM_TX_HIGH )
395 #define TD_1800 ( PA_OFF | FEM_PINS ^ 0 )
396
397 #define RU_1900 ( PA_OFF | FEM_PINS ^ 0 )
398 #define RD_1900 ( PA_OFF | FEM_PINS ^ 0 )
399 #define TU_1900 ( PA_HI_BAND | FEM_PINS ^ FEM_TX_HIGH )
400 #define TD_1900 ( PA_OFF | FEM_PINS ^ 0 )
340 401
341 #endif // FreeCalypso target selection 402 #endif // FreeCalypso target selection
342 403
343 #define TC1_DEVICE_ABB TC1_DEVICE0 // TSPEN0 404 #define TC1_DEVICE_ABB TC1_DEVICE0 // TSPEN0
344 #if CONFIG_TARGET_PIRELLI 405 #if CONFIG_TARGET_PIRELLI