bengal-port-config.h 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859
  1. /* SPDX-License-Identifier: GPL-2.0-only */
  2. /*
  3. * Copyright (c) 2018-2020, 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_rouleur[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, 1, 0, 0xFF, 0xFF, 4, 1, 0xFF, 0},
  23. {7, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0},
  24. {0, 0, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0, 0},
  25. };
  26. static struct port_params rx_frame_params_dsd[SWR_MSTR_PORT_LEN] = {
  27. {3, 0, 0, 0xFF, 0xFF, 1, 0xFF, 0xFF, 1},
  28. {31, 0, 0, 3, 6, 7, 0, 0xFF, 0},
  29. {31, 11, 11, 0xFF, 0xFF, 4, 1, 0xFF, 0},
  30. {7, 9, 0, 0xFF, 0xFF, 0xFF, 0xFF, 1, 0},
  31. {3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 3, 0},
  32. };
  33. /* TX UC1: TX1: 1ch, TX2: 2chs, TX3: 1ch(MBHC) */
  34. static struct port_params tx_frame_params_default[SWR_MSTR_PORT_LEN] = {
  35. {3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}, /* TX1 */
  36. {3, 2, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}, /* TX2 */
  37. {3, 1, 0, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0}, /* TX3 */
  38. };
  39. static struct swr_mstr_port_map sm_port_map[] = {
  40. {VA_MACRO, SWR_UC0, tx_frame_params_default},
  41. {RX_MACRO, SWR_UC0, rx_frame_params_default},
  42. {RX_MACRO, SWR_UC1, rx_frame_params_dsd},
  43. };
  44. static struct swr_mstr_port_map sm_port_map_rouleur[] = {
  45. {VA_MACRO, SWR_UC0, tx_frame_params_default},
  46. {RX_MACRO, SWR_UC0, rx_frame_params_rouleur},
  47. {RX_MACRO, SWR_UC1, rx_frame_params_dsd},
  48. };
  49. #endif /* _BENGAL_PORT_CONFIG */