tegra30.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957
  1. /*
  2. * Copyright (C) 2014 NVIDIA CORPORATION. All rights reserved.
  3. *
  4. * This program is free software; you can redistribute it and/or modify
  5. * it under the terms of the GNU General Public License version 2 as
  6. * published by the Free Software Foundation.
  7. */
  8. #include <linux/of.h>
  9. #include <linux/mm.h>
  10. #include <dt-bindings/memory/tegra30-mc.h>
  11. #include "mc.h"
  12. static const struct tegra_mc_client tegra30_mc_clients[] = {
  13. {
  14. .id = 0x00,
  15. .name = "ptcr",
  16. .swgroup = TEGRA_SWGROUP_PTC,
  17. }, {
  18. .id = 0x01,
  19. .name = "display0a",
  20. .swgroup = TEGRA_SWGROUP_DC,
  21. .smmu = {
  22. .reg = 0x228,
  23. .bit = 1,
  24. },
  25. .la = {
  26. .reg = 0x2e8,
  27. .shift = 0,
  28. .mask = 0xff,
  29. .def = 0x4e,
  30. },
  31. }, {
  32. .id = 0x02,
  33. .name = "display0ab",
  34. .swgroup = TEGRA_SWGROUP_DCB,
  35. .smmu = {
  36. .reg = 0x228,
  37. .bit = 2,
  38. },
  39. .la = {
  40. .reg = 0x2f4,
  41. .shift = 0,
  42. .mask = 0xff,
  43. .def = 0x4e,
  44. },
  45. }, {
  46. .id = 0x03,
  47. .name = "display0b",
  48. .swgroup = TEGRA_SWGROUP_DC,
  49. .smmu = {
  50. .reg = 0x228,
  51. .bit = 3,
  52. },
  53. .la = {
  54. .reg = 0x2e8,
  55. .shift = 16,
  56. .mask = 0xff,
  57. .def = 0x4e,
  58. },
  59. }, {
  60. .id = 0x04,
  61. .name = "display0bb",
  62. .swgroup = TEGRA_SWGROUP_DCB,
  63. .smmu = {
  64. .reg = 0x228,
  65. .bit = 4,
  66. },
  67. .la = {
  68. .reg = 0x2f4,
  69. .shift = 16,
  70. .mask = 0xff,
  71. .def = 0x4e,
  72. },
  73. }, {
  74. .id = 0x05,
  75. .name = "display0c",
  76. .swgroup = TEGRA_SWGROUP_DC,
  77. .smmu = {
  78. .reg = 0x228,
  79. .bit = 5,
  80. },
  81. .la = {
  82. .reg = 0x2ec,
  83. .shift = 0,
  84. .mask = 0xff,
  85. .def = 0x4e,
  86. },
  87. }, {
  88. .id = 0x06,
  89. .name = "display0cb",
  90. .swgroup = TEGRA_SWGROUP_DCB,
  91. .smmu = {
  92. .reg = 0x228,
  93. .bit = 6,
  94. },
  95. .la = {
  96. .reg = 0x2f8,
  97. .shift = 0,
  98. .mask = 0xff,
  99. .def = 0x4e,
  100. },
  101. }, {
  102. .id = 0x07,
  103. .name = "display1b",
  104. .swgroup = TEGRA_SWGROUP_DC,
  105. .smmu = {
  106. .reg = 0x228,
  107. .bit = 7,
  108. },
  109. .la = {
  110. .reg = 0x2ec,
  111. .shift = 16,
  112. .mask = 0xff,
  113. .def = 0x4e,
  114. },
  115. }, {
  116. .id = 0x08,
  117. .name = "display1bb",
  118. .swgroup = TEGRA_SWGROUP_DCB,
  119. .smmu = {
  120. .reg = 0x228,
  121. .bit = 8,
  122. },
  123. .la = {
  124. .reg = 0x2f8,
  125. .shift = 16,
  126. .mask = 0xff,
  127. .def = 0x4e,
  128. },
  129. }, {
  130. .id = 0x09,
  131. .name = "eppup",
  132. .swgroup = TEGRA_SWGROUP_EPP,
  133. .smmu = {
  134. .reg = 0x228,
  135. .bit = 9,
  136. },
  137. .la = {
  138. .reg = 0x300,
  139. .shift = 0,
  140. .mask = 0xff,
  141. .def = 0x17,
  142. },
  143. }, {
  144. .id = 0x0a,
  145. .name = "g2pr",
  146. .swgroup = TEGRA_SWGROUP_G2,
  147. .smmu = {
  148. .reg = 0x228,
  149. .bit = 10,
  150. },
  151. .la = {
  152. .reg = 0x308,
  153. .shift = 0,
  154. .mask = 0xff,
  155. .def = 0x09,
  156. },
  157. }, {
  158. .id = 0x0b,
  159. .name = "g2sr",
  160. .swgroup = TEGRA_SWGROUP_G2,
  161. .smmu = {
  162. .reg = 0x228,
  163. .bit = 11,
  164. },
  165. .la = {
  166. .reg = 0x308,
  167. .shift = 16,
  168. .mask = 0xff,
  169. .def = 0x09,
  170. },
  171. }, {
  172. .id = 0x0c,
  173. .name = "mpeunifbr",
  174. .swgroup = TEGRA_SWGROUP_MPE,
  175. .smmu = {
  176. .reg = 0x228,
  177. .bit = 12,
  178. },
  179. .la = {
  180. .reg = 0x328,
  181. .shift = 0,
  182. .mask = 0xff,
  183. .def = 0x50,
  184. },
  185. }, {
  186. .id = 0x0d,
  187. .name = "viruv",
  188. .swgroup = TEGRA_SWGROUP_VI,
  189. .smmu = {
  190. .reg = 0x228,
  191. .bit = 13,
  192. },
  193. .la = {
  194. .reg = 0x364,
  195. .shift = 0,
  196. .mask = 0xff,
  197. .def = 0x2c,
  198. },
  199. }, {
  200. .id = 0x0e,
  201. .name = "afir",
  202. .swgroup = TEGRA_SWGROUP_AFI,
  203. .smmu = {
  204. .reg = 0x228,
  205. .bit = 14,
  206. },
  207. .la = {
  208. .reg = 0x2e0,
  209. .shift = 0,
  210. .mask = 0xff,
  211. .def = 0x10,
  212. },
  213. }, {
  214. .id = 0x0f,
  215. .name = "avpcarm7r",
  216. .swgroup = TEGRA_SWGROUP_AVPC,
  217. .smmu = {
  218. .reg = 0x228,
  219. .bit = 15,
  220. },
  221. .la = {
  222. .reg = 0x2e4,
  223. .shift = 0,
  224. .mask = 0xff,
  225. .def = 0x04,
  226. },
  227. }, {
  228. .id = 0x10,
  229. .name = "displayhc",
  230. .swgroup = TEGRA_SWGROUP_DC,
  231. .smmu = {
  232. .reg = 0x228,
  233. .bit = 16,
  234. },
  235. .la = {
  236. .reg = 0x2f0,
  237. .shift = 0,
  238. .mask = 0xff,
  239. .def = 0xff,
  240. },
  241. }, {
  242. .id = 0x11,
  243. .name = "displayhcb",
  244. .swgroup = TEGRA_SWGROUP_DCB,
  245. .smmu = {
  246. .reg = 0x228,
  247. .bit = 17,
  248. },
  249. .la = {
  250. .reg = 0x2fc,
  251. .shift = 0,
  252. .mask = 0xff,
  253. .def = 0xff,
  254. },
  255. }, {
  256. .id = 0x12,
  257. .name = "fdcdrd",
  258. .swgroup = TEGRA_SWGROUP_NV,
  259. .smmu = {
  260. .reg = 0x228,
  261. .bit = 18,
  262. },
  263. .la = {
  264. .reg = 0x334,
  265. .shift = 0,
  266. .mask = 0xff,
  267. .def = 0x0a,
  268. },
  269. }, {
  270. .id = 0x13,
  271. .name = "fdcdrd2",
  272. .swgroup = TEGRA_SWGROUP_NV2,
  273. .smmu = {
  274. .reg = 0x228,
  275. .bit = 19,
  276. },
  277. .la = {
  278. .reg = 0x33c,
  279. .shift = 0,
  280. .mask = 0xff,
  281. .def = 0x0a,
  282. },
  283. }, {
  284. .id = 0x14,
  285. .name = "g2dr",
  286. .swgroup = TEGRA_SWGROUP_G2,
  287. .smmu = {
  288. .reg = 0x228,
  289. .bit = 20,
  290. },
  291. .la = {
  292. .reg = 0x30c,
  293. .shift = 0,
  294. .mask = 0xff,
  295. .def = 0x0a,
  296. },
  297. }, {
  298. .id = 0x15,
  299. .name = "hdar",
  300. .swgroup = TEGRA_SWGROUP_HDA,
  301. .smmu = {
  302. .reg = 0x228,
  303. .bit = 21,
  304. },
  305. .la = {
  306. .reg = 0x318,
  307. .shift = 0,
  308. .mask = 0xff,
  309. .def = 0xff,
  310. },
  311. }, {
  312. .id = 0x16,
  313. .name = "host1xdmar",
  314. .swgroup = TEGRA_SWGROUP_HC,
  315. .smmu = {
  316. .reg = 0x228,
  317. .bit = 22,
  318. },
  319. .la = {
  320. .reg = 0x310,
  321. .shift = 0,
  322. .mask = 0xff,
  323. .def = 0x05,
  324. },
  325. }, {
  326. .id = 0x17,
  327. .name = "host1xr",
  328. .swgroup = TEGRA_SWGROUP_HC,
  329. .smmu = {
  330. .reg = 0x228,
  331. .bit = 23,
  332. },
  333. .la = {
  334. .reg = 0x310,
  335. .shift = 16,
  336. .mask = 0xff,
  337. .def = 0x50,
  338. },
  339. }, {
  340. .id = 0x18,
  341. .name = "idxsrd",
  342. .swgroup = TEGRA_SWGROUP_NV,
  343. .smmu = {
  344. .reg = 0x228,
  345. .bit = 24,
  346. },
  347. .la = {
  348. .reg = 0x334,
  349. .shift = 16,
  350. .mask = 0xff,
  351. .def = 0x13,
  352. },
  353. }, {
  354. .id = 0x19,
  355. .name = "idxsrd2",
  356. .swgroup = TEGRA_SWGROUP_NV2,
  357. .smmu = {
  358. .reg = 0x228,
  359. .bit = 25,
  360. },
  361. .la = {
  362. .reg = 0x33c,
  363. .shift = 16,
  364. .mask = 0xff,
  365. .def = 0x13,
  366. },
  367. }, {
  368. .id = 0x1a,
  369. .name = "mpe_ipred",
  370. .swgroup = TEGRA_SWGROUP_MPE,
  371. .smmu = {
  372. .reg = 0x228,
  373. .bit = 26,
  374. },
  375. .la = {
  376. .reg = 0x328,
  377. .shift = 16,
  378. .mask = 0xff,
  379. .def = 0x80,
  380. },
  381. }, {
  382. .id = 0x1b,
  383. .name = "mpeamemrd",
  384. .swgroup = TEGRA_SWGROUP_MPE,
  385. .smmu = {
  386. .reg = 0x228,
  387. .bit = 27,
  388. },
  389. .la = {
  390. .reg = 0x32c,
  391. .shift = 0,
  392. .mask = 0xff,
  393. .def = 0x42,
  394. },
  395. }, {
  396. .id = 0x1c,
  397. .name = "mpecsrd",
  398. .swgroup = TEGRA_SWGROUP_MPE,
  399. .smmu = {
  400. .reg = 0x228,
  401. .bit = 28,
  402. },
  403. .la = {
  404. .reg = 0x32c,
  405. .shift = 16,
  406. .mask = 0xff,
  407. .def = 0xff,
  408. },
  409. }, {
  410. .id = 0x1d,
  411. .name = "ppcsahbdmar",
  412. .swgroup = TEGRA_SWGROUP_PPCS,
  413. .smmu = {
  414. .reg = 0x228,
  415. .bit = 29,
  416. },
  417. .la = {
  418. .reg = 0x344,
  419. .shift = 0,
  420. .mask = 0xff,
  421. .def = 0x10,
  422. },
  423. }, {
  424. .id = 0x1e,
  425. .name = "ppcsahbslvr",
  426. .swgroup = TEGRA_SWGROUP_PPCS,
  427. .smmu = {
  428. .reg = 0x228,
  429. .bit = 30,
  430. },
  431. .la = {
  432. .reg = 0x344,
  433. .shift = 16,
  434. .mask = 0xff,
  435. .def = 0x12,
  436. },
  437. }, {
  438. .id = 0x1f,
  439. .name = "satar",
  440. .swgroup = TEGRA_SWGROUP_SATA,
  441. .smmu = {
  442. .reg = 0x228,
  443. .bit = 31,
  444. },
  445. .la = {
  446. .reg = 0x350,
  447. .shift = 0,
  448. .mask = 0xff,
  449. .def = 0x33,
  450. },
  451. }, {
  452. .id = 0x20,
  453. .name = "texsrd",
  454. .swgroup = TEGRA_SWGROUP_NV,
  455. .smmu = {
  456. .reg = 0x22c,
  457. .bit = 0,
  458. },
  459. .la = {
  460. .reg = 0x338,
  461. .shift = 0,
  462. .mask = 0xff,
  463. .def = 0x13,
  464. },
  465. }, {
  466. .id = 0x21,
  467. .name = "texsrd2",
  468. .swgroup = TEGRA_SWGROUP_NV2,
  469. .smmu = {
  470. .reg = 0x22c,
  471. .bit = 1,
  472. },
  473. .la = {
  474. .reg = 0x340,
  475. .shift = 0,
  476. .mask = 0xff,
  477. .def = 0x13,
  478. },
  479. }, {
  480. .id = 0x22,
  481. .name = "vdebsevr",
  482. .swgroup = TEGRA_SWGROUP_VDE,
  483. .smmu = {
  484. .reg = 0x22c,
  485. .bit = 2,
  486. },
  487. .la = {
  488. .reg = 0x354,
  489. .shift = 0,
  490. .mask = 0xff,
  491. .def = 0xff,
  492. },
  493. }, {
  494. .id = 0x23,
  495. .name = "vdember",
  496. .swgroup = TEGRA_SWGROUP_VDE,
  497. .smmu = {
  498. .reg = 0x22c,
  499. .bit = 3,
  500. },
  501. .la = {
  502. .reg = 0x354,
  503. .shift = 16,
  504. .mask = 0xff,
  505. .def = 0xd0,
  506. },
  507. }, {
  508. .id = 0x24,
  509. .name = "vdemcer",
  510. .swgroup = TEGRA_SWGROUP_VDE,
  511. .smmu = {
  512. .reg = 0x22c,
  513. .bit = 4,
  514. },
  515. .la = {
  516. .reg = 0x358,
  517. .shift = 0,
  518. .mask = 0xff,
  519. .def = 0x2a,
  520. },
  521. }, {
  522. .id = 0x25,
  523. .name = "vdetper",
  524. .swgroup = TEGRA_SWGROUP_VDE,
  525. .smmu = {
  526. .reg = 0x22c,
  527. .bit = 5,
  528. },
  529. .la = {
  530. .reg = 0x358,
  531. .shift = 16,
  532. .mask = 0xff,
  533. .def = 0x74,
  534. },
  535. }, {
  536. .id = 0x26,
  537. .name = "mpcorelpr",
  538. .swgroup = TEGRA_SWGROUP_MPCORELP,
  539. .la = {
  540. .reg = 0x324,
  541. .shift = 0,
  542. .mask = 0xff,
  543. .def = 0x04,
  544. },
  545. }, {
  546. .id = 0x27,
  547. .name = "mpcorer",
  548. .swgroup = TEGRA_SWGROUP_MPCORE,
  549. .la = {
  550. .reg = 0x320,
  551. .shift = 0,
  552. .mask = 0xff,
  553. .def = 0x04,
  554. },
  555. }, {
  556. .id = 0x28,
  557. .name = "eppu",
  558. .swgroup = TEGRA_SWGROUP_EPP,
  559. .smmu = {
  560. .reg = 0x22c,
  561. .bit = 8,
  562. },
  563. .la = {
  564. .reg = 0x300,
  565. .shift = 16,
  566. .mask = 0xff,
  567. .def = 0x6c,
  568. },
  569. }, {
  570. .id = 0x29,
  571. .name = "eppv",
  572. .swgroup = TEGRA_SWGROUP_EPP,
  573. .smmu = {
  574. .reg = 0x22c,
  575. .bit = 9,
  576. },
  577. .la = {
  578. .reg = 0x304,
  579. .shift = 0,
  580. .mask = 0xff,
  581. .def = 0x6c,
  582. },
  583. }, {
  584. .id = 0x2a,
  585. .name = "eppy",
  586. .swgroup = TEGRA_SWGROUP_EPP,
  587. .smmu = {
  588. .reg = 0x22c,
  589. .bit = 10,
  590. },
  591. .la = {
  592. .reg = 0x304,
  593. .shift = 16,
  594. .mask = 0xff,
  595. .def = 0x6c,
  596. },
  597. }, {
  598. .id = 0x2b,
  599. .name = "mpeunifbw",
  600. .swgroup = TEGRA_SWGROUP_MPE,
  601. .smmu = {
  602. .reg = 0x22c,
  603. .bit = 11,
  604. },
  605. .la = {
  606. .reg = 0x330,
  607. .shift = 0,
  608. .mask = 0xff,
  609. .def = 0x13,
  610. },
  611. }, {
  612. .id = 0x2c,
  613. .name = "viwsb",
  614. .swgroup = TEGRA_SWGROUP_VI,
  615. .smmu = {
  616. .reg = 0x22c,
  617. .bit = 12,
  618. },
  619. .la = {
  620. .reg = 0x364,
  621. .shift = 16,
  622. .mask = 0xff,
  623. .def = 0x12,
  624. },
  625. }, {
  626. .id = 0x2d,
  627. .name = "viwu",
  628. .swgroup = TEGRA_SWGROUP_VI,
  629. .smmu = {
  630. .reg = 0x22c,
  631. .bit = 13,
  632. },
  633. .la = {
  634. .reg = 0x368,
  635. .shift = 0,
  636. .mask = 0xff,
  637. .def = 0xb2,
  638. },
  639. }, {
  640. .id = 0x2e,
  641. .name = "viwv",
  642. .swgroup = TEGRA_SWGROUP_VI,
  643. .smmu = {
  644. .reg = 0x22c,
  645. .bit = 14,
  646. },
  647. .la = {
  648. .reg = 0x368,
  649. .shift = 16,
  650. .mask = 0xff,
  651. .def = 0xb2,
  652. },
  653. }, {
  654. .id = 0x2f,
  655. .name = "viwy",
  656. .swgroup = TEGRA_SWGROUP_VI,
  657. .smmu = {
  658. .reg = 0x22c,
  659. .bit = 15,
  660. },
  661. .la = {
  662. .reg = 0x36c,
  663. .shift = 0,
  664. .mask = 0xff,
  665. .def = 0x12,
  666. },
  667. }, {
  668. .id = 0x30,
  669. .name = "g2dw",
  670. .swgroup = TEGRA_SWGROUP_G2,
  671. .smmu = {
  672. .reg = 0x22c,
  673. .bit = 16,
  674. },
  675. .la = {
  676. .reg = 0x30c,
  677. .shift = 16,
  678. .mask = 0xff,
  679. .def = 0x9,
  680. },
  681. }, {
  682. .id = 0x31,
  683. .name = "afiw",
  684. .swgroup = TEGRA_SWGROUP_AFI,
  685. .smmu = {
  686. .reg = 0x22c,
  687. .bit = 17,
  688. },
  689. .la = {
  690. .reg = 0x2e0,
  691. .shift = 16,
  692. .mask = 0xff,
  693. .def = 0x0c,
  694. },
  695. }, {
  696. .id = 0x32,
  697. .name = "avpcarm7w",
  698. .swgroup = TEGRA_SWGROUP_AVPC,
  699. .smmu = {
  700. .reg = 0x22c,
  701. .bit = 18,
  702. },
  703. .la = {
  704. .reg = 0x2e4,
  705. .shift = 16,
  706. .mask = 0xff,
  707. .def = 0x0e,
  708. },
  709. }, {
  710. .id = 0x33,
  711. .name = "fdcdwr",
  712. .swgroup = TEGRA_SWGROUP_NV,
  713. .smmu = {
  714. .reg = 0x22c,
  715. .bit = 19,
  716. },
  717. .la = {
  718. .reg = 0x338,
  719. .shift = 16,
  720. .mask = 0xff,
  721. .def = 0x0a,
  722. },
  723. }, {
  724. .id = 0x34,
  725. .name = "fdcwr2",
  726. .swgroup = TEGRA_SWGROUP_NV2,
  727. .smmu = {
  728. .reg = 0x22c,
  729. .bit = 20,
  730. },
  731. .la = {
  732. .reg = 0x340,
  733. .shift = 16,
  734. .mask = 0xff,
  735. .def = 0x0a,
  736. },
  737. }, {
  738. .id = 0x35,
  739. .name = "hdaw",
  740. .swgroup = TEGRA_SWGROUP_HDA,
  741. .smmu = {
  742. .reg = 0x22c,
  743. .bit = 21,
  744. },
  745. .la = {
  746. .reg = 0x318,
  747. .shift = 16,
  748. .mask = 0xff,
  749. .def = 0xff,
  750. },
  751. }, {
  752. .id = 0x36,
  753. .name = "host1xw",
  754. .swgroup = TEGRA_SWGROUP_HC,
  755. .smmu = {
  756. .reg = 0x22c,
  757. .bit = 22,
  758. },
  759. .la = {
  760. .reg = 0x314,
  761. .shift = 0,
  762. .mask = 0xff,
  763. .def = 0x10,
  764. },
  765. }, {
  766. .id = 0x37,
  767. .name = "ispw",
  768. .swgroup = TEGRA_SWGROUP_ISP,
  769. .smmu = {
  770. .reg = 0x22c,
  771. .bit = 23,
  772. },
  773. .la = {
  774. .reg = 0x31c,
  775. .shift = 0,
  776. .mask = 0xff,
  777. .def = 0xff,
  778. },
  779. }, {
  780. .id = 0x38,
  781. .name = "mpcorelpw",
  782. .swgroup = TEGRA_SWGROUP_MPCORELP,
  783. .la = {
  784. .reg = 0x324,
  785. .shift = 16,
  786. .mask = 0xff,
  787. .def = 0x0e,
  788. },
  789. }, {
  790. .id = 0x39,
  791. .name = "mpcorew",
  792. .swgroup = TEGRA_SWGROUP_MPCORE,
  793. .la = {
  794. .reg = 0x320,
  795. .shift = 16,
  796. .mask = 0xff,
  797. .def = 0x0e,
  798. },
  799. }, {
  800. .id = 0x3a,
  801. .name = "mpecswr",
  802. .swgroup = TEGRA_SWGROUP_MPE,
  803. .smmu = {
  804. .reg = 0x22c,
  805. .bit = 26,
  806. },
  807. .la = {
  808. .reg = 0x330,
  809. .shift = 16,
  810. .mask = 0xff,
  811. .def = 0xff,
  812. },
  813. }, {
  814. .id = 0x3b,
  815. .name = "ppcsahbdmaw",
  816. .swgroup = TEGRA_SWGROUP_PPCS,
  817. .smmu = {
  818. .reg = 0x22c,
  819. .bit = 27,
  820. },
  821. .la = {
  822. .reg = 0x348,
  823. .shift = 0,
  824. .mask = 0xff,
  825. .def = 0x10,
  826. },
  827. }, {
  828. .id = 0x3c,
  829. .name = "ppcsahbslvw",
  830. .swgroup = TEGRA_SWGROUP_PPCS,
  831. .smmu = {
  832. .reg = 0x22c,
  833. .bit = 28,
  834. },
  835. .la = {
  836. .reg = 0x348,
  837. .shift = 16,
  838. .mask = 0xff,
  839. .def = 0x06,
  840. },
  841. }, {
  842. .id = 0x3d,
  843. .name = "sataw",
  844. .swgroup = TEGRA_SWGROUP_SATA,
  845. .smmu = {
  846. .reg = 0x22c,
  847. .bit = 29,
  848. },
  849. .la = {
  850. .reg = 0x350,
  851. .shift = 16,
  852. .mask = 0xff,
  853. .def = 0x33,
  854. },
  855. }, {
  856. .id = 0x3e,
  857. .name = "vdebsevw",
  858. .swgroup = TEGRA_SWGROUP_VDE,
  859. .smmu = {
  860. .reg = 0x22c,
  861. .bit = 30,
  862. },
  863. .la = {
  864. .reg = 0x35c,
  865. .shift = 0,
  866. .mask = 0xff,
  867. .def = 0xff,
  868. },
  869. }, {
  870. .id = 0x3f,
  871. .name = "vdedbgw",
  872. .swgroup = TEGRA_SWGROUP_VDE,
  873. .smmu = {
  874. .reg = 0x22c,
  875. .bit = 31,
  876. },
  877. .la = {
  878. .reg = 0x35c,
  879. .shift = 16,
  880. .mask = 0xff,
  881. .def = 0xff,
  882. },
  883. }, {
  884. .id = 0x40,
  885. .name = "vdembew",
  886. .swgroup = TEGRA_SWGROUP_VDE,
  887. .smmu = {
  888. .reg = 0x230,
  889. .bit = 0,
  890. },
  891. .la = {
  892. .reg = 0x360,
  893. .shift = 0,
  894. .mask = 0xff,
  895. .def = 0x42,
  896. },
  897. }, {
  898. .id = 0x41,
  899. .name = "vdetpmw",
  900. .swgroup = TEGRA_SWGROUP_VDE,
  901. .smmu = {
  902. .reg = 0x230,
  903. .bit = 1,
  904. },
  905. .la = {
  906. .reg = 0x360,
  907. .shift = 16,
  908. .mask = 0xff,
  909. .def = 0x2a,
  910. },
  911. },
  912. };
  913. static const struct tegra_smmu_swgroup tegra30_swgroups[] = {
  914. { .name = "dc", .swgroup = TEGRA_SWGROUP_DC, .reg = 0x240 },
  915. { .name = "dcb", .swgroup = TEGRA_SWGROUP_DCB, .reg = 0x244 },
  916. { .name = "epp", .swgroup = TEGRA_SWGROUP_EPP, .reg = 0x248 },
  917. { .name = "g2", .swgroup = TEGRA_SWGROUP_G2, .reg = 0x24c },
  918. { .name = "mpe", .swgroup = TEGRA_SWGROUP_MPE, .reg = 0x264 },
  919. { .name = "vi", .swgroup = TEGRA_SWGROUP_VI, .reg = 0x280 },
  920. { .name = "afi", .swgroup = TEGRA_SWGROUP_AFI, .reg = 0x238 },
  921. { .name = "avpc", .swgroup = TEGRA_SWGROUP_AVPC, .reg = 0x23c },
  922. { .name = "nv", .swgroup = TEGRA_SWGROUP_NV, .reg = 0x268 },
  923. { .name = "nv2", .swgroup = TEGRA_SWGROUP_NV2, .reg = 0x26c },
  924. { .name = "hda", .swgroup = TEGRA_SWGROUP_HDA, .reg = 0x254 },
  925. { .name = "hc", .swgroup = TEGRA_SWGROUP_HC, .reg = 0x250 },
  926. { .name = "ppcs", .swgroup = TEGRA_SWGROUP_PPCS, .reg = 0x270 },
  927. { .name = "sata", .swgroup = TEGRA_SWGROUP_SATA, .reg = 0x278 },
  928. { .name = "vde", .swgroup = TEGRA_SWGROUP_VDE, .reg = 0x27c },
  929. { .name = "isp", .swgroup = TEGRA_SWGROUP_ISP, .reg = 0x258 },
  930. };
  931. static const struct tegra_smmu_soc tegra30_smmu_soc = {
  932. .clients = tegra30_mc_clients,
  933. .num_clients = ARRAY_SIZE(tegra30_mc_clients),
  934. .swgroups = tegra30_swgroups,
  935. .num_swgroups = ARRAY_SIZE(tegra30_swgroups),
  936. .supports_round_robin_arbitration = false,
  937. .supports_request_limit = false,
  938. .num_tlb_lines = 16,
  939. .num_asids = 4,
  940. };
  941. const struct tegra_mc_soc tegra30_mc_soc = {
  942. .clients = tegra30_mc_clients,
  943. .num_clients = ARRAY_SIZE(tegra30_mc_clients),
  944. .num_address_bits = 32,
  945. .atom_size = 16,
  946. .client_id_mask = 0x7f,
  947. .smmu = &tegra30_smmu_soc,
  948. .intmask = MC_INT_INVALID_SMMU_PAGE | MC_INT_SECURITY_VIOLATION |
  949. MC_INT_DECERR_EMEM,
  950. };