blob: 0a34e066e94028503af8c1e0b92a1bb6468ca24b [file] [log] [blame]
Tom Rini10e47792018-05-06 17:58:06 -04001// SPDX-License-Identifier: GPL-2.0+
Timur Tabid5e13882012-10-05 11:09:19 +00002/*
3 * Copyright 2010-2011 Freescale Semiconductor, Inc.
Timur Tabid5e13882012-10-05 11:09:19 +00004 */
5
Tom Rinib01c75d2024-04-27 08:10:57 -06006#include <config.h>
Tom Rinidee15a92024-04-30 20:40:48 -06007#include <linux/kernel.h>
Timur Tabid5e13882012-10-05 11:09:19 +00008#include <asm/fsl_portals.h>
9#include <asm/fsl_liodn.h>
10
11#ifdef CONFIG_SYS_DPAA_QBMAN
Tom Rini6a5dccc2022-11-16 13:10:41 -050012struct qportal_info qp_info[CFG_SYS_QMAN_NUM_PORTALS] = {
Timur Tabid5e13882012-10-05 11:09:19 +000013 /* dqrr liodn, frame data liodn, liodn off, sdest */
14 SET_QP_INFO(1, 2, 1, 0),
15 SET_QP_INFO(3, 4, 2, 1),
16 SET_QP_INFO(5, 6, 3, 2),
17 SET_QP_INFO(7, 8, 4, 3),
18 SET_QP_INFO(9, 10, 5, 0),
19 SET_QP_INFO(11, 12, 6, 1),
20 SET_QP_INFO(13, 14, 7, 2),
21 SET_QP_INFO(15, 16, 8, 3),
22 SET_QP_INFO(17, 18, 9, 0), /* for now, set sdest to 0 */
23 SET_QP_INFO(19, 20, 10, 0), /* for now, set sdest to 0 */
24};
25#endif
26
27struct liodn_id_table liodn_tbl[] = {
28#ifdef CONFIG_SYS_DPAA_QBMAN
29 SET_QMAN_LIODN(31),
30 SET_BMAN_LIODN(32),
31#endif
32
33 SET_SDHC_LIODN(1, 64),
34
35 SET_USB_LIODN(1, "fsl-usb2-mph", 93),
36 SET_USB_LIODN(2, "fsl-usb2-dr", 94),
37
38 SET_SATA_LIODN(1, 95),
39 SET_SATA_LIODN(2, 96),
40
41 SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 195),
42 SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 196),
43 SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 197),
44
Tudor Laurentiu7210d9a2014-11-20 12:09:31 +020045 SET_DMA_LIODN(1, "fsl,eloplus-dma", 193),
46 SET_DMA_LIODN(2, "fsl,eloplus-dma", 194),
Timur Tabid5e13882012-10-05 11:09:19 +000047};
48int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
49
50#ifdef CONFIG_SYS_DPAA_FMAN
Igal Libermane14ec992015-08-18 14:47:05 +030051struct fman_liodn_id_table fman1_liodn_tbl[] = {
Tudor Laurentiuf2baab22014-12-09 11:00:19 +020052 SET_FMAN_RX_1G_LIODN(1, 0, 11),
53 SET_FMAN_RX_1G_LIODN(1, 1, 12),
54 SET_FMAN_RX_1G_LIODN(1, 2, 13),
55 SET_FMAN_RX_1G_LIODN(1, 3, 14),
56 SET_FMAN_RX_1G_LIODN(1, 4, 15),
57 SET_FMAN_RX_10G_LIODN(1, 0, 16),
Timur Tabid5e13882012-10-05 11:09:19 +000058};
59int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
60
Tom Rini0a2bac72022-11-16 13:10:29 -050061#if (CFG_SYS_NUM_FMAN == 2)
Igal Libermane14ec992015-08-18 14:47:05 +030062struct fman_liodn_id_table fman2_liodn_tbl[] = {
Tudor Laurentiuf2baab22014-12-09 11:00:19 +020063 SET_FMAN_RX_1G_LIODN(2, 0, 17),
64 SET_FMAN_RX_1G_LIODN(2, 1, 18),
65 SET_FMAN_RX_1G_LIODN(2, 2, 19),
66 SET_FMAN_RX_1G_LIODN(2, 3, 20),
67 SET_FMAN_RX_1G_LIODN(2, 4, 21),
68 SET_FMAN_RX_10G_LIODN(2, 0, 22),
Timur Tabid5e13882012-10-05 11:09:19 +000069};
70int fman2_liodn_tbl_sz = ARRAY_SIZE(fman2_liodn_tbl);
71#endif
72#endif
73
74struct liodn_id_table sec_liodn_tbl[] = {
75 SET_SEC_JR_LIODN_ENTRY(0, 129, 130),
76 SET_SEC_JR_LIODN_ENTRY(1, 131, 132),
77 SET_SEC_JR_LIODN_ENTRY(2, 133, 134),
78 SET_SEC_JR_LIODN_ENTRY(3, 135, 136),
79 SET_SEC_RTIC_LIODN_ENTRY(a, 89),
80 SET_SEC_RTIC_LIODN_ENTRY(b, 90),
81 SET_SEC_RTIC_LIODN_ENTRY(c, 91),
82 SET_SEC_RTIC_LIODN_ENTRY(d, 92),
83 SET_SEC_DECO_LIODN_ENTRY(0, 139, 140),
84 SET_SEC_DECO_LIODN_ENTRY(1, 141, 142),
85 SET_SEC_DECO_LIODN_ENTRY(2, 143, 144),
86 SET_SEC_DECO_LIODN_ENTRY(3, 145, 146),
87};
88int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
89
90#ifdef CONFIG_SYS_FSL_RAID_ENGINE
91struct liodn_id_table raide_liodn_tbl[] = {
92 SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 0, 60),
93 SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 1, 61),
94 SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 0, 62),
95 SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 1, 63),
96};
97int raide_liodn_tbl_sz = ARRAY_SIZE(raide_liodn_tbl);
98#endif
99
100struct liodn_id_table liodn_bases[] = {
101 [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(64, 101),
102#ifdef CONFIG_SYS_DPAA_FMAN
103 [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
104#endif
Tom Rini0a2bac72022-11-16 13:10:29 -0500105#if (CFG_SYS_NUM_FMAN == 2)
Timur Tabid5e13882012-10-05 11:09:19 +0000106 [FSL_HW_PORTAL_FMAN2] = SET_LIODN_BASE_1(160),
107#endif
108#ifdef CONFIG_SYS_FSL_RAID_ENGINE
109 [FSL_HW_PORTAL_RAID_ENGINE] = SET_LIODN_BASE_1(49),
110#endif
111};