bengal-port-config.h 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2018-2019, The Linux Foundation. All rights reserved.
  4. */
  5. #ifndef _BENGAL_PORT_CONFIG
  6. #define _BENGAL_PORT_CONFIG
  7. #include <soc/swr-common.h>
  8. /*
  9. * Add port configuration in the format
  10. *{ si, off1, off2, hstart, hstop, wd_len, bp_mode, bgp_ctrl, lane_ctrl}
  11. */
  12. static struct port_params rx_frame_params_default[SWR_MSTR_PORT_LEN] = {
  13. {3, 0, 0, 0xFF, 0xFF, 1, 0xFF, 0xFF, 1},
  14. {31, 0, 0, 3, 6, 7, 0, 0xFF, 0},
  15. {31, 11, 11, 0xFF, 0xFF, 4, 1, 0xFF, 0},
  16. {7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0},
  17. {0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0},
  18. };
  19. static struct port_params rx_frame_params_dsd[SWR_MSTR_PORT_LEN] = {
  20. {3, 0, 0, 0xFF, 0xFF, 1, 0xFF, 0xFF, 1},
  21. {31, 0, 0, 3, 6, 7, 0, 0xFF, 0},
  22. {31, 11, 11, 0xFF, 0xFF, 4, 1, 0xFF, 0},
  23. {7, 9, 0, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0},
  24. {3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 3, 0},
  25. };
  26. /* TX UC1: TX1: 1ch, TX2: 2chs, TX3: 1ch(MBHC) */
  27. static struct port_params tx_frame_params_default[SWR_MSTR_PORT_LEN] = {
  28. {1, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}, /* TX1 */
  29. {1, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 1}, /* TX2 */
  30. {3, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}, /* TX3 */
  31. };
  32. static struct swr_mstr_port_map sm_port_map[] = {
  33. {VA_MACRO, SWR_UC0, tx_frame_params_default},
  34. {RX_MACRO, SWR_UC0, rx_frame_params_default},
  35. {RX_MACRO, SWR_UC1, rx_frame_params_dsd},
  36. };
  37. #endif /* _BENGAL_PORT_CONFIG */