2 * Copyright (C) 2014 NVIDIA CORPORATION. All rights reserved.
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.
12 #include <dt-bindings/memory/tegra114-mc.h>
16 static const struct tegra_mc_client tegra114_mc_clients
[] = {
20 .swgroup
= TEGRA_SWGROUP_PTC
,
24 .swgroup
= TEGRA_SWGROUP_DC
,
38 .swgroup
= TEGRA_SWGROUP_DCB
,
52 .swgroup
= TEGRA_SWGROUP_DC
,
66 .swgroup
= TEGRA_SWGROUP_DCB
,
80 .swgroup
= TEGRA_SWGROUP_DC
,
94 .swgroup
= TEGRA_SWGROUP_DCB
,
108 .swgroup
= TEGRA_SWGROUP_EPP
,
122 .swgroup
= TEGRA_SWGROUP_G2
,
136 .swgroup
= TEGRA_SWGROUP_G2
,
150 .swgroup
= TEGRA_SWGROUP_AVPC
,
164 .swgroup
= TEGRA_SWGROUP_DC
,
177 .name
= "displayhcb",
178 .swgroup
= TEGRA_SWGROUP_DCB
,
192 .swgroup
= TEGRA_SWGROUP_NV
,
206 .swgroup
= TEGRA_SWGROUP_NV
,
220 .swgroup
= TEGRA_SWGROUP_G2
,
234 .swgroup
= TEGRA_SWGROUP_HDA
,
247 .name
= "host1xdmar",
248 .swgroup
= TEGRA_SWGROUP_HC
,
262 .swgroup
= TEGRA_SWGROUP_HC
,
276 .swgroup
= TEGRA_SWGROUP_NV
,
290 .swgroup
= TEGRA_SWGROUP_MSENC
,
303 .name
= "ppcsahbdmar",
304 .swgroup
= TEGRA_SWGROUP_PPCS
,
317 .name
= "ppcsahbslvr",
318 .swgroup
= TEGRA_SWGROUP_PPCS
,
332 .swgroup
= TEGRA_SWGROUP_NV
,
346 .swgroup
= TEGRA_SWGROUP_VDE
,
360 .swgroup
= TEGRA_SWGROUP_VDE
,
374 .swgroup
= TEGRA_SWGROUP_VDE
,
388 .swgroup
= TEGRA_SWGROUP_VDE
,
402 .swgroup
= TEGRA_SWGROUP_MPCORELP
,
412 .swgroup
= TEGRA_SWGROUP_MPCORE
,
422 .swgroup
= TEGRA_SWGROUP_EPP
,
436 .swgroup
= TEGRA_SWGROUP_EPP
,
450 .swgroup
= TEGRA_SWGROUP_EPP
,
464 .swgroup
= TEGRA_SWGROUP_MSENC
,
478 .swgroup
= TEGRA_SWGROUP_VI
,
492 .swgroup
= TEGRA_SWGROUP_VI
,
506 .swgroup
= TEGRA_SWGROUP_VI
,
520 .swgroup
= TEGRA_SWGROUP_VI
,
534 .swgroup
= TEGRA_SWGROUP_G2
,
548 .swgroup
= TEGRA_SWGROUP_AVPC
,
562 .swgroup
= TEGRA_SWGROUP_NV
,
576 .swgroup
= TEGRA_SWGROUP_NV
,
590 .swgroup
= TEGRA_SWGROUP_HDA
,
604 .swgroup
= TEGRA_SWGROUP_HC
,
618 .swgroup
= TEGRA_SWGROUP_ISP
,
632 .swgroup
= TEGRA_SWGROUP_MPCORELP
,
642 .swgroup
= TEGRA_SWGROUP_MPCORE
,
651 .name
= "ppcsahbdmaw",
652 .swgroup
= TEGRA_SWGROUP_PPCS
,
665 .name
= "ppcsahbslvw",
666 .swgroup
= TEGRA_SWGROUP_PPCS
,
680 .swgroup
= TEGRA_SWGROUP_VDE
,
694 .swgroup
= TEGRA_SWGROUP_VDE
,
708 .swgroup
= TEGRA_SWGROUP_VDE
,
722 .swgroup
= TEGRA_SWGROUP_VDE
,
735 .name
= "xusb_hostr",
736 .swgroup
= TEGRA_SWGROUP_XUSB_HOST
,
749 .name
= "xusb_hostw",
750 .swgroup
= TEGRA_SWGROUP_XUSB_HOST
,
764 .swgroup
= TEGRA_SWGROUP_XUSB_DEV
,
778 .swgroup
= TEGRA_SWGROUP_XUSB_DEV
,
792 .swgroup
= TEGRA_SWGROUP_NV
,
806 .swgroup
= TEGRA_SWGROUP_NV
,
820 .swgroup
= TEGRA_SWGROUP_NV
,
834 .swgroup
= TEGRA_SWGROUP_NV
,
848 .swgroup
= TEGRA_SWGROUP_EMUCIF
,
858 .swgroup
= TEGRA_SWGROUP_EMUCIF
,
868 .swgroup
= TEGRA_SWGROUP_TSEC
,
882 .swgroup
= TEGRA_SWGROUP_TSEC
,
896 static const struct tegra_smmu_swgroup tegra114_swgroups
[] = {
897 { .name
= "dc", .swgroup
= TEGRA_SWGROUP_DC
, .reg
= 0x240 },
898 { .name
= "dcb", .swgroup
= TEGRA_SWGROUP_DCB
, .reg
= 0x244 },
899 { .name
= "epp", .swgroup
= TEGRA_SWGROUP_EPP
, .reg
= 0x248 },
900 { .name
= "g2", .swgroup
= TEGRA_SWGROUP_G2
, .reg
= 0x24c },
901 { .name
= "avpc", .swgroup
= TEGRA_SWGROUP_AVPC
, .reg
= 0x23c },
902 { .name
= "nv", .swgroup
= TEGRA_SWGROUP_NV
, .reg
= 0x268 },
903 { .name
= "hda", .swgroup
= TEGRA_SWGROUP_HDA
, .reg
= 0x254 },
904 { .name
= "hc", .swgroup
= TEGRA_SWGROUP_HC
, .reg
= 0x250 },
905 { .name
= "msenc", .swgroup
= TEGRA_SWGROUP_MSENC
, .reg
= 0x264 },
906 { .name
= "ppcs", .swgroup
= TEGRA_SWGROUP_PPCS
, .reg
= 0x270 },
907 { .name
= "vde", .swgroup
= TEGRA_SWGROUP_VDE
, .reg
= 0x27c },
908 { .name
= "vi", .swgroup
= TEGRA_SWGROUP_VI
, .reg
= 0x280 },
909 { .name
= "isp", .swgroup
= TEGRA_SWGROUP_ISP
, .reg
= 0x258 },
910 { .name
= "xusb_host", .swgroup
= TEGRA_SWGROUP_XUSB_HOST
, .reg
= 0x288 },
911 { .name
= "xusb_dev", .swgroup
= TEGRA_SWGROUP_XUSB_DEV
, .reg
= 0x28c },
912 { .name
= "tsec", .swgroup
= TEGRA_SWGROUP_TSEC
, .reg
= 0x294 },
915 static const unsigned int tegra114_group_display
[] = {
920 static const struct tegra_smmu_group_soc tegra114_groups
[] = {
923 .swgroups
= tegra114_group_display
,
924 .num_swgroups
= ARRAY_SIZE(tegra114_group_display
),
928 static const struct tegra_smmu_soc tegra114_smmu_soc
= {
929 .clients
= tegra114_mc_clients
,
930 .num_clients
= ARRAY_SIZE(tegra114_mc_clients
),
931 .swgroups
= tegra114_swgroups
,
932 .num_swgroups
= ARRAY_SIZE(tegra114_swgroups
),
933 .groups
= tegra114_groups
,
934 .num_groups
= ARRAY_SIZE(tegra114_groups
),
935 .supports_round_robin_arbitration
= false,
936 .supports_request_limit
= false,
941 #define TEGRA114_MC_RESET(_name, _control, _status, _bit) \
944 .id = TEGRA114_MC_RESET_##_name, \
945 .control = _control, \
950 static const struct tegra_mc_reset tegra114_mc_resets
[] = {
951 TEGRA114_MC_RESET(AVPC
, 0x200, 0x204, 1),
952 TEGRA114_MC_RESET(DC
, 0x200, 0x204, 2),
953 TEGRA114_MC_RESET(DCB
, 0x200, 0x204, 3),
954 TEGRA114_MC_RESET(EPP
, 0x200, 0x204, 4),
955 TEGRA114_MC_RESET(2D
, 0x200, 0x204, 5),
956 TEGRA114_MC_RESET(HC
, 0x200, 0x204, 6),
957 TEGRA114_MC_RESET(HDA
, 0x200, 0x204, 7),
958 TEGRA114_MC_RESET(ISP
, 0x200, 0x204, 8),
959 TEGRA114_MC_RESET(MPCORE
, 0x200, 0x204, 9),
960 TEGRA114_MC_RESET(MPCORELP
, 0x200, 0x204, 10),
961 TEGRA114_MC_RESET(MPE
, 0x200, 0x204, 11),
962 TEGRA114_MC_RESET(3D
, 0x200, 0x204, 12),
963 TEGRA114_MC_RESET(3D2
, 0x200, 0x204, 13),
964 TEGRA114_MC_RESET(PPCS
, 0x200, 0x204, 14),
965 TEGRA114_MC_RESET(VDE
, 0x200, 0x204, 16),
966 TEGRA114_MC_RESET(VI
, 0x200, 0x204, 17),
969 const struct tegra_mc_soc tegra114_mc_soc
= {
970 .clients
= tegra114_mc_clients
,
971 .num_clients
= ARRAY_SIZE(tegra114_mc_clients
),
972 .num_address_bits
= 32,
974 .client_id_mask
= 0x7f,
975 .smmu
= &tegra114_smmu_soc
,
976 .intmask
= MC_INT_INVALID_SMMU_PAGE
| MC_INT_SECURITY_VIOLATION
|
978 .reset_ops
= &terga_mc_reset_ops_common
,
979 .resets
= tegra114_mc_resets
,
980 .num_resets
= ARRAY_SIZE(tegra114_mc_resets
),