linux/include/ufs/unipro.h

/* SPDX-License-Identifier: GPL-2.0-or-later */
/*
 * Copyright (C) 2013 Samsung Electronics Co., Ltd.
 */

#ifndef _UNIPRO_H_
#define _UNIPRO_H_

/*
 * M-TX Configuration Attributes
 */
#define TX_HIBERN8TIME_CAPABILITY
#define TX_MODE
#define TX_HSRATE_SERIES
#define TX_HSGEAR
#define TX_PWMGEAR
#define TX_AMPLITUDE
#define TX_HS_SLEWRATE
#define TX_SYNC_SOURCE
#define TX_HS_SYNC_LENGTH
#define TX_HS_PREPARE_LENGTH
#define TX_LS_PREPARE_LENGTH
#define TX_HIBERN8_CONTROL
#define TX_LCC_ENABLE
#define TX_PWM_BURST_CLOSURE_EXTENSION
#define TX_BYPASS_8B10B_ENABLE
#define TX_DRIVER_POLARITY
#define TX_HS_UNTERMINATED_LINE_DRIVE_ENABLE
#define TX_LS_TERMINATED_LINE_DRIVE_ENABLE
#define TX_LCC_SEQUENCER
#define TX_MIN_ACTIVATETIME
#define TX_PWM_G6_G7_SYNC_LENGTH
#define TX_REFCLKFREQ
#define TX_CFGCLKFREQVAL
#define CFGEXTRATTR
#define DITHERCTRL2

/*
 * M-RX Configuration Attributes
 */
#define RX_HS_G1_SYNC_LENGTH_CAP
#define RX_HS_G1_PREP_LENGTH_CAP
#define RX_MIN_ACTIVATETIME_CAPABILITY
#define RX_HIBERN8TIME_CAPABILITY
#define RX_HS_G2_SYNC_LENGTH_CAP
#define RX_HS_G3_SYNC_LENGTH_CAP
#define RX_HS_G2_PREP_LENGTH_CAP
#define RX_HS_G3_PREP_LENGTH_CAP
#define RX_ADV_GRANULARITY_CAP
#define RX_HIBERN8TIME_CAP
#define RX_ADV_HIBERN8TIME_CAP
#define RX_ADV_MIN_ACTIVATETIME_CAP
#define RX_MODE
#define RX_HSRATE_SERIES
#define RX_HSGEAR
#define RX_PWMGEAR
#define RX_LS_TERMINATED_ENABLE
#define RX_HS_UNTERMINATED_ENABLE
#define RX_ENTER_HIBERN8
#define RX_BYPASS_8B10B_ENABLE
#define RX_TERMINATION_FORCE_ENABLE
#define RXCALCTRL
#define RXSQCTRL
#define CFGRXCDR8
#define CFGRXOVR8
#define CFGRXOVR6
#define RXDIRECTCTRL2
#define CFGRXOVR4
#define RX_REFCLKFREQ
#define RX_CFGCLKFREQVAL
#define CFGWIDEINLN
#define ENARXDIRECTCFG4
#define ENARXDIRECTCFG3
#define ENARXDIRECTCFG2


#define is_mphy_tx_attr(attr)
#define RX_ADV_FINE_GRAN_STEP(x)
#define SYNC_LEN_FINE(x)
#define SYNC_LEN_COARSE(x)
#define PREP_LEN(x)

#define RX_MIN_ACTIVATETIME_UNIT_US
#define HIBERN8TIME_UNIT_US

/*
 * Common Block Attributes
 */
#define TX_GLOBALHIBERNATE
#define REFCLKMODE
#define DIRECTCTRL19
#define DIRECTCTRL10
#define CDIRECTCTRL6
#define RTOBSERVESELECT
#define CBDIVFACTOR
#define CBDCOCTRL5
#define CBPRGPLL2
#define CBPRGTUNING

#define UNIPRO_CB_OFFSET(x)

/*
 * PHY Adapter attributes
 */
#define PA_PHY_TYPE
#define PA_AVAILTXDATALANES
#define PA_MAXTXSPEEDFAST
#define PA_MAXTXSPEEDSLOW
#define PA_MAXRXSPEEDFAST
#define PA_MAXRXSPEEDSLOW
#define PA_TXLINKSTARTUPHS
#define PA_AVAILRXDATALANES
#define PA_MINRXTRAILINGCLOCKS
#define PA_LOCAL_TX_LCC_ENABLE
#define PA_ACTIVETXDATALANES
#define PA_CONNECTEDTXDATALANES
#define PA_TXFORCECLOCK
#define PA_TXPWRMODE
#define PA_TXTRAILINGCLOCKS
#define PA_TXSPEEDFAST
#define PA_TXSPEEDSLOW
#define PA_TXPWRSTATUS
#define PA_TXGEAR
#define PA_TXTERMINATION
#define PA_HSSERIES
#define PA_LEGACYDPHYESCDL
#define PA_PWRMODE
#define PA_ACTIVERXDATALANES
#define PA_CONNECTEDRXDATALANES
#define PA_RXPWRSTATUS
#define PA_RXGEAR
#define PA_RXTERMINATION
#define PA_MAXRXPWMGEAR
#define PA_MAXRXHSGEAR
#define PA_PACPREQTIMEOUT
#define PA_PACPREQEOBTIMEOUT
#define PA_REMOTEVERINFO
#define PA_LOGICALLANEMAP
#define PA_SLEEPNOCONFIGTIME
#define PA_STALLNOCONFIGTIME
#define PA_SAVECONFIGTIME
#define PA_RXHSUNTERMCAP
#define PA_RXLSTERMCAP
#define PA_HIBERN8TIME
#define PA_LOCALVERINFO
#define PA_GRANULARITY
#define PA_TACTIVATE
#define PA_PWRMODEUSERDATA0
#define PA_PWRMODEUSERDATA1
#define PA_PWRMODEUSERDATA2
#define PA_PWRMODEUSERDATA3
#define PA_PWRMODEUSERDATA4
#define PA_PWRMODEUSERDATA5
#define PA_PWRMODEUSERDATA6
#define PA_PWRMODEUSERDATA7
#define PA_PWRMODEUSERDATA8
#define PA_PWRMODEUSERDATA9
#define PA_PWRMODEUSERDATA10
#define PA_PWRMODEUSERDATA11
#define PA_PACPFRAMECOUNT
#define PA_PACPERRORCOUNT
#define PA_PHYTESTCONTROL
#define PA_TXHSADAPTTYPE

