r8a7740.h 4.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. /*
  2. * Copyright (C) 2012 Renesas Solutions Corp.
  3. *
  4. * SPDX-License-Identifier: GPL-2.0
  5. */
  6. #ifndef __ASM_ARCH_R8A7740_H
  7. #define __ASM_ARCH_R8A7740_H
  8. /*
  9. * R8A7740 I/O Addresses
  10. */
  11. #define MERAM_BASE 0xE5580000
  12. #define DDRP_BASE 0xC12A0000
  13. #define HPB_BASE 0xE6000000
  14. #define RWDT0_BASE 0xE6020000
  15. #define RWDT1_BASE 0xE6030000
  16. #define GPIO_BASE 0xE6050000
  17. #define CMT1_BASE 0xE6138000
  18. #define CPG_BASE 0xE6150000
  19. #define SYSC_BASE 0xE6180000
  20. #define SDHI0_BASE 0xE6850000
  21. #define SDHI1_BASE 0xE6860000
  22. #define MMCIF_BASE 0xE6BD0000
  23. #define SCIF5_BASE 0xE6CB0000
  24. #define SCIF6_BASE 0xE6CC0000
  25. #define DBSC_BASE 0xFE400000
  26. #define BSC_BASE 0xFEC10000
  27. #define I2C0_BASE 0xFFF20000
  28. #define I2C1_BASE 0xE6C20000
  29. #define TMU_BASE 0xFFF80000
  30. #ifndef __ASSEMBLY__
  31. #include <asm/types.h>
  32. /* RWDT */
  33. struct r8a7740_rwdt {
  34. u16 rwtcnt0; /* 0x00 */
  35. u16 dummy0; /* 0x02 */
  36. u16 rwtcsra0; /* 0x04 */
  37. u16 dummy1; /* 0x06 */
  38. u16 rwtcsrb0; /* 0x08 */
  39. u16 dummy2; /* 0x0A */
  40. };
  41. /* HPB Semaphore Control Registers */
  42. struct r8a7740_hpb {
  43. u32 hpbctrl0;
  44. u32 hpbctrl1;
  45. u32 hpbctrl2;
  46. u32 cccr;
  47. u32 dummy0; /* 0x20 */
  48. u32 hpbctrl4;
  49. u32 hpbctrl5;
  50. };
  51. /* CPG */
  52. struct r8a7740_cpg {
  53. u32 frqcra;
  54. u32 frqcrb;
  55. u32 vclkcr1;
  56. u32 vclkcr2;
  57. u32 fmsickcr;
  58. u32 fmsockcr;
  59. u32 fsiackcr;
  60. u32 dummy0; /* 0x1c */
  61. u32 rtstbcr;
  62. u32 systbcr;
  63. u32 pllc01cr;
  64. u32 pllc2cr;
  65. u32 mstpsr0;
  66. u32 dummy1; /* 0x34 */
  67. u32 mstpsr1;
  68. u32 mstpsr5;
  69. u32 mstpsr2;
  70. u32 dummy2; /* 0x44 */
  71. u32 mstpsr3;
  72. u32 mstpsr4;
  73. u32 dummy3; /* 0x50 */
  74. u32 astat;
  75. u32 dummy4[4]; /* 0x58 .. 0x64 */
  76. u32 ztrckcr;
  77. u32 dummy5[5]; /* 0x6c .. 0x7c */
  78. u32 subckcr;
  79. u32 spuckcr;
  80. u32 vouckcr;
  81. u32 usbckcr;
  82. u32 dummy6[3]; /* 0x90 .. 0x98 */
  83. u32 stprckcr;
  84. u32 srcr0;
  85. u32 dummy7; /* 0xa4 */
  86. u32 srcr1;
  87. u32 dummy8; /* 0xac */
  88. u32 srcr2;
  89. u32 dummy9; /* 0xb4 */
  90. u32 srcr3;
  91. u32 srcr4;
  92. u32 dummy10; /* 0xc0 */
  93. u32 srcr5;
  94. u32 pllc01stpcr;
  95. u32 dummy11[5]; /* 0xcc .. 0xdc */
  96. u32 frqcrc;
  97. u32 frqcrd;
  98. u32 dummy12[10]; /* 0xe8 .. 0x10c */
  99. u32 rmstpcr0;
  100. u32 rmstpcr1;
  101. u32 rmstpcr2;
  102. u32 rmstpcr3;
  103. u32 rmstpcr4;
  104. u32 rmstpcr5;
  105. u32 dummy13[2]; /* 0x128 .. 0x12c */
  106. u32 smstpcr0;
  107. u32 smstpcr1;
  108. u32 smstpcr2;
  109. u32 smstpcr3;
  110. u32 smstpcr4;
  111. u32 smstpcr5;
  112. };
  113. /* BSC */
  114. struct r8a7740_bsc {
  115. u32 cmncr;
  116. u32 cs0bcr;
  117. u32 cs2bcr;
  118. u32 dummy0; /* 0x0c */
  119. u32 cs4bcr;
  120. u32 cs5abcr;
  121. u32 cs5bbcr;
  122. u32 cs6abcr;
  123. u32 dummy1; /* 0x20 */
  124. u32 cs0wcr;
  125. u32 cs2wcr;
  126. u32 dummy2; /* 0x2c */
  127. u32 cs4wcr;
  128. u32 cs5awcr;
  129. u32 cs5bwcr;
  130. u32 cs6awcr;
  131. u32 dummy3[5]; /* 0x40 .. 0x50 */
  132. u32 rbwtcnt;
  133. u32 busycr;
  134. u32 dummy4[5]; /* 0x5c .. 0x6c */
  135. u32 bromtimcr;
  136. u32 dummy5[7]; /* 0x74 .. 0x8c */
  137. u32 bptcr00;
  138. u32 bptcr01;
  139. u32 bptcr02;
  140. u32 bptcr03;
  141. u32 bptcr04;
  142. u32 bptcr05;
  143. u32 bptcr06;
  144. u32 bptcr07;
  145. u32 bptcr08;
  146. u32 bptcr09;
  147. u32 bptcr10;
  148. u32 bptcr11;
  149. u32 bptcr12;
  150. u32 bptcr13;
  151. u32 bptcr14;
  152. u32 bptcr15;
  153. u32 bptcr16;
  154. u32 bptcr17;
  155. u32 bptcr18;
  156. u32 bptcr19;
  157. u32 bptcr20;
  158. u32 bptcr21;
  159. u32 bptcr22;
  160. u32 bptcr23;
  161. u32 bptcr24;
  162. u32 bptcr25;
  163. u32 bptcr26;
  164. u32 bptcr27;
  165. u32 bptcr28;
  166. u32 bptcr29;
  167. u32 bptcr30;
  168. u32 bptcr31;
  169. u32 bswcr;
  170. u32 dummy6[68]; /* 0x114 .. 0x220 */
  171. u32 cs0wcr2;
  172. u32 cs2wcr2;
  173. u32 dummy7; /* 0x22c */
  174. u32 cs4wcr2;
  175. };
  176. #define CS0WCR2 0xFEC10224
  177. #define CS2WCR2 0xFEC10228
  178. #define CS4WCR2 0xFEC10230
  179. /* DDRP */
  180. struct r8a7740_ddrp {
  181. u32 funcctrl;
  182. u32 dllctrl;
  183. u32 zqcalctrl;
  184. u32 zqodtctrl;
  185. u32 rdctrl;
  186. u32 rdtmg;
  187. u32 fifoinit;
  188. u32 outctrl;
  189. u32 dummy0[50]; /* 0x20 .. 0xe4 */
  190. u32 dqcalofs1;
  191. u32 dqcalofs2;
  192. u32 dummy1[2]; /* 0xf0 .. 0xf4 */
  193. u32 dqcalexp;
  194. };
  195. #define DDRPNCNT 0xE605803C
  196. #define DDRVREFCNT 0xE61500EC
  197. /* DBSC */
  198. struct r8a7740_dbsc {
  199. u32 dummy0;
  200. u32 dbsvcr;
  201. u32 dbstate0;
  202. u32 dbstate1;
  203. u32 dbacen;
  204. u32 dbrfen;
  205. u32 dbcmd;
  206. u32 dbwait;
  207. u32 dbkind;
  208. u32 dbconf0;
  209. u32 dummy1[2]; /* 0x28 .. 0x2c */
  210. u32 dbphytype;
  211. u32 dummy2[3]; /* 0x34 .. 0x3c */
  212. u32 dbtr0;
  213. u32 dbtr1;
  214. u32 dbtr2;
  215. u32 dummy3; /* 0x4c */
  216. u32 dbtr3;
  217. u32 dbtr4;
  218. u32 dbtr5;
  219. u32 dbtr6;
  220. u32 dbtr7;
  221. u32 dbtr8;
  222. u32 dbtr9;
  223. u32 dbtr10;
  224. u32 dbtr11;
  225. u32 dbtr12;
  226. u32 dbtr13;
  227. u32 dbtr14;
  228. u32 dbtr15;
  229. u32 dbtr16;
  230. u32 dbtr17;
  231. u32 dbtr18;
  232. u32 dbtr19;
  233. u32 dummy4[7]; /* 0x94 .. 0xac */
  234. u32 dbbl;
  235. u32 dummy5[3]; /* 0xb4 .. 0xbc */
  236. u32 dbadj0;
  237. u32 dbadj1;
  238. u32 dbadj2;
  239. u32 dummy6[5]; /* 0xcc .. 0xdc */
  240. u32 dbrfcnf0;
  241. u32 dbrfcnf1;
  242. u32 dbrfcnf2;
  243. u32 dbrfcnf3;
  244. u32 dummy7; /* 0xf0 */
  245. u32 dbcalcnf;
  246. u32 dbcaltr;
  247. u32 dummy8; /* 0xfc */;
  248. u32 dbrnk0;
  249. u32 dummy9[31]; /* 0x104 .. 0x17C */
  250. u32 dbpdncnf;
  251. u32 dummy10[7]; /* 0x184 .. 0x19C */
  252. u32 dbmrrdr;
  253. u32 dummy11[39]; /* 0x1A4 .. 0x23C */
  254. u32 dbdfistat;
  255. u32 dbdficnt;
  256. u32 dummy12[46]; /* 0x248 .. 0x2FC */
  257. u32 dbbs0cnt0;
  258. u32 dbbs0cnt1;
  259. };
  260. #endif
  261. #endif /* __ASM_ARCH_R8A7740_H */