Laxminath Kasam | ae52c99 | 2019-08-26 15:01:15 +0530 | [diff] [blame] | 1 | /* SPDX-License-Identifier: GPL-2.0-only */ |
| 2 | /* |
Aditya Bavanari | 21d663f | 2020-04-18 11:21:43 +0530 | [diff] [blame] | 3 | * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved. |
Laxminath Kasam | ae52c99 | 2019-08-26 15:01:15 +0530 | [diff] [blame] | 4 | */ |
| 5 | |
| 6 | #ifndef _BENGAL_PORT_CONFIG |
| 7 | #define _BENGAL_PORT_CONFIG |
| 8 | |
| 9 | #include <soc/swr-common.h> |
| 10 | |
| 11 | /* |
| 12 | * Add port configuration in the format |
| 13 | *{ si, off1, off2, hstart, hstop, wd_len, bp_mode, bgp_ctrl, lane_ctrl} |
| 14 | */ |
| 15 | |
| 16 | static struct port_params rx_frame_params_default[SWR_MSTR_PORT_LEN] = { |
| 17 | {3, 0, 0, 0xFF, 0xFF, 1, 0xFF, 0xFF, 1}, |
| 18 | {31, 0, 0, 3, 6, 7, 0, 0xFF, 0}, |
| 19 | {31, 11, 11, 0xFF, 0xFF, 4, 1, 0xFF, 0}, |
| 20 | {7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}, |
| 21 | {0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0}, |
| 22 | }; |
| 23 | |
Aditya Bavanari | 21d663f | 2020-04-18 11:21:43 +0530 | [diff] [blame] | 24 | static struct port_params rx_frame_params_rouleur[SWR_MSTR_PORT_LEN] = { |
| 25 | {3, 0, 0, 0xFF, 0xFF, 1, 0xFF, 0xFF, 1}, |
| 26 | {31, 0, 0, 3, 6, 7, 0, 0xFF, 0}, |
| 27 | {31, 1, 0, 0xFF, 0xFF, 4, 1, 0xFF, 0}, |
| 28 | {7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}, |
| 29 | {0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0}, |
| 30 | }; |
| 31 | |
| 32 | |
Laxminath Kasam | ae52c99 | 2019-08-26 15:01:15 +0530 | [diff] [blame] | 33 | static struct port_params rx_frame_params_dsd[SWR_MSTR_PORT_LEN] = { |
| 34 | {3, 0, 0, 0xFF, 0xFF, 1, 0xFF, 0xFF, 1}, |
| 35 | {31, 0, 0, 3, 6, 7, 0, 0xFF, 0}, |
| 36 | {31, 11, 11, 0xFF, 0xFF, 4, 1, 0xFF, 0}, |
| 37 | {7, 9, 0, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0}, |
| 38 | {3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 3, 0}, |
| 39 | }; |
| 40 | |
| 41 | /* TX UC1: TX1: 1ch, TX2: 2chs, TX3: 1ch(MBHC) */ |
| 42 | static struct port_params tx_frame_params_default[SWR_MSTR_PORT_LEN] = { |
Laxminath Kasam | 4696fff | 2019-11-26 16:07:11 +0530 | [diff] [blame] | 43 | {3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}, /* TX1 */ |
| 44 | {3, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}, /* TX2 */ |
| 45 | {3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}, /* TX3 */ |
Laxminath Kasam | ae52c99 | 2019-08-26 15:01:15 +0530 | [diff] [blame] | 46 | }; |
| 47 | |
| 48 | static struct swr_mstr_port_map sm_port_map[] = { |
Laxminath Kasam | 2e13d64 | 2019-10-12 01:36:30 +0530 | [diff] [blame] | 49 | {VA_MACRO, SWR_UC0, tx_frame_params_default}, |
Laxminath Kasam | ae52c99 | 2019-08-26 15:01:15 +0530 | [diff] [blame] | 50 | {RX_MACRO, SWR_UC0, rx_frame_params_default}, |
| 51 | {RX_MACRO, SWR_UC1, rx_frame_params_dsd}, |
| 52 | }; |
| 53 | |
Aditya Bavanari | 21d663f | 2020-04-18 11:21:43 +0530 | [diff] [blame] | 54 | static struct swr_mstr_port_map sm_port_map_rouleur[] = { |
| 55 | {VA_MACRO, SWR_UC0, tx_frame_params_default}, |
| 56 | {RX_MACRO, SWR_UC0, rx_frame_params_rouleur}, |
| 57 | {RX_MACRO, SWR_UC1, rx_frame_params_dsd}, |
| 58 | }; |
Laxminath Kasam | ae52c99 | 2019-08-26 15:01:15 +0530 | [diff] [blame] | 59 | #endif /* _BENGAL_PORT_CONFIG */ |