AM62D FreeRTOS SDK  11.02.00
tisci_pm_clock.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2015-2025 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  */
53 #ifndef TISCI_PM_TISCI_CLOCK_H
54 #define TISCI_PM_TISCI_CLOCK_H
55 
56 #ifdef __cplusplus
57 extern "C"
58 {
59 #endif
60 
61 
62 
67 #define TISCI_MSG_VALUE_CLOCK_SW_STATE_UNREQ 0
68 
75 #define TISCI_MSG_VALUE_CLOCK_SW_STATE_AUTO 1
76 
78 #define TISCI_MSG_VALUE_CLOCK_SW_STATE_REQ 2
79 
81 #define TISCI_MSG_VALUE_CLOCK_HW_STATE_NOT_READY 0
82 
84 #define TISCI_MSG_VALUE_CLOCK_HW_STATE_READY 1
85 
87 #define TISCI_MSG_VALUE_CLOCK_SSC_SPREAD_DOWN 3U
88 
90 #define TISCI_MSG_VALUE_CLOCK_SSC_SPREAD_CENTER 1U
91 
96 #define TISCI_MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE TISCI_BIT(9)
97 
102 #define TISCI_MSG_FLAG_CLOCK_INPUT_TERM TISCI_BIT(10)
103 
105 #define TISCI_MSG_FLAG_CLOCK_SSC_ACTIVE TISCI_BIT(11)
106 
143  struct tisci_header hdr;
144  uint32_t device;
145  uint8_t clk;
146  uint8_t state;
147  uint32_t clk32;
148 } __attribute__((__packed__));
149 
159  struct tisci_header hdr;
160 } __attribute__((__packed__));
161 
185  struct tisci_header hdr;
186  uint32_t device;
187  uint8_t clk;
188  uint32_t clk32;
189 } __attribute__((__packed__));
190 
206  struct tisci_header hdr;
208  uint8_t current_state;
209 } __attribute__((__packed__));
210 
257  struct tisci_header hdr;
258  uint32_t device;
259  uint8_t clk;
260  uint8_t parent;
261  uint32_t clk32;
262  uint32_t parent32;
263 } __attribute__((__packed__));
264 
274  struct tisci_header hdr;
275 } __attribute__((__packed__));
276 
305  struct tisci_header hdr;
306  uint32_t device;
307  uint8_t clk;
308  uint32_t clk32;
309 } __attribute__((__packed__));
310 
328  struct tisci_header hdr;
329  uint8_t parent;
330  uint32_t parent32;
331 } __attribute__((__packed__));
332 
356  struct tisci_header hdr;
357  uint32_t device;
358  uint8_t clk;
359  uint32_t clk32;
360 } __attribute__((__packed__));
361 
379  struct tisci_header hdr;
380  uint8_t num_parents;
382 } __attribute__((__packed__));
383 
435  struct tisci_header hdr;
436  uint32_t device;
437  uint64_t min_freq_hz;
438  uint64_t target_freq_hz;
439  uint64_t max_freq_hz;
440  uint8_t clk;
441  uint32_t clk32;
442 } __attribute__((__packed__));
443 
453  struct tisci_header hdr;
454 } __attribute__((__packed__));
455 
497  struct tisci_header hdr;
498  uint32_t device;
499  uint64_t min_freq_hz;
500  uint64_t target_freq_hz;
501  uint64_t max_freq_hz;
502  uint8_t clk;
503  uint32_t clk32;
504 } __attribute__((__packed__));
505 
515  struct tisci_header hdr;
516  uint64_t freq_hz;
517 } __attribute__((__packed__));
518 
545  struct tisci_header hdr;
546  uint32_t device;
547  uint8_t clk;
548  uint32_t clk32;
549 } __attribute__((__packed__));
550 
560  struct tisci_header hdr;
561  uint64_t freq_hz;
562 } __attribute__((__packed__));
563 
603  struct tisci_header hdr;
604  uint32_t device;
605  uint32_t clk;
606  uint32_t modfreq_hz;
607  uint32_t mod_depth;
608  uint8_t spread_type;
609  uint8_t enable;
610 } __attribute__((__packed__));
611 
621  struct tisci_header hdr;
622 } __attribute__((__packed__));
623 
640  struct tisci_header hdr;
641  uint32_t device;
642  uint32_t clk;
643 } __attribute__((__packed__));
644 
663  struct tisci_header hdr;
664  uint32_t modfreq_hz;
665  uint32_t mod_depth;
666  uint8_t spread_type;
667  uint8_t enable;
668 } __attribute__((__packed__));
669 
670 
671 #ifdef __cplusplus
672 }
673 #endif
674 
675 #endif /* TISCI_PM_TISCI_CLOCK_H */
676 
tisci_msg_get_num_clock_parents_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:358
tisci_msg_get_freq_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:548
tisci_msg_set_freq_resp
Empty response for TISCI_MSG_SET_FREQ.
Definition: tisci_pm_clock.h:452
tisci_msg_get_clock_ssc_req::clk
uint32_t clk
Definition: tisci_pm_clock.h:642
__attribute__
struct tisci_msg_set_clock_req __attribute__((__packed__))
tisci_msg_get_num_clock_parents_resp::num_parentint32_t
uint32_t num_parentint32_t
Definition: tisci_pm_clock.h:381
tisci_msg_get_freq_resp::freq_hz
uint64_t freq_hz
Definition: tisci_pm_clock.h:561
tisci_msg_get_freq_resp
Result of get frequency request.
Definition: tisci_pm_clock.h:559
tisci_msg_get_clock_ssc_req
Get the current SSC settings of a device's clock.
Definition: tisci_pm_clock.h:639
tisci_msg_set_clock_parent_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:261
tisci_msg_get_freq_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:560
tisci_msg_set_clock_ssc_req::mod_depth
uint32_t mod_depth
Definition: tisci_pm_clock.h:607
tisci_msg_set_clock_parent_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:274
tisci_msg_set_freq_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:453
tisci_msg_get_freq_req
Get the current frequency of a device's clock.
Definition: tisci_pm_clock.h:544
tisci_msg_get_num_clock_parents_resp::num_parents
uint8_t num_parents
Definition: tisci_pm_clock.h:380
tisci_msg_get_clock_ssc_resp::modfreq_hz
uint32_t modfreq_hz
Definition: tisci_pm_clock.h:664
tisci_msg_query_freq_req::target_freq_hz
uint64_t target_freq_hz
Definition: tisci_pm_clock.h:500
tisci_msg_get_clock_ssc_resp::enable
uint8_t enable
Definition: tisci_pm_clock.h:667
tisci_msg_get_clock_resp
Clock state response.
Definition: tisci_pm_clock.h:205
tisci_msg_get_num_clock_parents_resp
Num clock parents response.
Definition: tisci_pm_clock.h:378
tisci_msg_set_clock_ssc_req::clk
uint32_t clk
Definition: tisci_pm_clock.h:605
tisci_msg_get_clock_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:185
tisci_msg_get_clock_parent_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:307
tisci_msg_set_clock_req::device
uint32_t device
Definition: tisci_pm_clock.h:144
tisci_msg_get_num_clock_parents_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:356
tisci_msg_set_clock_ssc_req::spread_type
uint8_t spread_type
Definition: tisci_pm_clock.h:608
tisci_msg_query_freq_req::max_freq_hz
uint64_t max_freq_hz
Definition: tisci_pm_clock.h:501
tisci_msg_get_num_clock_parents_req
Return the number of possible parents for a clock.
Definition: tisci_pm_clock.h:355
tisci_msg_get_clock_parent_resp::parent32
uint32_t parent32
Definition: tisci_pm_clock.h:330
tisci_msg_get_clock_ssc_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:663
tisci_msg_query_freq_req
Determine the result of a hypothetical set frequency operation.
Definition: tisci_pm_clock.h:496
tisci_msg_query_freq_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:503
tisci_msg_get_freq_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:545
tisci_msg_get_freq_req::device
uint32_t device
Definition: tisci_pm_clock.h:546
tisci_msg_set_freq_req::device
uint32_t device
Definition: tisci_pm_clock.h:436
tisci_msg_get_clock_parent_resp::parent
uint8_t parent
Definition: tisci_pm_clock.h:329
tisci_msg_set_clock_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:147
tisci_msg_set_clock_parent_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:259
tisci_header
Header that prefixes all TISCI messages.
Definition: tisci_protocol.h:94
tisci_msg_query_freq_resp::freq_hz
uint64_t freq_hz
Definition: tisci_pm_clock.h:516
tisci_msg_get_clock_ssc_resp::mod_depth
uint32_t mod_depth
Definition: tisci_pm_clock.h:665
tisci_msg_set_clock_ssc_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:621
tisci_msg_get_num_clock_parents_req::device
uint32_t device
Definition: tisci_pm_clock.h:357
tisci_msg_get_clock_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:206
tisci_msg_get_clock_ssc_resp::spread_type
uint8_t spread_type
Definition: tisci_pm_clock.h:666
tisci_msg_set_clock_parent_req
Set the clock parent.
Definition: tisci_pm_clock.h:256
tisci_msg_get_clock_resp::programmed_state
uint8_t programmed_state
Definition: tisci_pm_clock.h:207
tisci_msg_set_clock_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:143
tisci_msg_get_clock_ssc_req::device
uint32_t device
Definition: tisci_pm_clock.h:641
tisci_msg_set_freq_req::max_freq_hz
uint64_t max_freq_hz
Definition: tisci_pm_clock.h:439
tisci_msg_query_freq_req::min_freq_hz
uint64_t min_freq_hz
Definition: tisci_pm_clock.h:499
tisci_msg_get_clock_ssc_resp
Result of get SSC request.
Definition: tisci_pm_clock.h:662
tisci_msg_get_clock_parent_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:305
tisci_msg_set_freq_req::min_freq_hz
uint64_t min_freq_hz
Definition: tisci_pm_clock.h:437
tisci_msg_set_clock_req
Mark a clock as required/not required.
Definition: tisci_pm_clock.h:142
tisci_msg_set_clock_parent_req::device
uint32_t device
Definition: tisci_pm_clock.h:258
tisci_msg_get_clock_parent_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:328
tisci_msg_query_freq_req::device
uint32_t device
Definition: tisci_pm_clock.h:498
tisci_msg_set_clock_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:145
tisci_msg_set_clock_ssc_req::device
uint32_t device
Definition: tisci_pm_clock.h:604
tisci_msg_set_clock_ssc_req::modfreq_hz
uint32_t modfreq_hz
Definition: tisci_pm_clock.h:606
tisci_msg_set_clock_ssc_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:603
tisci_msg_get_clock_parent_req::device
uint32_t device
Definition: tisci_pm_clock.h:306
tisci_msg_get_clock_parent_req
Return the current clock parent.
Definition: tisci_pm_clock.h:304
tisci_msg_query_freq_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:515
tisci_msg_get_clock_parent_resp
Clock parent response.
Definition: tisci_pm_clock.h:327
tisci_msg_set_clock_resp
Empty response for TISCI_MSG_SET_CLOCK.
Definition: tisci_pm_clock.h:158
tisci_msg_get_clock_ssc_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:640
tisci_msg_get_clock_req
Get the current state of a clock.
Definition: tisci_pm_clock.h:184
tisci_msg_set_clock_parent_resp
Empty response for TISCI_MSG_SET_CLOCK_PARENT.
Definition: tisci_pm_clock.h:273
tisci_msg_set_clock_parent_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:257
tisci_msg_query_freq_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:502
tisci_msg_get_clock_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:188
tisci_msg_get_clock_parent_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:308
tisci_msg_get_num_clock_parents_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:379
tisci_msg_get_clock_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:187
tisci_msg_set_freq_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:440
tisci_msg_set_clock_ssc_req::enable
uint8_t enable
Definition: tisci_pm_clock.h:609
tisci_msg_set_clock_resp::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:159
tisci_msg_set_clock_ssc_resp
Empty response for TISCI_MSG_SET_CLOCK_SSC.
Definition: tisci_pm_clock.h:620
tisci_msg_get_freq_req::clk
uint8_t clk
Definition: tisci_pm_clock.h:547
tisci_msg_set_freq_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:435
tisci_msg_set_clock_ssc_req
Set the spread spectrum clocking for a clock.
Definition: tisci_pm_clock.h:602
tisci_msg_query_freq_req::hdr
struct tisci_header hdr
Definition: tisci_pm_clock.h:497
tisci_msg_get_num_clock_parents_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:359
tisci_msg_set_freq_req
Set the desired frequency for a clock.
Definition: tisci_pm_clock.h:434
tisci_msg_set_clock_req::state
uint8_t state
Definition: tisci_pm_clock.h:146
tisci_msg_get_clock_req::device
uint32_t device
Definition: tisci_pm_clock.h:186
tisci_msg_set_freq_req::target_freq_hz
uint64_t target_freq_hz
Definition: tisci_pm_clock.h:438
tisci_msg_get_clock_resp::current_state
uint8_t current_state
Definition: tisci_pm_clock.h:208
tisci_msg_query_freq_resp
Result of a query operation.
Definition: tisci_pm_clock.h:514
tisci_msg_set_clock_parent_req::parent
uint8_t parent
Definition: tisci_pm_clock.h:260
tisci_msg_set_freq_req::clk32
uint32_t clk32
Definition: tisci_pm_clock.h:441
tisci_msg_set_clock_parent_req::parent32
uint32_t parent32
Definition: tisci_pm_clock.h:262