PDK API Guide for J721E
sciclient_pm.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2018 Texas Instruments Incorporated
3  *
4  * Redistribution and use in source and binary forms, with or without
5  * modification, are permitted provided that the following conditions
6  * are met:
7  *
8  * Redistributions of source code must retain the above copyright
9  * notice, this list of conditions and the following disclaimer.
10  *
11  * Redistributions in binary form must reproduce the above copyright
12  * notice, this list of conditions and the following disclaimer in the
13  * documentation and/or other materials provided with the
14  * distribution.
15  *
16  * Neither the name of Texas Instruments Incorporated nor the names of
17  * its contributors may be used to endorse or promote products derived
18  * from this software without specific prior written permission.
19  *
20  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
21  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
22  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
23  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
24  * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
25  * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
26  * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
27  * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
28  * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
29  * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
30  * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31  *
32  */
54 #ifndef SCICLIENT_PM_H_
55 #define SCICLIENT_PM_H_
56 
57 /* ========================================================================== */
58 /* Include Files */
59 /* ========================================================================== */
60 
61 #include <stdint.h>
62 
63 #ifdef __cplusplus
64 extern "C" {
65 #endif
66 
67 /* ========================================================================== */
68 /* Macros & Typedefs */
69 /* ========================================================================== */
70 
72 #define DOMGRP_00 ((0x01U) << 0U)
73 
74 #define DOMGRP_01 ((0x01U) << 1U)
75 
76 #define DOMGRP_02 ((0x01U) << 2U)
77 
78 #define DOMGRP_03 ((0x01U) << 3U)
79 
80 #define DOMGRP_04 ((0x01U) << 4U)
81 
82 #define DOMGRP_05 ((0x01U) << 5U)
83 
84 #define DOMGRP_06 ((0x01U) << 6U)
85 
86 /* ========================================================================== */
87 /* Structure Declarations */
88 /* ========================================================================== */
89 
90 /* None */
91 
92 /* ========================================================================== */
93 /* Function Declarations */
94 /* ========================================================================== */
95 
120 int32_t Sciclient_pmSetModuleState(uint32_t moduleId,
121  uint32_t state,
122  uint32_t reqFlag,
123  uint32_t timeout);
146 int32_t Sciclient_pmGetModuleState(uint32_t moduleId,
147  uint32_t *moduleState,
148  uint32_t *resetState,
149  uint32_t *contextLossState,
150  uint32_t timeout);
168 int32_t Sciclient_pmSetModuleRst(uint32_t moduleId,
169  uint32_t resetBit,
170  uint32_t timeout);
171 
192 int32_t Sciclient_pmSetModuleRst_flags(uint32_t moduleId,
193  uint32_t resetBit,
194  uint32_t reqFlag,
195  uint32_t timeout);
215 int32_t Sciclient_pmModuleClkRequest(uint32_t moduleId,
216  uint32_t clockId,
217  uint32_t state,
218  uint32_t additionalFlag,
219  uint32_t timeout);
236 int32_t Sciclient_pmModuleGetClkStatus(uint32_t moduleId,
237  uint32_t clockId,
238  uint32_t *state,
239  uint32_t timeout);
240 
263 int32_t Sciclient_pmSetModuleClkParent(uint32_t moduleId,
264  uint32_t clockId,
265  uint32_t parent,
266  uint32_t timeout);
288 int32_t Sciclient_pmGetModuleClkParent(uint32_t moduleId,
289  uint32_t clockId,
290  uint32_t *parent,
291  uint32_t timeout);
310 int32_t Sciclient_pmGetModuleClkNumParent(uint32_t moduleId,
311  uint32_t clockId,
312  uint32_t *numParent,
313  uint32_t timeout);
341 int32_t Sciclient_pmSetModuleClkFreq(uint32_t moduleId,
342  uint32_t clockId,
343  uint64_t freqHz,
344  uint32_t additionalFlag,
345  uint32_t timeout);
375 int32_t Sciclient_pmSetModuleClkFreqRange(uint32_t moduleId,
376  uint32_t clockId,
377  uint64_t freqHz,
378  uint64_t minFreqHz,
379  uint64_t maxFreqHz,
380  uint32_t additionalFlag,
381  uint32_t timeout);
407 int32_t Sciclient_pmQueryModuleClkFreq(uint32_t moduleId,
408  uint32_t clockId,
409  uint64_t reqFreqHz,
410  uint64_t *respFreqHz,
411  uint32_t timeout);
439 int32_t Sciclient_pmQueryModuleClkFreqRange(uint32_t moduleId,
440  uint32_t clockId,
441  uint64_t reqFreqHz,
442  uint64_t minFreqHz,
443  uint64_t maxFreqHz,
444  uint64_t *respFreqHz,
445  uint32_t timeout);
465 int32_t Sciclient_pmGetModuleClkFreq(uint32_t moduleId,
466  uint32_t clockId,
467  uint64_t *freqHz,
468  uint32_t timeout);
480 int32_t Sciclient_pmEnableWdt(uint32_t timeout);
481 
501 int32_t Sciclient_pmDisableWakeup(uint32_t timeout);
502 
521 int32_t Sciclient_pmGetWakeupReason(uint8_t mode[32],
522  uint8_t reason[32],
523  uint32_t * time_ms,
524  uint32_t timeout);
539 int32_t Sciclient_pmDevicePowerOff(uint32_t timeout);
540 
556 int32_t Sciclient_pmDeviceReset(uint32_t timeout);
557 
570 int32_t Sciclient_pmDomainReset(domgrp_t domGrp, uint32_t timeout);
571 
572 
581 int32_t Sciclient_pmIsModuleValid(uint32_t modId);
582 
583 #ifdef __cplusplus
584 }
585 #endif
586 
587 #endif /* #ifndef SCICLIENT_FMWPMMESSAGES_H_ */
588 
589 /* @} */
int32_t Sciclient_pmModuleGetClkStatus(uint32_t moduleId, uint32_t clockId, uint32_t *state, uint32_t timeout)
Message to get the clock state to or from a hardware block.
int32_t Sciclient_pmGetWakeupReason(uint8_t mode[32], uint8_t reason[32], uint32_t *time_ms, uint32_t timeout)
Request wakeup reason After a wakeup, the host can request the deepest sleep/idle mode reached and th...
int32_t Sciclient_pmSetModuleClkFreq(uint32_t moduleId, uint32_t clockId, uint64_t freqHz, uint32_t additionalFlag, uint32_t timeout)
Message to set the clock frequency. This is typically desired when the default frequency of the hardw...
int32_t Sciclient_pmDeviceReset(uint32_t timeout)
Objective: Trigger a SoC level reset Usage: Used to trigger a system level reset. NOTE: Depending on ...
int32_t Sciclient_pmSetModuleRst_flags(uint32_t moduleId, uint32_t resetBit, uint32_t reqFlag, uint32_t timeout)
Set the device reset state, allowing for user to set reqFlags This is used to set or release various ...
int32_t Sciclient_pmQueryModuleClkFreqRange(uint32_t moduleId, uint32_t clockId, uint64_t reqFreqHz, uint64_t minFreqHz, uint64_t maxFreqHz, uint64_t *respFreqHz, uint32_t timeout)
Message to query the best clock frequency in the given range. This message does no real operation,...
int32_t Sciclient_pmDomainReset(domgrp_t domGrp, uint32_t timeout)
Objective: Trigger a SoC level reset to parts of the SoC.
int32_t Sciclient_pmSetModuleClkParent(uint32_t moduleId, uint32_t clockId, uint32_t parent, uint32_t timeout)
Message to Set Clock Parent: This message allows SoC specific customization for setting up a specific...
int32_t Sciclient_pmDisableWakeup(uint32_t timeout)
This message is part of the CPU Off sequence. The sequence is:
int32_t Sciclient_pmSetModuleState(uint32_t moduleId, uint32_t state, uint32_t reqFlag, uint32_t timeout)
Message to set the hardware block/module state This is used to request or release a device....
uint8_t domgrp_t
Defines the sysfw DOMGRP type. This is meant to be used in code or data structures that require disti...
Definition: sciclient.h:235
int32_t Sciclient_pmGetModuleClkFreq(uint32_t moduleId, uint32_t clockId, uint64_t *freqHz, uint32_t timeout)
Message to Get Clock Frequency This is most used functionality and is meant for usage when the driver...
int32_t Sciclient_pmModuleClkRequest(uint32_t moduleId, uint32_t clockId, uint32_t state, uint32_t additionalFlag, uint32_t timeout)
Message to set the clock state: This requests for finer control of hardware device's clocks....
int32_t Sciclient_pmGetModuleClkNumParent(uint32_t moduleId, uint32_t clockId, uint32_t *numParent, uint32_t timeout)
Message to get the number of clock parents for a given module. This is typically used to get the max ...
int32_t Sciclient_pmDevicePowerOff(uint32_t timeout)
Some processors have a special sequence for powering off the core that provides notification to the P...
uint32_t time_ms
Definition: tisci_pm_core.h:132
int32_t Sciclient_pmQueryModuleClkFreq(uint32_t moduleId, uint32_t clockId, uint64_t reqFreqHz, uint64_t *respFreqHz, uint32_t timeout)
Message to query the best clock frequency in the given range. This message does no real operation,...
int32_t Sciclient_pmIsModuleValid(uint32_t modId)
This API would check if the given module Id is valid for the device.
char mode[32]
Definition: tisci_pm_core.h:130
uint8_t state
Definition: tisci_pm_clock.h:130
int32_t Sciclient_pmSetModuleRst(uint32_t moduleId, uint32_t resetBit, uint32_t timeout)
Set the device reset state. This is used to set or release various resets of the hardware block/modul...
int32_t Sciclient_pmSetModuleClkFreqRange(uint32_t moduleId, uint32_t clockId, uint64_t freqHz, uint64_t minFreqHz, uint64_t maxFreqHz, uint32_t additionalFlag, uint32_t timeout)
Message to set the clock frequency. This is typically desired when the default frequency of the hardw...
int32_t Sciclient_pmGetModuleClkParent(uint32_t moduleId, uint32_t clockId, uint32_t *parent, uint32_t timeout)
Message to Get Clock Parent: Query the clock parent currently configured for a specific clock source ...
uint8_t parent
Definition: tisci_pm_clock.h:130
int32_t Sciclient_pmGetModuleState(uint32_t moduleId, uint32_t *moduleState, uint32_t *resetState, uint32_t *contextLossState, uint32_t timeout)
Message to get the hardware block/Module state. This request does not require the processing entity t...
int32_t Sciclient_pmEnableWdt(uint32_t timeout)
Enables the WDT controllers within the DMSC.
char reason[32]
Definition: tisci_pm_core.h:131