mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-22 04:24:19 +00:00

This patch forces rx training on 10G ports as part of comphy_smc call from Linux. Signed-off-by: Alex Evraev <alexev@marvell.com> Change-Id: Iebe6ea7c8b21cbdce5c466c8a69b92e9d7c8a8ca Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/boot/atf/+/30763 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Stefan Chulski <stefanc@marvell.com> Reviewed-by: Nadav Haklai <nadavh@marvell.com>
102 lines
2.2 KiB
C
102 lines
2.2 KiB
C
/*
|
|
* Copyright (C) 2018 Marvell International Ltd.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
* https://spdx.org/licenses
|
|
*/
|
|
|
|
/* Those are parameters for xfi mode, which need to be tune for each board type.
|
|
* For known DB boards the parameters was already calibrated and placed under
|
|
* the plat/marvell/armada/a8k/<board_type>/board/phy-porting-layer.h
|
|
*/
|
|
struct xfi_params {
|
|
uint8_t g1_ffe_res_sel;
|
|
uint8_t g1_ffe_cap_sel;
|
|
uint8_t align90;
|
|
uint8_t g1_dfe_res;
|
|
uint8_t g1_amp;
|
|
uint8_t g1_emph;
|
|
uint8_t g1_emph_en;
|
|
uint8_t g1_tx_amp_adj;
|
|
uint8_t g1_tx_emph_en;
|
|
uint8_t g1_tx_emph;
|
|
uint8_t g1_rx_selmuff;
|
|
uint8_t g1_rx_selmufi;
|
|
uint8_t g1_rx_selmupf;
|
|
uint8_t g1_rx_selmupi;
|
|
_Bool valid;
|
|
};
|
|
|
|
struct sata_params {
|
|
uint8_t g1_amp;
|
|
uint8_t g2_amp;
|
|
uint8_t g3_amp;
|
|
|
|
uint8_t g1_emph;
|
|
uint8_t g2_emph;
|
|
uint8_t g3_emph;
|
|
|
|
uint8_t g1_emph_en;
|
|
uint8_t g2_emph_en;
|
|
uint8_t g3_emph_en;
|
|
|
|
uint8_t g1_tx_amp_adj;
|
|
uint8_t g2_tx_amp_adj;
|
|
uint8_t g3_tx_amp_adj;
|
|
|
|
uint8_t g1_tx_emph_en;
|
|
uint8_t g2_tx_emph_en;
|
|
uint8_t g3_tx_emph_en;
|
|
|
|
uint8_t g1_tx_emph;
|
|
uint8_t g2_tx_emph;
|
|
uint8_t g3_tx_emph;
|
|
|
|
uint8_t g3_dfe_res;
|
|
|
|
uint8_t g3_ffe_res_sel;
|
|
|
|
uint8_t g3_ffe_cap_sel;
|
|
|
|
uint8_t align90;
|
|
|
|
uint8_t g1_rx_selmuff;
|
|
uint8_t g2_rx_selmuff;
|
|
uint8_t g3_rx_selmuff;
|
|
|
|
uint8_t g1_rx_selmufi;
|
|
uint8_t g2_rx_selmufi;
|
|
uint8_t g3_rx_selmufi;
|
|
|
|
uint8_t g1_rx_selmupf;
|
|
uint8_t g2_rx_selmupf;
|
|
uint8_t g3_rx_selmupf;
|
|
|
|
uint8_t g1_rx_selmupi;
|
|
uint8_t g2_rx_selmupi;
|
|
uint8_t g3_rx_selmupi;
|
|
|
|
uint8_t polarity_invert;
|
|
|
|
_Bool valid;
|
|
};
|
|
|
|
struct usb_params {
|
|
uint8_t polarity_invert;
|
|
};
|
|
|
|
int mvebu_cp110_comphy_is_pll_locked(uint64_t comphy_base,
|
|
uint8_t comphy_index);
|
|
int mvebu_cp110_comphy_power_off(uint64_t comphy_base,
|
|
uint8_t comphy_index, uint64_t comphy_mode);
|
|
int mvebu_cp110_comphy_power_on(uint64_t comphy_base, uint8_t comphy_index,
|
|
uint64_t comphy_mode,
|
|
uint64_t comphy_train_base);
|
|
int mvebu_cp110_comphy_xfi_rx_training(uint64_t comphy_base,
|
|
uint8_t comphy_index);
|
|
int mvebu_cp110_comphy_digital_reset(uint64_t comphy_base, uint8_t comphy_index,
|
|
uint32_t comphy_mode, uint32_t command);
|
|
|
|
#define COMPHY_POLARITY_NO_INVERT 0
|
|
#define COMPHY_POLARITY_TXD_INVERT 1
|
|
#define COMPHY_POLARITY_RXD_INVERT 2
|