r8a7740.h 4.6 KB

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