1*f11c7f63SJim Harris /*- 2*f11c7f63SJim Harris * This file is provided under a dual BSD/GPLv2 license. When using or 3*f11c7f63SJim Harris * redistributing this file, you may do so under either license. 4*f11c7f63SJim Harris * 5*f11c7f63SJim Harris * GPL LICENSE SUMMARY 6*f11c7f63SJim Harris * 7*f11c7f63SJim Harris * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 8*f11c7f63SJim Harris * 9*f11c7f63SJim Harris * This program is free software; you can redistribute it and/or modify 10*f11c7f63SJim Harris * it under the terms of version 2 of the GNU General Public License as 11*f11c7f63SJim Harris * published by the Free Software Foundation. 12*f11c7f63SJim Harris * 13*f11c7f63SJim Harris * This program is distributed in the hope that it will be useful, but 14*f11c7f63SJim Harris * WITHOUT ANY WARRANTY; without even the implied warranty of 15*f11c7f63SJim Harris * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU 16*f11c7f63SJim Harris * General Public License for more details. 17*f11c7f63SJim Harris * 18*f11c7f63SJim Harris * You should have received a copy of the GNU General Public License 19*f11c7f63SJim Harris * along with this program; if not, write to the Free Software 20*f11c7f63SJim Harris * Foundation, Inc., 51 Franklin St - Fifth Floor, Boston, MA 02110-1301 USA. 21*f11c7f63SJim Harris * The full GNU General Public License is included in this distribution 22*f11c7f63SJim Harris * in the file called LICENSE.GPL. 23*f11c7f63SJim Harris * 24*f11c7f63SJim Harris * BSD LICENSE 25*f11c7f63SJim Harris * 26*f11c7f63SJim Harris * Copyright(c) 2008 - 2011 Intel Corporation. All rights reserved. 27*f11c7f63SJim Harris * All rights reserved. 28*f11c7f63SJim Harris * 29*f11c7f63SJim Harris * Redistribution and use in source and binary forms, with or without 30*f11c7f63SJim Harris * modification, are permitted provided that the following conditions 31*f11c7f63SJim Harris * are met: 32*f11c7f63SJim Harris * 33*f11c7f63SJim Harris * * Redistributions of source code must retain the above copyright 34*f11c7f63SJim Harris * notice, this list of conditions and the following disclaimer. 35*f11c7f63SJim Harris * * Redistributions in binary form must reproduce the above copyright 36*f11c7f63SJim Harris * notice, this list of conditions and the following disclaimer in 37*f11c7f63SJim Harris * the documentation and/or other materials provided with the 38*f11c7f63SJim Harris * distribution. 39*f11c7f63SJim Harris * 40*f11c7f63SJim Harris * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 41*f11c7f63SJim Harris * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 42*f11c7f63SJim Harris * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR 43*f11c7f63SJim Harris * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 44*f11c7f63SJim Harris * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 45*f11c7f63SJim Harris * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 46*f11c7f63SJim Harris * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 47*f11c7f63SJim Harris * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 48*f11c7f63SJim Harris * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 49*f11c7f63SJim Harris * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 50*f11c7f63SJim Harris * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 51*f11c7f63SJim Harris * 52*f11c7f63SJim Harris * $FreeBSD$ 53*f11c7f63SJim Harris */ 54*f11c7f63SJim Harris #ifndef _SCU_BIOS_DEFINITIONS_H_ 55*f11c7f63SJim Harris #define _SCU_BIOS_DEFINITIONS_H_ 56*f11c7f63SJim Harris 57*f11c7f63SJim Harris #ifdef __cplusplus 58*f11c7f63SJim Harris extern "C" { 59*f11c7f63SJim Harris #endif // __cplusplus 60*f11c7f63SJim Harris 61*f11c7f63SJim Harris /** 62*f11c7f63SJim Harris * IMPORTANT NOTE: 63*f11c7f63SJim Harris * This file can be used by an SCI Library based driver or 64*f11c7f63SJim Harris * stand-alone where the library is excluded. By excluding 65*f11c7f63SJim Harris * the SCI Library, inclusion of OS specific header files can 66*f11c7f63SJim Harris * be avoided. For example, a BIOS utility probably does not 67*f11c7f63SJim Harris * want to be bothered with inclusion of nested OS DDK include 68*f11c7f63SJim Harris * files that are not necessary for its function. 69*f11c7f63SJim Harris * 70*f11c7f63SJim Harris * To exclude the SCI Library, either uncomment the EXCLUDE_SCI_LIBRARY 71*f11c7f63SJim Harris * #define statement in environment.h or define the statement as an input 72*f11c7f63SJim Harris * to your compiler. 73*f11c7f63SJim Harris */ 74*f11c7f63SJim Harris 75*f11c7f63SJim Harris #include <dev/isci/environment.h> 76*f11c7f63SJim Harris 77*f11c7f63SJim Harris #ifndef EXCLUDE_SCI_LIBRARY 78*f11c7f63SJim Harris #include <dev/isci/scil/sci_types.h> 79*f11c7f63SJim Harris #include <dev/isci/scil/intel_sas.h> 80*f11c7f63SJim Harris #include <dev/isci/scil/sci_controller_constants.h> 81*f11c7f63SJim Harris #endif /* EXCLUDE_SCI_LIBRARY */ 82*f11c7f63SJim Harris 83*f11c7f63SJim Harris 84*f11c7f63SJim Harris 85*f11c7f63SJim Harris // For Intel Storage Controller Unit OEM Block 86*f11c7f63SJim Harris #define SCI_OEM_PARAM_SIGNATURE "ISCUOEMB" 87*f11c7f63SJim Harris 88*f11c7f63SJim Harris #define SCI_PREBOOT_SOURCE_INIT (0x00) 89*f11c7f63SJim Harris #define SCI_PREBOOT_SOURCE_OROM (0x80) 90*f11c7f63SJim Harris #define SCI_PREBOOT_SOURCE_EFI (0x81) 91*f11c7f63SJim Harris 92*f11c7f63SJim Harris #define SCI_OEM_PARAM_VER_1_0 (0x10) 93*f11c7f63SJim Harris #define SCI_OEM_PARAM_VER_1_1 (0x11) 94*f11c7f63SJim Harris #define SCI_OEM_PARAM_VER_1_2 (0x12) 95*f11c7f63SJim Harris #define SCI_OEM_PARAM_VER_1_3 (0x13) 96*f11c7f63SJim Harris 97*f11c7f63SJim Harris // current version 98*f11c7f63SJim Harris #define SCI_OEM_PARAM_VER_CUR SCI_OEM_PARAM_VER_1_3 99*f11c7f63SJim Harris 100*f11c7f63SJim Harris // port configuration mode 101*f11c7f63SJim Harris #define SCI_BIOS_MODE_MPC (0x00) 102*f11c7f63SJim Harris #define SCI_BIOS_MODE_APC (0x01) 103*f11c7f63SJim Harris 104*f11c7f63SJim Harris 105*f11c7f63SJim Harris #ifndef SCI_MAX_PHYS 106*f11c7f63SJim Harris #define SCI_MAX_PHYS (4) 107*f11c7f63SJim Harris #endif 108*f11c7f63SJim Harris 109*f11c7f63SJim Harris #ifndef SCI_MAX_PORTS 110*f11c7f63SJim Harris #define SCI_MAX_PORTS (4) 111*f11c7f63SJim Harris #endif 112*f11c7f63SJim Harris 113*f11c7f63SJim Harris 114*f11c7f63SJim Harris /** 115*f11c7f63SJim Harris * @struct SCI_BIOS_OEM_PARAM_BLOCK_HDR 116*f11c7f63SJim Harris * 117*f11c7f63SJim Harris * @brief This structure defines the OEM Parameter block header. 118*f11c7f63SJim Harris */ 119*f11c7f63SJim Harris typedef struct SCI_BIOS_OEM_PARAM_BLOCK_HDR 120*f11c7f63SJim Harris { 121*f11c7f63SJim Harris /** 122*f11c7f63SJim Harris * This field contains the OEM Parameter Block Signature which is 123*f11c7f63SJim Harris * used by BIOS and driver software to identify that the memory location 124*f11c7f63SJim Harris * contains valid OEM Parameter data. The value must be set to 125*f11c7f63SJim Harris * SCI_OEM_PARAM_SIGNATURE which is the string "ISCUOEMB" which 126*f11c7f63SJim Harris * stands for Intel Storage Controller Unit OEM Block. 127*f11c7f63SJim Harris */ 128*f11c7f63SJim Harris U8 signature[8]; 129*f11c7f63SJim Harris /** 130*f11c7f63SJim Harris * This field contains the size in bytes of the complete OEM 131*f11c7f63SJim Harris * Parameter Block, both header and payload hdr_length + 132*f11c7f63SJim Harris * (num_elements * element_length). 133*f11c7f63SJim Harris */ 134*f11c7f63SJim Harris U16 total_block_length; 135*f11c7f63SJim Harris /** 136*f11c7f63SJim Harris * This field contains the size in bytes of the 137*f11c7f63SJim Harris * SCI_BIOS_OEM_PARAM_BLOCK_HDR. It also indicates the offset from 138*f11c7f63SJim Harris * the beginning of this data structure to where the actual 139*f11c7f63SJim Harris * parameter data payload begins. 140*f11c7f63SJim Harris */ 141*f11c7f63SJim Harris U8 hdr_length; 142*f11c7f63SJim Harris /** 143*f11c7f63SJim Harris * This field contains the version info defining the structure 144*f11c7f63SJim Harris * of the OEM Parameter block. 145*f11c7f63SJim Harris */ 146*f11c7f63SJim Harris U8 version; 147*f11c7f63SJim Harris /** 148*f11c7f63SJim Harris * This field contains a value indicating the preboot initialization 149*f11c7f63SJim Harris * method (Option ROM or UEFI driver) so that after OS transition, 150*f11c7f63SJim Harris * the OS driver can know the preboot method. OEMs who build a single 151*f11c7f63SJim Harris * flash image where the preboot method is unknown at manufacturing 152*f11c7f63SJim Harris * time should set this field to SCI_PREBOOT_SOURCE_INIT. Then 153*f11c7f63SJim Harris * after the block is retrieved into host memory and under preboot 154*f11c7f63SJim Harris * driver control, the OROM or UEFI driver can set this field 155*f11c7f63SJim Harris * appropriately (SCI_PREBOOT_SOURCE_OROM and SCI_PREBOOT_SOURCE_EFI, 156*f11c7f63SJim Harris * respectively). 157*f11c7f63SJim Harris */ 158*f11c7f63SJim Harris U8 preboot_source; 159*f11c7f63SJim Harris /** 160*f11c7f63SJim Harris * This field contains the number of parameter descriptor elements 161*f11c7f63SJim Harris * (i.e. controller_elements) following this header. The number of 162*f11c7f63SJim Harris * elements corresponds to the number of SCU controller units contained 163*f11c7f63SJim Harris * in the platform: 164*f11c7f63SJim Harris * controller_element[0] = SCU0 165*f11c7f63SJim Harris * controller_element[1] = SCU1 166*f11c7f63SJim Harris */ 167*f11c7f63SJim Harris U8 num_elements; 168*f11c7f63SJim Harris /** 169*f11c7f63SJim Harris * This field contains the size in bytes of the descriptor element(s) 170*f11c7f63SJim Harris * in the block. 171*f11c7f63SJim Harris */ 172*f11c7f63SJim Harris U16 element_length; 173*f11c7f63SJim Harris /** 174*f11c7f63SJim Harris * Reserve fields for future use. 175*f11c7f63SJim Harris */ 176*f11c7f63SJim Harris U8 reserved[8]; 177*f11c7f63SJim Harris 178*f11c7f63SJim Harris } SCI_BIOS_OEM_PARAM_BLOCK_HDR_T; 179*f11c7f63SJim Harris 180*f11c7f63SJim Harris 181*f11c7f63SJim Harris /** 182*f11c7f63SJim Harris * @struct SCIC_SDS_OEM_PARAMETERS VER 1.0 183*f11c7f63SJim Harris * 184*f11c7f63SJim Harris * @brief This structure delineates the various OEM parameters that must 185*f11c7f63SJim Harris * be set for the Intel SAS Storage Controller Unit (SCU). 186*f11c7f63SJim Harris */ 187*f11c7f63SJim Harris typedef struct SCI_BIOS_OEM_PARAM_ELEMENT 188*f11c7f63SJim Harris { 189*f11c7f63SJim Harris /** 190*f11c7f63SJim Harris * Per SCU Controller Data 191*f11c7f63SJim Harris */ 192*f11c7f63SJim Harris struct 193*f11c7f63SJim Harris { 194*f11c7f63SJim Harris /** 195*f11c7f63SJim Harris * This field indicates the port configuration mode for 196*f11c7f63SJim Harris * this controller: 197*f11c7f63SJim Harris * Automatic Port Configuration(APC) or 198*f11c7f63SJim Harris * Manual Port Configuration (MPC). 199*f11c7f63SJim Harris * 200*f11c7f63SJim Harris * APC means the Platform OEM expects SCI to configure 201*f11c7f63SJim Harris * SAS Ports automatically according to the discovered SAS 202*f11c7f63SJim Harris * Address pairs of the endpoints, wide and/or narrow. 203*f11c7f63SJim Harris * 204*f11c7f63SJim Harris * MPC means the Platform OEM manually defines wide or narrow 205*f11c7f63SJim Harris * connectors by apriori assigning PHYs to SAS Ports. 206*f11c7f63SJim Harris * 207*f11c7f63SJim Harris * By default, the mode type is APC 208*f11c7f63SJim Harris * in APC mode, if ANY of the phy mask is non-zero, 209*f11c7f63SJim Harris * SCI_FAILURE_INVALID_PARAMETER_VALUE will be returned 210*f11c7f63SJim Harris * from scic_oem_parameters_set AND the default oem 211*f11c7f63SJim Harris * configuration will be applied 212*f11c7f63SJim Harris * in MPC mode, if ALL of the phy masks are zero, 213*f11c7f63SJim Harris * SCI_FAILURE_INVALID_PARAMETER_VALUE will be returned 214*f11c7f63SJim Harris * from scic_oem_parameters_set AND the default oem 215*f11c7f63SJim Harris * configuration will be applied 216*f11c7f63SJim Harris */ 217*f11c7f63SJim Harris U8 mode_type; 218*f11c7f63SJim Harris 219*f11c7f63SJim Harris /** 220*f11c7f63SJim Harris * This field specifies the maximum number of direct attached 221*f11c7f63SJim Harris * devices the OEM will allow to have powered up simultaneously 222*f11c7f63SJim Harris * on this controller. This allows the OEM to avoid exceeding 223*f11c7f63SJim Harris * power supply limits for this platform. A value of zero 224*f11c7f63SJim Harris * indicates there are no restrictions. 225*f11c7f63SJim Harris */ 226*f11c7f63SJim Harris U8 max_number_concurrent_device_spin_up; 227*f11c7f63SJim Harris 228*f11c7f63SJim Harris /** 229*f11c7f63SJim Harris * This field indicates OEM's desired default 230*f11c7f63SJim Harris * Spread Spectrum Clocking (SSC) setting for Tx: 231*f11c7f63SJim Harris * enabled = 1 232*f11c7f63SJim Harris * disabled = 0 233*f11c7f63SJim Harris */ 234*f11c7f63SJim Harris U8 do_enable_ssc; 235*f11c7f63SJim Harris 236*f11c7f63SJim Harris U8 reserved; 237*f11c7f63SJim Harris 238*f11c7f63SJim Harris } controller; 239*f11c7f63SJim Harris 240*f11c7f63SJim Harris /** 241*f11c7f63SJim Harris * Per SAS Port data. 242*f11c7f63SJim Harris */ 243*f11c7f63SJim Harris struct 244*f11c7f63SJim Harris { 245*f11c7f63SJim Harris /** 246*f11c7f63SJim Harris * This field specifies the phys to be contained inside a port. 247*f11c7f63SJim Harris * The bit position in the mask specifies the index of the phy 248*f11c7f63SJim Harris * to be contained in the port. Multiple bits (i.e. phys) 249*f11c7f63SJim Harris * can be contained in a single port: 250*f11c7f63SJim Harris * Bit 0 = This controller's PHY index 0 (0x01) 251*f11c7f63SJim Harris * Bit 1 = This controller's PHY index 1 (0x02) 252*f11c7f63SJim Harris * Bit 2 = This controller's PHY index 2 (0x04) 253*f11c7f63SJim Harris * Bit 3 = This controller's PHY index 3 (0x08) 254*f11c7f63SJim Harris * 255*f11c7f63SJim Harris * Refer to the mode_type field for rules regarding APC and MPC mode. 256*f11c7f63SJim Harris * General rule: For APC mode phy_mask = 0 257*f11c7f63SJim Harris */ 258*f11c7f63SJim Harris U8 phy_mask; 259*f11c7f63SJim Harris 260*f11c7f63SJim Harris } ports[SCI_MAX_PORTS]; // Up to 4 Ports per SCU controller unit 261*f11c7f63SJim Harris 262*f11c7f63SJim Harris /** 263*f11c7f63SJim Harris * Per PHY Parameter data. 264*f11c7f63SJim Harris */ 265*f11c7f63SJim Harris struct 266*f11c7f63SJim Harris { 267*f11c7f63SJim Harris /** 268*f11c7f63SJim Harris * This field indicates the SAS Address that will be transmitted on 269*f11c7f63SJim Harris * this PHY index. The field is defined as a union, however, the 270*f11c7f63SJim Harris * OEM should use the U8 array definition when encoding it to ensure 271*f11c7f63SJim Harris * correct byte ordering. 272*f11c7f63SJim Harris * 273*f11c7f63SJim Harris * NOTE: If using APC MODE, along with phy_mask being set to ZERO, the 274*f11c7f63SJim Harris * SAS Addresses for all PHYs within a controller group SHALL be the 275*f11c7f63SJim Harris * same. 276*f11c7f63SJim Harris */ 277*f11c7f63SJim Harris union 278*f11c7f63SJim Harris { 279*f11c7f63SJim Harris /** 280*f11c7f63SJim Harris * The array should be stored in little endian order. For example, 281*f11c7f63SJim Harris * if the desired SAS Address is 0x50010B90_0003538D, then it 282*f11c7f63SJim Harris * should be stored in the following manner: 283*f11c7f63SJim Harris * array[0] = 0x90 284*f11c7f63SJim Harris * array[1] = 0x0B 285*f11c7f63SJim Harris * array[2] = 0x01 286*f11c7f63SJim Harris * array[3] = 0x50 287*f11c7f63SJim Harris * array[4] = 0x8D 288*f11c7f63SJim Harris * array[5] = 0x53 289*f11c7f63SJim Harris * array[6] = 0x03 290*f11c7f63SJim Harris * array[7] = 0x00 291*f11c7f63SJim Harris */ 292*f11c7f63SJim Harris U8 array[8]; 293*f11c7f63SJim Harris /** 294*f11c7f63SJim Harris * This is the typedef'd version of the SAS Address used in 295*f11c7f63SJim Harris * the SCI Library. 296*f11c7f63SJim Harris */ 297*f11c7f63SJim Harris SCI_SAS_ADDRESS_T sci_format; 298*f11c7f63SJim Harris 299*f11c7f63SJim Harris } sas_address; 300*f11c7f63SJim Harris 301*f11c7f63SJim Harris /** 302*f11c7f63SJim Harris * These are the per PHY equalization settings associated with the the 303*f11c7f63SJim Harris * AFE XCVR Tx Amplitude and Equalization Control Register Set 304*f11c7f63SJim Harris * (0 thru 3). 305*f11c7f63SJim Harris * 306*f11c7f63SJim Harris * Operational Note: The following Look-Up-Table registers are engaged 307*f11c7f63SJim Harris * by the AFE block after the following: 308*f11c7f63SJim Harris * - Software programs the Link Layer AFE Look Up Table Control 309*f11c7f63SJim Harris * Registers (AFE_LUTCR). 310*f11c7f63SJim Harris * - Software sets AFE XCVR Tx Control Register Tx Equalization 311*f11c7f63SJim Harris * Enable bit. 312*f11c7f63SJim Harris */ 313*f11c7f63SJim Harris /** 314*f11c7f63SJim Harris * AFE_TX_AMP_CTRL0. This register is associated with AFE_LUTCR 315*f11c7f63SJim Harris * LUTSel=00b. It contains the Tx Equalization settings that will be 316*f11c7f63SJim Harris * used if a SATA 1.5Gbs or SATA 3.0Gbs device is direct-attached. 317*f11c7f63SJim Harris */ 318*f11c7f63SJim Harris U32 afe_tx_amp_control0; 319*f11c7f63SJim Harris 320*f11c7f63SJim Harris /** 321*f11c7f63SJim Harris * AFE_TX_AMP_CTRL1. This register is associated with AFE_LUTCR 322*f11c7f63SJim Harris * LUTSel=01b. It contains the Tx Equalization settings that will 323*f11c7f63SJim Harris * be used if a SATA 6.0Gbs device is direct-attached. 324*f11c7f63SJim Harris */ 325*f11c7f63SJim Harris U32 afe_tx_amp_control1; 326*f11c7f63SJim Harris 327*f11c7f63SJim Harris /** 328*f11c7f63SJim Harris * AFE_TX_AMP_CTRL2. This register is associated with AFE_LUTCR 329*f11c7f63SJim Harris * LUTSel=10b. It contains the Tx Equalization settings that will 330*f11c7f63SJim Harris * be used if a SAS 1.5Gbs or SAS 3.0Gbs device is direct-attached. 331*f11c7f63SJim Harris */ 332*f11c7f63SJim Harris U32 afe_tx_amp_control2; 333*f11c7f63SJim Harris 334*f11c7f63SJim Harris /** 335*f11c7f63SJim Harris * AFE_TX_AMP_CTRL3. This register is associated with AFE_LUTCR 336*f11c7f63SJim Harris * LUTSel=11b. It contains the Tx Equalization settings that will 337*f11c7f63SJim Harris * be used if a SAS 6.0Gbs device is direct-attached. 338*f11c7f63SJim Harris */ 339*f11c7f63SJim Harris U32 afe_tx_amp_control3; 340*f11c7f63SJim Harris 341*f11c7f63SJim Harris } phys[SCI_MAX_PHYS]; // 4 PHYs per SCU controller unit 342*f11c7f63SJim Harris 343*f11c7f63SJim Harris } SCI_BIOS_OEM_PARAM_ELEMENT_T; 344*f11c7f63SJim Harris 345*f11c7f63SJim Harris /** 346*f11c7f63SJim Harris * @struct SCIC_SDS_OEM_PARAMETERS VER 1.1 347*f11c7f63SJim Harris * 348*f11c7f63SJim Harris * @brief This structure delineates the various OEM parameters that must 349*f11c7f63SJim Harris * be set for the Intel SAS Storage Controller Unit (SCU). 350*f11c7f63SJim Harris */ 351*f11c7f63SJim Harris typedef struct SCI_BIOS_OEM_PARAM_ELEMENT_v_1_1 352*f11c7f63SJim Harris { 353*f11c7f63SJim Harris /** 354*f11c7f63SJim Harris * Per SCU Controller Data 355*f11c7f63SJim Harris */ 356*f11c7f63SJim Harris struct 357*f11c7f63SJim Harris { 358*f11c7f63SJim Harris /** 359*f11c7f63SJim Harris * This field indicates the port configuration mode for 360*f11c7f63SJim Harris * this controller: 361*f11c7f63SJim Harris * Automatic Port Configuration(APC) or 362*f11c7f63SJim Harris * Manual Port Configuration (MPC). 363*f11c7f63SJim Harris * 364*f11c7f63SJim Harris * APC means the Platform OEM expects SCI to configure 365*f11c7f63SJim Harris * SAS Ports automatically according to the discovered SAS 366*f11c7f63SJim Harris * Address pairs of the endpoints, wide and/or narrow. 367*f11c7f63SJim Harris * 368*f11c7f63SJim Harris * MPC means the Platform OEM manually defines wide or narrow 369*f11c7f63SJim Harris * connectors by apriori assigning PHYs to SAS Ports. 370*f11c7f63SJim Harris * 371*f11c7f63SJim Harris * By default, the mode type is APC 372*f11c7f63SJim Harris * in APC mode, if ANY of the phy mask is non-zero, 373*f11c7f63SJim Harris * SCI_FAILURE_INVALID_PARAMETER_VALUE will be returned 374*f11c7f63SJim Harris * from scic_oem_parameters_set AND the default oem 375*f11c7f63SJim Harris * configuration will be applied 376*f11c7f63SJim Harris * in MPC mode, if ALL of the phy masks are zero, 377*f11c7f63SJim Harris * SCI_FAILURE_INVALID_PARAMETER_VALUE will be returned 378*f11c7f63SJim Harris * from scic_oem_parameters_set AND the default oem 379*f11c7f63SJim Harris * configuration will be applied 380*f11c7f63SJim Harris */ 381*f11c7f63SJim Harris U8 mode_type; 382*f11c7f63SJim Harris 383*f11c7f63SJim Harris /** 384*f11c7f63SJim Harris * This field specifies the maximum number of direct attached 385*f11c7f63SJim Harris * devices the OEM will allow to have powered up simultaneously 386*f11c7f63SJim Harris * on this controller. This allows the OEM to avoid exceeding 387*f11c7f63SJim Harris * power supply limits for this platform. A value of zero 388*f11c7f63SJim Harris * indicates there are no restrictions. 389*f11c7f63SJim Harris */ 390*f11c7f63SJim Harris U8 max_number_concurrent_device_spin_up; 391*f11c7f63SJim Harris 392*f11c7f63SJim Harris /** 393*f11c7f63SJim Harris * This bitfield indicates the OEM's desired default Tx 394*f11c7f63SJim Harris * Spread Spectrum Clocking (SSC) settings for SATA and SAS. 395*f11c7f63SJim Harris * NOTE: Default SSC Modulation Frequency is 31.5KHz. 396*f11c7f63SJim Harris *--------------------------------------------------------------------*/ 397*f11c7f63SJim Harris /** 398*f11c7f63SJim Harris * NOTE: Max spread for SATA is +0 / -5000 PPM. 399*f11c7f63SJim Harris * Down-spreading SSC (only method allowed for SATA): 400*f11c7f63SJim Harris * SATA SSC Tx Disabled = 0x0 401*f11c7f63SJim Harris * SATA SSC Tx at +0 / -1419 PPM Spread = 0x2 402*f11c7f63SJim Harris * SATA SSC Tx at +0 / -2129 PPM Spread = 0x3 403*f11c7f63SJim Harris * SATA SSC Tx at +0 / -4257 PPM Spread = 0x6 404*f11c7f63SJim Harris * SATA SSC Tx at +0 / -4967 PPM Spread = 0x7 405*f11c7f63SJim Harris */ 406*f11c7f63SJim Harris U8 ssc_sata_tx_spread_level : 4; 407*f11c7f63SJim Harris 408*f11c7f63SJim Harris /** 409*f11c7f63SJim Harris * SAS SSC Tx Disabled = 0x0 410*f11c7f63SJim Harris * 411*f11c7f63SJim Harris * NOTE: Max spread for SAS down-spreading +0 / -2300 PPM 412*f11c7f63SJim Harris * Down-spreading SSC: 413*f11c7f63SJim Harris * SAS SSC Tx at +0 / -1419 PPM Spread = 0x2 414*f11c7f63SJim Harris * SAS SSC Tx at +0 / -2129 PPM Spread = 0x3 415*f11c7f63SJim Harris * 416*f11c7f63SJim Harris * NOTE: Max spread for SAS center-spreading +2300 / -2300 PPM 417*f11c7f63SJim Harris * Center-spreading SSC: 418*f11c7f63SJim Harris * SAS SSC Tx at +1064 / -1064 PPM Spread = 0x3 419*f11c7f63SJim Harris * SAS SSC Tx at +2129 / -2129 PPM Spread = 0x6 420*f11c7f63SJim Harris */ 421*f11c7f63SJim Harris U8 ssc_sas_tx_spread_level : 3; 422*f11c7f63SJim Harris /** 423*f11c7f63SJim Harris * NOTE: Refer to the SSC section of the SAS 2.x Specification 424*f11c7f63SJim Harris * for proper setting of this field. For standard SAS Initiator 425*f11c7f63SJim Harris * SAS PHY operation it should be 0 for Down-spreading. 426*f11c7f63SJim Harris * SAS SSC Tx spread type: 427*f11c7f63SJim Harris * Down-spreading SSC = 0 428*f11c7f63SJim Harris * Center-spreading SSC = 1 429*f11c7f63SJim Harris */ 430*f11c7f63SJim Harris U8 ssc_sas_tx_type : 1; 431*f11c7f63SJim Harris /*--------------------------------------------------------------------*/ 432*f11c7f63SJim Harris 433*f11c7f63SJim Harris U8 reserved; 434*f11c7f63SJim Harris 435*f11c7f63SJim Harris } controller; 436*f11c7f63SJim Harris 437*f11c7f63SJim Harris /** 438*f11c7f63SJim Harris * Per SAS Port data. 439*f11c7f63SJim Harris */ 440*f11c7f63SJim Harris struct 441*f11c7f63SJim Harris { 442*f11c7f63SJim Harris /** 443*f11c7f63SJim Harris * This field specifies the phys to be contained inside a port. 444*f11c7f63SJim Harris * The bit position in the mask specifies the index of the phy 445*f11c7f63SJim Harris * to be contained in the port. Multiple bits (i.e. phys) 446*f11c7f63SJim Harris * can be contained in a single port: 447*f11c7f63SJim Harris * Bit 0 = This controller's PHY index 0 (0x01) 448*f11c7f63SJim Harris * Bit 1 = This controller's PHY index 1 (0x02) 449*f11c7f63SJim Harris * Bit 2 = This controller's PHY index 2 (0x04) 450*f11c7f63SJim Harris * Bit 3 = This controller's PHY index 3 (0x08) 451*f11c7f63SJim Harris * 452*f11c7f63SJim Harris * Refer to the mode_type field for rules regarding APC and MPC mode. 453*f11c7f63SJim Harris * General rule: For APC mode phy_mask = 0 454*f11c7f63SJim Harris */ 455*f11c7f63SJim Harris U8 phy_mask; 456*f11c7f63SJim Harris 457*f11c7f63SJim Harris } ports[SCI_MAX_PORTS]; // Up to 4 Ports per SCU controller unit 458*f11c7f63SJim Harris 459*f11c7f63SJim Harris /** 460*f11c7f63SJim Harris * Per PHY Parameter data. 461*f11c7f63SJim Harris */ 462*f11c7f63SJim Harris struct 463*f11c7f63SJim Harris { 464*f11c7f63SJim Harris /** 465*f11c7f63SJim Harris * This field indicates the SAS Address that will be transmitted on 466*f11c7f63SJim Harris * this PHY index. The field is defined as a union, however, the 467*f11c7f63SJim Harris * OEM should use the U8 array definition when encoding it to ensure 468*f11c7f63SJim Harris * correct byte ordering. 469*f11c7f63SJim Harris * 470*f11c7f63SJim Harris * NOTE: If using APC MODE, along with phy_mask being set to ZERO, the 471*f11c7f63SJim Harris * SAS Addresses for all PHYs within a controller group SHALL be the 472*f11c7f63SJim Harris * same. 473*f11c7f63SJim Harris */ 474*f11c7f63SJim Harris union 475*f11c7f63SJim Harris { 476*f11c7f63SJim Harris /** 477*f11c7f63SJim Harris * The array should be stored in little endian order. For example, 478*f11c7f63SJim Harris * if the desired SAS Address is 0x50010B90_0003538D, then it 479*f11c7f63SJim Harris * should be stored in the following manner: 480*f11c7f63SJim Harris * array[0] = 0x90 481*f11c7f63SJim Harris * array[1] = 0x0B 482*f11c7f63SJim Harris * array[2] = 0x01 483*f11c7f63SJim Harris * array[3] = 0x50 484*f11c7f63SJim Harris * array[4] = 0x8D 485*f11c7f63SJim Harris * array[5] = 0x53 486*f11c7f63SJim Harris * array[6] = 0x03 487*f11c7f63SJim Harris * array[7] = 0x00 488*f11c7f63SJim Harris */ 489*f11c7f63SJim Harris U8 array[8]; 490*f11c7f63SJim Harris /** 491*f11c7f63SJim Harris * This is the typedef'd version of the SAS Address used in 492*f11c7f63SJim Harris * the SCI Library. 493*f11c7f63SJim Harris */ 494*f11c7f63SJim Harris SCI_SAS_ADDRESS_T sci_format; 495*f11c7f63SJim Harris 496*f11c7f63SJim Harris } sas_address; 497*f11c7f63SJim Harris 498*f11c7f63SJim Harris /** 499*f11c7f63SJim Harris * These are the per PHY equalization settings associated with the the 500*f11c7f63SJim Harris * AFE XCVR Tx Amplitude and Equalization Control Register Set 501*f11c7f63SJim Harris * (0 thru 3). 502*f11c7f63SJim Harris * 503*f11c7f63SJim Harris * Operational Note: The following Look-Up-Table registers are engaged 504*f11c7f63SJim Harris * by the AFE block after the following: 505*f11c7f63SJim Harris * - Software programs the Link Layer AFE Look Up Table Control 506*f11c7f63SJim Harris * Registers (AFE_LUTCR). 507*f11c7f63SJim Harris * - Software sets AFE XCVR Tx Control Register Tx Equalization 508*f11c7f63SJim Harris * Enable bit. 509*f11c7f63SJim Harris */ 510*f11c7f63SJim Harris /** 511*f11c7f63SJim Harris * AFE_TX_AMP_CTRL0. This register is associated with AFE_LUTCR 512*f11c7f63SJim Harris * LUTSel=00b. It contains the Tx Equalization settings that will be 513*f11c7f63SJim Harris * used if a SATA 1.5Gbs or SATA 3.0Gbs device is direct-attached. 514*f11c7f63SJim Harris */ 515*f11c7f63SJim Harris U32 afe_tx_amp_control0; 516*f11c7f63SJim Harris 517*f11c7f63SJim Harris /** 518*f11c7f63SJim Harris * AFE_TX_AMP_CTRL1. This register is associated with AFE_LUTCR 519*f11c7f63SJim Harris * LUTSel=01b. It contains the Tx Equalization settings that will 520*f11c7f63SJim Harris * be used if a SATA 6.0Gbs device is direct-attached. 521*f11c7f63SJim Harris */ 522*f11c7f63SJim Harris U32 afe_tx_amp_control1; 523*f11c7f63SJim Harris 524*f11c7f63SJim Harris /** 525*f11c7f63SJim Harris * AFE_TX_AMP_CTRL2. This register is associated with AFE_LUTCR 526*f11c7f63SJim Harris * LUTSel=10b. It contains the Tx Equalization settings that will 527*f11c7f63SJim Harris * be used if a SAS 1.5Gbs or SAS 3.0Gbs device is direct-attached. 528*f11c7f63SJim Harris */ 529*f11c7f63SJim Harris U32 afe_tx_amp_control2; 530*f11c7f63SJim Harris 531*f11c7f63SJim Harris /** 532*f11c7f63SJim Harris * AFE_TX_AMP_CTRL3. This register is associated with AFE_LUTCR 533*f11c7f63SJim Harris * LUTSel=11b. It contains the Tx Equalization settings that will 534*f11c7f63SJim Harris * be used if a SAS 6.0Gbs device is direct-attached. 535*f11c7f63SJim Harris */ 536*f11c7f63SJim Harris U32 afe_tx_amp_control3; 537*f11c7f63SJim Harris 538*f11c7f63SJim Harris } phys[SCI_MAX_PHYS]; // 4 PHYs per SCU controller unit 539*f11c7f63SJim Harris 540*f11c7f63SJim Harris } SCI_BIOS_OEM_PARAM_ELEMENT_v_1_1_T; 541*f11c7f63SJim Harris 542*f11c7f63SJim Harris /** 543*f11c7f63SJim Harris * @struct SCIC_SDS_OEM_PARAMETERS VER 1.2 544*f11c7f63SJim Harris * 545*f11c7f63SJim Harris * @brief This structure delineates the various OEM parameters that must 546*f11c7f63SJim Harris * be set for the Intel SAS Storage Controller Unit (SCU). 547*f11c7f63SJim Harris */ 548*f11c7f63SJim Harris typedef struct SCI_BIOS_OEM_PARAM_ELEMENT_v_1_2 549*f11c7f63SJim Harris { 550*f11c7f63SJim Harris /** 551*f11c7f63SJim Harris * Per SCU Controller Data 552*f11c7f63SJim Harris */ 553*f11c7f63SJim Harris struct 554*f11c7f63SJim Harris { 555*f11c7f63SJim Harris /** 556*f11c7f63SJim Harris * This field indicates the port configuration mode for 557*f11c7f63SJim Harris * this controller: 558*f11c7f63SJim Harris * Automatic Port Configuration(APC) or 559*f11c7f63SJim Harris * Manual Port Configuration (MPC). 560*f11c7f63SJim Harris * 561*f11c7f63SJim Harris * APC means the Platform OEM expects SCI to configure 562*f11c7f63SJim Harris * SAS Ports automatically according to the discovered SAS 563*f11c7f63SJim Harris * Address pairs of the endpoints, wide and/or narrow. 564*f11c7f63SJim Harris * 565*f11c7f63SJim Harris * MPC means the Platform OEM manually defines wide or narrow 566*f11c7f63SJim Harris * connectors by apriori assigning PHYs to SAS Ports. 567*f11c7f63SJim Harris * 568*f11c7f63SJim Harris * By default, the mode type is APC 569*f11c7f63SJim Harris * in APC mode, if ANY of the phy mask is non-zero, 570*f11c7f63SJim Harris * SCI_FAILURE_INVALID_PARAMETER_VALUE will be returned 571*f11c7f63SJim Harris * from scic_oem_parameters_set AND the default oem 572*f11c7f63SJim Harris * configuration will be applied 573*f11c7f63SJim Harris * in MPC mode, if ALL of the phy masks are zero, 574*f11c7f63SJim Harris * SCI_FAILURE_INVALID_PARAMETER_VALUE will be returned 575*f11c7f63SJim Harris * from scic_oem_parameters_set AND the default oem 576*f11c7f63SJim Harris * configuration will be applied 577*f11c7f63SJim Harris */ 578*f11c7f63SJim Harris U8 mode_type; 579*f11c7f63SJim Harris 580*f11c7f63SJim Harris /** 581*f11c7f63SJim Harris * This field specifies the maximum number of direct attached 582*f11c7f63SJim Harris * devices the OEM will allow to have powered up simultaneously 583*f11c7f63SJim Harris * on this controller. This allows the OEM to avoid exceeding 584*f11c7f63SJim Harris * power supply limits for this platform. A value of zero 585*f11c7f63SJim Harris * indicates there are no restrictions. 586*f11c7f63SJim Harris */ 587*f11c7f63SJim Harris U8 max_number_concurrent_device_spin_up; 588*f11c7f63SJim Harris 589*f11c7f63SJim Harris /** 590*f11c7f63SJim Harris * This bitfield indicates the OEM's desired default Tx 591*f11c7f63SJim Harris * Spread Spectrum Clocking (SSC) settings for SATA and SAS. 592*f11c7f63SJim Harris * NOTE: Default SSC Modulation Frequency is 31.5KHz. 593*f11c7f63SJim Harris *--------------------------------------------------------------------*/ 594*f11c7f63SJim Harris /** 595*f11c7f63SJim Harris * NOTE: Max spread for SATA is +0 / -5000 PPM. 596*f11c7f63SJim Harris * Down-spreading SSC (only method allowed for SATA): 597*f11c7f63SJim Harris * SATA SSC Tx Disabled = 0x0 598*f11c7f63SJim Harris * SATA SSC Tx at +0 / -1419 PPM Spread = 0x2 599*f11c7f63SJim Harris * SATA SSC Tx at +0 / -2129 PPM Spread = 0x3 600*f11c7f63SJim Harris * SATA SSC Tx at +0 / -4257 PPM Spread = 0x6 601*f11c7f63SJim Harris * SATA SSC Tx at +0 / -4967 PPM Spread = 0x7 602*f11c7f63SJim Harris */ 603*f11c7f63SJim Harris U8 ssc_sata_tx_spread_level : 4; 604*f11c7f63SJim Harris 605*f11c7f63SJim Harris /** 606*f11c7f63SJim Harris * SAS SSC Tx Disabled = 0x0 607*f11c7f63SJim Harris * 608*f11c7f63SJim Harris * NOTE: Max spread for SAS down-spreading +0 / -2300 PPM 609*f11c7f63SJim Harris * Down-spreading SSC: 610*f11c7f63SJim Harris * SAS SSC Tx at +0 / -1419 PPM Spread = 0x2 611*f11c7f63SJim Harris * SAS SSC Tx at +0 / -2129 PPM Spread = 0x3 612*f11c7f63SJim Harris * 613*f11c7f63SJim Harris * NOTE: Max spread for SAS center-spreading +2300 / -2300 PPM 614*f11c7f63SJim Harris * Center-spreading SSC: 615*f11c7f63SJim Harris * SAS SSC Tx at +1064 / -1064 PPM Spread = 0x3 616*f11c7f63SJim Harris * SAS SSC Tx at +2129 / -2129 PPM Spread = 0x6 617*f11c7f63SJim Harris */ 618*f11c7f63SJim Harris U8 ssc_sas_tx_spread_level : 3; 619*f11c7f63SJim Harris /** 620*f11c7f63SJim Harris * NOTE: Refer to the SSC section of the SAS 2.x Specification 621*f11c7f63SJim Harris * for proper setting of this field. For standard SAS Initiator 622*f11c7f63SJim Harris * SAS PHY operation it should be 0 for Down-spreading. 623*f11c7f63SJim Harris * SAS SSC Tx spread type: 624*f11c7f63SJim Harris * Down-spreading SSC = 0 625*f11c7f63SJim Harris * Center-spreading SSC = 1 626*f11c7f63SJim Harris */ 627*f11c7f63SJim Harris U8 ssc_sas_tx_type : 1; 628*f11c7f63SJim Harris 629*f11c7f63SJim Harris /** 630*f11c7f63SJim Harris * This field indicates length of the SAS/SATA cable between 631*f11c7f63SJim Harris * host and device. 632*f11c7f63SJim Harris * This field is used make relationship between analog parameters of 633*f11c7f63SJim Harris * the phy in the silicon and length of the cable. 634*f11c7f63SJim Harris * Supported length: "short"- up to 3m, "long"- more than 3m 635*f11c7f63SJim Harris * This is bit mask field: 636*f11c7f63SJim Harris * 637*f11c7f63SJim Harris * BIT: 7 6 5 4 3 2 1 0 (LSB) 638*f11c7f63SJim Harris * ASSIGNMENT: <-><-><-><-><phy3><phy2><phy1><phy0> 639*f11c7f63SJim Harris * 640*f11c7f63SJim Harris * For short cable corresponding bit shall be reset, 641*f11c7f63SJim Harris * for long cable shall be set. 642*f11c7f63SJim Harris */ 643*f11c7f63SJim Harris U8 long_cable_selection_mask; 644*f11c7f63SJim Harris 645*f11c7f63SJim Harris } controller; 646*f11c7f63SJim Harris 647*f11c7f63SJim Harris /** 648*f11c7f63SJim Harris * Per SAS Port data. 649*f11c7f63SJim Harris */ 650*f11c7f63SJim Harris struct 651*f11c7f63SJim Harris { 652*f11c7f63SJim Harris /** 653*f11c7f63SJim Harris * This field specifies the phys to be contained inside a port. 654*f11c7f63SJim Harris * The bit position in the mask specifies the index of the phy 655*f11c7f63SJim Harris * to be contained in the port. Multiple bits (i.e. phys) 656*f11c7f63SJim Harris * can be contained in a single port: 657*f11c7f63SJim Harris * Bit 0 = This controller's PHY index 0 (0x01) 658*f11c7f63SJim Harris * Bit 1 = This controller's PHY index 1 (0x02) 659*f11c7f63SJim Harris * Bit 2 = This controller's PHY index 2 (0x04) 660*f11c7f63SJim Harris * Bit 3 = This controller's PHY index 3 (0x08) 661*f11c7f63SJim Harris * 662*f11c7f63SJim Harris * Refer to the mode_type field for rules regarding APC and MPC mode. 663*f11c7f63SJim Harris * General rule: For APC mode phy_mask = 0 664*f11c7f63SJim Harris */ 665*f11c7f63SJim Harris U8 phy_mask; 666*f11c7f63SJim Harris 667*f11c7f63SJim Harris } ports[SCI_MAX_PORTS]; // Up to 4 Ports per SCU controller unit 668*f11c7f63SJim Harris 669*f11c7f63SJim Harris /** 670*f11c7f63SJim Harris * Per PHY Parameter data. 671*f11c7f63SJim Harris */ 672*f11c7f63SJim Harris struct 673*f11c7f63SJim Harris { 674*f11c7f63SJim Harris /** 675*f11c7f63SJim Harris * This field indicates the SAS Address that will be transmitted on 676*f11c7f63SJim Harris * this PHY index. The field is defined as a union, however, the 677*f11c7f63SJim Harris * OEM should use the U8 array definition when encoding it to ensure 678*f11c7f63SJim Harris * correct byte ordering. 679*f11c7f63SJim Harris * 680*f11c7f63SJim Harris * NOTE: If using APC MODE, along with phy_mask being set to ZERO, the 681*f11c7f63SJim Harris * SAS Addresses for all PHYs within a controller group SHALL be the 682*f11c7f63SJim Harris * same. 683*f11c7f63SJim Harris */ 684*f11c7f63SJim Harris union 685*f11c7f63SJim Harris { 686*f11c7f63SJim Harris /** 687*f11c7f63SJim Harris * The array should be stored in little endian order. For example, 688*f11c7f63SJim Harris * if the desired SAS Address is 0x50010B90_0003538D, then it 689*f11c7f63SJim Harris * should be stored in the following manner: 690*f11c7f63SJim Harris * array[0] = 0x90 691*f11c7f63SJim Harris * array[1] = 0x0B 692*f11c7f63SJim Harris * array[2] = 0x01 693*f11c7f63SJim Harris * array[3] = 0x50 694*f11c7f63SJim Harris * array[4] = 0x8D 695*f11c7f63SJim Harris * array[5] = 0x53 696*f11c7f63SJim Harris * array[6] = 0x03 697*f11c7f63SJim Harris * array[7] = 0x00 698*f11c7f63SJim Harris */ 699*f11c7f63SJim Harris U8 array[8]; 700*f11c7f63SJim Harris /** 701*f11c7f63SJim Harris * This is the typedef'd version of the SAS Address used in 702*f11c7f63SJim Harris * the SCI Library. 703*f11c7f63SJim Harris */ 704*f11c7f63SJim Harris SCI_SAS_ADDRESS_T sci_format; 705*f11c7f63SJim Harris 706*f11c7f63SJim Harris } sas_address; 707*f11c7f63SJim Harris 708*f11c7f63SJim Harris /** 709*f11c7f63SJim Harris * These are the per PHY equalization settings associated with the the 710*f11c7f63SJim Harris * AFE XCVR Tx Amplitude and Equalization Control Register Set 711*f11c7f63SJim Harris * (0 thru 3). 712*f11c7f63SJim Harris * 713*f11c7f63SJim Harris * Operational Note: The following Look-Up-Table registers are engaged 714*f11c7f63SJim Harris * by the AFE block after the following: 715*f11c7f63SJim Harris * - Software programs the Link Layer AFE Look Up Table Control 716*f11c7f63SJim Harris * Registers (AFE_LUTCR). 717*f11c7f63SJim Harris * - Software sets AFE XCVR Tx Control Register Tx Equalization 718*f11c7f63SJim Harris * Enable bit. 719*f11c7f63SJim Harris */ 720*f11c7f63SJim Harris /** 721*f11c7f63SJim Harris * AFE_TX_AMP_CTRL0. This register is associated with AFE_LUTCR 722*f11c7f63SJim Harris * LUTSel=00b. It contains the Tx Equalization settings that will be 723*f11c7f63SJim Harris * used if a SATA 1.5Gbs or SATA 3.0Gbs device is direct-attached. 724*f11c7f63SJim Harris */ 725*f11c7f63SJim Harris U32 afe_tx_amp_control0; 726*f11c7f63SJim Harris 727*f11c7f63SJim Harris /** 728*f11c7f63SJim Harris * AFE_TX_AMP_CTRL1. This register is associated with AFE_LUTCR 729*f11c7f63SJim Harris * LUTSel=01b. It contains the Tx Equalization settings that will 730*f11c7f63SJim Harris * be used if a SATA 6.0Gbs device is direct-attached. 731*f11c7f63SJim Harris */ 732*f11c7f63SJim Harris U32 afe_tx_amp_control1; 733*f11c7f63SJim Harris 734*f11c7f63SJim Harris /** 735*f11c7f63SJim Harris * AFE_TX_AMP_CTRL2. This register is associated with AFE_LUTCR 736*f11c7f63SJim Harris * LUTSel=10b. It contains the Tx Equalization settings that will 737*f11c7f63SJim Harris * be used if a SAS 1.5Gbs or SAS 3.0Gbs device is direct-attached. 738*f11c7f63SJim Harris */ 739*f11c7f63SJim Harris U32 afe_tx_amp_control2; 740*f11c7f63SJim Harris 741*f11c7f63SJim Harris /** 742*f11c7f63SJim Harris * AFE_TX_AMP_CTRL3. This register is associated with AFE_LUTCR 743*f11c7f63SJim Harris * LUTSel=11b. It contains the Tx Equalization settings that will 744*f11c7f63SJim Harris * be used if a SAS 6.0Gbs device is direct-attached. 745*f11c7f63SJim Harris */ 746*f11c7f63SJim Harris U32 afe_tx_amp_control3; 747*f11c7f63SJim Harris 748*f11c7f63SJim Harris } phys[SCI_MAX_PHYS]; // 4 PHYs per SCU controller unit 749*f11c7f63SJim Harris 750*f11c7f63SJim Harris } SCI_BIOS_OEM_PARAM_ELEMENT_v_1_2_T; 751*f11c7f63SJim Harris 752*f11c7f63SJim Harris /** 753*f11c7f63SJim Harris * @struct SCIC_SDS_OEM_PARAMETERS VER 1.3 754*f11c7f63SJim Harris * 755*f11c7f63SJim Harris * @brief This structure delineates the various OEM parameters that must 756*f11c7f63SJim Harris * be set for the Intel SAS Storage Controller Unit (SCU). 757*f11c7f63SJim Harris */ 758*f11c7f63SJim Harris typedef struct SCI_BIOS_OEM_PARAM_ELEMENT_v_1_3 759*f11c7f63SJim Harris { 760*f11c7f63SJim Harris /** 761*f11c7f63SJim Harris * Per SCU Controller Data 762*f11c7f63SJim Harris */ 763*f11c7f63SJim Harris struct 764*f11c7f63SJim Harris { 765*f11c7f63SJim Harris /** 766*f11c7f63SJim Harris * This field indicates the port configuration mode for 767*f11c7f63SJim Harris * this controller: 768*f11c7f63SJim Harris * Automatic Port Configuration(APC) or 769*f11c7f63SJim Harris * Manual Port Configuration (MPC). 770*f11c7f63SJim Harris * 771*f11c7f63SJim Harris * APC means the Platform OEM expects SCI to configure 772*f11c7f63SJim Harris * SAS Ports automatically according to the discovered SAS 773*f11c7f63SJim Harris * Address pairs of the endpoints, wide and/or narrow. 774*f11c7f63SJim Harris * 775*f11c7f63SJim Harris * MPC means the Platform OEM manually defines wide or narrow 776*f11c7f63SJim Harris * connectors by apriori assigning PHYs to SAS Ports. 777*f11c7f63SJim Harris * 778*f11c7f63SJim Harris * By default, the mode type is APC 779*f11c7f63SJim Harris * in APC mode, if ANY of the phy mask is non-zero, 780*f11c7f63SJim Harris * SCI_FAILURE_INVALID_PARAMETER_VALUE will be returned 781*f11c7f63SJim Harris * from scic_oem_parameters_set AND the default oem 782*f11c7f63SJim Harris * configuration will be applied 783*f11c7f63SJim Harris * in MPC mode, if ALL of the phy masks are zero, 784*f11c7f63SJim Harris * SCI_FAILURE_INVALID_PARAMETER_VALUE will be returned 785*f11c7f63SJim Harris * from scic_oem_parameters_set AND the default oem 786*f11c7f63SJim Harris * configuration will be applied 787*f11c7f63SJim Harris */ 788*f11c7f63SJim Harris U8 mode_type; 789*f11c7f63SJim Harris 790*f11c7f63SJim Harris /** 791*f11c7f63SJim Harris * This field specifies the maximum number of direct attached 792*f11c7f63SJim Harris * devices the OEM will allow to have powered up simultaneously 793*f11c7f63SJim Harris * on this controller. This allows the OEM to avoid exceeding 794*f11c7f63SJim Harris * power supply limits for this platform. A value of zero 795*f11c7f63SJim Harris * indicates there are no restrictions. 796*f11c7f63SJim Harris */ 797*f11c7f63SJim Harris U8 max_number_concurrent_device_spin_up; 798*f11c7f63SJim Harris 799*f11c7f63SJim Harris /** 800*f11c7f63SJim Harris * This bitfield indicates the OEM's desired default Tx 801*f11c7f63SJim Harris * Spread Spectrum Clocking (SSC) settings for SATA and SAS. 802*f11c7f63SJim Harris * NOTE: Default SSC Modulation Frequency is 31.5KHz. 803*f11c7f63SJim Harris *--------------------------------------------------------------------*/ 804*f11c7f63SJim Harris /** 805*f11c7f63SJim Harris * NOTE: Max spread for SATA is +0 / -5000 PPM. 806*f11c7f63SJim Harris * Down-spreading SSC (only method allowed for SATA): 807*f11c7f63SJim Harris * SATA SSC Tx Disabled = 0x0 808*f11c7f63SJim Harris * SATA SSC Tx at +0 / -1419 PPM Spread = 0x2 809*f11c7f63SJim Harris * SATA SSC Tx at +0 / -2129 PPM Spread = 0x3 810*f11c7f63SJim Harris * SATA SSC Tx at +0 / -4257 PPM Spread = 0x6 811*f11c7f63SJim Harris * SATA SSC Tx at +0 / -4967 PPM Spread = 0x7 812*f11c7f63SJim Harris */ 813*f11c7f63SJim Harris U8 ssc_sata_tx_spread_level : 4; 814*f11c7f63SJim Harris 815*f11c7f63SJim Harris /** 816*f11c7f63SJim Harris * SAS SSC Tx Disabled = 0x0 817*f11c7f63SJim Harris * 818*f11c7f63SJim Harris * NOTE: Max spread for SAS down-spreading +0 / -2300 PPM 819*f11c7f63SJim Harris * Down-spreading SSC: 820*f11c7f63SJim Harris * SAS SSC Tx at +0 / -1419 PPM Spread = 0x2 821*f11c7f63SJim Harris * SAS SSC Tx at +0 / -2129 PPM Spread = 0x3 822*f11c7f63SJim Harris * 823*f11c7f63SJim Harris * NOTE: Max spread for SAS center-spreading +2300 / -2300 PPM 824*f11c7f63SJim Harris * Center-spreading SSC: 825*f11c7f63SJim Harris * SAS SSC Tx at +1064 / -1064 PPM Spread = 0x3 826*f11c7f63SJim Harris * SAS SSC Tx at +2129 / -2129 PPM Spread = 0x6 827*f11c7f63SJim Harris */ 828*f11c7f63SJim Harris U8 ssc_sas_tx_spread_level : 3; 829*f11c7f63SJim Harris /** 830*f11c7f63SJim Harris * NOTE: Refer to the SSC section of the SAS 2.x Specification 831*f11c7f63SJim Harris * for proper setting of this field. For standard SAS Initiator 832*f11c7f63SJim Harris * SAS PHY operation it should be 0 for Down-spreading. 833*f11c7f63SJim Harris * SAS SSC Tx spread type: 834*f11c7f63SJim Harris * Down-spreading SSC = 0 835*f11c7f63SJim Harris * Center-spreading SSC = 1 836*f11c7f63SJim Harris */ 837*f11c7f63SJim Harris U8 ssc_sas_tx_type : 1; 838*f11c7f63SJim Harris 839*f11c7f63SJim Harris /** 840*f11c7f63SJim Harris * This field indicates length of the SAS/SATA cable between 841*f11c7f63SJim Harris * host and device. 842*f11c7f63SJim Harris * This field is used make relationship between analog parameters of 843*f11c7f63SJim Harris * the phy in the silicon and length of the cable. 844*f11c7f63SJim Harris * Supported cable attenuation levels: 845*f11c7f63SJim Harris * "short"- up to 3m, "medium"-3m to 6m, and "long"- more than 6m 846*f11c7f63SJim Harris * This is bit mask field: 847*f11c7f63SJim Harris * 848*f11c7f63SJim Harris * BIT: (MSB) 7 6 5 4 849*f11c7f63SJim Harris * ASSIGNMENT: <phy3><phy2><phy1><phy0> - Medium cable length assignment 850*f11c7f63SJim Harris * BIT: 3 2 1 0 (LSB) 851*f11c7f63SJim Harris * ASSIGNMENT: <phy3><phy2><phy1><phy0> - Long cable length assignment 852*f11c7f63SJim Harris * 853*f11c7f63SJim Harris * BITS 7-4 are set when the cable length is assigned to medium 854*f11c7f63SJim Harris * BITS 3-0 are set when the cable length is assigned to long 855*f11c7f63SJim Harris * The BIT positions are clear when the cable length is assigned to short 856*f11c7f63SJim Harris * Setting the bits for both long and medium cable length is undefined. 857*f11c7f63SJim Harris * 858*f11c7f63SJim Harris * A value of 0x84 would assign 859*f11c7f63SJim Harris * phy3 - medium 860*f11c7f63SJim Harris * phy2 - long 861*f11c7f63SJim Harris * phy1 - short 862*f11c7f63SJim Harris * phy0 - short 863*f11c7f63SJim Harris */ 864*f11c7f63SJim Harris U8 cable_selection_mask; 865*f11c7f63SJim Harris 866*f11c7f63SJim Harris } controller; 867*f11c7f63SJim Harris 868*f11c7f63SJim Harris /** 869*f11c7f63SJim Harris * Per SAS Port data. 870*f11c7f63SJim Harris */ 871*f11c7f63SJim Harris struct 872*f11c7f63SJim Harris { 873*f11c7f63SJim Harris /** 874*f11c7f63SJim Harris * This field specifies the phys to be contained inside a port. 875*f11c7f63SJim Harris * The bit position in the mask specifies the index of the phy 876*f11c7f63SJim Harris * to be contained in the port. Multiple bits (i.e. phys) 877*f11c7f63SJim Harris * can be contained in a single port: 878*f11c7f63SJim Harris * Bit 0 = This controller's PHY index 0 (0x01) 879*f11c7f63SJim Harris * Bit 1 = This controller's PHY index 1 (0x02) 880*f11c7f63SJim Harris * Bit 2 = This controller's PHY index 2 (0x04) 881*f11c7f63SJim Harris * Bit 3 = This controller's PHY index 3 (0x08) 882*f11c7f63SJim Harris * 883*f11c7f63SJim Harris * Refer to the mode_type field for rules regarding APC and MPC mode. 884*f11c7f63SJim Harris * General rule: For APC mode phy_mask = 0 885*f11c7f63SJim Harris */ 886*f11c7f63SJim Harris U8 phy_mask; 887*f11c7f63SJim Harris 888*f11c7f63SJim Harris } ports[SCI_MAX_PORTS]; // Up to 4 Ports per SCU controller unit 889*f11c7f63SJim Harris 890*f11c7f63SJim Harris /** 891*f11c7f63SJim Harris * Per PHY Parameter data. 892*f11c7f63SJim Harris */ 893*f11c7f63SJim Harris struct 894*f11c7f63SJim Harris { 895*f11c7f63SJim Harris /** 896*f11c7f63SJim Harris * This field indicates the SAS Address that will be transmitted on 897*f11c7f63SJim Harris * this PHY index. The field is defined as a union, however, the 898*f11c7f63SJim Harris * OEM should use the U8 array definition when encoding it to ensure 899*f11c7f63SJim Harris * correct byte ordering. 900*f11c7f63SJim Harris * 901*f11c7f63SJim Harris * NOTE: If using APC MODE, along with phy_mask being set to ZERO, the 902*f11c7f63SJim Harris * SAS Addresses for all PHYs within a controller group SHALL be the 903*f11c7f63SJim Harris * same. 904*f11c7f63SJim Harris */ 905*f11c7f63SJim Harris union 906*f11c7f63SJim Harris { 907*f11c7f63SJim Harris /** 908*f11c7f63SJim Harris * The array should be stored in little endian order. For example, 909*f11c7f63SJim Harris * if the desired SAS Address is 0x50010B90_0003538D, then it 910*f11c7f63SJim Harris * should be stored in the following manner: 911*f11c7f63SJim Harris * array[0] = 0x90 912*f11c7f63SJim Harris * array[1] = 0x0B 913*f11c7f63SJim Harris * array[2] = 0x01 914*f11c7f63SJim Harris * array[3] = 0x50 915*f11c7f63SJim Harris * array[4] = 0x8D 916*f11c7f63SJim Harris * array[5] = 0x53 917*f11c7f63SJim Harris * array[6] = 0x03 918*f11c7f63SJim Harris * array[7] = 0x00 919*f11c7f63SJim Harris */ 920*f11c7f63SJim Harris U8 array[8]; 921*f11c7f63SJim Harris /** 922*f11c7f63SJim Harris * This is the typedef'd version of the SAS Address used in 923*f11c7f63SJim Harris * the SCI Library. 924*f11c7f63SJim Harris */ 925*f11c7f63SJim Harris SCI_SAS_ADDRESS_T sci_format; 926*f11c7f63SJim Harris 927*f11c7f63SJim Harris } sas_address; 928*f11c7f63SJim Harris 929*f11c7f63SJim Harris /** 930*f11c7f63SJim Harris * These are the per PHY equalization settings associated with the the 931*f11c7f63SJim Harris * AFE XCVR Tx Amplitude and Equalization Control Register Set 932*f11c7f63SJim Harris * (0 thru 3). 933*f11c7f63SJim Harris * 934*f11c7f63SJim Harris * Operational Note: The following Look-Up-Table registers are engaged 935*f11c7f63SJim Harris * by the AFE block after the following: 936*f11c7f63SJim Harris * - Software programs the Link Layer AFE Look Up Table Control 937*f11c7f63SJim Harris * Registers (AFE_LUTCR). 938*f11c7f63SJim Harris * - Software sets AFE XCVR Tx Control Register Tx Equalization 939*f11c7f63SJim Harris * Enable bit. 940*f11c7f63SJim Harris */ 941*f11c7f63SJim Harris /** 942*f11c7f63SJim Harris * AFE_TX_AMP_CTRL0. This register is associated with AFE_LUTCR 943*f11c7f63SJim Harris * LUTSel=00b. It contains the Tx Equalization settings that will be 944*f11c7f63SJim Harris * used if a SATA 1.5Gbs or SATA 3.0Gbs device is direct-attached. 945*f11c7f63SJim Harris */ 946*f11c7f63SJim Harris U32 afe_tx_amp_control0; 947*f11c7f63SJim Harris 948*f11c7f63SJim Harris /** 949*f11c7f63SJim Harris * AFE_TX_AMP_CTRL1. This register is associated with AFE_LUTCR 950*f11c7f63SJim Harris * LUTSel=01b. It contains the Tx Equalization settings that will 951*f11c7f63SJim Harris * be used if a SATA 6.0Gbs device is direct-attached. 952*f11c7f63SJim Harris */ 953*f11c7f63SJim Harris U32 afe_tx_amp_control1; 954*f11c7f63SJim Harris 955*f11c7f63SJim Harris /** 956*f11c7f63SJim Harris * AFE_TX_AMP_CTRL2. This register is associated with AFE_LUTCR 957*f11c7f63SJim Harris * LUTSel=10b. It contains the Tx Equalization settings that will 958*f11c7f63SJim Harris * be used if a SAS 1.5Gbs or SAS 3.0Gbs device is direct-attached. 959*f11c7f63SJim Harris */ 960*f11c7f63SJim Harris U32 afe_tx_amp_control2; 961*f11c7f63SJim Harris 962*f11c7f63SJim Harris /** 963*f11c7f63SJim Harris * AFE_TX_AMP_CTRL3. This register is associated with AFE_LUTCR 964*f11c7f63SJim Harris * LUTSel=11b. It contains the Tx Equalization settings that will 965*f11c7f63SJim Harris * be used if a SAS 6.0Gbs device is direct-attached. 966*f11c7f63SJim Harris */ 967*f11c7f63SJim Harris U32 afe_tx_amp_control3; 968*f11c7f63SJim Harris 969*f11c7f63SJim Harris } phys[SCI_MAX_PHYS]; // 4 PHYs per SCU controller unit 970*f11c7f63SJim Harris 971*f11c7f63SJim Harris } SCI_BIOS_OEM_PARAM_ELEMENT_v_1_3_T; 972*f11c7f63SJim Harris 973*f11c7f63SJim Harris /** 974*f11c7f63SJim Harris * @struct SCI_BIOS_OEM_PARAM_BLOCK 975*f11c7f63SJim Harris * 976*f11c7f63SJim Harris * @brief This structure defines the OEM Parameter block as it will be stored 977*f11c7f63SJim Harris * in the last 512 bytes of the PDR region in the SPI flash. It must be 978*f11c7f63SJim Harris * unpacked or pack(1). 979*f11c7f63SJim Harris */ 980*f11c7f63SJim Harris typedef struct SCI_BIOS_OEM_PARAM_BLOCK 981*f11c7f63SJim Harris { 982*f11c7f63SJim Harris /** 983*f11c7f63SJim Harris * OEM Parameter Block header. 984*f11c7f63SJim Harris */ 985*f11c7f63SJim Harris SCI_BIOS_OEM_PARAM_BLOCK_HDR_T header; 986*f11c7f63SJim Harris 987*f11c7f63SJim Harris /** 988*f11c7f63SJim Harris * Per controller element descriptor containing the controller's 989*f11c7f63SJim Harris * parameter data. The prototype defines just one of these descriptors, 990*f11c7f63SJim Harris * however, the actual runtime number is determined by the num_elements 991*f11c7f63SJim Harris * field in the header. 992*f11c7f63SJim Harris */ 993*f11c7f63SJim Harris SCI_BIOS_OEM_PARAM_ELEMENT_T controller_element[1]; 994*f11c7f63SJim Harris 995*f11c7f63SJim Harris } SCI_BIOS_OEM_PARAM_BLOCK_T; 996*f11c7f63SJim Harris 997*f11c7f63SJim Harris #ifdef __cplusplus 998*f11c7f63SJim Harris } 999*f11c7f63SJim Harris #endif // __cplusplus 1000*f11c7f63SJim Harris 1001*f11c7f63SJim Harris #endif // _SCU_BIOS_DEFINITIONS_H_ 1002*f11c7f63SJim Harris 1003