slic_ds26522.h 3.2 KB

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