blob: 37d4f740aac65b15155781be7a1ff81dde809582 [file] [log] [blame]
Laxminath Kasamae52c992019-08-26 15:01:15 +05301/* SPDX-License-Identifier: GPL-2.0-only */
2/*
Aditya Bavanari21d663f2020-04-18 11:21:43 +05303 * Copyright (c) 2018-2020, The Linux Foundation. All rights reserved.
Laxminath Kasamae52c992019-08-26 15:01:15 +05304 */
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
16static 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 Bavanari21d663f2020-04-18 11:21:43 +053024static 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 Kasamae52c992019-08-26 15:01:15 +053033static 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) */
42static struct port_params tx_frame_params_default[SWR_MSTR_PORT_LEN] = {
Laxminath Kasam4696fff2019-11-26 16:07:11 +053043 {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 Kasamae52c992019-08-26 15:01:15 +053046};
47
48static struct swr_mstr_port_map sm_port_map[] = {
Laxminath Kasam2e13d642019-10-12 01:36:30 +053049 {VA_MACRO, SWR_UC0, tx_frame_params_default},
Laxminath Kasamae52c992019-08-26 15:01:15 +053050 {RX_MACRO, SWR_UC0, rx_frame_params_default},
51 {RX_MACRO, SWR_UC1, rx_frame_params_dsd},
52};
53
Aditya Bavanari21d663f2020-04-18 11:21:43 +053054static 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 Kasamae52c992019-08-26 15:01:15 +053059#endif /* _BENGAL_PORT_CONFIG */