1 /* 2 * Copyright (c) 2021 Intel Corporation. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef __SOC_POWER_DEBUG_H__ 8 #define __SOC_POWER_DEBUG_H__ 9 10 /* #define SOC_SLEEP_STATE_GPIO_MARKER_DEBUG */ 11 12 #ifdef SOC_SLEEP_STATE_GPIO_MARKER_DEBUG 13 14 /* Select a gpio not used. LED4 on EVB. High = ON */ 15 #define DP_GPIO_ID MCHP_GPIO_0241_ID 16 17 /* output drive high */ 18 #define PM_DP_ENTER_GPIO_VAL 0x10240U 19 /* output drive low */ 20 #define PM_DP_EXIT_GPIO_VAL 0x0240U 21 pm_dp_gpio(uint32_t gpio_ctrl_val)22static inline void pm_dp_gpio(uint32_t gpio_ctrl_val) 23 { 24 struct gpio_regs * const regs = 25 (struct gpio_regs * const)(DT_REG_ADDR(DT_NODELABEL(gpio_000_036))); 26 27 regs->CTRL[DP_GPIO_ID] = gpio_ctrl_val; 28 } 29 30 #endif 31 32 #ifdef DP_GPIO_ID 33 #define PM_DP_ENTER() pm_dp_gpio(PM_DP_ENTER_GPIO_VAL) 34 #define PM_DP_EXIT() pm_dp_gpio(PM_DP_EXIT_GPIO_VAL) 35 #else 36 #define PM_DP_ENTER() 37 #define PM_DP_EXIT() 38 #endif 39 40 #endif /* __SOC_POWER_DEBUG_H__ */ 41