Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

soc/tegra: cbb: Add support for CBB fabrics in Tegra254

Add support for CBB 2.0 based fabrics in Tegra254 SoC using ACPI.
Fabrics reporting errors are: C2C, GPU and Display_Cluster. Tegra254
uses a hardware based lookup to get target node address, so the
target_map tables for each fabric are no longer needed.

Signed-off-by: Sumit Gupta <sumitg@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>

authored by

Sumit Gupta and committed by
Thierry Reding
84daa158 fa4854a9

+58
+58
drivers/soc/tegra/cbb/tegra234-cbb.c
··· 117 117 T264_RSVD7_FABRIC_ID, 118 118 }; 119 119 120 + enum t254_cbb_fabric_ids { 121 + T254_DCE_FABRIC_ID = 19, 122 + T254_DISP_CLUSTER_FABRIC_ID = 25, 123 + T254_C2C_FABRIC_ID = 26, 124 + T254_GPU_FABRIC_ID = 27, 125 + T254_DISP_CLUSTER_1_FABRIC_ID = 28, 126 + T254_MAX_FABRIC_ID, 127 + }; 128 + 120 129 struct tegra234_target_lookup { 121 130 const char *name; 122 131 unsigned int offset; ··· 1427 1418 .firewall_wr_ctl = 0x5c8, 1428 1419 }; 1429 1420 1421 + static const struct tegra234_fabric_lookup t254_cbb_fab_list[] = { 1422 + [T254_C2C_FABRIC_ID] = { "c2c-fabric", true }, 1423 + [T254_DISP_CLUSTER_FABRIC_ID] = { "display-cluster-fabric", true }, 1424 + [T254_GPU_FABRIC_ID] = { "gpu-fabric", true }, 1425 + }; 1426 + 1427 + static const struct tegra234_cbb_fabric t254_c2c_fabric = { 1428 + .fab_id = T254_C2C_FABRIC_ID, 1429 + .fab_list = t254_cbb_fab_list, 1430 + .errors = tegra241_cbb_errors, 1431 + .max_errors = ARRAY_SIZE(tegra241_cbb_errors), 1432 + .err_intr_enbl = 0xf, 1433 + .err_status_clr = 0x1ff007f, 1434 + .notifier_offset = 0x50000, 1435 + .off_mask_erd = 0x14004, 1436 + .firewall_base = 0x40000, 1437 + .firewall_ctl = 0x9b0, 1438 + .firewall_wr_ctl = 0x9a8, 1439 + }; 1440 + 1441 + static const struct tegra234_cbb_fabric t254_disp_fabric = { 1442 + .fab_id = T254_DISP_CLUSTER_FABRIC_ID, 1443 + .fab_list = t254_cbb_fab_list, 1444 + .errors = tegra241_cbb_errors, 1445 + .max_errors = ARRAY_SIZE(tegra241_cbb_errors), 1446 + .err_intr_enbl = 0x1, 1447 + .err_status_clr = 0x1ff007f, 1448 + .notifier_offset = 0x50000, 1449 + .firewall_base = 0x30000, 1450 + .firewall_ctl = 0x810, 1451 + .firewall_wr_ctl = 0x808, 1452 + }; 1453 + 1454 + static const struct tegra234_cbb_fabric t254_gpu_fabric = { 1455 + .fab_id = T254_GPU_FABRIC_ID, 1456 + .fab_list = t254_cbb_fab_list, 1457 + .errors = tegra241_cbb_errors, 1458 + .max_errors = ARRAY_SIZE(tegra241_cbb_errors), 1459 + .err_intr_enbl = 0x1f, 1460 + .err_status_clr = 0x1ff007f, 1461 + .notifier_offset = 0x50000, 1462 + .firewall_base = 0x30000, 1463 + .firewall_ctl = 0x930, 1464 + .firewall_wr_ctl = 0x928, 1465 + }; 1466 + 1430 1467 static const struct of_device_id tegra234_cbb_dt_ids[] = { 1431 1468 { .compatible = "nvidia,tegra234-cbb-fabric", .data = &tegra234_cbb_fabric }, 1432 1469 { .compatible = "nvidia,tegra234-aon-fabric", .data = &tegra234_aon_fabric }, ··· 1497 1442 static const struct tegra234_cbb_acpi_uid tegra234_cbb_acpi_uids[] = { 1498 1443 { "NVDA1070", "1", &tegra241_cbb_fabric }, 1499 1444 { "NVDA1070", "2", &tegra241_bpmp_fabric }, 1445 + { "NVDA1070", "3", &t254_c2c_fabric }, 1446 + { "NVDA1070", "4", &t254_disp_fabric }, 1447 + { "NVDA1070", "5", &t254_gpu_fabric }, 1500 1448 { }, 1501 1449 }; 1502 1450