tegra114.c 15 KB

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