merlin16_pwr_mgt.h (4138B)
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_pwr_mgt.h 22 * Power management functions provided to IP User 23 */ 24 #ifndef MERLIN16_API_PWR_MGT_H 25 #define MERLIN16_API_PWR_MGT_H 26 27 #include "merlin16_ipconfig.h" 28 #include "common/srds_api_enum.h" 29 #include "common/srds_api_err_code.h" 30 #include "merlin16_dependencies.h" 31 32 /*-----------------------*/ 33 /* IDDQ / Clkgate APIs */ 34 /*-----------------------*/ 35 /** Core configuration for IDDQ. 36 * Note: User also needs to configure all lanes through merlin16_lane_config_for_iddq() 37 * before enabling IDDQ by asserting IDDQ pin. 38 * @param sa__ is an opaque state vector passed through to device access functions. 39 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 40 */ 41 err_code_t merlin16_core_config_for_iddq(srds_access_t *sa__); 42 43 /** Serdes Core Powerdown. 44 * Along with merlin16_core_pwrdn(), all lanes powerdowns should also be issued using 45 * merlin16_lane_pwrdn() to complete a Core Powerdown. 46 * @param sa__ is an opaque state vector passed through to device access functions. 47 * @param mode based on enum #srds_core_pwrdn_mode_enum select from ON, CORE, DEEP power down modes 48 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 49 */ 50 err_code_t merlin16_core_pwrdn(srds_access_t *sa__, enum srds_core_pwrdn_mode_enum mode); 51 52 /**************************************************/ 53 /* LANE Based APIs - Required to be used per Lane */ 54 /**************************************************/ 55 56 /*--------------------------------------------------------------*/ 57 /* IDDQ / Powerdown / Deep Powerdown / Isolate Pins */ 58 /*--------------------------------------------------------------*/ 59 /** Lane configurations for IDDQ. 60 * Note: User needs to configure all lanes through merlin16_lane_config_for_iddq() and also call merlin16_core_config_for_iddq() 61 * before enabling IDDQ by asserting IDDQ pin. 62 * @param sa__ is an opaque state vector passed through to device access functions. 63 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 64 */ 65 err_code_t merlin16_lane_config_for_iddq(srds_access_t *sa__); 66 67 /** Serdes Lane Powerdown. 68 * Powers down option available - TX only, RX only, complete LANE, complete lane DEEP, PWR_ON 69 * 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)]. 70 * @param sa__ is an opaque state vector passed through to device access functions. 71 * @param mode Enable/Disable lane powerdown based on #srds_core_pwrdn_mode_enum 72 * @return Error Code generated by API (returns ERR_CODE_NONE if no errors) 73 */ 74 err_code_t merlin16_lane_pwrdn(srds_access_t *sa__, enum srds_core_pwrdn_mode_enum mode); 75 76 #endif