slic_ds26522.h 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134
  1. /*
  2. * drivers/tdm/line_ctrl/slic_ds26522.h
  3. *
  4. * Copyright 2016 Freescale Semiconductor, Inc.
  5. *
  6. * Author: Zhao Qiang <B45475@freescale.com>
  7. *
  8. * This program is free software; you can redistribute it and/or modify it
  9. * under the terms of the GNU General Public License as published by the
  10. * Free Software Foundation; either version 2 of the License, or (at your
  11. * option) any later version.
  12. */
  13. #define DS26522_RF_ADDR_START 0x00
  14. #define DS26522_RF_ADDR_END 0xef
  15. #define DS26522_GLB_ADDR_START 0xf0
  16. #define DS26522_GLB_ADDR_END 0xff
  17. #define DS26522_TF_ADDR_START 0x100
  18. #define DS26522_TF_ADDR_END 0x1ef
  19. #define DS26522_LIU_ADDR_START 0x1000
  20. #define DS26522_LIU_ADDR_END 0x101f
  21. #define DS26522_TEST_ADDR_START 0x1008
  22. #define DS26522_TEST_ADDR_END 0x101f
  23. #define DS26522_BERT_ADDR_START 0x1100
  24. #define DS26522_BERT_ADDR_END 0x110f
  25. #define DS26522_RMMR_ADDR 0x80
  26. #define DS26522_RCR1_ADDR 0x81
  27. #define DS26522_RCR3_ADDR 0x83
  28. #define DS26522_RIOCR_ADDR 0x84
  29. #define DS26522_GTCR1_ADDR 0xf0
  30. #define DS26522_GFCR_ADDR 0xf1
  31. #define DS26522_GTCR2_ADDR 0xf2
  32. #define DS26522_GTCCR_ADDR 0xf3
  33. #define DS26522_GLSRR_ADDR 0xf5
  34. #define DS26522_GFSRR_ADDR 0xf6
  35. #define DS26522_IDR_ADDR 0xf8
  36. #define DS26522_E1TAF_ADDR 0x164
  37. #define DS26522_E1TNAF_ADDR 0x165
  38. #define DS26522_TMMR_ADDR 0x180
  39. #define DS26522_TCR1_ADDR 0x181
  40. #define DS26522_TIOCR_ADDR 0x184
  41. #define DS26522_LTRCR_ADDR 0x1000
  42. #define DS26522_LTITSR_ADDR 0x1001
  43. #define DS26522_LMCR_ADDR 0x1002
  44. #define DS26522_LRISMR_ADDR 0x1007
  45. #define MAX_NUM_OF_CHANNELS 8
  46. #define PQ_MDS_8E1T1_BRD_REV 0x00
  47. #define PQ_MDS_8E1T1_PLD_REV 0x00
  48. #define DS26522_GTCCR_BPREFSEL_REFCLKIN 0xa0
  49. #define DS26522_GTCCR_BFREQSEL_1544KHZ 0x08
  50. #define DS26522_GTCCR_FREQSEL_1544KHZ 0x04
  51. #define DS26522_GTCCR_BFREQSEL_2048KHZ 0x00
  52. #define DS26522_GTCCR_FREQSEL_2048KHZ 0x00
  53. #define DS26522_GFCR_BPCLK_2048KHZ 0x00
  54. #define DS26522_GTCR2_TSSYNCOUT 0x02
  55. #define DS26522_GTCR1 0x00
  56. #define DS26522_GFSRR_RESET 0x01
  57. #define DS26522_GFSRR_NORMAL 0x00
  58. #define DS26522_GLSRR_RESET 0x01
  59. #define DS26522_GLSRR_NORMAL 0x00
  60. #define DS26522_RMMR_SFTRST 0x02
  61. #define DS26522_RMMR_FRM_EN 0x80
  62. #define DS26522_RMMR_INIT_DONE 0x40
  63. #define DS26522_RMMR_T1 0x00
  64. #define DS26522_RMMR_E1 0x01
  65. #define DS26522_E1TAF_DEFAULT 0x1b
  66. #define DS26522_E1TNAF_DEFAULT 0x40
  67. #define DS26522_TMMR_SFTRST 0x02
  68. #define DS26522_TMMR_FRM_EN 0x80
  69. #define DS26522_TMMR_INIT_DONE 0x40
  70. #define DS26522_TMMR_T1 0x00
  71. #define DS26522_TMMR_E1 0x01
  72. #define DS26522_RCR1_T1_SYNCT 0x80
  73. #define DS26522_RCR1_T1_RB8ZS 0x40
  74. #define DS26522_RCR1_T1_SYNCC 0x08
  75. #define DS26522_RCR1_E1_HDB3 0x40
  76. #define DS26522_RCR1_E1_CCS 0x20
  77. #define DS26522_RIOCR_1544KHZ 0x00
  78. #define DS26522_RIOCR_2048KHZ 0x10
  79. #define DS26522_RIOCR_RSIO_OUT 0x00
  80. #define DS26522_RCR3_FLB 0x01
  81. #define DS26522_TIOCR_1544KHZ 0x00
  82. #define DS26522_TIOCR_2048KHZ 0x10
  83. #define DS26522_TIOCR_TSIO_OUT 0x04
  84. #define DS26522_TCR1_TB8ZS 0x04
  85. #define DS26522_LTRCR_T1 0x02
  86. #define DS26522_LTRCR_E1 0x00
  87. #define DS26522_LTITSR_TLIS_75OHM 0x00
  88. #define DS26522_LTITSR_LBOS_75OHM 0x00
  89. #define DS26522_LTITSR_TLIS_100OHM 0x10
  90. #define DS26522_LTITSR_TLIS_0DB_CSU 0x00
  91. #define DS26522_LRISMR_75OHM 0x00
  92. #define DS26522_LRISMR_100OHM 0x10
  93. #define DS26522_LRISMR_MAX 0x03
  94. #define DS26522_LMCR_TE 0x01
  95. enum line_rate {
  96. LINE_RATE_T1, /* T1 line rate (1.544 Mbps) */
  97. LINE_RATE_E1 /* E1 line rate (2.048 Mbps) */
  98. };
  99. enum tdm_trans_mode {
  100. NORMAL = 0,
  101. FRAMER_LB
  102. };
  103. enum card_support_type {
  104. LM_CARD = 0,
  105. DS26522_CARD,
  106. NO_CARD
  107. };