xref: /openbmc/u-boot/arch/powerpc/cpu/mpc85xx/p5040_ids.c (revision 83d290c56fab2d38cd1ab4c4cc7099559c1d5046)
1*83d290c5STom Rini // SPDX-License-Identifier: GPL-2.0+
24905443fSTimur Tabi /*
34905443fSTimur Tabi  * Copyright 2010-2011 Freescale Semiconductor, Inc.
44905443fSTimur Tabi  */
54905443fSTimur Tabi 
64905443fSTimur Tabi #include <common.h>
74905443fSTimur Tabi #include <asm/fsl_portals.h>
84905443fSTimur Tabi #include <asm/fsl_liodn.h>
94905443fSTimur Tabi 
104905443fSTimur Tabi #ifdef CONFIG_SYS_DPAA_QBMAN
114905443fSTimur Tabi struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = {
124905443fSTimur Tabi 	/* dqrr liodn, frame data liodn, liodn off, sdest */
134905443fSTimur Tabi 	SET_QP_INFO(1, 2, 1, 0),
144905443fSTimur Tabi 	SET_QP_INFO(3, 4, 2, 1),
154905443fSTimur Tabi 	SET_QP_INFO(5, 6, 3, 2),
164905443fSTimur Tabi 	SET_QP_INFO(7, 8, 4, 3),
174905443fSTimur Tabi 	SET_QP_INFO(9, 10, 5, 0),
184905443fSTimur Tabi 	SET_QP_INFO(11, 12, 6, 1),
194905443fSTimur Tabi 	SET_QP_INFO(13, 14, 7, 2),
204905443fSTimur Tabi 	SET_QP_INFO(15, 16, 8, 3),
214905443fSTimur Tabi 	SET_QP_INFO(17, 18, 9, 0),	/* for now, set sdest to 0 */
224905443fSTimur Tabi 	SET_QP_INFO(19, 20, 10, 0),	/* for now, set sdest to 0 */
234905443fSTimur Tabi };
244905443fSTimur Tabi #endif
254905443fSTimur Tabi 
264905443fSTimur Tabi struct liodn_id_table liodn_tbl[] = {
274905443fSTimur Tabi #ifdef CONFIG_SYS_DPAA_QBMAN
284905443fSTimur Tabi 	SET_QMAN_LIODN(31),
294905443fSTimur Tabi 	SET_BMAN_LIODN(32),
304905443fSTimur Tabi #endif
314905443fSTimur Tabi 
324905443fSTimur Tabi 	SET_SDHC_LIODN(1, 64),
334905443fSTimur Tabi 
344905443fSTimur Tabi 	SET_USB_LIODN(1, "fsl-usb2-mph", 93),
354905443fSTimur Tabi 	SET_USB_LIODN(2, "fsl-usb2-dr", 94),
364905443fSTimur Tabi 
374905443fSTimur Tabi 	SET_SATA_LIODN(1, 95),
384905443fSTimur Tabi 	SET_SATA_LIODN(2, 96),
394905443fSTimur Tabi 
404905443fSTimur Tabi 	SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 195),
414905443fSTimur Tabi 	SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 2, 196),
424905443fSTimur Tabi 	SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 3, 197),
434905443fSTimur Tabi 
448d3eaa97STudor Laurentiu 	SET_DMA_LIODN(1, "fsl,eloplus-dma", 193),
458d3eaa97STudor Laurentiu 	SET_DMA_LIODN(2, "fsl,eloplus-dma", 194),
464905443fSTimur Tabi };
474905443fSTimur Tabi int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl);
484905443fSTimur Tabi 
494905443fSTimur Tabi #ifdef CONFIG_SYS_DPAA_FMAN
5097a8d010SIgal Liberman struct fman_liodn_id_table fman1_liodn_tbl[] = {
51d4be1753STudor Laurentiu 	SET_FMAN_RX_1G_LIODN(1, 0, 11),
52d4be1753STudor Laurentiu 	SET_FMAN_RX_1G_LIODN(1, 1, 12),
53d4be1753STudor Laurentiu 	SET_FMAN_RX_1G_LIODN(1, 2, 13),
54d4be1753STudor Laurentiu 	SET_FMAN_RX_1G_LIODN(1, 3, 14),
55d4be1753STudor Laurentiu 	SET_FMAN_RX_1G_LIODN(1, 4, 15),
56d4be1753STudor Laurentiu 	SET_FMAN_RX_10G_LIODN(1, 0, 16),
574905443fSTimur Tabi };
584905443fSTimur Tabi int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl);
594905443fSTimur Tabi 
604905443fSTimur Tabi #if (CONFIG_SYS_NUM_FMAN == 2)
6197a8d010SIgal Liberman struct fman_liodn_id_table fman2_liodn_tbl[] = {
62d4be1753STudor Laurentiu 	SET_FMAN_RX_1G_LIODN(2, 0, 17),
63d4be1753STudor Laurentiu 	SET_FMAN_RX_1G_LIODN(2, 1, 18),
64d4be1753STudor Laurentiu 	SET_FMAN_RX_1G_LIODN(2, 2, 19),
65d4be1753STudor Laurentiu 	SET_FMAN_RX_1G_LIODN(2, 3, 20),
66d4be1753STudor Laurentiu 	SET_FMAN_RX_1G_LIODN(2, 4, 21),
67d4be1753STudor Laurentiu 	SET_FMAN_RX_10G_LIODN(2, 0, 22),
684905443fSTimur Tabi };
694905443fSTimur Tabi int fman2_liodn_tbl_sz = ARRAY_SIZE(fman2_liodn_tbl);
704905443fSTimur Tabi #endif
714905443fSTimur Tabi #endif
724905443fSTimur Tabi 
734905443fSTimur Tabi struct liodn_id_table sec_liodn_tbl[] = {
744905443fSTimur Tabi 	SET_SEC_JR_LIODN_ENTRY(0, 129, 130),
754905443fSTimur Tabi 	SET_SEC_JR_LIODN_ENTRY(1, 131, 132),
764905443fSTimur Tabi 	SET_SEC_JR_LIODN_ENTRY(2, 133, 134),
774905443fSTimur Tabi 	SET_SEC_JR_LIODN_ENTRY(3, 135, 136),
784905443fSTimur Tabi 	SET_SEC_RTIC_LIODN_ENTRY(a, 89),
794905443fSTimur Tabi 	SET_SEC_RTIC_LIODN_ENTRY(b, 90),
804905443fSTimur Tabi 	SET_SEC_RTIC_LIODN_ENTRY(c, 91),
814905443fSTimur Tabi 	SET_SEC_RTIC_LIODN_ENTRY(d, 92),
824905443fSTimur Tabi 	SET_SEC_DECO_LIODN_ENTRY(0, 139, 140),
834905443fSTimur Tabi 	SET_SEC_DECO_LIODN_ENTRY(1, 141, 142),
844905443fSTimur Tabi 	SET_SEC_DECO_LIODN_ENTRY(2, 143, 144),
854905443fSTimur Tabi 	SET_SEC_DECO_LIODN_ENTRY(3, 145, 146),
864905443fSTimur Tabi };
874905443fSTimur Tabi int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl);
884905443fSTimur Tabi 
894905443fSTimur Tabi #ifdef CONFIG_SYS_FSL_RAID_ENGINE
904905443fSTimur Tabi struct liodn_id_table raide_liodn_tbl[] = {
914905443fSTimur Tabi 	SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 0, 60),
924905443fSTimur Tabi 	SET_RAID_ENGINE_JQ_LIODN_ENTRY(0, 1, 61),
934905443fSTimur Tabi 	SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 0, 62),
944905443fSTimur Tabi 	SET_RAID_ENGINE_JQ_LIODN_ENTRY(1, 1, 63),
954905443fSTimur Tabi };
964905443fSTimur Tabi int raide_liodn_tbl_sz = ARRAY_SIZE(raide_liodn_tbl);
974905443fSTimur Tabi #endif
984905443fSTimur Tabi 
994905443fSTimur Tabi struct liodn_id_table liodn_bases[] = {
1004905443fSTimur Tabi 	[FSL_HW_PORTAL_SEC]  = SET_LIODN_BASE_2(64, 101),
1014905443fSTimur Tabi #ifdef CONFIG_SYS_DPAA_FMAN
1024905443fSTimur Tabi 	[FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(32),
1034905443fSTimur Tabi #endif
1044905443fSTimur Tabi #if (CONFIG_SYS_NUM_FMAN == 2)
1054905443fSTimur Tabi 	[FSL_HW_PORTAL_FMAN2] = SET_LIODN_BASE_1(160),
1064905443fSTimur Tabi #endif
1074905443fSTimur Tabi #ifdef CONFIG_SYS_FSL_RAID_ENGINE
1084905443fSTimur Tabi 	[FSL_HW_PORTAL_RAID_ENGINE]  = SET_LIODN_BASE_1(49),
1094905443fSTimur Tabi #endif
1104905443fSTimur Tabi };
111