linux/drivers/net/pcs/pcs-xpcs-nxp.c

// SPDX-License-Identifier: GPL-2.0
/* Copyright 2021 NXP
 */
#include <linux/pcs/pcs-xpcs.h>
#include "pcs-xpcs.h"

/* LANE_DRIVER1_0 register */
#define SJA1110_LANE_DRIVER1_0
#define SJA1110_TXDRV(x)

/* LANE_DRIVER2_0 register */
#define SJA1110_LANE_DRIVER2_0
#define SJA1110_TXDRVTRIM_LSB(x)

/* LANE_DRIVER2_1 register */
#define SJA1110_LANE_DRIVER2_1
#define SJA1110_LANE_DRIVER2_1_RSV
#define SJA1110_TXDRVTRIM_MSB(x)

/* LANE_TRIM register */
#define SJA1110_LANE_TRIM
#define SJA1110_TXTEN
#define SJA1110_TXRTRIM(x)
#define SJA1110_TXPLL_BWSEL
#define SJA1110_RXTEN
#define SJA1110_RXRTRIM(x)
#define SJA1110_CDR_GAIN
#define SJA1110_ACCOUPLE_RXVCM_EN

/* LANE_DATAPATH_1 register */
#define SJA1110_LANE_DATAPATH_1

/* POWERDOWN_ENABLE register */
#define SJA1110_POWERDOWN_ENABLE
#define SJA1110_TXPLL_PD
#define SJA1110_TXPD
#define SJA1110_RXPKDETEN
#define SJA1110_RXCH_PD
#define SJA1110_RXBIAS_PD
#define SJA1110_RESET_SER_EN
#define SJA1110_RESET_SER
#define SJA1110_RESET_DES
#define SJA1110_RCVEN

/* RXPLL_CTRL0 register */
#define SJA1110_RXPLL_CTRL0
#define SJA1110_RXPLL_FBDIV(x)

/* RXPLL_CTRL1 register */
#define SJA1110_RXPLL_CTRL1
#define SJA1110_RXPLL_REFDIV(x)

/* TXPLL_CTRL0 register */
#define SJA1110_TXPLL_CTRL0
#define SJA1110_TXPLL_FBDIV(x)

/* TXPLL_CTRL1 register */
#define SJA1110_TXPLL_CTRL1
#define SJA1110_TXPLL_REFDIV(x)

/* RX_DATA_DETECT register */
#define SJA1110_RX_DATA_DETECT

/* RX_CDR_CTLE register */
#define SJA1110_RX_CDR_CTLE

/* In NXP SJA1105, the PCS is integrated with a PMA that has the TX lane
 * polarity inverted by default (PLUS is MINUS, MINUS is PLUS). To obtain
 * normal non-inverted behavior, the TX lane polarity must be inverted in the
 * PCS, via the DIGITAL_CONTROL_2 register.
 */
int nxp_sja1105_sgmii_pma_config(struct dw_xpcs *xpcs)
{}

static int nxp_sja1110_pma_config(struct dw_xpcs *xpcs,
				  u16 txpll_fbdiv, u16 txpll_refdiv,
				  u16 rxpll_fbdiv, u16 rxpll_refdiv,
				  u16 rx_cdr_ctle)
{}

int nxp_sja1110_sgmii_pma_config(struct dw_xpcs *xpcs)
{}

int nxp_sja1110_2500basex_pma_config(struct dw_xpcs *xpcs)
{}