1 // SPDX-License-Identifier: GPL-2.0-only
3 * Copyright (C) 2017-2021 NVIDIA CORPORATION. All rights reserved.
6 #include <soc/tegra/mc.h>
8 #include <dt-bindings/memory/tegra194-mc.h>
12 static const struct tegra_mc_client tegra194_mc_clients[] = {
14 .id = TEGRA194_MEMORY_CLIENT_PTCR,
16 .sid = TEGRA194_SID_PASSTHROUGH,
24 .id = TEGRA194_MEMORY_CLIENT_MIU7R,
26 .sid = TEGRA194_SID_MIU,
34 .id = TEGRA194_MEMORY_CLIENT_MIU7W,
36 .sid = TEGRA194_SID_MIU,
44 .id = TEGRA194_MEMORY_CLIENT_HDAR,
46 .sid = TEGRA194_SID_HDA,
54 .id = TEGRA194_MEMORY_CLIENT_HOST1XDMAR,
56 .sid = TEGRA194_SID_HOST1X,
64 .id = TEGRA194_MEMORY_CLIENT_NVENCSRD,
66 .sid = TEGRA194_SID_NVENC,
74 .id = TEGRA194_MEMORY_CLIENT_SATAR,
76 .sid = TEGRA194_SID_SATA,
84 .id = TEGRA194_MEMORY_CLIENT_MPCORER,
86 .sid = TEGRA194_SID_PASSTHROUGH,
94 .id = TEGRA194_MEMORY_CLIENT_NVENCSWR,
96 .sid = TEGRA194_SID_NVENC,
104 .id = TEGRA194_MEMORY_CLIENT_HDAW,
106 .sid = TEGRA194_SID_HDA,
114 .id = TEGRA194_MEMORY_CLIENT_MPCOREW,
116 .sid = TEGRA194_SID_PASSTHROUGH,
124 .id = TEGRA194_MEMORY_CLIENT_SATAW,
126 .sid = TEGRA194_SID_SATA,
134 .id = TEGRA194_MEMORY_CLIENT_ISPRA,
136 .sid = TEGRA194_SID_ISP,
144 .id = TEGRA194_MEMORY_CLIENT_ISPFALR,
146 .sid = TEGRA194_SID_ISP_FALCON,
154 .id = TEGRA194_MEMORY_CLIENT_ISPWA,
156 .sid = TEGRA194_SID_ISP,
164 .id = TEGRA194_MEMORY_CLIENT_ISPWB,
166 .sid = TEGRA194_SID_ISP,
174 .id = TEGRA194_MEMORY_CLIENT_XUSB_HOSTR,
175 .name = "xusb_hostr",
176 .sid = TEGRA194_SID_XUSB_HOST,
184 .id = TEGRA194_MEMORY_CLIENT_XUSB_HOSTW,
185 .name = "xusb_hostw",
186 .sid = TEGRA194_SID_XUSB_HOST,
194 .id = TEGRA194_MEMORY_CLIENT_XUSB_DEVR,
196 .sid = TEGRA194_SID_XUSB_DEV,
204 .id = TEGRA194_MEMORY_CLIENT_XUSB_DEVW,
206 .sid = TEGRA194_SID_XUSB_DEV,
214 .id = TEGRA194_MEMORY_CLIENT_SDMMCRA,
216 .sid = TEGRA194_SID_SDMMC1,
224 .id = TEGRA194_MEMORY_CLIENT_SDMMCR,
226 .sid = TEGRA194_SID_SDMMC3,
234 .id = TEGRA194_MEMORY_CLIENT_SDMMCRAB,
236 .sid = TEGRA194_SID_SDMMC4,
244 .id = TEGRA194_MEMORY_CLIENT_SDMMCWA,
246 .sid = TEGRA194_SID_SDMMC1,
254 .id = TEGRA194_MEMORY_CLIENT_SDMMCW,
256 .sid = TEGRA194_SID_SDMMC3,
264 .id = TEGRA194_MEMORY_CLIENT_SDMMCWAB,
266 .sid = TEGRA194_SID_SDMMC4,
274 .id = TEGRA194_MEMORY_CLIENT_VICSRD,
276 .sid = TEGRA194_SID_VIC,
284 .id = TEGRA194_MEMORY_CLIENT_VICSWR,
286 .sid = TEGRA194_SID_VIC,
294 .id = TEGRA194_MEMORY_CLIENT_VIW,
296 .sid = TEGRA194_SID_VI,
304 .id = TEGRA194_MEMORY_CLIENT_NVDECSRD,
306 .sid = TEGRA194_SID_NVDEC,
314 .id = TEGRA194_MEMORY_CLIENT_NVDECSWR,
316 .sid = TEGRA194_SID_NVDEC,
324 .id = TEGRA194_MEMORY_CLIENT_APER,
326 .sid = TEGRA194_SID_APE,
334 .id = TEGRA194_MEMORY_CLIENT_APEW,
336 .sid = TEGRA194_SID_APE,
344 .id = TEGRA194_MEMORY_CLIENT_NVJPGSRD,
346 .sid = TEGRA194_SID_NVJPG,
354 .id = TEGRA194_MEMORY_CLIENT_NVJPGSWR,
356 .sid = TEGRA194_SID_NVJPG,
365 .id = TEGRA194_MEMORY_CLIENT_AXIAPR,
366 .sid = TEGRA194_SID_PASSTHROUGH,
374 .id = TEGRA194_MEMORY_CLIENT_AXIAPW,
376 .sid = TEGRA194_SID_PASSTHROUGH,
384 .id = TEGRA194_MEMORY_CLIENT_ETRR,
386 .sid = TEGRA194_SID_ETR,
394 .id = TEGRA194_MEMORY_CLIENT_ETRW,
396 .sid = TEGRA194_SID_ETR,
404 .id = TEGRA194_MEMORY_CLIENT_AXISR,
406 .sid = TEGRA194_SID_PASSTHROUGH,
414 .id = TEGRA194_MEMORY_CLIENT_AXISW,
416 .sid = TEGRA194_SID_PASSTHROUGH,
424 .id = TEGRA194_MEMORY_CLIENT_EQOSR,
426 .sid = TEGRA194_SID_EQOS,
435 .id = TEGRA194_MEMORY_CLIENT_EQOSW,
436 .sid = TEGRA194_SID_EQOS,
444 .id = TEGRA194_MEMORY_CLIENT_UFSHCR,
446 .sid = TEGRA194_SID_UFSHC,
454 .id = TEGRA194_MEMORY_CLIENT_UFSHCW,
456 .sid = TEGRA194_SID_UFSHC,
464 .id = TEGRA194_MEMORY_CLIENT_NVDISPLAYR,
465 .name = "nvdisplayr",
466 .sid = TEGRA194_SID_NVDISPLAY,
474 .id = TEGRA194_MEMORY_CLIENT_BPMPR,
476 .sid = TEGRA194_SID_BPMP,
484 .id = TEGRA194_MEMORY_CLIENT_BPMPW,
486 .sid = TEGRA194_SID_BPMP,
494 .id = TEGRA194_MEMORY_CLIENT_BPMPDMAR,
496 .sid = TEGRA194_SID_BPMP,
504 .id = TEGRA194_MEMORY_CLIENT_BPMPDMAW,
506 .sid = TEGRA194_SID_BPMP,
514 .id = TEGRA194_MEMORY_CLIENT_AONR,
516 .sid = TEGRA194_SID_AON,
524 .id = TEGRA194_MEMORY_CLIENT_AONW,
526 .sid = TEGRA194_SID_AON,
534 .id = TEGRA194_MEMORY_CLIENT_AONDMAR,
536 .sid = TEGRA194_SID_AON,
544 .id = TEGRA194_MEMORY_CLIENT_AONDMAW,
546 .sid = TEGRA194_SID_AON,
554 .id = TEGRA194_MEMORY_CLIENT_SCER,
556 .sid = TEGRA194_SID_SCE,
564 .id = TEGRA194_MEMORY_CLIENT_SCEW,
566 .sid = TEGRA194_SID_SCE,
574 .id = TEGRA194_MEMORY_CLIENT_SCEDMAR,
576 .sid = TEGRA194_SID_SCE,
584 .id = TEGRA194_MEMORY_CLIENT_SCEDMAW,
586 .sid = TEGRA194_SID_SCE,
594 .id = TEGRA194_MEMORY_CLIENT_APEDMAR,
596 .sid = TEGRA194_SID_APE,
604 .id = TEGRA194_MEMORY_CLIENT_APEDMAW,
606 .sid = TEGRA194_SID_APE,
614 .id = TEGRA194_MEMORY_CLIENT_NVDISPLAYR1,
615 .name = "nvdisplayr1",
616 .sid = TEGRA194_SID_NVDISPLAY,
624 .id = TEGRA194_MEMORY_CLIENT_VICSRD1,
626 .sid = TEGRA194_SID_VIC,
634 .id = TEGRA194_MEMORY_CLIENT_NVDECSRD1,
636 .sid = TEGRA194_SID_NVDEC,
644 .id = TEGRA194_MEMORY_CLIENT_MIU0R,
646 .sid = TEGRA194_SID_MIU,
655 .id = TEGRA194_MEMORY_CLIENT_MIU0W,
656 .sid = TEGRA194_SID_MIU,
664 .id = TEGRA194_MEMORY_CLIENT_MIU1R,
666 .sid = TEGRA194_SID_MIU,
674 .id = TEGRA194_MEMORY_CLIENT_MIU1W,
676 .sid = TEGRA194_SID_MIU,
684 .id = TEGRA194_MEMORY_CLIENT_MIU2R,
686 .sid = TEGRA194_SID_MIU,
694 .id = TEGRA194_MEMORY_CLIENT_MIU2W,
696 .sid = TEGRA194_SID_MIU,
704 .id = TEGRA194_MEMORY_CLIENT_MIU3R,
706 .sid = TEGRA194_SID_MIU,
714 .id = TEGRA194_MEMORY_CLIENT_MIU3W,
716 .sid = TEGRA194_SID_MIU,
724 .id = TEGRA194_MEMORY_CLIENT_MIU4R,
726 .sid = TEGRA194_SID_MIU,
734 .id = TEGRA194_MEMORY_CLIENT_MIU4W,
736 .sid = TEGRA194_SID_MIU,
744 .id = TEGRA194_MEMORY_CLIENT_DPMUR,
746 .sid = TEGRA194_SID_PASSTHROUGH,
754 .id = TEGRA194_MEMORY_CLIENT_VIFALR,
756 .sid = TEGRA194_SID_VI_FALCON,
764 .id = TEGRA194_MEMORY_CLIENT_VIFALW,
766 .sid = TEGRA194_SID_VI_FALCON,
774 .id = TEGRA194_MEMORY_CLIENT_DLA0RDA,
776 .sid = TEGRA194_SID_NVDLA0,
784 .id = TEGRA194_MEMORY_CLIENT_DLA0FALRDB,
785 .name = "dla0falrdb",
786 .sid = TEGRA194_SID_NVDLA0,
794 .id = TEGRA194_MEMORY_CLIENT_DLA0WRA,
796 .sid = TEGRA194_SID_NVDLA0,
804 .id = TEGRA194_MEMORY_CLIENT_DLA0FALWRB,
805 .name = "dla0falwrb",
806 .sid = TEGRA194_SID_NVDLA0,
814 .id = TEGRA194_MEMORY_CLIENT_DLA1RDA,
816 .sid = TEGRA194_SID_NVDLA1,
824 .id = TEGRA194_MEMORY_CLIENT_DLA1FALRDB,
825 .name = "dla1falrdb",
826 .sid = TEGRA194_SID_NVDLA1,
834 .id = TEGRA194_MEMORY_CLIENT_DLA1WRA,
836 .sid = TEGRA194_SID_NVDLA1,
844 .id = TEGRA194_MEMORY_CLIENT_DLA1FALWRB,
845 .name = "dla1falwrb",
846 .sid = TEGRA194_SID_NVDLA1,
854 .id = TEGRA194_MEMORY_CLIENT_PVA0RDA,
856 .sid = TEGRA194_SID_PVA0,
864 .id = TEGRA194_MEMORY_CLIENT_PVA0RDB,
866 .sid = TEGRA194_SID_PVA0,
874 .id = TEGRA194_MEMORY_CLIENT_PVA0RDC,
876 .sid = TEGRA194_SID_PVA0,
884 .id = TEGRA194_MEMORY_CLIENT_PVA0WRA,
886 .sid = TEGRA194_SID_PVA0,
894 .id = TEGRA194_MEMORY_CLIENT_PVA0WRB,
896 .sid = TEGRA194_SID_PVA0,
904 .id = TEGRA194_MEMORY_CLIENT_PVA0WRC,
906 .sid = TEGRA194_SID_PVA0,
914 .id = TEGRA194_MEMORY_CLIENT_PVA1RDA,
916 .sid = TEGRA194_SID_PVA1,
924 .id = TEGRA194_MEMORY_CLIENT_PVA1RDB,
926 .sid = TEGRA194_SID_PVA1,
934 .id = TEGRA194_MEMORY_CLIENT_PVA1RDC,
936 .sid = TEGRA194_SID_PVA1,
944 .id = TEGRA194_MEMORY_CLIENT_PVA1WRA,
946 .sid = TEGRA194_SID_PVA1,
954 .id = TEGRA194_MEMORY_CLIENT_PVA1WRB,
956 .sid = TEGRA194_SID_PVA1,
964 .id = TEGRA194_MEMORY_CLIENT_PVA1WRC,
966 .sid = TEGRA194_SID_PVA1,
974 .id = TEGRA194_MEMORY_CLIENT_RCER,
976 .sid = TEGRA194_SID_RCE,
984 .id = TEGRA194_MEMORY_CLIENT_RCEW,
986 .sid = TEGRA194_SID_RCE,
994 .id = TEGRA194_MEMORY_CLIENT_RCEDMAR,
996 .sid = TEGRA194_SID_RCE,
1004 .id = TEGRA194_MEMORY_CLIENT_RCEDMAW,
1006 .sid = TEGRA194_SID_RCE,
1014 .id = TEGRA194_MEMORY_CLIENT_NVENC1SRD,
1015 .name = "nvenc1srd",
1016 .sid = TEGRA194_SID_NVENC1,
1024 .id = TEGRA194_MEMORY_CLIENT_NVENC1SWR,
1025 .name = "nvenc1swr",
1026 .sid = TEGRA194_SID_NVENC1,
1034 .id = TEGRA194_MEMORY_CLIENT_PCIE0R,
1036 .sid = TEGRA194_SID_PCIE0,
1044 .id = TEGRA194_MEMORY_CLIENT_PCIE0W,
1046 .sid = TEGRA194_SID_PCIE0,
1054 .id = TEGRA194_MEMORY_CLIENT_PCIE1R,
1056 .sid = TEGRA194_SID_PCIE1,
1064 .id = TEGRA194_MEMORY_CLIENT_PCIE1W,
1066 .sid = TEGRA194_SID_PCIE1,
1074 .id = TEGRA194_MEMORY_CLIENT_PCIE2AR,
1076 .sid = TEGRA194_SID_PCIE2,
1084 .id = TEGRA194_MEMORY_CLIENT_PCIE2AW,
1086 .sid = TEGRA194_SID_PCIE2,
1094 .id = TEGRA194_MEMORY_CLIENT_PCIE3R,
1096 .sid = TEGRA194_SID_PCIE3,
1104 .id = TEGRA194_MEMORY_CLIENT_PCIE3W,
1106 .sid = TEGRA194_SID_PCIE3,
1114 .id = TEGRA194_MEMORY_CLIENT_PCIE4R,
1116 .sid = TEGRA194_SID_PCIE4,
1124 .id = TEGRA194_MEMORY_CLIENT_PCIE4W,
1126 .sid = TEGRA194_SID_PCIE4,
1134 .id = TEGRA194_MEMORY_CLIENT_PCIE5R,
1136 .sid = TEGRA194_SID_PCIE5,
1144 .id = TEGRA194_MEMORY_CLIENT_PCIE5W,
1146 .sid = TEGRA194_SID_PCIE5,
1154 .id = TEGRA194_MEMORY_CLIENT_ISPFALW,
1156 .sid = TEGRA194_SID_ISP_FALCON,
1164 .id = TEGRA194_MEMORY_CLIENT_DLA0RDA1,
1166 .sid = TEGRA194_SID_NVDLA0,
1174 .id = TEGRA194_MEMORY_CLIENT_DLA1RDA1,
1176 .sid = TEGRA194_SID_NVDLA1,
1184 .id = TEGRA194_MEMORY_CLIENT_PVA0RDA1,
1186 .sid = TEGRA194_SID_PVA0,
1194 .id = TEGRA194_MEMORY_CLIENT_PVA0RDB1,
1196 .sid = TEGRA194_SID_PVA0,
1204 .id = TEGRA194_MEMORY_CLIENT_PVA1RDA1,
1206 .sid = TEGRA194_SID_PVA1,
1214 .id = TEGRA194_MEMORY_CLIENT_PVA1RDB1,
1216 .sid = TEGRA194_SID_PVA1,
1224 .id = TEGRA194_MEMORY_CLIENT_PCIE5R1,
1226 .sid = TEGRA194_SID_PCIE5,
1234 .id = TEGRA194_MEMORY_CLIENT_NVENCSRD1,
1235 .name = "nvencsrd1",
1236 .sid = TEGRA194_SID_NVENC,
1244 .id = TEGRA194_MEMORY_CLIENT_NVENC1SRD1,
1245 .name = "nvenc1srd1",
1246 .sid = TEGRA194_SID_NVENC1,
1254 .id = TEGRA194_MEMORY_CLIENT_ISPRA1,
1256 .sid = TEGRA194_SID_ISP,
1264 .id = TEGRA194_MEMORY_CLIENT_PCIE0R1,
1266 .sid = TEGRA194_SID_PCIE0,
1274 .id = TEGRA194_MEMORY_CLIENT_NVDEC1SRD,
1275 .name = "nvdec1srd",
1276 .sid = TEGRA194_SID_NVDEC1,
1284 .id = TEGRA194_MEMORY_CLIENT_NVDEC1SRD1,
1285 .name = "nvdec1srd1",
1286 .sid = TEGRA194_SID_NVDEC1,
1294 .id = TEGRA194_MEMORY_CLIENT_NVDEC1SWR,
1295 .name = "nvdec1swr",
1296 .sid = TEGRA194_SID_NVDEC1,
1304 .id = TEGRA194_MEMORY_CLIENT_MIU5R,
1306 .sid = TEGRA194_SID_MIU,
1314 .id = TEGRA194_MEMORY_CLIENT_MIU5W,
1316 .sid = TEGRA194_SID_MIU,
1324 .id = TEGRA194_MEMORY_CLIENT_MIU6R,
1326 .sid = TEGRA194_SID_MIU,
1334 .id = TEGRA194_MEMORY_CLIENT_MIU6W,
1336 .sid = TEGRA194_SID_MIU,
1346 const struct tegra_mc_soc tegra194_mc_soc = {
1347 .num_clients = ARRAY_SIZE(tegra194_mc_clients),
1348 .clients = tegra194_mc_clients,
1349 .num_address_bits = 40,
1351 .client_id_mask = 0xff,
1352 .intmask = MC_INT_DECERR_ROUTE_SANITY |
1353 MC_INT_DECERR_GENERALIZED_CARVEOUT | MC_INT_DECERR_MTS |
1354 MC_INT_SECERR_SEC | MC_INT_DECERR_VPR |
1355 MC_INT_SECURITY_VIOLATION | MC_INT_DECERR_EMEM,
1356 .has_addr_hi_reg = true,
1357 .ops = &tegra186_mc_ops,
1358 .ch_intmask = 0x00000f00,
1359 .global_intstatus_channel_shift = 8,