1*83d290c5STom Rini // SPDX-License-Identifier: GPL-2.0+ 2d2404141SYork Sun /* 3d2404141SYork Sun * Copyright 2012 Freescale Semiconductor, Inc. 4d2404141SYork Sun */ 5d2404141SYork Sun 6d2404141SYork Sun #include <common.h> 7d2404141SYork Sun #include <asm/fsl_portals.h> 8d2404141SYork Sun #include <asm/fsl_liodn.h> 9d2404141SYork Sun 10d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_QBMAN 11d2404141SYork Sun struct qportal_info qp_info[CONFIG_SYS_QMAN_NUM_PORTALS] = { 12d2404141SYork Sun /* dqrr liodn, frame data liodn, liodn off, sdest */ 13d2404141SYork Sun SET_QP_INFO(1, 27, 1, 0), 14d2404141SYork Sun SET_QP_INFO(2, 28, 1, 0), 15d2404141SYork Sun SET_QP_INFO(3, 29, 1, 1), 16d2404141SYork Sun SET_QP_INFO(4, 30, 1, 1), 17d2404141SYork Sun SET_QP_INFO(5, 31, 1, 2), 18d2404141SYork Sun SET_QP_INFO(6, 32, 1, 2), 19d2404141SYork Sun SET_QP_INFO(7, 33, 1, 3), 20d2404141SYork Sun SET_QP_INFO(8, 34, 1, 3), 21d2404141SYork Sun SET_QP_INFO(9, 35, 1, 0), 22d2404141SYork Sun SET_QP_INFO(10, 36, 1, 0), 23d2404141SYork Sun SET_QP_INFO(11, 37, 1, 1), 24d2404141SYork Sun SET_QP_INFO(12, 38, 1, 1), 25d2404141SYork Sun SET_QP_INFO(13, 39, 1, 2), 26d2404141SYork Sun SET_QP_INFO(14, 40, 1, 2), 27d2404141SYork Sun SET_QP_INFO(15, 41, 1, 3), 28d2404141SYork Sun SET_QP_INFO(16, 42, 1, 3), 29d2404141SYork Sun SET_QP_INFO(17, 43, 1, 0), 30d2404141SYork Sun SET_QP_INFO(18, 44, 1, 0), 31d2404141SYork Sun SET_QP_INFO(19, 45, 1, 1), 32d2404141SYork Sun SET_QP_INFO(20, 46, 1, 1), 33d2404141SYork Sun SET_QP_INFO(21, 47, 1, 2), 34d2404141SYork Sun SET_QP_INFO(22, 48, 1, 2), 35d2404141SYork Sun SET_QP_INFO(23, 49, 1, 3), 36d2404141SYork Sun SET_QP_INFO(24, 50, 1, 3), 37d2404141SYork Sun SET_QP_INFO(25, 51, 1, 0), 38d2404141SYork Sun }; 39d2404141SYork Sun #endif 40d2404141SYork Sun 41e1dbdd81SPoonam Aggrwal #ifdef CONFIG_SYS_SRIO 42d2404141SYork Sun struct srio_liodn_id_table srio_liodn_tbl[] = { 4332f38ee3SLiu Gang SET_SRIO_LIODN_BASE(1, 307), 4432f38ee3SLiu Gang SET_SRIO_LIODN_BASE(2, 387), 45d2404141SYork Sun }; 46d2404141SYork Sun int srio_liodn_tbl_sz = ARRAY_SIZE(srio_liodn_tbl); 47e1dbdd81SPoonam Aggrwal #endif 48d2404141SYork Sun 49d2404141SYork Sun struct liodn_id_table liodn_tbl[] = { 50d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_QBMAN 51d2404141SYork Sun SET_QMAN_LIODN(62), 52d2404141SYork Sun SET_BMAN_LIODN(63), 53d2404141SYork Sun #endif 54d2404141SYork Sun 55d2404141SYork Sun SET_SDHC_LIODN(1, 552), 56d2404141SYork Sun 57a53dd530Sramneek mehresh SET_USB_LIODN(1, "fsl-usb2-dr", 553), 58d2404141SYork Sun 59d1ccaf76STudor Laurentiu SET_PCI_LIODN_BASE(CONFIG_SYS_FSL_PCIE_COMPAT, 1, 148), 60d2404141SYork Sun 618d3eaa97STudor Laurentiu SET_DMA_LIODN(1, "fsl,elo3-dma", 147), 628d3eaa97STudor Laurentiu SET_DMA_LIODN(2, "fsl,elo3-dma", 227), 63d2404141SYork Sun 64b41f192bSYork Sun #ifndef CONFIG_ARCH_B4420 65d2404141SYork Sun SET_GUTS_LIODN("fsl,rapidio-delta", 199, rio1liodnr, 0), 66d2404141SYork Sun SET_GUTS_LIODN(NULL, 200, rio2liodnr, 0), 67d2404141SYork Sun SET_GUTS_LIODN(NULL, 201, rio1maintliodnr, 0), 68d2404141SYork Sun SET_GUTS_LIODN(NULL, 202, rio2maintliodnr, 0), 69e1dbdd81SPoonam Aggrwal #endif 70d2404141SYork Sun 71d2404141SYork Sun /* SET_NEXUS_LIODN(557), -- not yet implemented */ 72d2404141SYork Sun }; 73d2404141SYork Sun int liodn_tbl_sz = ARRAY_SIZE(liodn_tbl); 74d2404141SYork Sun 75d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_FMAN 7697a8d010SIgal Liberman struct fman_liodn_id_table fman1_liodn_tbl[] = { 77d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 0, 88), 78d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 1, 89), 79d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 2, 90), 80d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 3, 91), 81d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 4, 92), 82d2404141SYork Sun SET_FMAN_RX_1G_LIODN(1, 5, 93), 83b41f192bSYork Sun #ifndef CONFIG_ARCH_B4420 84d2404141SYork Sun SET_FMAN_RX_10G_LIODN(1, 0, 94), 85d2404141SYork Sun SET_FMAN_RX_10G_LIODN(1, 1, 95), 86e1dbdd81SPoonam Aggrwal #endif 87d2404141SYork Sun }; 88d2404141SYork Sun int fman1_liodn_tbl_sz = ARRAY_SIZE(fman1_liodn_tbl); 89d2404141SYork Sun #endif 90d2404141SYork Sun 91d2404141SYork Sun struct liodn_id_table sec_liodn_tbl[] = { 92d2404141SYork Sun SET_SEC_JR_LIODN_ENTRY(0, 454, 458), 93d2404141SYork Sun SET_SEC_JR_LIODN_ENTRY(1, 455, 459), 94d2404141SYork Sun SET_SEC_JR_LIODN_ENTRY(2, 456, 460), 95d2404141SYork Sun SET_SEC_JR_LIODN_ENTRY(3, 457, 461), 96d2404141SYork Sun SET_SEC_RTIC_LIODN_ENTRY(a, 453), 97d2404141SYork Sun SET_SEC_RTIC_LIODN_ENTRY(b, 549), 98d2404141SYork Sun SET_SEC_RTIC_LIODN_ENTRY(c, 550), 99d2404141SYork Sun SET_SEC_RTIC_LIODN_ENTRY(d, 551), 100d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(0, 541, 610), 101d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(1, 542, 611), 102d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(2, 543, 612), 103d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(3, 544, 613), 104d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(4, 545, 614), 105d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(5, 546, 615), 106d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(6, 547, 616), 107d2404141SYork Sun SET_SEC_DECO_LIODN_ENTRY(7, 548, 617), 108d2404141SYork Sun }; 109d2404141SYork Sun int sec_liodn_tbl_sz = ARRAY_SIZE(sec_liodn_tbl); 110d2404141SYork Sun 111d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_RMAN 112d2404141SYork Sun struct liodn_id_table rman_liodn_tbl[] = { 113d2404141SYork Sun /* Set RMan block 0-3 liodn offset */ 1140795eff3SMinghuan Lian SET_RMAN_LIODN(0, 6), 1150795eff3SMinghuan Lian SET_RMAN_LIODN(1, 7), 1160795eff3SMinghuan Lian SET_RMAN_LIODN(2, 8), 1170795eff3SMinghuan Lian SET_RMAN_LIODN(3, 9), 118d2404141SYork Sun }; 119d2404141SYork Sun int rman_liodn_tbl_sz = ARRAY_SIZE(rman_liodn_tbl); 120d2404141SYork Sun #endif 121d2404141SYork Sun 122d2404141SYork Sun struct liodn_id_table liodn_bases[] = { 123d2404141SYork Sun [FSL_HW_PORTAL_SEC] = SET_LIODN_BASE_2(462, 558), 124d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_FMAN 125d2404141SYork Sun [FSL_HW_PORTAL_FMAN1] = SET_LIODN_BASE_1(973), 126d2404141SYork Sun #endif 127d2404141SYork Sun #ifdef CONFIG_SYS_DPAA_RMAN 128d2404141SYork Sun [FSL_HW_PORTAL_RMAN] = SET_LIODN_BASE_1(922), 129d2404141SYork Sun #endif 130d2404141SYork Sun }; 131