linux/drivers/gpu/drm/i915/display/bxt_dpio_phy_regs.h

/* SPDX-License-Identifier: MIT */
/*
 * Copyright © 2023 Intel Corporation
 */

#ifndef __BXT_DPIO_PHY_REGS_H__
#define __BXT_DPIO_PHY_REGS_H__

#include "intel_display_reg_defs.h"

/* BXT PHY registers */
#define _BXT_PHY0_BASE
#define _BXT_PHY1_BASE
#define _BXT_PHY2_BASE
#define BXT_PHY_BASE(phy)

#define _BXT_PHY(phy, reg)

#define _BXT_PHY_CH(phy, ch, reg_ch0, reg_ch1)
#define _MMIO_BXT_PHY_CH(phy, ch, reg_ch0, reg_ch1)
#define _BXT_LANE_OFFSET(lane)
#define _MMIO_BXT_PHY_CH_LN(phy, ch, lane, reg_ch0, reg_ch1)

/* BXT PHY PLL registers */
#define _PORT_PLL_A
#define _PORT_PLL_B
#define _PORT_PLL_C
#define PORT_PLL_ENABLE
#define PORT_PLL_LOCK
#define PORT_PLL_REF_SEL
#define PORT_PLL_POWER_ENABLE
#define PORT_PLL_POWER_STATE
#define BXT_PORT_PLL_ENABLE(port)

#define _PORT_PLL_EBB_0_A
#define _PORT_PLL_EBB_0_B
#define _PORT_PLL_EBB_0_C
#define PORT_PLL_P1_MASK
#define PORT_PLL_P1(p1)
#define PORT_PLL_P2_MASK
#define PORT_PLL_P2(p2)
#define BXT_PORT_PLL_EBB_0(phy, ch)

#define _PORT_PLL_EBB_4_A
#define _PORT_PLL_EBB_4_B
#define _PORT_PLL_EBB_4_C
#define PORT_PLL_RECALIBRATE
#define PORT_PLL_10BIT_CLK_ENABLE
#define BXT_PORT_PLL_EBB_4(phy, ch)

#define _PORT_PLL_0_A
#define _PORT_PLL_0_B
#define _PORT_PLL_0_C
/* PORT_PLL_0_A */
#define PORT_PLL_M2_INT_MASK
#define PORT_PLL_M2_INT(m2_int)
/* PORT_PLL_1_A */
#define PORT_PLL_N_MASK
#define PORT_PLL_N(n)
/* PORT_PLL_2_A */
#define PORT_PLL_M2_FRAC_MASK
#define PORT_PLL_M2_FRAC(m2_frac)
/* PORT_PLL_3_A */
#define PORT_PLL_M2_FRAC_ENABLE
/* PORT_PLL_6_A */
#define PORT_PLL_GAIN_CTL_MASK
#define PORT_PLL_GAIN_CTL(x)
#define PORT_PLL_INT_COEFF_MASK
#define PORT_PLL_INT_COEFF(x)
#define PORT_PLL_PROP_COEFF_MASK
#define PORT_PLL_PROP_COEFF(x)
/* PORT_PLL_8_A */
#define PORT_PLL_TARGET_CNT_MASK
#define PORT_PLL_TARGET_CNT(x)
/* PORT_PLL_9_A */
#define PORT_PLL_LOCK_THRESHOLD_MASK
#define PORT_PLL_LOCK_THRESHOLD(x)
/* PORT_PLL_10_A */
#define PORT_PLL_DCO_AMP_OVR_EN_H
#define PORT_PLL_DCO_AMP_MASK
#define PORT_PLL_DCO_AMP(x)
#define _PORT_PLL_BASE(phy, ch)
#define BXT_PORT_PLL(phy, ch, idx)

/* BXT PHY common lane registers */
#define _PORT_CL1CM_DW0_A
#define _PORT_CL1CM_DW0_BC
#define PHY_POWER_GOOD
#define PHY_RESERVED
#define BXT_PORT_CL1CM_DW0(phy)

#define _PORT_CL1CM_DW9_A
#define _PORT_CL1CM_DW9_BC
#define IREF0RC_OFFSET_MASK
#define IREF0RC_OFFSET(x)
#define BXT_PORT_CL1CM_DW9(phy)

#define _PORT_CL1CM_DW10_A
#define _PORT_CL1CM_DW10_BC
#define IREF1RC_OFFSET_MASK
#define IREF1RC_OFFSET(x)
#define BXT_PORT_CL1CM_DW10(phy)

#define _PORT_CL1CM_DW28_A
#define _PORT_CL1CM_DW28_BC
#define OCL1_POWER_DOWN_EN
#define DW28_OLDO_DYN_PWR_DOWN_EN
#define SUS_CLK_CONFIG
#define BXT_PORT_CL1CM_DW28(phy)

#define _PORT_CL1CM_DW30_A
#define _PORT_CL1CM_DW30_BC
#define OCL2_LDOFUSE_PWR_DIS
#define BXT_PORT_CL1CM_DW30(phy)

/* The spec defines this only for BXT PHY0, but lets assume that this
 * would exist for PHY1 too if it had a second channel.
 */
