1*3fc36ee0SWojciech Macek /******************************************************************************* 2*3fc36ee0SWojciech Macek Copyright (C) 2013 Annapurna Labs Ltd. 3*3fc36ee0SWojciech Macek 4*3fc36ee0SWojciech Macek This file may be licensed under the terms of the Annapurna Labs Commercial 5*3fc36ee0SWojciech Macek License Agreement. 6*3fc36ee0SWojciech Macek 7*3fc36ee0SWojciech Macek Alternatively, this file can be distributed under the terms of the GNU General 8*3fc36ee0SWojciech Macek Public License V2 or V3 as published by the Free Software Foundation and can be 9*3fc36ee0SWojciech Macek found at http://www.gnu.org/licenses/gpl-2.0.html 10*3fc36ee0SWojciech Macek 11*3fc36ee0SWojciech Macek Alternatively, redistribution and use in source and binary forms, with or 12*3fc36ee0SWojciech Macek without modification, are permitted provided that the following conditions are 13*3fc36ee0SWojciech Macek met: 14*3fc36ee0SWojciech Macek 15*3fc36ee0SWojciech Macek * Redistributions of source code must retain the above copyright notice, 16*3fc36ee0SWojciech Macek this list of conditions and the following disclaimer. 17*3fc36ee0SWojciech Macek 18*3fc36ee0SWojciech Macek * Redistributions in binary form must reproduce the above copyright 19*3fc36ee0SWojciech Macek notice, this list of conditions and the following disclaimer in 20*3fc36ee0SWojciech Macek the documentation and/or other materials provided with the 21*3fc36ee0SWojciech Macek distribution. 22*3fc36ee0SWojciech Macek 23*3fc36ee0SWojciech Macek THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 24*3fc36ee0SWojciech Macek ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 25*3fc36ee0SWojciech Macek WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 26*3fc36ee0SWojciech Macek DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR 27*3fc36ee0SWojciech Macek ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 28*3fc36ee0SWojciech Macek (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; 29*3fc36ee0SWojciech Macek LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON 30*3fc36ee0SWojciech Macek ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 31*3fc36ee0SWojciech Macek (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS 32*3fc36ee0SWojciech Macek SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 33*3fc36ee0SWojciech Macek 34*3fc36ee0SWojciech Macek *******************************************************************************/ 35*3fc36ee0SWojciech Macek 36*3fc36ee0SWojciech Macek /** 37*3fc36ee0SWojciech Macek * @{ 38*3fc36ee0SWojciech Macek * @file al_hal_serdes_c_regs.h 39*3fc36ee0SWojciech Macek * 40*3fc36ee0SWojciech Macek * @brief ... registers 41*3fc36ee0SWojciech Macek * 42*3fc36ee0SWojciech Macek */ 43*3fc36ee0SWojciech Macek 44*3fc36ee0SWojciech Macek #ifndef __AL_HAL_serdes_c_REGS_H__ 45*3fc36ee0SWojciech Macek #define __AL_HAL_serdes_c_REGS_H__ 46*3fc36ee0SWojciech Macek 47*3fc36ee0SWojciech Macek #include "al_hal_plat_types.h" 48*3fc36ee0SWojciech Macek 49*3fc36ee0SWojciech Macek #ifdef __cplusplus 50*3fc36ee0SWojciech Macek extern "C" { 51*3fc36ee0SWojciech Macek #endif 52*3fc36ee0SWojciech Macek /* 53*3fc36ee0SWojciech Macek * Unit Registers 54*3fc36ee0SWojciech Macek */ 55*3fc36ee0SWojciech Macek 56*3fc36ee0SWojciech Macek struct al_serdes_c_gen { 57*3fc36ee0SWojciech Macek /* [0x0] SERDES registers Version */ 58*3fc36ee0SWojciech Macek uint32_t version; 59*3fc36ee0SWojciech Macek uint32_t rsrvd_0[3]; 60*3fc36ee0SWojciech Macek /* [0x10] SERDES register file address */ 61*3fc36ee0SWojciech Macek uint32_t reg_addr; 62*3fc36ee0SWojciech Macek /* [0x14] SERDES register file data */ 63*3fc36ee0SWojciech Macek uint32_t reg_data; 64*3fc36ee0SWojciech Macek /* [0x18] SERDES control */ 65*3fc36ee0SWojciech Macek uint32_t ctrl; 66*3fc36ee0SWojciech Macek /* [0x1c] SERDES cpu mem address */ 67*3fc36ee0SWojciech Macek uint32_t cpu_prog_addr; 68*3fc36ee0SWojciech Macek /* [0x20] SERDES cpu mem data */ 69*3fc36ee0SWojciech Macek uint32_t cpu_prog_data; 70*3fc36ee0SWojciech Macek /* [0x24] SERDES data mem address */ 71*3fc36ee0SWojciech Macek uint32_t cpu_data_mem_addr; 72*3fc36ee0SWojciech Macek /* [0x28] SERDES data mem data */ 73*3fc36ee0SWojciech Macek uint32_t cpu_data_mem_data; 74*3fc36ee0SWojciech Macek /* [0x2c] SERDES control */ 75*3fc36ee0SWojciech Macek uint32_t rst; 76*3fc36ee0SWojciech Macek /* [0x30] SERDES control */ 77*3fc36ee0SWojciech Macek uint32_t status; 78*3fc36ee0SWojciech Macek uint32_t rsrvd[51]; 79*3fc36ee0SWojciech Macek }; 80*3fc36ee0SWojciech Macek struct al_serdes_c_lane { 81*3fc36ee0SWojciech Macek uint32_t rsrvd_0[4]; 82*3fc36ee0SWojciech Macek /* [0x10] Data configuration */ 83*3fc36ee0SWojciech Macek uint32_t cfg; 84*3fc36ee0SWojciech Macek /* [0x14] Lane status */ 85*3fc36ee0SWojciech Macek uint32_t stat; 86*3fc36ee0SWojciech Macek /* [0x18] SERDES control */ 87*3fc36ee0SWojciech Macek uint32_t reserved; 88*3fc36ee0SWojciech Macek uint32_t rsrvd[25]; 89*3fc36ee0SWojciech Macek }; 90*3fc36ee0SWojciech Macek 91*3fc36ee0SWojciech Macek struct al_serdes_c_regs { 92*3fc36ee0SWojciech Macek uint32_t rsrvd_0[64]; 93*3fc36ee0SWojciech Macek struct al_serdes_c_gen gen; /* [0x100] */ 94*3fc36ee0SWojciech Macek struct al_serdes_c_lane lane[2]; /* [0x200] */ 95*3fc36ee0SWojciech Macek }; 96*3fc36ee0SWojciech Macek 97*3fc36ee0SWojciech Macek 98*3fc36ee0SWojciech Macek /* 99*3fc36ee0SWojciech Macek * Registers Fields 100*3fc36ee0SWojciech Macek */ 101*3fc36ee0SWojciech Macek 102*3fc36ee0SWojciech Macek 103*3fc36ee0SWojciech Macek /**** version register ****/ 104*3fc36ee0SWojciech Macek /* Revision number (Minor) */ 105*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_RELEASE_NUM_MINOR_MASK 0x000000FF 106*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_RELEASE_NUM_MINOR_SHIFT 0 107*3fc36ee0SWojciech Macek /* Revision number (Major) */ 108*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_RELEASE_NUM_MAJOR_MASK 0x0000FF00 109*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_RELEASE_NUM_MAJOR_SHIFT 8 110*3fc36ee0SWojciech Macek /* date of release */ 111*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_DATE_DAY_MASK 0x001F0000 112*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_DATE_DAY_SHIFT 16 113*3fc36ee0SWojciech Macek /* month of release */ 114*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_DATA_MONTH_MASK 0x01E00000 115*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_DATA_MONTH_SHIFT 21 116*3fc36ee0SWojciech Macek /* year of release (starting from 2000) */ 117*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_DATE_YEAR_MASK 0x3E000000 118*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_DATE_YEAR_SHIFT 25 119*3fc36ee0SWojciech Macek /* Reserved */ 120*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_RESERVED_MASK 0xC0000000 121*3fc36ee0SWojciech Macek #define SERDES_C_GEN_VERSION_RESERVED_SHIFT 30 122*3fc36ee0SWojciech Macek 123*3fc36ee0SWojciech Macek /**** reg_addr register ****/ 124*3fc36ee0SWojciech Macek /* address value */ 125*3fc36ee0SWojciech Macek #define SERDES_C_GEN_REG_ADDR_VAL_MASK 0x00007FFF 126*3fc36ee0SWojciech Macek #define SERDES_C_GEN_REG_ADDR_VAL_SHIFT 0 127*3fc36ee0SWojciech Macek 128*3fc36ee0SWojciech Macek /**** reg_data register ****/ 129*3fc36ee0SWojciech Macek /* data value */ 130*3fc36ee0SWojciech Macek #define SERDES_C_GEN_REG_DATA_VAL_MASK 0x000000FF 131*3fc36ee0SWojciech Macek #define SERDES_C_GEN_REG_DATA_VAL_SHIFT 0 132*3fc36ee0SWojciech Macek /* Bit-wise write enable */ 133*3fc36ee0SWojciech Macek #define SERDES_C_GEN_REG_DATA_STRB_MASK 0x0000FF00 134*3fc36ee0SWojciech Macek #define SERDES_C_GEN_REG_DATA_STRB_SHIFT 8 135*3fc36ee0SWojciech Macek 136*3fc36ee0SWojciech Macek /**** ctrl register ****/ 137*3fc36ee0SWojciech Macek /* 138*3fc36ee0SWojciech Macek * 0x0 – Select reference clock from Bump 139*3fc36ee0SWojciech Macek * 0x1 – Select inter-macro reference clock from the left side 140*3fc36ee0SWojciech Macek * 0x2 – Same as 0x0 141*3fc36ee0SWojciech Macek * 0x3 – Select inter-macro reference clock from the right side 142*3fc36ee0SWojciech Macek */ 143*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_INPUT_SEL_MASK 0x00000003 144*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_INPUT_SEL_SHIFT 0 145*3fc36ee0SWojciech Macek 146*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_INPUT_SEL_REF \ 147*3fc36ee0SWojciech Macek (0 << (SERDES_C_GEN_CTRL_REFCLK_INPUT_SEL_SHIFT)) 148*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_INPUT_SEL_L2R \ 149*3fc36ee0SWojciech Macek (1 << (SERDES_C_GEN_CTRL_REFCLK_INPUT_SEL_SHIFT)) 150*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_INPUT_SEL_R2L \ 151*3fc36ee0SWojciech Macek (3 << (SERDES_C_GEN_CTRL_REFCLK_INPUT_SEL_SHIFT)) 152*3fc36ee0SWojciech Macek 153*3fc36ee0SWojciech Macek /* 154*3fc36ee0SWojciech Macek * 0x0 – Tied to 0 to save power 155*3fc36ee0SWojciech Macek * 0x1 – Select reference clock from Bump 156*3fc36ee0SWojciech Macek * 0x2 – Select inter-macro reference clock input from right side 157*3fc36ee0SWojciech Macek * 0x3 – Same as 0x2 158*3fc36ee0SWojciech Macek */ 159*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_LEFT_SEL_MASK 0x00000030 160*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_LEFT_SEL_SHIFT 4 161*3fc36ee0SWojciech Macek 162*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_LEFT_SEL_0 \ 163*3fc36ee0SWojciech Macek (0 << (SERDES_C_GEN_CTRL_REFCLK_LEFT_SEL_SHIFT)) 164*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_LEFT_SEL_REF \ 165*3fc36ee0SWojciech Macek (1 << (SERDES_C_GEN_CTRL_REFCLK_LEFT_SEL_SHIFT)) 166*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_LEFT_SEL_R2L \ 167*3fc36ee0SWojciech Macek (2 << (SERDES_C_GEN_CTRL_REFCLK_LEFT_SEL_SHIFT)) 168*3fc36ee0SWojciech Macek 169*3fc36ee0SWojciech Macek /* 170*3fc36ee0SWojciech Macek * 0x0 – Tied to 0 to save power 171*3fc36ee0SWojciech Macek * 0x1 – Select reference clock from Bump 172*3fc36ee0SWojciech Macek * 0x2 – Select inter-macro reference clock input from left side 173*3fc36ee0SWojciech Macek * 0x3 – Same as 0x2 174*3fc36ee0SWojciech Macek */ 175*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_RIGHT_SEL_MASK 0x000000C0 176*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_RIGHT_SEL_SHIFT 6 177*3fc36ee0SWojciech Macek 178*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_RIGHT_SEL_0 \ 179*3fc36ee0SWojciech Macek (0 << (SERDES_C_GEN_CTRL_REFCLK_RIGHT_SEL_SHIFT)) 180*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_RIGHT_SEL_REF \ 181*3fc36ee0SWojciech Macek (1 << (SERDES_C_GEN_CTRL_REFCLK_RIGHT_SEL_SHIFT)) 182*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_REFCLK_RIGHT_SEL_L2R \ 183*3fc36ee0SWojciech Macek (2 << (SERDES_C_GEN_CTRL_REFCLK_RIGHT_SEL_SHIFT)) 184*3fc36ee0SWojciech Macek 185*3fc36ee0SWojciech Macek /* 186*3fc36ee0SWojciech Macek * Program memory acknowledge - Only when the access 187*3fc36ee0SWojciech Macek * to the program memory is not 188*3fc36ee0SWojciech Macek * ready for the microcontroller, it 189*3fc36ee0SWojciech Macek * is driven to 0 190*3fc36ee0SWojciech Macek */ 191*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_CPU_MEMPSACK (1 << 8) 192*3fc36ee0SWojciech Macek /* 193*3fc36ee0SWojciech Macek * Data memory acknowledge - Only when the access 194*3fc36ee0SWojciech Macek * to the program memory is not 195*3fc36ee0SWojciech Macek * ready for the microcontroller, it 196*3fc36ee0SWojciech Macek * is driven to 0 197*3fc36ee0SWojciech Macek */ 198*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_CPU_MEMACK (1 << 12) 199*3fc36ee0SWojciech Macek /* 200*3fc36ee0SWojciech Macek * 0 - keep cpu clk as sb clk 201*3fc36ee0SWojciech Macek * 1 – cpu_clk is sb_clk divided by 2 202*3fc36ee0SWojciech Macek */ 203*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_CPU_CLK_DIV (1 << 16) 204*3fc36ee0SWojciech Macek /* 205*3fc36ee0SWojciech Macek * 0x0 – OIF CEI-28G-SR 206*3fc36ee0SWojciech Macek * 0x1 – OIF CIE-25G-LR 207*3fc36ee0SWojciech Macek * 0x8 – XFI 208*3fc36ee0SWojciech Macek * Others – Reserved 209*3fc36ee0SWojciech Macek * 210*3fc36ee0SWojciech Macek * Note that phy_ctrl_cfg_i[3] is used to signify high-speed/low-speed 211*3fc36ee0SWojciech Macek */ 212*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_PHY_CTRL_CFG_MASK 0x00F00000 213*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_PHY_CTRL_CFG_SHIFT 20 214*3fc36ee0SWojciech Macek /* 215*3fc36ee0SWojciech Macek * 0 - Internal 8051 micro- controller is allowed to access the internal APB 216*3fc36ee0SWojciech Macek * CSR. Internal APB runs at cpu_clk_i, and the accesses from the external APB 217*3fc36ee0SWojciech Macek * in apb_clk_i domain to APB CSR are resynchronized to cpu_clk_i. 1 – Bypass 218*3fc36ee0SWojciech Macek * CPU. Internal 8051 micro-controller is blocked from accessing the internal 219*3fc36ee0SWojciech Macek * APB CSR. Internal APB runs at apb_clk_i. 220*3fc36ee0SWojciech Macek */ 221*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CTRL_CPU_BYPASS (1 << 24) 222*3fc36ee0SWojciech Macek 223*3fc36ee0SWojciech Macek /**** cpu_prog_addr register ****/ 224*3fc36ee0SWojciech Macek /* 225*3fc36ee0SWojciech Macek * address value 32 bit, 226*3fc36ee0SWojciech Macek * The firmware data will be 1 byte with 64K rows 227*3fc36ee0SWojciech Macek */ 228*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CPU_PROG_ADDR_VAL_MASK 0x00007FFF 229*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CPU_PROG_ADDR_VAL_SHIFT 0 230*3fc36ee0SWojciech Macek 231*3fc36ee0SWojciech Macek /**** cpu_data_mem_addr register ****/ 232*3fc36ee0SWojciech Macek /* address value – 8K byte memory */ 233*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CPU_DATA_MEM_ADDR_VAL_MASK 0x00001FFF 234*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CPU_DATA_MEM_ADDR_VAL_SHIFT 0 235*3fc36ee0SWojciech Macek 236*3fc36ee0SWojciech Macek /**** cpu_data_mem_data register ****/ 237*3fc36ee0SWojciech Macek /* data value */ 238*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CPU_DATA_MEM_DATA_VAL_MASK 0x000000FF 239*3fc36ee0SWojciech Macek #define SERDES_C_GEN_CPU_DATA_MEM_DATA_VAL_SHIFT 0 240*3fc36ee0SWojciech Macek 241*3fc36ee0SWojciech Macek /**** rst register ****/ 242*3fc36ee0SWojciech Macek /* Power on reset Signal – active low */ 243*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_POR_N (1 << 0) 244*3fc36ee0SWojciech Macek /* CMU reset Active low */ 245*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_CM0_RST_N (1 << 1) 246*3fc36ee0SWojciech Macek /* 247*3fc36ee0SWojciech Macek * 0x0 – Normal / Active 248*3fc36ee0SWojciech Macek * 0x1 – Partial power down 249*3fc36ee0SWojciech Macek * 0x2 – Near complete power down (only 250*3fc36ee0SWojciech Macek * refclk buffers and portions of analog bias 251*3fc36ee0SWojciech Macek * active) 252*3fc36ee0SWojciech Macek * 0x3 – complete power down (IDDQ mode) 253*3fc36ee0SWojciech Macek * Can be asserted when CMU is in normal 254*3fc36ee0SWojciech Macek * mode. These modes provide an increased 255*3fc36ee0SWojciech Macek * power savings compared to reset mode. 256*3fc36ee0SWojciech Macek * Signal is overridden by por_n_i so has no 257*3fc36ee0SWojciech Macek * effect in power on reset state. 258*3fc36ee0SWojciech Macek */ 259*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_CM0_PD_MASK 0x00000030 260*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_CM0_PD_SHIFT 4 261*3fc36ee0SWojciech Macek /* Lane0 reset signal active low */ 262*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_LN0_RST_N (1 << 6) 263*3fc36ee0SWojciech Macek /* Lane1 reset signal active low */ 264*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_LN1_RST_N (1 << 7) 265*3fc36ee0SWojciech Macek /* 266*3fc36ee0SWojciech Macek * 0x0 – Normal / Active 267*3fc36ee0SWojciech Macek * 0x1 – Partial power down 268*3fc36ee0SWojciech Macek * 0x2 – Most blocks powered down (only LOS 269*3fc36ee0SWojciech Macek * active) 270*3fc36ee0SWojciech Macek * 0x3 – complete power down (IDDQ mode) 271*3fc36ee0SWojciech Macek * Can be asserted when Lane is in normal 272*3fc36ee0SWojciech Macek * mode. These modes provide an increased 273*3fc36ee0SWojciech Macek * power savings compared to reset mode. 274*3fc36ee0SWojciech Macek * Signal is overridden by por_n_i so has no 275*3fc36ee0SWojciech Macek * affect in power on reset state 276*3fc36ee0SWojciech Macek */ 277*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_LN0_PD_MASK 0x00000300 278*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_LN0_PD_SHIFT 8 279*3fc36ee0SWojciech Macek /* 280*3fc36ee0SWojciech Macek * 0x0 – Normal / Active 281*3fc36ee0SWojciech Macek * 0x1 – Partial power down 282*3fc36ee0SWojciech Macek * 0x2 – Most blocks powered down (only LOS 283*3fc36ee0SWojciech Macek * active) 284*3fc36ee0SWojciech Macek * 0x3 – complete power down (IDDQ mode) 285*3fc36ee0SWojciech Macek * Can be asserted when Lane is in normal 286*3fc36ee0SWojciech Macek * mode. These modes provide an increased 287*3fc36ee0SWojciech Macek * power savings compared to reset mode. 288*3fc36ee0SWojciech Macek * Signal is overridden by por_n_i so has no 289*3fc36ee0SWojciech Macek * affect in power on reset state 290*3fc36ee0SWojciech Macek */ 291*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_LN1_PD_MASK 0x00000C00 292*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_LN1_PD_SHIFT 10 293*3fc36ee0SWojciech Macek 294*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_CPU_MEM_RESET (1 << 12) 295*3fc36ee0SWojciech Macek 296*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_CPU_MEM_SHUTDOWN (1 << 13) 297*3fc36ee0SWojciech Macek 298*3fc36ee0SWojciech Macek #define SERDES_C_GEN_RST_CAPRI_APB_RESET (1 << 14) 299*3fc36ee0SWojciech Macek 300*3fc36ee0SWojciech Macek /**** status register ****/ 301*3fc36ee0SWojciech Macek /* 302*3fc36ee0SWojciech Macek * 0x0 – No error 303*3fc36ee0SWojciech Macek * 0x1 – PHY has an internal error 304*3fc36ee0SWojciech Macek */ 305*3fc36ee0SWojciech Macek #define SERDES_C_GEN_STATUS_ERR_O (1 << 0) 306*3fc36ee0SWojciech Macek /* 307*3fc36ee0SWojciech Macek * 0x0 – PHY is not ready to respond to 308*3fc36ee0SWojciech Macek * cm0_rst_n_i and cm0_pd_i[1:0]. The 309*3fc36ee0SWojciech Macek * signals should not be changed. 310*3fc36ee0SWojciech Macek * 0x1 - PHY is ready to respond to 311*3fc36ee0SWojciech Macek * cm0_rst_n_i and cm0_pd_i[1:0] 312*3fc36ee0SWojciech Macek */ 313*3fc36ee0SWojciech Macek #define SERDES_C_GEN_STATUS_CM0_RST_PD_READY (1 << 1) 314*3fc36ee0SWojciech Macek /* 315*3fc36ee0SWojciech Macek * Indicates CMU PLL has locked to the 316*3fc36ee0SWojciech Macek * reference clock and all output clocks are at 317*3fc36ee0SWojciech Macek * the correct frequency 318*3fc36ee0SWojciech Macek */ 319*3fc36ee0SWojciech Macek #define SERDES_C_GEN_STATUS_CM0_OK_O (1 << 2) 320*3fc36ee0SWojciech Macek /* 321*3fc36ee0SWojciech Macek * 0x0 – PHY is not ready to respond to 322*3fc36ee0SWojciech Macek * ln0_rst_n and ln0_pd[1:0]. The signals 323*3fc36ee0SWojciech Macek * should not be changed. 324*3fc36ee0SWojciech Macek * 0x1 - PHY is ready to respond to lnX_rst_n_i 325*3fc36ee0SWojciech Macek * and lnX_pd_i[1:0] 326*3fc36ee0SWojciech Macek */ 327*3fc36ee0SWojciech Macek #define SERDES_C_GEN_STATUS_LN0_RST_PD_READY (1 << 3) 328*3fc36ee0SWojciech Macek /* 329*3fc36ee0SWojciech Macek * 0x0 – PHY is not ready to respond to 330*3fc36ee0SWojciech Macek * ln1_rst_n_i and ln1_pd[1:0]. The signals 331*3fc36ee0SWojciech Macek * should not be changed. 332*3fc36ee0SWojciech Macek * 0x1 - PHY is ready to respond to lnX_rst_n_i 333*3fc36ee0SWojciech Macek * and lnX_pd_i[1:0] 334*3fc36ee0SWojciech Macek */ 335*3fc36ee0SWojciech Macek #define SERDES_C_GEN_STATUS_LN1_RST_PD_READY (1 << 4) 336*3fc36ee0SWojciech Macek /* 337*3fc36ee0SWojciech Macek * Active low when the CPU performs a wait cycle (internally or externally 338*3fc36ee0SWojciech Macek * generated) 339*3fc36ee0SWojciech Macek */ 340*3fc36ee0SWojciech Macek #define SERDES_C_GEN_STATUS_CPU_WAITSTATE (1 << 5) 341*3fc36ee0SWojciech Macek 342*3fc36ee0SWojciech Macek #define SERDES_C_GEN_STATUS_TBUS_MASK 0x000FFF00 343*3fc36ee0SWojciech Macek #define SERDES_C_GEN_STATUS_TBUS_SHIFT 8 344*3fc36ee0SWojciech Macek 345*3fc36ee0SWojciech Macek /**** cfg register ****/ 346*3fc36ee0SWojciech Macek /* 1- Swap 32 bit data on RX side */ 347*3fc36ee0SWojciech Macek #define SERDES_C_LANE_CFG_RX_LANE_SWAP (1 << 0) 348*3fc36ee0SWojciech Macek /* 1- Swap 32 bit data on TX side */ 349*3fc36ee0SWojciech Macek #define SERDES_C_LANE_CFG_TX_LANE_SWAP (1 << 1) 350*3fc36ee0SWojciech Macek /* 1 – invert rx data polarity */ 351*3fc36ee0SWojciech Macek #define SERDES_C_LANE_CFG_LN_CTRL_RXPOLARITY (1 << 2) 352*3fc36ee0SWojciech Macek /* 1 – invert tx data polarity */ 353*3fc36ee0SWojciech Macek #define SERDES_C_LANE_CFG_TX_LANE_POLARITY (1 << 3) 354*3fc36ee0SWojciech Macek /* 355*3fc36ee0SWojciech Macek * 0x0 –Data on lnX_txdata_o will not be 356*3fc36ee0SWojciech Macek * transmitted. Transmitter will be placed into 357*3fc36ee0SWojciech Macek * electrical idle. 358*3fc36ee0SWojciech Macek * 0x1 – Data on the active bits of 359*3fc36ee0SWojciech Macek * lnX_txdata_o will be transmitted 360*3fc36ee0SWojciech Macek */ 361*3fc36ee0SWojciech Macek #define SERDES_C_LANE_CFG_LN_CTRL_TX_EN (1 << 4) 362*3fc36ee0SWojciech Macek /* 363*3fc36ee0SWojciech Macek * Informs the PHY to bypass the output of the 364*3fc36ee0SWojciech Macek * analog LOS detector and instead rely upon 365*3fc36ee0SWojciech Macek * a protocol LOS mechanism in the SoC/ASIC 366*3fc36ee0SWojciech Macek * 0x0 – LOS operates as normal 367*3fc36ee0SWojciech Macek * 0x1 – Bypass analog LOS output and 368*3fc36ee0SWojciech Macek * instead rely upon protocol-level LOS 369*3fc36ee0SWojciech Macek * detection via input lnX_ctrl_los_eii_value 370*3fc36ee0SWojciech Macek */ 371*3fc36ee0SWojciech Macek #define SERDES_C_LANE_CFG_LN_CTRL_LOS_EII_EN (1 << 5) 372*3fc36ee0SWojciech Macek /* 373*3fc36ee0SWojciech Macek * If lnX_ctrl_los_eii_en_i = 1 then Informs 374*3fc36ee0SWojciech Macek * the PHY that the received signal was lost 375*3fc36ee0SWojciech Macek */ 376*3fc36ee0SWojciech Macek #define SERDES_C_LANE_CFG_LN_CTRL_LOS_EII_VALUE (1 << 6) 377*3fc36ee0SWojciech Macek /* One hot mux */ 378*3fc36ee0SWojciech Macek #define SERDES_C_LANE_CFG_TX_DATA_SRC_SELECT_MASK 0x00000F00 379*3fc36ee0SWojciech Macek #define SERDES_C_LANE_CFG_TX_DATA_SRC_SELECT_SHIFT 8 380*3fc36ee0SWojciech Macek /* 0x0 - 20-bit 0x1 – 40-bit */ 381*3fc36ee0SWojciech Macek #define SERDES_C_LANE_CFG_LN_CTRL_DATA_WIDTH (1 << 12) 382*3fc36ee0SWojciech Macek 383*3fc36ee0SWojciech Macek /**** stat register ****/ 384*3fc36ee0SWojciech Macek /* 385*3fc36ee0SWojciech Macek * x0 – lane is not ready to send and receive data 386*3fc36ee0SWojciech Macek * 0x1 – lane is ready to send and receive data 387*3fc36ee0SWojciech Macek */ 388*3fc36ee0SWojciech Macek #define SERDES_C_LANE_STAT_LNX_STAT_OK (1 << 0) 389*3fc36ee0SWojciech Macek /* 390*3fc36ee0SWojciech Macek * 0x0 – received data run length has not 391*3fc36ee0SWojciech Macek * exceed the programmable run length 392*3fc36ee0SWojciech Macek * detector threshold 393*3fc36ee0SWojciech Macek * 0x1 – received data run length has 394*3fc36ee0SWojciech Macek * exceeded the programmable run length 395*3fc36ee0SWojciech Macek * detector threshold 396*3fc36ee0SWojciech Macek */ 397*3fc36ee0SWojciech Macek #define SERDES_C_LANE_STAT_LN_STAT_RUNLEN_ERR (1 << 1) 398*3fc36ee0SWojciech Macek /* 399*3fc36ee0SWojciech Macek * 0x0 – data on lnX_rxdata_o are invalid 400*3fc36ee0SWojciech Macek * 0x1 – data on the active bits of 401*3fc36ee0SWojciech Macek * lnX_rxdata_o are valid 402*3fc36ee0SWojciech Macek */ 403*3fc36ee0SWojciech Macek #define SERDES_C_LANE_STAT_LN_STAT_RXVALID (1 << 2) 404*3fc36ee0SWojciech Macek /* 405*3fc36ee0SWojciech Macek * Loss of Signal (LOS) indicator that includes 406*3fc36ee0SWojciech Macek * the combined functions of the digitally 407*3fc36ee0SWojciech Macek * assisted analog LOS, digital LOS, and 408*3fc36ee0SWojciech Macek * protocol LOS override features 409*3fc36ee0SWojciech Macek * 0x0 – Signal detected on lnX_rxp_i / 410*3fc36ee0SWojciech Macek * lnX_rxm_i pins 411*3fc36ee0SWojciech Macek * 0x1 – No signal detected on lnX_rxp_i / 412*3fc36ee0SWojciech Macek * lnX_rxm_i pins 413*3fc36ee0SWojciech Macek */ 414*3fc36ee0SWojciech Macek #define SERDES_C_LANE_STAT_LN_STAT_LOS (1 << 3) 415*3fc36ee0SWojciech Macek 416*3fc36ee0SWojciech Macek #define SERDES_C_LANE_STAT_LN_STAT_LOS_DEGLITCH (1 << 4) 417*3fc36ee0SWojciech Macek 418*3fc36ee0SWojciech Macek /**** reserved register ****/ 419*3fc36ee0SWojciech Macek 420*3fc36ee0SWojciech Macek #define SERDES_C_LANE_RESERVED_DEF_0_MASK 0x0000FFFF 421*3fc36ee0SWojciech Macek #define SERDES_C_LANE_RESERVED_DEF_0_SHIFT 0 422*3fc36ee0SWojciech Macek 423*3fc36ee0SWojciech Macek #define SERDES_C_LANE_RESERVED_DEF_1_MASK 0xFFFF0000 424*3fc36ee0SWojciech Macek #define SERDES_C_LANE_RESERVED_DEF_1_SHIFT 16 425*3fc36ee0SWojciech Macek 426*3fc36ee0SWojciech Macek #ifdef __cplusplus 427*3fc36ee0SWojciech Macek } 428*3fc36ee0SWojciech Macek #endif 429*3fc36ee0SWojciech Macek 430*3fc36ee0SWojciech Macek #endif /* __AL_HAL_serdes_c_REGS_H__ */ 431*3fc36ee0SWojciech Macek 432*3fc36ee0SWojciech Macek /** @} end of ... group */ 433*3fc36ee0SWojciech Macek 434*3fc36ee0SWojciech Macek 435