merlin16_pcieg3_pwr_mgt.h (4237B)
1 /*********************************************************************************** 2 *********************************************************************************** 3 * * 4 * Revision : * 5 * * 6 * Description : Interface functions targeted to IP user * 7 * * 8 * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file. 9 * 10 * Copyright 2007-2019 Broadcom Inc. All rights reserved. * 11 * No portions of this material may be reproduced in any form without * 12 * the written permission of: * 13 * Broadcom Corporation * 14 * 5300 California Avenue * 15 * Irvine, CA 92617 * 16 * * 17 * All information contained in this document is Broadcom Corporation * 18 * company private proprietary, and trade secret. * 19 */ 20 21 /** @file merlin16_pcieg3_pwr_mgt.h 22 * Power management functions provided to IP User 23 */ 24 25 #ifndef MERLIN16_PCIEG3_API_PWR_MGT_H 26 #define MERLIN16_PCIEG3_API_PWR_MGT_H 27 28 #include "merlin16_pcieg3_ipconfig.h" 29 #include "common/srds_api_enum.h" 30 #include "common/srds_api_err_code.h" 31 #include "merlin16_pcieg3_dependencies.h" 32 33 /*-----------------------*/ 34 /* IDDQ / Clkgate APIs */ 35 /*-----------------------*/ 36 /** Core configuration for IDDQ. 37 * Note: User also needs to configure all lanes through merlin16_pcieg3_lane_config_for_iddq() 38 * before enabling IDDQ by asserting IDDQ pin. 39 * @param sa__ is an opaque state vector passed through to device access functions. 40 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 41 */ 42 err_code_t merlin16_pcieg3_core_config_for_iddq(srds_access_t *sa__); 43 44 /** Serdes Core Powerdown. 45 * Along with merlin16_pcieg3_core_pwrdn(), all lanes powerdowns should also be issued using 46 * merlin16_pcieg3_lane_pwrdn() to complete a Core Powerdown. 47 * @param sa__ is an opaque state vector passed through to device access functions. 48 * @param mode based on enum #srds_core_pwrdn_mode_enum select from ON, CORE, DEEP power down modes 49 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 50 */ 51 err_code_t merlin16_pcieg3_core_pwrdn(srds_access_t *sa__, enum srds_core_pwrdn_mode_enum mode); 52 53 /**************************************************/ 54 /* LANE Based APIs - Required to be used per Lane */ 55 /**************************************************/ 56 57 /*--------------------------------------------------------------*/ 58 /* IDDQ / Powerdown / Deep Powerdown / Isolate Pins */ 59 /*--------------------------------------------------------------*/ 60 /** Lane configurations for IDDQ. 61 * Note: User needs to configure all lanes through merlin16_pcieg3_lane_config_for_iddq() and also call merlin16_pcieg3_core_config_for_iddq() 62 * before enabling IDDQ by asserting IDDQ pin. 63 * @param sa__ is an opaque state vector passed through to device access functions. 64 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 65 */ 66 err_code_t merlin16_pcieg3_lane_config_for_iddq(srds_access_t *sa__); 67 68 /** Serdes Lane Powerdown. 69 * Powers down option available - TX only, RX only, complete LANE, complete lane DEEP, PWR_ON 70 * Note: To wake up from lane DEEP powerdown, first call PWR_ON and then de-assert lane_dp_reset [wr_ln_dp_s_rstb(0x1)]. 71 * @param sa__ is an opaque state vector passed through to device access functions. 72 * @param mode Enable/Disable lane powerdown based on #srds_core_pwrdn_mode_enum 73 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 74 */ 75 err_code_t merlin16_pcieg3_lane_pwrdn(srds_access_t *sa__, enum srds_core_pwrdn_mode_enum mode); 76 77 #endif