blob: bd05eae2551defe2659f69d4a1331754c9c4038a [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
6#include <common.h>
7#include <asm/fsl_portals.h>
8#include <asm/fsl_liodn.h>
9
10#ifdef CONFIG_SYS_DPAA_QBMAN
Tom Rini6a5dccc2022-11-16 13:10:41 -050011struct qportal_info qp_info[CFG_SYS_QMAN_NUM_PORTALS] = {
Timur Tabid5e13882012-10-05 11:09:19 +000012 /* dqrr liodn, frame data liodn, liodn off, sdest */
13 SET_QP_INFO(1, 2, 1, 0),
14 SET_QP_INFO(3, 4, 2, 1),
15 SET_QP_INFO(5, 6, 3, 2),
16 SET_QP_INFO(7, 8, 4, 3),
17 SET_QP_INFO(9, 10, 5, 0),
18 SET_QP_INFO(11, 12, 6, 1),
19 SET_QP_INFO(13, 14, 7, 2),
20 SET_QP_INFO(15, 16, 8, 3),
21 SET_QP_INFO(17, 18, 9, 0), /* for now, set sdest to 0 */
22 SET_QP_INFO(19, 20, 10, 0), /* for now, set sdest to 0 */
23};
24#endif
25
26struct liodn_id_table liodn_tbl[] = {
27#ifdef CONFIG_SYS_DPAA_QBMAN
28 SET_QMAN_LIODN(31),
29 SET_BMAN_LIODN(32),
30#endif
31
32 SET_SDHC_LIODN(1, 64),
33
34 SET_USB_LIODN(1, "fsl-usb2-mph", 93),
35 SET_USB_LIODN(2, "fsl-usb2-dr", 94),
36
37 SET_SATA_LIODN(1, 95),
38 SET_SATA_LIODN(2, 96),
39
40 SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 195),
41 SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 196),
42 SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 197),
43
Tudor Laurentiu7210d9a2014-11-20 12:09:31 +020044 SET_DMA_LIODN(1, "fsl,eloplus-dma", 193),
45 SET_DMA_LIODN(2, "fsl,eloplus-dma", 194),
Timur Tabid5e13882012-10-05 11:09:19 +000046};
47int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
48
49#ifdef CONFIG_SYS_DPAA_FMAN
Igal Libermane14ec992015-08-18 14:47:05 +030050struct fman_liodn_id_table fman1_liodn_tbl[] = {
Tudor Laurentiuf2baab22014-12-09 11:00:19 +020051 SET_FMAN_RX_1G_LIODN(1, 0, 11),
52 SET_FMAN_RX_1G_LIODN(1, 1, 12),
53 SET_FMAN_RX_1G_LIODN(1, 2, 13),
54 SET_FMAN_RX_1G_LIODN(1, 3, 14),
55 SET_FMAN_RX_1G_LIODN(1, 4, 15),
56 SET_FMAN_RX_10G_LIODN(1, 0, 16),
Timur Tabid5e13882012-10-05 11:09:19 +000057};
58int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
59
Tom Rini0a2bac72022-11-16 13:10:29 -050060#if (CFG_SYS_NUM_FMAN == 2)
Igal Libermane14ec992015-08-18 14:47:05 +030061struct fman_liodn_id_table fman2_liodn_tbl[] = {
Tudor Laurentiuf2baab22014-12-09 11:00:19 +020062 SET_FMAN_RX_1G_LIODN(2, 0, 17),
63 SET_FMAN_RX_1G_LIODN(2, 1, 18),
64 SET_FMAN_RX_1G_LIODN(2, 2, 19),
65 SET_FMAN_RX_1G_LIODN(2, 3, 20),
66 SET_FMAN_RX_1G_LIODN(2, 4, 21),
67 SET_FMAN_RX_10G_LIODN(2, 0, 22),
Timur Tabid5e13882012-10-05 11:09:19 +000068};
69int fman2_liodn_tbl_sz = ARRAY_SIZE(fman2_liodn_tbl);
70#endif
71#endif
72
73struct liodn_id_table sec_liodn_tbl[] = {
74 SET_SEC_JR_LIODN_ENTRY(0, 129, 130),
75 SET_SEC_JR_LIODN_ENTRY(1, 131, 132),
76 SET_SEC_JR_LIODN_ENTRY(2, 133, 134),
77 SET_SEC_JR_LIODN_ENTRY(3, 135, 136),
78 SET_SEC_RTIC_LIODN_ENTRY(a, 89),
79 SET_SEC_RTIC_LIODN_ENTRY(b, 90),
80 SET_SEC_RTIC_LIODN_ENTRY(c, 91),
81 SET_SEC_RTIC_LIODN_ENTRY(d, 92),
82 SET_SEC_DECO_LIODN_ENTRY(0, 139, 140),
83 SET_SEC_DECO_LIODN_ENTRY(1, 141, 142),
84 SET_SEC_DECO_LIODN_ENTRY(2, 143, 144),
85 SET_SEC_DECO_LIODN_ENTRY(3, 145, 146),
86};
87int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
88
89#ifdef CONFIG_SYS_FSL_RAID_ENGINE
90struct liodn_id_table raide_liodn_tbl[] = {
91 SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 0, 60),
92 SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 1, 61),
93 SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 0, 62),
94 SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 1, 63),
95};
96int raide_liodn_tbl_sz = ARRAY_SIZE(raide_liodn_tbl);
97#endif
98
99struct liodn_id_table liodn_bases[] = {
100 [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(64, 101),
101#ifdef CONFIG_SYS_DPAA_FMAN
102 [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
103#endif
Tom Rini0a2bac72022-11-16 13:10:29 -0500104#if (CFG_SYS_NUM_FMAN == 2)
Timur Tabid5e13882012-10-05 11:09:19 +0000105 [FSL_HW_PORTAL_FMAN2] = SET_LIODN_BASE_1(160),
106#endif
107#ifdef CONFIG_SYS_FSL_RAID_ENGINE
108 [FSL_HW_PORTAL_RAID_ENGINE] = SET_LIODN_BASE_1(49),
109#endif
110};