/* Adpat type for PA_TXHSADAPTTYPE attribute */
#define PA_REFRESH_ADAPT
#define PA_INITIAL_ADAPT
#define PA_NO_ADAPT

#define PA_TACTIVATE_TIME_UNIT_US
#define PA_HIBERN8_TIME_UNIT_US

/*Other attributes*/
#define VS_POWERSTATE
#define VS_MPHYCFGUPDT
#define VS_DEBUGOMC

#define PA_GRANULARITY_MIN_VAL
#define PA_GRANULARITY_MAX_VAL

/* PHY Adapter Protocol Constants */
#define PA_MAXDATALANES

#define DL_FC0ProtectionTimeOutVal_Default
#define DL_TC0ReplayTimeOutVal_Default
#define DL_AFC0ReqTimeOutVal_Default
#define DL_FC1ProtectionTimeOutVal_Default
#define DL_TC1ReplayTimeOutVal_Default
#define DL_AFC1ReqTimeOutVal_Default

#define DME_LocalFC0ProtectionTimeOutVal
#define DME_LocalTC0ReplayTimeOutVal
#define DME_LocalAFC0ReqTimeOutVal

/* PA power modes */
enum ufs_pa_pwr_mode {};

#define PWRMODE_MASK
#define PWRMODE_RX_OFFSET

/* PA TX/RX Frequency Series */
enum ufs_hs_gear_rate {};

enum ufs_pwm_gear_tag {};

enum ufs_hs_gear_tag {};

enum ufs_lanes {};

enum ufs_unipro_ver {};

/*
 * Data Link Layer Attributes
 */
#define DL_TXPREEMPTIONCAP
#define DL_TC0TXMAXSDUSIZE
#define DL_TC0RXINITCREDITVAL
#define DL_TC1TXMAXSDUSIZE
#define DL_TC1RXINITCREDITVAL
#define DL_TC0TXBUFFERSIZE
#define DL_TC1TXBUFFERSIZE
#define DL_TC0TXFCTHRESHOLD
#define DL_FC0PROTTIMEOUTVAL
#define DL_TC0REPLAYTIMEOUTVAL
#define DL_AFC0REQTIMEOUTVAL
#define DL_AFC0CREDITTHRESHOLD
#define DL_TC0OUTACKTHRESHOLD
#define DL_PEERTC0PRESENT
#define DL_PEERTC0RXINITCREVAL
#define DL_TC1TXFCTHRESHOLD
#define DL_FC1PROTTIMEOUTVAL
#define DL_TC1REPLAYTIMEOUTVAL
#define DL_AFC1REQTIMEOUTVAL
#define DL_AFC1CREDITTHRESHOLD
#define DL_TC1OUTACKTHRESHOLD
#define DL_PEERTC1PRESENT
#define DL_PEERTC1RXINITCREVAL

/*
 * Network Layer Attributes
 */
#define N_DEVICEID
#define N_DEVICEID_VALID
#define N_TC0TXMAXSDUSIZE
#define N_TC1TXMAXSDUSIZE

/*
 * Transport Layer Attributes
 */
#define T_NUMCPORTS
#define T_NUMTESTFEATURES
#define T_CONNECTIONSTATE
#define T_PEERDEVICEID
#define T_PEERCPORTID
#define T_TRAFFICCLASS
#define T_PROTOCOLID
#define T_CPORTFLAGS
#define T_TXTOKENVALUE
#define T_RXTOKENVALUE
#define T_LOCALBUFFERSPACE
#define T_PEERBUFFERSPACE
#define T_CREDITSTOSEND
#define T_CPORTMODE
#define T_TC0TXMAXSDUSIZE
#define T_TC1TXMAXSDUSIZE

/* CPort setting */
#define E2EFC_ON
#define E2EFC_OFF
#define CSD_N_ON
#define CSD_N_OFF
#define CSV_N_ON
#define CSV_N_OFF
#define CPORT_DEF_FLAGS

/* CPort connection state */
enum {};

#endif /* _UNIPRO_H_ */