#define _PORT_CL2CM_DW6_A
#define _PORT_CL2CM_DW6_BC
#define BXT_PORT_CL2CM_DW6(phy)
#define DW6_OLDO_DYN_PWR_DOWN_EN

/* BXT PHY Ref registers */
#define _PORT_REF_DW3_A
#define _PORT_REF_DW3_BC
#define GRC_DONE
#define BXT_PORT_REF_DW3(phy)

#define _PORT_REF_DW6_A
#define _PORT_REF_DW6_BC
#define GRC_CODE_MASK
#define GRC_CODE(x)
#define GRC_CODE_FAST_MASK
#define GRC_CODE_FAST(x)
#define GRC_CODE_SLOW_MASK
#define GRC_CODE_SLOW(x)
#define GRC_CODE_NOM_MASK
#define GRC_CODE_NOM(x)
#define BXT_PORT_REF_DW6(phy)

#define _PORT_REF_DW8_A
#define _PORT_REF_DW8_BC
#define GRC_DIS
#define GRC_RDY_OVRD
#define BXT_PORT_REF_DW8(phy)

/* BXT PHY PCS registers */
#define _PORT_PCS_DW10_LN01_A
#define _PORT_PCS_DW10_LN01_B
#define _PORT_PCS_DW10_LN01_C
#define _PORT_PCS_DW10_GRP_A
#define _PORT_PCS_DW10_GRP_B
#define _PORT_PCS_DW10_GRP_C
#define BXT_PORT_PCS_DW10_LN01(phy, ch)
#define BXT_PORT_PCS_DW10_GRP(phy, ch)

#define TX2_SWING_CALC_INIT
#define TX1_SWING_CALC_INIT

#define _PORT_PCS_DW12_LN01_A
#define _PORT_PCS_DW12_LN01_B
#define _PORT_PCS_DW12_LN01_C
#define _PORT_PCS_DW12_LN23_A
#define _PORT_PCS_DW12_LN23_B
#define _PORT_PCS_DW12_LN23_C
#define _PORT_PCS_DW12_GRP_A
#define _PORT_PCS_DW12_GRP_B
#define _PORT_PCS_DW12_GRP_C
#define LANESTAGGER_STRAP_OVRD
#define LANE_STAGGER_MASK
#define BXT_PORT_PCS_DW12_LN01(phy, ch)
#define BXT_PORT_PCS_DW12_LN23(phy, ch)
#define BXT_PORT_PCS_DW12_GRP(phy, ch)

/* BXT PHY TX registers */
#define _PORT_TX_DW2_LN0_A
#define _PORT_TX_DW2_LN0_B
#define _PORT_TX_DW2_LN0_C
#define _PORT_TX_DW2_GRP_A
#define _PORT_TX_DW2_GRP_B
#define _PORT_TX_DW2_GRP_C
#define BXT_PORT_TX_DW2_LN(phy, ch, lane)
#define BXT_PORT_TX_DW2_GRP(phy, ch)
#define MARGIN_000_MASK
#define MARGIN_000(x)
#define UNIQ_TRANS_SCALE_MASK
#define UNIQ_TRANS_SCALE(x)

#define _PORT_TX_DW3_LN0_A
#define _PORT_TX_DW3_LN0_B
#define _PORT_TX_DW3_LN0_C
#define _PORT_TX_DW3_GRP_A
#define _PORT_TX_DW3_GRP_B
#define _PORT_TX_DW3_GRP_C
#define BXT_PORT_TX_DW3_LN(phy, ch, lane)
#define BXT_PORT_TX_DW3_GRP(phy, ch)
#define SCALE_DCOMP_METHOD
#define UNIQUE_TRANGE_EN_METHOD

#define _PORT_TX_DW4_LN0_A
#define _PORT_TX_DW4_LN0_B
#define _PORT_TX_DW4_LN0_C
#define _PORT_TX_DW4_GRP_A
#define _PORT_TX_DW4_GRP_B
#define _PORT_TX_DW4_GRP_C
#define BXT_PORT_TX_DW4_LN(phy, ch, lane)
#define BXT_PORT_TX_DW4_GRP(phy, ch)
#define DE_EMPHASIS_MASK
#define DE_EMPHASIS(x)

#define _PORT_TX_DW5_LN0_A
#define _PORT_TX_DW5_LN0_B
#define _PORT_TX_DW5_LN0_C
#define _PORT_TX_DW5_GRP_A
#define _PORT_TX_DW5_GRP_B
#define _PORT_TX_DW5_GRP_C
#define BXT_PORT_TX_DW5_LN(phy, ch, lane)
#define BXT_PORT_TX_DW5_GRP(phy, ch)
#define DCC_DELAY_RANGE_1
#define DCC_DELAY_RANGE_2

#define _PORT_TX_DW14_LN0_A
#define _PORT_TX_DW14_LN0_B
#define _PORT_TX_DW14_LN0_C
#define LATENCY_OPTIM
#define BXT_PORT_TX_DW14_LN(phy, ch, lane)

#endif /* __BXT_DPIO_PHY_REGS_H__ */