clps711x.h 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394
  1. /*
  2. * CLPS711X system register bits definitions
  3. *
  4. * Copyright (C) 2013 Alexander Shiyan <shc_work@mail.ru>
  5. *
  6. * This program is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. */
  11. #ifndef _LINUX_MFD_SYSCON_CLPS711X_H_
  12. #define _LINUX_MFD_SYSCON_CLPS711X_H_
  13. #define SYSCON_OFFSET (0x00)
  14. #define SYSFLG_OFFSET (0x40)
  15. #define SYSCON1_KBDSCAN(x) ((x) & 15)
  16. #define SYSCON1_KBDSCAN_MASK (15)
  17. #define SYSCON1_TC1M (1 << 4)
  18. #define SYSCON1_TC1S (1 << 5)
  19. #define SYSCON1_TC2M (1 << 6)
  20. #define SYSCON1_TC2S (1 << 7)
  21. #define SYSCON1_BZTOG (1 << 9)
  22. #define SYSCON1_BZMOD (1 << 10)
  23. #define SYSCON1_DBGEN (1 << 11)
  24. #define SYSCON1_LCDEN (1 << 12)
  25. #define SYSCON1_CDENTX (1 << 13)
  26. #define SYSCON1_CDENRX (1 << 14)
  27. #define SYSCON1_SIREN (1 << 15)
  28. #define SYSCON1_ADCKSEL(x) (((x) & 3) << 16)
  29. #define SYSCON1_ADCKSEL_MASK (3 << 16)
  30. #define SYSCON1_EXCKEN (1 << 18)
  31. #define SYSCON1_WAKEDIS (1 << 19)
  32. #define SYSCON1_IRTXM (1 << 20)
  33. #define SYSCON2_SERSEL (1 << 0)
  34. #define SYSCON2_KBD6 (1 << 1)
  35. #define SYSCON2_DRAMZ (1 << 2)
  36. #define SYSCON2_KBWEN (1 << 3)
  37. #define SYSCON2_SS2TXEN (1 << 4)
  38. #define SYSCON2_PCCARD1 (1 << 5)
  39. #define SYSCON2_PCCARD2 (1 << 6)
  40. #define SYSCON2_SS2RXEN (1 << 7)
  41. #define SYSCON2_SS2MAEN (1 << 9)
  42. #define SYSCON2_OSTB (1 << 12)
  43. #define SYSCON2_CLKENSL (1 << 13)
  44. #define SYSCON2_BUZFREQ (1 << 14)
  45. #define SYSCON3_ADCCON (1 << 0)
  46. #define SYSCON3_CLKCTL0 (1 << 1)
  47. #define SYSCON3_CLKCTL1 (1 << 2)
  48. #define SYSCON3_DAISEL (1 << 3)
  49. #define SYSCON3_ADCCKNSEN (1 << 4)
  50. #define SYSCON3_VERSN(x) (((x) >> 5) & 7)
  51. #define SYSCON3_VERSN_MASK (7 << 5)
  52. #define SYSCON3_FASTWAKE (1 << 8)
  53. #define SYSCON3_DAIEN (1 << 9)
  54. #define SYSCON3_128FS SYSCON3_DAIEN
  55. #define SYSCON3_ENPD67 (1 << 10)
  56. #define SYSCON_UARTEN (1 << 8)
  57. #define SYSFLG1_MCDR (1 << 0)
  58. #define SYSFLG1_DCDET (1 << 1)
  59. #define SYSFLG1_WUDR (1 << 2)
  60. #define SYSFLG1_WUON (1 << 3)
  61. #define SYSFLG1_CTS (1 << 8)
  62. #define SYSFLG1_DSR (1 << 9)
  63. #define SYSFLG1_DCD (1 << 10)
  64. #define SYSFLG1_NBFLG (1 << 12)
  65. #define SYSFLG1_RSTFLG (1 << 13)
  66. #define SYSFLG1_PFFLG (1 << 14)
  67. #define SYSFLG1_CLDFLG (1 << 15)
  68. #define SYSFLG1_CRXFE (1 << 24)
  69. #define SYSFLG1_CTXFF (1 << 25)
  70. #define SYSFLG1_SSIBUSY (1 << 26)
  71. #define SYSFLG1_ID (1 << 29)
  72. #define SYSFLG1_VERID(x) (((x) >> 30) & 3)
  73. #define SYSFLG1_VERID_MASK (3 << 30)
  74. #define SYSFLG2_SSRXOF (1 << 0)
  75. #define SYSFLG2_RESVAL (1 << 1)
  76. #define SYSFLG2_RESFRM (1 << 2)
  77. #define SYSFLG2_SS2RXFE (1 << 3)
  78. #define SYSFLG2_SS2TXFF (1 << 4)
  79. #define SYSFLG2_SS2TXUF (1 << 5)
  80. #define SYSFLG2_CKMODE (1 << 6)
  81. #define SYSFLG_UBUSY (1 << 11)
  82. #define SYSFLG_URXFE (1 << 22)
  83. #define SYSFLG_UTXFF (1 << 23)
  84. #endif