1 /* SPDX-License-Identifier: BSD-3-Clause */
3 * Texas Instruments System Control Interface (TISCI) Protocol
5 * Communication protocol with TI SCI hardware
6 * The system works in a message response protocol
7 * See: http://processors.wiki.ti.com/index.php/TISCI for details
9 * Copyright (C) 2018 Texas Instruments Incorporated - http://www.ti.com/
10 * Based on drivers/firmware/ti_sci.h from Linux.
17 /* Generic Messages */
18 #define TI_SCI_MSG_ENABLE_WDT 0x0000
19 #define TI_SCI_MSG_WAKE_RESET 0x0001
20 #define TI_SCI_MSG_VERSION 0x0002
21 #define TI_SCI_MSG_WAKE_REASON 0x0003
22 #define TI_SCI_MSG_GOODBYE 0x0004
23 #define TI_SCI_MSG_SYS_RESET 0x0005
24 #define TI_SCI_MSG_BOARD_CONFIG 0x000b
25 #define TI_SCI_MSG_BOARD_CONFIG_RM 0x000c
26 #define TI_SCI_MSG_BOARD_CONFIG_SECURITY 0x000d
27 #define TI_SCI_MSG_BOARD_CONFIG_PM 0x000e
28 #define TISCI_MSG_QUERY_MSMC 0x0020
31 #define TI_SCI_MSG_SET_DEVICE_STATE 0x0200
32 #define TI_SCI_MSG_GET_DEVICE_STATE 0x0201
33 #define TI_SCI_MSG_SET_DEVICE_RESETS 0x0202
36 #define TI_SCI_MSG_SET_CLOCK_STATE 0x0100
37 #define TI_SCI_MSG_GET_CLOCK_STATE 0x0101
38 #define TI_SCI_MSG_SET_CLOCK_PARENT 0x0102
39 #define TI_SCI_MSG_GET_CLOCK_PARENT 0x0103
40 #define TI_SCI_MSG_GET_NUM_CLOCK_PARENTS 0x0104
41 #define TI_SCI_MSG_SET_CLOCK_FREQ 0x010c
42 #define TI_SCI_MSG_QUERY_CLOCK_FREQ 0x010d
43 #define TI_SCI_MSG_GET_CLOCK_FREQ 0x010e
45 /* Processor Control Messages */
46 #define TISCI_MSG_PROC_REQUEST 0xc000
47 #define TISCI_MSG_PROC_RELEASE 0xc001
48 #define TISCI_MSG_PROC_HANDOVER 0xc005
49 #define TISCI_MSG_SET_PROC_BOOT_CONFIG 0xc100
50 #define TISCI_MSG_SET_PROC_BOOT_CTRL 0xc101
51 #define TISCI_MSG_PROC_AUTH_BOOT_IMIAGE 0xc120
52 #define TISCI_MSG_GET_PROC_BOOT_STATUS 0xc400
53 #define TISCI_MSG_WAIT_PROC_BOOT_STATUS 0xc401
55 /* Resource Management Requests */
56 #define TI_SCI_MSG_GET_RESOURCE_RANGE 0x1500
58 /* NAVSS resource management */
59 /* Ringacc requests */
60 #define TI_SCI_MSG_RM_RING_CFG 0x1110
61 #define TI_SCI_MSG_RM_RING_GET_CFG 0x1111
64 #define TI_SCI_MSG_RM_PSIL_PAIR 0x1280
65 #define TI_SCI_MSG_RM_PSIL_UNPAIR 0x1281
67 #define TI_SCI_MSG_RM_UDMAP_TX_ALLOC 0x1200
68 #define TI_SCI_MSG_RM_UDMAP_TX_FREE 0x1201
69 #define TI_SCI_MSG_RM_UDMAP_RX_ALLOC 0x1210
70 #define TI_SCI_MSG_RM_UDMAP_RX_FREE 0x1211
71 #define TI_SCI_MSG_RM_UDMAP_FLOW_CFG 0x1220
72 #define TI_SCI_MSG_RM_UDMAP_OPT_FLOW_CFG 0x1221
74 #define TISCI_MSG_RM_UDMAP_TX_CH_CFG 0x1205
75 #define TISCI_MSG_RM_UDMAP_TX_CH_GET_CFG 0x1206
76 #define TISCI_MSG_RM_UDMAP_RX_CH_CFG 0x1215
77 #define TISCI_MSG_RM_UDMAP_RX_CH_GET_CFG 0x1216
78 #define TISCI_MSG_RM_UDMAP_FLOW_CFG 0x1230
79 #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_CFG 0x1231
80 #define TISCI_MSG_RM_UDMAP_FLOW_GET_CFG 0x1232
81 #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_GET_CFG 0x1233
83 #define TISCI_MSG_FWL_SET 0x9000
84 #define TISCI_MSG_FWL_GET 0x9001
85 #define TISCI_MSG_FWL_CHANGE_OWNER 0x9002
88 * struct ti_sci_msg_hdr - Generic Message Header for All messages and responses
89 * @type: Type of messages: One of TI_SCI_MSG* values
90 * @host: Host of the message
91 * @seq: Message identifier indicating a transfer sequence
92 * @flags: Flag for the message
94 struct ti_sci_msg_hdr {
98 #define TI_SCI_MSG_FLAG(val) (1 << (val))
99 #define TI_SCI_FLAG_REQ_GENERIC_NORESPONSE 0x0
100 #define TI_SCI_FLAG_REQ_ACK_ON_RECEIVED TI_SCI_MSG_FLAG(0)
101 #define TI_SCI_FLAG_REQ_ACK_ON_PROCESSED TI_SCI_MSG_FLAG(1)
102 #define TI_SCI_FLAG_RESP_GENERIC_NACK 0x0
103 #define TI_SCI_FLAG_RESP_GENERIC_ACK TI_SCI_MSG_FLAG(1)
104 /* Additional Flags */
109 * struct ti_sci_secure_msg_hdr - Header that prefixes all TISCI messages sent
110 * via secure transport.
111 * @checksum: crc16 checksum for the entire message
112 * @reserved: Reserved for future use.
114 struct ti_sci_secure_msg_hdr {
120 * struct ti_sci_msg_resp_version - Response for a message
121 * @hdr: Generic header
122 * @firmware_description: String describing the firmware
123 * @firmware_revision: Firmware revision
124 * @abi_major: Major version of the ABI that firmware supports
125 * @abi_minor: Minor version of the ABI that firmware supports
127 * In general, ABI version changes follow the rule that minor version increments
128 * are backward compatible. Major revision changes in ABI may not be
129 * backward compatible.
131 * Response to a generic message with message type TI_SCI_MSG_VERSION
133 struct ti_sci_msg_resp_version {
134 struct ti_sci_msg_hdr hdr;
135 char firmware_description[32];
136 u16 firmware_revision;
142 * struct ti_sci_msg_req_reboot - Reboot the SoC
143 * @hdr: Generic Header
145 * Request type is TI_SCI_MSG_SYS_RESET, responded with a generic
148 struct ti_sci_msg_req_reboot {
149 struct ti_sci_msg_hdr hdr;
153 * struct ti_sci_msg_board_config - Board configuration message
154 * @hdr: Generic Header
155 * @boardcfgp_low: Lower 32 bit of the pointer pointing to the board
157 * @boardcfgp_high: Upper 32 bit of the pointer pointing to the board
159 * @boardcfg_size: Size of board configuration data object
160 * Request type is TI_SCI_MSG_BOARD_CONFIG, responded with a generic
163 struct ti_sci_msg_board_config {
164 struct ti_sci_msg_hdr hdr;
171 * struct ti_sci_msg_resp_query_msmc - Query msmc message response structure
172 * @hdr: Generic Header
173 * @msmc_start_low: Lower 32 bit of msmc start
174 * @msmc_start_high: Upper 32 bit of msmc start
175 * @msmc_end_low: Lower 32 bit of msmc end
176 * @msmc_end_high: Upper 32 bit of msmc end
178 * Response to a generic message with message type TISCI_MSG_QUERY_MSMC
180 struct ti_sci_msg_resp_query_msmc {
181 struct ti_sci_msg_hdr hdr;
189 * struct ti_sci_msg_req_set_device_state - Set the desired state of the device
190 * @hdr: Generic header
191 * @id: Indicates which device to modify
192 * @reserved: Reserved space in message, must be 0 for backward compatibility
193 * @state: The desired state of the device.
195 * Certain flags can also be set to alter the device state:
196 * + MSG_FLAG_DEVICE_WAKE_ENABLED - Configure the device to be a wake source.
197 * The meaning of this flag will vary slightly from device to device and from
198 * SoC to SoC but it generally allows the device to wake the SoC out of deep
200 * + MSG_FLAG_DEVICE_RESET_ISO - Enable reset isolation for this device.
201 * + MSG_FLAG_DEVICE_EXCLUSIVE - Claim this device exclusively. When passed
202 * with STATE_RETENTION or STATE_ON, it will claim the device exclusively.
203 * If another host already has this device set to STATE_RETENTION or STATE_ON,
204 * the message will fail. Once successful, other hosts attempting to set
205 * STATE_RETENTION or STATE_ON will fail.
207 * Request type is TI_SCI_MSG_SET_DEVICE_STATE, responded with a generic
210 struct ti_sci_msg_req_set_device_state {
211 /* Additional hdr->flags options */
212 #define MSG_FLAG_DEVICE_WAKE_ENABLED TI_SCI_MSG_FLAG(8)
213 #define MSG_FLAG_DEVICE_RESET_ISO TI_SCI_MSG_FLAG(9)
214 #define MSG_FLAG_DEVICE_EXCLUSIVE TI_SCI_MSG_FLAG(10)
215 struct ti_sci_msg_hdr hdr;
219 #define MSG_DEVICE_SW_STATE_AUTO_OFF 0
220 #define MSG_DEVICE_SW_STATE_RETENTION 1
221 #define MSG_DEVICE_SW_STATE_ON 2
226 * struct ti_sci_msg_req_get_device_state - Request to get device.
227 * @hdr: Generic header
228 * @id: Device Identifier
230 * Request type is TI_SCI_MSG_GET_DEVICE_STATE, responded device state
233 struct ti_sci_msg_req_get_device_state {
234 struct ti_sci_msg_hdr hdr;
239 * struct ti_sci_msg_resp_get_device_state - Response to get device request.
240 * @hdr: Generic header
241 * @context_loss_count: Indicates how many times the device has lost context. A
242 * driver can use this monotonic counter to determine if the device has
243 * lost context since the last time this message was exchanged.
244 * @resets: Programmed state of the reset lines.
245 * @programmed_state: The state as programmed by set_device.
246 * - Uses the MSG_DEVICE_SW_* macros
247 * @current_state: The actual state of the hardware.
249 * Response to request TI_SCI_MSG_GET_DEVICE_STATE.
251 struct ti_sci_msg_resp_get_device_state {
252 struct ti_sci_msg_hdr hdr;
253 u32 context_loss_count;
256 #define MSG_DEVICE_HW_STATE_OFF 0
257 #define MSG_DEVICE_HW_STATE_ON 1
258 #define MSG_DEVICE_HW_STATE_TRANS 2
263 * struct ti_sci_msg_req_set_device_resets - Set the desired resets
264 * configuration of the device
265 * @hdr: Generic header
266 * @id: Indicates which device to modify
267 * @resets: A bit field of resets for the device. The meaning, behavior,
268 * and usage of the reset flags are device specific. 0 for a bit
269 * indicates releasing the reset represented by that bit while 1
270 * indicates keeping it held.
272 * Request type is TI_SCI_MSG_SET_DEVICE_RESETS, responded with a generic
275 struct ti_sci_msg_req_set_device_resets {
276 struct ti_sci_msg_hdr hdr;
282 * struct ti_sci_msg_req_set_clock_state - Request to setup a Clock state
283 * @hdr: Generic Header, Certain flags can be set specific to the clocks:
284 * MSG_FLAG_CLOCK_ALLOW_SSC: Allow this clock to be modified
285 * via spread spectrum clocking.
286 * MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE: Allow this clock's
287 * frequency to be changed while it is running so long as it
288 * is within the min/max limits.
289 * MSG_FLAG_CLOCK_INPUT_TERM: Enable input termination, this
290 * is only applicable to clock inputs on the SoC pseudo-device.
291 * @dev_id: Device identifier this request is for
292 * @clk_id: Clock identifier for the device for this request.
293 * Each device has it's own set of clock inputs. This indexes
294 * which clock input to modify.
295 * @request_state: Request the state for the clock to be set to.
296 * MSG_CLOCK_SW_STATE_UNREQ: The IP does not require this clock,
297 * it can be disabled, regardless of the state of the device
298 * MSG_CLOCK_SW_STATE_AUTO: Allow the System Controller to
299 * automatically manage the state of this clock. If the device
300 * is enabled, then the clock is enabled. If the device is set
301 * to off or retention, then the clock is internally set as not
302 * being required by the device.(default)
303 * MSG_CLOCK_SW_STATE_REQ: Configure the clock to be enabled,
304 * regardless of the state of the device.
306 * Normally, all required clocks are managed by TISCI entity, this is used
307 * only for specific control *IF* required. Auto managed state is
308 * MSG_CLOCK_SW_STATE_AUTO, in other states, TISCI entity assume remote
309 * will explicitly control.
311 * Request type is TI_SCI_MSG_SET_CLOCK_STATE, response is a generic
312 * ACK or NACK message.
314 struct ti_sci_msg_req_set_clock_state {
315 /* Additional hdr->flags options */
316 #define MSG_FLAG_CLOCK_ALLOW_SSC TI_SCI_MSG_FLAG(8)
317 #define MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE TI_SCI_MSG_FLAG(9)
318 #define MSG_FLAG_CLOCK_INPUT_TERM TI_SCI_MSG_FLAG(10)
319 struct ti_sci_msg_hdr hdr;
322 #define MSG_CLOCK_SW_STATE_UNREQ 0
323 #define MSG_CLOCK_SW_STATE_AUTO 1
324 #define MSG_CLOCK_SW_STATE_REQ 2
329 * struct ti_sci_msg_req_get_clock_state - Request for clock state
330 * @hdr: Generic Header
331 * @dev_id: Device identifier this request is for
332 * @clk_id: Clock identifier for the device for this request.
333 * Each device has it's own set of clock inputs. This indexes
334 * which clock input to get state of.
336 * Request type is TI_SCI_MSG_GET_CLOCK_STATE, response is state
339 struct ti_sci_msg_req_get_clock_state {
340 struct ti_sci_msg_hdr hdr;
346 * struct ti_sci_msg_resp_get_clock_state - Response to get clock state
347 * @hdr: Generic Header
348 * @programmed_state: Any programmed state of the clock. This is one of
349 * MSG_CLOCK_SW_STATE* values.
350 * @current_state: Current state of the clock. This is one of:
351 * MSG_CLOCK_HW_STATE_NOT_READY: Clock is not ready
352 * MSG_CLOCK_HW_STATE_READY: Clock is ready
354 * Response to TI_SCI_MSG_GET_CLOCK_STATE.
356 struct ti_sci_msg_resp_get_clock_state {
357 struct ti_sci_msg_hdr hdr;
359 #define MSG_CLOCK_HW_STATE_NOT_READY 0
360 #define MSG_CLOCK_HW_STATE_READY 1
365 * struct ti_sci_msg_req_set_clock_parent - Set the clock parent
366 * @hdr: Generic Header
367 * @dev_id: Device identifier this request is for
368 * @clk_id: Clock identifier for the device for this request.
369 * Each device has it's own set of clock inputs. This indexes
370 * which clock input to modify.
371 * @parent_id: The new clock parent is selectable by an index via this
374 * Request type is TI_SCI_MSG_SET_CLOCK_PARENT, response is generic
375 * ACK / NACK message.
377 struct ti_sci_msg_req_set_clock_parent {
378 struct ti_sci_msg_hdr hdr;
385 * struct ti_sci_msg_req_get_clock_parent - Get the clock parent
386 * @hdr: Generic Header
387 * @dev_id: Device identifier this request is for
388 * @clk_id: Clock identifier for the device for this request.
389 * Each device has it's own set of clock inputs. This indexes
390 * which clock input to get the parent for.
392 * Request type is TI_SCI_MSG_GET_CLOCK_PARENT, response is parent information
394 struct ti_sci_msg_req_get_clock_parent {
395 struct ti_sci_msg_hdr hdr;
401 * struct ti_sci_msg_resp_get_clock_parent - Response with clock parent
402 * @hdr: Generic Header
403 * @parent_id: The current clock parent
405 * Response to TI_SCI_MSG_GET_CLOCK_PARENT.
407 struct ti_sci_msg_resp_get_clock_parent {
408 struct ti_sci_msg_hdr hdr;
413 * struct ti_sci_msg_req_get_clock_num_parents - Request to get clock parents
414 * @hdr: Generic header
415 * @dev_id: Device identifier this request is for
416 * @clk_id: Clock identifier for the device for this request.
418 * This request provides information about how many clock parent options
419 * are available for a given clock to a device. This is typically used
422 * Request type is TI_SCI_MSG_GET_NUM_CLOCK_PARENTS, response is appropriate
423 * message, or NACK in case of inability to satisfy request.
425 struct ti_sci_msg_req_get_clock_num_parents {
426 struct ti_sci_msg_hdr hdr;
432 * struct ti_sci_msg_resp_get_clock_num_parents - Response for get clk parents
433 * @hdr: Generic header
434 * @num_parents: Number of clock parents
436 * Response to TI_SCI_MSG_GET_NUM_CLOCK_PARENTS
438 struct ti_sci_msg_resp_get_clock_num_parents {
439 struct ti_sci_msg_hdr hdr;
444 * struct ti_sci_msg_req_query_clock_freq - Request to query a frequency
445 * @hdr: Generic Header
446 * @dev_id: Device identifier this request is for
447 * @min_freq_hz: The minimum allowable frequency in Hz. This is the minimum
448 * allowable programmed frequency and does not account for clock
449 * tolerances and jitter.
450 * @target_freq_hz: The target clock frequency. A frequency will be found
451 * as close to this target frequency as possible.
452 * @max_freq_hz: The maximum allowable frequency in Hz. This is the maximum
453 * allowable programmed frequency and does not account for clock
454 * tolerances and jitter.
455 * @clk_id: Clock identifier for the device for this request.
457 * NOTE: Normally clock frequency management is automatically done by TISCI
458 * entity. In case of specific requests, TISCI evaluates capability to achieve
459 * requested frequency within provided range and responds with
462 * Request type is TI_SCI_MSG_QUERY_CLOCK_FREQ, response is appropriate message,
463 * or NACK in case of inability to satisfy request.
465 struct ti_sci_msg_req_query_clock_freq {
466 struct ti_sci_msg_hdr hdr;
475 * struct ti_sci_msg_resp_query_clock_freq - Response to a clock frequency query
476 * @hdr: Generic Header
477 * @freq_hz: Frequency that is the best match in Hz.
479 * Response to request type TI_SCI_MSG_QUERY_CLOCK_FREQ. NOTE: if the request
480 * cannot be satisfied, the message will be of type NACK.
482 struct ti_sci_msg_resp_query_clock_freq {
483 struct ti_sci_msg_hdr hdr;
488 * struct ti_sci_msg_req_set_clock_freq - Request to setup a clock frequency
489 * @hdr: Generic Header
490 * @dev_id: Device identifier this request is for
491 * @min_freq_hz: The minimum allowable frequency in Hz. This is the minimum
492 * allowable programmed frequency and does not account for clock
493 * tolerances and jitter.
494 * @target_freq_hz: The target clock frequency. The clock will be programmed
495 * at a rate as close to this target frequency as possible.
496 * @max_freq_hz: The maximum allowable frequency in Hz. This is the maximum
497 * allowable programmed frequency and does not account for clock
498 * tolerances and jitter.
499 * @clk_id: Clock identifier for the device for this request.
501 * NOTE: Normally clock frequency management is automatically done by TISCI
502 * entity. In case of specific requests, TISCI evaluates capability to achieve
503 * requested range and responds with success/failure message.
505 * This sets the desired frequency for a clock within an allowable
506 * range. This message will fail on an enabled clock unless
507 * MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE is set for the clock. Additionally,
508 * if other clocks have their frequency modified due to this message,
509 * they also must have the MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE or be disabled.
511 * Calling set frequency on a clock input to the SoC pseudo-device will
512 * inform the PMMC of that clock's frequency. Setting a frequency of
513 * zero will indicate the clock is disabled.
515 * Calling set frequency on clock outputs from the SoC pseudo-device will
516 * function similarly to setting the clock frequency on a device.
518 * Request type is TI_SCI_MSG_SET_CLOCK_FREQ, response is a generic ACK/NACK
521 struct ti_sci_msg_req_set_clock_freq {
522 struct ti_sci_msg_hdr hdr;
531 * struct ti_sci_msg_req_get_clock_freq - Request to get the clock frequency
532 * @hdr: Generic Header
533 * @dev_id: Device identifier this request is for
534 * @clk_id: Clock identifier for the device for this request.
536 * NOTE: Normally clock frequency management is automatically done by TISCI
537 * entity. In some cases, clock frequencies are configured by host.
539 * Request type is TI_SCI_MSG_GET_CLOCK_FREQ, responded with clock frequency
540 * that the clock is currently at.
542 struct ti_sci_msg_req_get_clock_freq {
543 struct ti_sci_msg_hdr hdr;
549 * struct ti_sci_msg_resp_get_clock_freq - Response of clock frequency request
550 * @hdr: Generic Header
551 * @freq_hz: Frequency that the clock is currently on, in Hz.
553 * Response to request type TI_SCI_MSG_GET_CLOCK_FREQ.
555 struct ti_sci_msg_resp_get_clock_freq {
556 struct ti_sci_msg_hdr hdr;
560 #define TI_SCI_IRQ_SECONDARY_HOST_INVALID 0xff
563 * struct ti_sci_msg_req_get_resource_range - Request to get a host's assigned
564 * range of resources.
565 * @hdr: Generic Header
566 * @type: Unique resource assignment type
567 * @subtype: Resource assignment subtype within the resource type.
568 * @secondary_host: Host processing entity to which the resources are
569 * allocated. This is required only when the destination
570 * host id id different from ti sci interface host id,
571 * else TI_SCI_IRQ_SECONDARY_HOST_INVALID can be passed.
573 * Request type is TI_SCI_MSG_GET_RESOURCE_RANGE. Responded with requested
574 * resource range which is of type TI_SCI_MSG_GET_RESOURCE_RANGE.
576 struct ti_sci_msg_req_get_resource_range {
577 struct ti_sci_msg_hdr hdr;
578 #define MSG_RM_RESOURCE_TYPE_MASK GENMASK(9, 0)
579 #define MSG_RM_RESOURCE_SUBTYPE_MASK GENMASK(5, 0)
586 * struct ti_sci_msg_resp_get_resource_range - Response to resource get range.
587 * @hdr: Generic Header
588 * @range_start: Start index of the resource range.
589 * @range_num: Number of resources in the range.
591 * Response to request TI_SCI_MSG_GET_RESOURCE_RANGE.
593 struct ti_sci_msg_resp_get_resource_range {
594 struct ti_sci_msg_hdr hdr;
599 #define TISCI_ADDR_LOW_MASK GENMASK_ULL(31, 0)
600 #define TISCI_ADDR_HIGH_MASK GENMASK_ULL(63, 32)
601 #define TISCI_ADDR_HIGH_SHIFT 32
604 * struct ti_sci_msg_req_proc_request - Request a processor
606 * @hdr: Generic Header
607 * @processor_id: ID of processor
609 * Request type is TISCI_MSG_PROC_REQUEST, response is a generic ACK/NACK
612 struct ti_sci_msg_req_proc_request {
613 struct ti_sci_msg_hdr hdr;
618 * struct ti_sci_msg_req_proc_release - Release a processor
620 * @hdr: Generic Header
621 * @processor_id: ID of processor
623 * Request type is TISCI_MSG_PROC_RELEASE, response is a generic ACK/NACK
626 struct ti_sci_msg_req_proc_release {
627 struct ti_sci_msg_hdr hdr;
632 * struct ti_sci_msg_req_proc_handover - Handover a processor to a host
634 * @hdr: Generic Header
635 * @processor_id: ID of processor
636 * @host_id: New Host we want to give control to
638 * Request type is TISCI_MSG_PROC_HANDOVER, response is a generic ACK/NACK
641 struct ti_sci_msg_req_proc_handover {
642 struct ti_sci_msg_hdr hdr;
647 /* A53 Config Flags */
648 #define PROC_BOOT_CFG_FLAG_ARMV8_DBG_EN 0x00000001
649 #define PROC_BOOT_CFG_FLAG_ARMV8_DBG_NIDEN 0x00000002
650 #define PROC_BOOT_CFG_FLAG_ARMV8_DBG_SPIDEN 0x00000004
651 #define PROC_BOOT_CFG_FLAG_ARMV8_DBG_SPNIDEN 0x00000008
652 #define PROC_BOOT_CFG_FLAG_ARMV8_AARCH32 0x00000100
654 /* R5 Config Flags */
655 #define PROC_BOOT_CFG_FLAG_R5_DBG_EN 0x00000001
656 #define PROC_BOOT_CFG_FLAG_R5_DBG_NIDEN 0x00000002
657 #define PROC_BOOT_CFG_FLAG_R5_LOCKSTEP 0x00000100
658 #define PROC_BOOT_CFG_FLAG_R5_TEINIT 0x00000200
659 #define PROC_BOOT_CFG_FLAG_R5_NMFI_EN 0x00000400
660 #define PROC_BOOT_CFG_FLAG_R5_TCM_RSTBASE 0x00000800
661 #define PROC_BOOT_CFG_FLAG_R5_BTCM_EN 0x00001000
662 #define PROC_BOOT_CFG_FLAG_R5_ATCM_EN 0x00002000
665 * struct ti_sci_msg_req_set_proc_boot_config - Set Processor boot configuration
666 * @hdr: Generic Header
667 * @processor_id: ID of processor
668 * @bootvector_low: Lower 32bit (Little Endian) of boot vector
669 * @bootvector_high: Higher 32bit (Little Endian) of boot vector
670 * @config_flags_set: Optional Processor specific Config Flags to set.
671 * Setting a bit here implies required bit sets to 1.
672 * @config_flags_clear: Optional Processor specific Config Flags to clear.
673 * Setting a bit here implies required bit gets cleared.
675 * Request type is TISCI_MSG_SET_PROC_BOOT_CONFIG, response is a generic
678 struct ti_sci_msg_req_set_proc_boot_config {
679 struct ti_sci_msg_hdr hdr;
683 u32 config_flags_set;
684 u32 config_flags_clear;
687 /* R5 Control Flags */
688 #define PROC_BOOT_CTRL_FLAG_R5_CORE_HALT 0x00000001
691 * struct ti_sci_msg_req_set_proc_boot_ctrl - Set Processor boot control flags
692 * @hdr: Generic Header
693 * @processor_id: ID of processor
694 * @control_flags_set: Optional Processor specific Control Flags to set.
695 * Setting a bit here implies required bit sets to 1.
696 * @control_flags_clear:Optional Processor specific Control Flags to clear.
697 * Setting a bit here implies required bit gets cleared.
699 * Request type is TISCI_MSG_SET_PROC_BOOT_CTRL, response is a generic ACK/NACK
702 struct ti_sci_msg_req_set_proc_boot_ctrl {
703 struct ti_sci_msg_hdr hdr;
705 u32 control_flags_set;
706 u32 control_flags_clear;
710 * struct ti_sci_msg_req_proc_auth_start_image - Authenticate and start image
711 * @hdr: Generic Header
712 * @cert_addr_low: Lower 32bit (Little Endian) of certificate
713 * @cert_addr_high: Higher 32bit (Little Endian) of certificate
715 * Request type is TISCI_MSG_PROC_AUTH_BOOT_IMAGE, response is a generic
718 struct ti_sci_msg_req_proc_auth_boot_image {
719 struct ti_sci_msg_hdr hdr;
724 struct ti_sci_msg_resp_proc_auth_boot_image {
725 struct ti_sci_msg_hdr hdr;
732 * struct ti_sci_msg_req_get_proc_boot_status - Get processor boot status
733 * @hdr: Generic Header
734 * @processor_id: ID of processor
736 * Request type is TISCI_MSG_GET_PROC_BOOT_STATUS, response is appropriate
737 * message, or NACK in case of inability to satisfy request.
739 struct ti_sci_msg_req_get_proc_boot_status {
740 struct ti_sci_msg_hdr hdr;
744 /* ARMv8 Status Flags */
745 #define PROC_BOOT_STATUS_FLAG_ARMV8_WFE 0x00000001
746 #define PROC_BOOT_STATUS_FLAG_ARMV8_WFI 0x00000002
748 /* R5 Status Flags */
749 #define PROC_BOOT_STATUS_FLAG_R5_WFE 0x00000001
750 #define PROC_BOOT_STATUS_FLAG_R5_WFI 0x00000002
751 #define PROC_BOOT_STATUS_FLAG_R5_CLK_GATED 0x00000004
752 #define PROC_BOOT_STATUS_FLAG_R5_LOCKSTEP_PERMITTED 0x00000100
755 * struct ti_sci_msg_resp_get_proc_boot_status - Processor boot status response
756 * @hdr: Generic Header
757 * @processor_id: ID of processor
758 * @bootvector_low: Lower 32bit (Little Endian) of boot vector
759 * @bootvector_high: Higher 32bit (Little Endian) of boot vector
760 * @config_flags: Optional Processor specific Config Flags set.
761 * @control_flags: Optional Processor specific Control Flags.
762 * @status_flags: Optional Processor specific Status Flags set.
764 * Response to TISCI_MSG_GET_PROC_BOOT_STATUS.
766 struct ti_sci_msg_resp_get_proc_boot_status {
767 struct ti_sci_msg_hdr hdr;
777 * struct ti_sci_msg_req_wait_proc_boot_status - Wait for a processor
779 * @hdr: Generic Header
780 * @processor_id: ID of processor
781 * @num_wait_iterations: Total number of iterations we will check before
782 * we will timeout and give up
783 * @num_match_iterations: How many iterations should we have continued
784 * status to account for status bits glitching.
785 * This is to make sure that match occurs for
786 * consecutive checks. This implies that the
787 * worst case should consider that the stable
788 * time should at the worst be num_wait_iterations
789 * num_match_iterations to prevent timeout.
790 * @delay_per_iteration_us: Specifies how long to wait (in micro seconds)
791 * between each status checks. This is the minimum
792 * duration, and overhead of register reads and
793 * checks are on top of this and can vary based on
795 * @delay_before_iterations_us: Specifies how long to wait (in micro seconds)
796 * before the very first check in the first
797 * iteration of status check loop. This is the
798 * minimum duration, and overhead of register
799 * reads and checks are.
800 * @status_flags_1_set_all_wait:If non-zero, Specifies that all bits of the
801 * status matching this field requested MUST be 1.
802 * @status_flags_1_set_any_wait:If non-zero, Specifies that at least one of the
803 * bits matching this field requested MUST be 1.
804 * @status_flags_1_clr_all_wait:If non-zero, Specifies that all bits of the
805 * status matching this field requested MUST be 0.
806 * @status_flags_1_clr_any_wait:If non-zero, Specifies that at least one of the
807 * bits matching this field requested MUST be 0.
809 * Request type is TISCI_MSG_WAIT_PROC_BOOT_STATUS, response is appropriate
810 * message, or NACK in case of inability to satisfy request.
812 struct ti_sci_msg_req_wait_proc_boot_status {
813 struct ti_sci_msg_hdr hdr;
815 u8 num_wait_iterations;
816 u8 num_match_iterations;
817 u8 delay_per_iteration_us;
818 u8 delay_before_iterations_us;
819 u32 status_flags_1_set_all_wait;
820 u32 status_flags_1_set_any_wait;
821 u32 status_flags_1_clr_all_wait;
822 u32 status_flags_1_clr_any_wait;
826 * struct ti_sci_msg_rm_ring_cfg_req - Configure a Navigator Subsystem ring
828 * Configures the non-real-time registers of a Navigator Subsystem ring.
829 * @hdr: Generic Header
830 * @valid_params: Bitfield defining validity of ring configuration parameters.
831 * The ring configuration fields are not valid, and will not be used for
832 * ring configuration, if their corresponding valid bit is zero.
834 * 0 - Valid bit for @tisci_msg_rm_ring_cfg_req addr_lo
835 * 1 - Valid bit for @tisci_msg_rm_ring_cfg_req addr_hi
836 * 2 - Valid bit for @tisci_msg_rm_ring_cfg_req count
837 * 3 - Valid bit for @tisci_msg_rm_ring_cfg_req mode
838 * 4 - Valid bit for @tisci_msg_rm_ring_cfg_req size
839 * 5 - Valid bit for @tisci_msg_rm_ring_cfg_req order_id
840 * @nav_id: Device ID of Navigator Subsystem from which the ring is allocated
841 * @index: ring index to be configured.
842 * @addr_lo: 32 LSBs of ring base address to be programmed into the ring's
843 * RING_BA_LO register
844 * @addr_hi: 16 MSBs of ring base address to be programmed into the ring's
845 * RING_BA_HI register.
846 * @count: Number of ring elements. Must be even if mode is CREDENTIALS or QM
848 * @mode: Specifies the mode the ring is to be configured.
849 * @size: Specifies encoded ring element size. To calculate the encoded size use
850 * the formula (log2(size_bytes) - 2), where size_bytes cannot be
852 * @order_id: Specifies the ring's bus order ID.
854 struct ti_sci_msg_rm_ring_cfg_req {
855 struct ti_sci_msg_hdr hdr;
868 * struct ti_sci_msg_rm_ring_cfg_resp - Response to configuring a ring.
870 * @hdr: Generic Header
872 struct ti_sci_msg_rm_ring_cfg_resp {
873 struct ti_sci_msg_hdr hdr;
877 * struct ti_sci_msg_rm_ring_get_cfg_req - Get RA ring's configuration
879 * Gets the configuration of the non-real-time register fields of a ring. The
880 * host, or a supervisor of the host, who owns the ring must be the requesting
881 * host. The values of the non-real-time registers are returned in
882 * @ti_sci_msg_rm_ring_get_cfg_resp.
884 * @hdr: Generic Header
885 * @nav_id: Device ID of Navigator Subsystem from which the ring is allocated
886 * @index: ring index.
888 struct ti_sci_msg_rm_ring_get_cfg_req {
889 struct ti_sci_msg_hdr hdr;
895 * struct ti_sci_msg_rm_ring_get_cfg_resp - Ring get configuration response
897 * Response received by host processor after RM has handled
898 * @ti_sci_msg_rm_ring_get_cfg_req. The response contains the ring's
899 * non-real-time register values.
901 * @hdr: Generic Header
902 * @addr_lo: Ring 32 LSBs of base address
903 * @addr_hi: Ring 16 MSBs of base address.
904 * @count: Ring number of elements.
906 * @size: encoded Ring element size
907 * @order_id: ing order ID.
909 struct ti_sci_msg_rm_ring_get_cfg_resp {
910 struct ti_sci_msg_hdr hdr;
920 * struct ti_sci_msg_psil_pair - Pairs a PSI-L source thread to a destination
922 * @hdr: Generic Header
923 * @nav_id: SoC Navigator Subsystem device ID whose PSI-L config proxy is
924 * used to pair the source and destination threads.
925 * @src_thread: PSI-L source thread ID within the PSI-L System thread map.
927 * UDMAP transmit channels mapped to source threads will have their
928 * TCHAN_THRD_ID register programmed with the destination thread if the pairing
931 * @dst_thread: PSI-L destination thread ID within the PSI-L System thread map.
932 * PSI-L destination threads start at index 0x8000. The request is NACK'd if
933 * the destination thread is not greater than or equal to 0x8000.
935 * UDMAP receive channels mapped to destination threads will have their
936 * RCHAN_THRD_ID register programmed with the source thread if the pairing
939 * Request type is TI_SCI_MSG_RM_PSIL_PAIR, response is a generic ACK or NACK
942 struct ti_sci_msg_psil_pair {
943 struct ti_sci_msg_hdr hdr;
950 * struct ti_sci_msg_psil_unpair - Unpairs a PSI-L source thread from a
952 * @hdr: Generic Header
953 * @nav_id: SoC Navigator Subsystem device ID whose PSI-L config proxy is
954 * used to unpair the source and destination threads.
955 * @src_thread: PSI-L source thread ID within the PSI-L System thread map.
957 * UDMAP transmit channels mapped to source threads will have their
958 * TCHAN_THRD_ID register cleared if the unpairing is successful.
960 * @dst_thread: PSI-L destination thread ID within the PSI-L System thread map.
961 * PSI-L destination threads start at index 0x8000. The request is NACK'd if
962 * the destination thread is not greater than or equal to 0x8000.
964 * UDMAP receive channels mapped to destination threads will have their
965 * RCHAN_THRD_ID register cleared if the unpairing is successful.
967 * Request type is TI_SCI_MSG_RM_PSIL_UNPAIR, response is a generic ACK or NACK
970 struct ti_sci_msg_psil_unpair {
971 struct ti_sci_msg_hdr hdr;
978 * Configures a Navigator Subsystem UDMAP transmit channel
980 * Configures the non-real-time registers of a Navigator Subsystem UDMAP
981 * transmit channel. The channel index must be assigned to the host defined
982 * in the TISCI header via the RM board configuration resource assignment
985 * @hdr: Generic Header
987 * @valid_params: Bitfield defining validity of tx channel configuration
988 * parameters. The tx channel configuration fields are not valid, and will not
989 * be used for ch configuration, if their corresponding valid bit is zero.
991 * 0 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_pause_on_err
992 * 1 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_atype
993 * 2 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_chan_type
994 * 3 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_fetch_size
995 * 4 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::txcq_qnum
996 * 5 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_priority
997 * 6 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_qos
998 * 7 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_orderid
999 * 8 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_sched_priority
1000 * 9 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_filt_einfo
1001 * 10 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_filt_pswords
1002 * 11 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_supr_tdpkt
1003 * 12 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_credit_count
1004 * 13 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::fdepth
1006 * @nav_id: SoC device ID of Navigator Subsystem where tx channel is located
1008 * @index: UDMAP transmit channel index.
1010 * @tx_pause_on_err: UDMAP transmit channel pause on error configuration to
1011 * be programmed into the tx_pause_on_err field of the channel's TCHAN_TCFG
1014 * @tx_filt_einfo: UDMAP transmit channel extended packet information passing
1015 * configuration to be programmed into the tx_filt_einfo field of the
1016 * channel's TCHAN_TCFG register.
1018 * @tx_filt_pswords: UDMAP transmit channel protocol specific word passing
1019 * configuration to be programmed into the tx_filt_pswords field of the
1020 * channel's TCHAN_TCFG register.
1022 * @tx_atype: UDMAP transmit channel non Ring Accelerator access pointer
1023 * interpretation configuration to be programmed into the tx_atype field of
1024 * the channel's TCHAN_TCFG register.
1026 * @tx_chan_type: UDMAP transmit channel functional channel type and work
1027 * passing mechanism configuration to be programmed into the tx_chan_type
1028 * field of the channel's TCHAN_TCFG register.
1030 * @tx_supr_tdpkt: UDMAP transmit channel teardown packet generation suppression
1031 * configuration to be programmed into the tx_supr_tdpkt field of the channel's
1032 * TCHAN_TCFG register.
1034 * @tx_fetch_size: UDMAP transmit channel number of 32-bit descriptor words to
1035 * fetch configuration to be programmed into the tx_fetch_size field of the
1036 * channel's TCHAN_TCFG register. The user must make sure to set the maximum
1037 * word count that can pass through the channel for any allowed descriptor type.
1039 * @tx_credit_count: UDMAP transmit channel transfer request credit count
1040 * configuration to be programmed into the count field of the TCHAN_TCREDIT
1041 * register. Specifies how many credits for complete TRs are available.
1043 * @txcq_qnum: UDMAP transmit channel completion queue configuration to be
1044 * programmed into the txcq_qnum field of the TCHAN_TCQ register. The specified
1045 * completion queue must be assigned to the host, or a subordinate of the host,
1046 * requesting configuration of the transmit channel.
1048 * @tx_priority: UDMAP transmit channel transmit priority value to be programmed
1049 * into the priority field of the channel's TCHAN_TPRI_CTRL register.
1051 * @tx_qos: UDMAP transmit channel transmit qos value to be programmed into the
1052 * qos field of the channel's TCHAN_TPRI_CTRL register.
1054 * @tx_orderid: UDMAP transmit channel bus order id value to be programmed into
1055 * the orderid field of the channel's TCHAN_TPRI_CTRL register.
1057 * @fdepth: UDMAP transmit channel FIFO depth configuration to be programmed
1058 * into the fdepth field of the TCHAN_TFIFO_DEPTH register. Sets the number of
1059 * Tx FIFO bytes which are allowed to be stored for the channel. Check the UDMAP
1060 * section of the TRM for restrictions regarding this parameter.
1062 * @tx_sched_priority: UDMAP transmit channel tx scheduling priority
1063 * configuration to be programmed into the priority field of the channel's
1064 * TCHAN_TST_SCHED register.
1066 struct ti_sci_msg_rm_udmap_tx_ch_cfg_req {
1067 struct ti_sci_msg_hdr hdr;
1084 u8 tx_sched_priority;
1088 * Response to configuring a UDMAP transmit channel.
1090 * @hdr: Standard TISCI header
1092 struct ti_sci_msg_rm_udmap_tx_ch_cfg_resp {
1093 struct ti_sci_msg_hdr hdr;
1097 * Configures a Navigator Subsystem UDMAP receive channel
1099 * Configures the non-real-time registers of a Navigator Subsystem UDMAP
1100 * receive channel. The channel index must be assigned to the host defined
1101 * in the TISCI header via the RM board configuration resource assignment
1104 * @hdr: Generic Header
1106 * @valid_params: Bitfield defining validity of rx channel configuration
1108 * The rx channel configuration fields are not valid, and will not be used for
1109 * ch configuration, if their corresponding valid bit is zero.
1111 * 0 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_pause_on_err
1112 * 1 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_atype
1113 * 2 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_chan_type
1114 * 3 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_fetch_size
1115 * 4 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rxcq_qnum
1116 * 5 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_priority
1117 * 6 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_qos
1118 * 7 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_orderid
1119 * 8 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_sched_priority
1120 * 9 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::flowid_start
1121 * 10 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::flowid_cnt
1122 * 11 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_ignore_short
1123 * 12 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_ignore_long
1125 * @nav_id: SoC device ID of Navigator Subsystem where rx channel is located
1127 * @index: UDMAP receive channel index.
1129 * @rx_fetch_size: UDMAP receive channel number of 32-bit descriptor words to
1130 * fetch configuration to be programmed into the rx_fetch_size field of the
1131 * channel's RCHAN_RCFG register.
1133 * @rxcq_qnum: UDMAP receive channel completion queue configuration to be
1134 * programmed into the rxcq_qnum field of the RCHAN_RCQ register.
1135 * The specified completion queue must be assigned to the host, or a subordinate
1136 * of the host, requesting configuration of the receive channel.
1138 * @rx_priority: UDMAP receive channel receive priority value to be programmed
1139 * into the priority field of the channel's RCHAN_RPRI_CTRL register.
1141 * @rx_qos: UDMAP receive channel receive qos value to be programmed into the
1142 * qos field of the channel's RCHAN_RPRI_CTRL register.
1144 * @rx_orderid: UDMAP receive channel bus order id value to be programmed into
1145 * the orderid field of the channel's RCHAN_RPRI_CTRL register.
1147 * @rx_sched_priority: UDMAP receive channel rx scheduling priority
1148 * configuration to be programmed into the priority field of the channel's
1149 * RCHAN_RST_SCHED register.
1151 * @flowid_start: UDMAP receive channel additional flows starting index
1152 * configuration to program into the flow_start field of the RCHAN_RFLOW_RNG
1153 * register. Specifies the starting index for flow IDs the receive channel is to
1154 * make use of beyond the default flow. flowid_start and @ref flowid_cnt must be
1155 * set as valid and configured together. The starting flow ID set by
1156 * @ref flowid_cnt must be a flow index within the Navigator Subsystem's subset
1157 * of flows beyond the default flows statically mapped to receive channels.
1158 * The additional flows must be assigned to the host, or a subordinate of the
1159 * host, requesting configuration of the receive channel.
1161 * @flowid_cnt: UDMAP receive channel additional flows count configuration to
1162 * program into the flowid_cnt field of the RCHAN_RFLOW_RNG register.
1163 * This field specifies how many flow IDs are in the additional contiguous range
1164 * of legal flow IDs for the channel. @ref flowid_start and flowid_cnt must be
1165 * set as valid and configured together. Disabling the valid_params field bit
1166 * for flowid_cnt indicates no flow IDs other than the default are to be
1167 * allocated and used by the receive channel. @ref flowid_start plus flowid_cnt
1168 * cannot be greater than the number of receive flows in the receive channel's
1169 * Navigator Subsystem. The additional flows must be assigned to the host, or a
1170 * subordinate of the host, requesting configuration of the receive channel.
1172 * @rx_pause_on_err: UDMAP receive channel pause on error configuration to be
1173 * programmed into the rx_pause_on_err field of the channel's RCHAN_RCFG
1176 * @rx_atype: UDMAP receive channel non Ring Accelerator access pointer
1177 * interpretation configuration to be programmed into the rx_atype field of the
1178 * channel's RCHAN_RCFG register.
1180 * @rx_chan_type: UDMAP receive channel functional channel type and work passing
1181 * mechanism configuration to be programmed into the rx_chan_type field of the
1182 * channel's RCHAN_RCFG register.
1184 * @rx_ignore_short: UDMAP receive channel short packet treatment configuration
1185 * to be programmed into the rx_ignore_short field of the RCHAN_RCFG register.
1187 * @rx_ignore_long: UDMAP receive channel long packet treatment configuration to
1188 * be programmed into the rx_ignore_long field of the RCHAN_RCFG register.
1190 struct ti_sci_msg_rm_udmap_rx_ch_cfg_req {
1191 struct ti_sci_msg_hdr hdr;
1200 u8 rx_sched_priority;
1211 * Response to configuring a UDMAP receive channel.
1213 * @hdr: Standard TISCI header
1215 struct ti_sci_msg_rm_udmap_rx_ch_cfg_resp {
1216 struct ti_sci_msg_hdr hdr;
1220 * Configures a Navigator Subsystem UDMAP receive flow
1222 * Configures a Navigator Subsystem UDMAP receive flow's registers.
1223 * Configuration does not include the flow registers which handle size-based
1224 * free descriptor queue routing.
1226 * The flow index must be assigned to the host defined in the TISCI header via
1227 * the RM board configuration resource assignment range list.
1229 * @hdr: Standard TISCI header
1232 * Bitfield defining validity of rx flow configuration parameters. The
1233 * rx flow configuration fields are not valid, and will not be used for flow
1234 * configuration, if their corresponding valid bit is zero. Valid bit usage:
1235 * 0 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_einfo_present
1236 * 1 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_psinfo_present
1237 * 2 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_error_handling
1238 * 3 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_desc_type
1239 * 4 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_sop_offset
1240 * 5 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_qnum
1241 * 6 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_hi
1242 * 7 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_lo
1243 * 8 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_hi
1244 * 9 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_lo
1245 * 10 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_hi_sel
1246 * 11 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_lo_sel
1247 * 12 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_hi_sel
1248 * 13 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_lo_sel
1249 * 14 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq0_sz0_qnum
1250 * 15 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq1_sz0_qnum
1251 * 16 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq2_sz0_qnum
1252 * 17 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq3_sz0_qnum
1253 * 18 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_ps_location
1255 * @nav_id: SoC device ID of Navigator Subsystem from which the receive flow is
1258 * @flow_index: UDMAP receive flow index for non-optional configuration.
1260 * @rx_einfo_present:
1261 * UDMAP receive flow extended packet info present configuration to be
1262 * programmed into the rx_einfo_present field of the flow's RFLOW_RFA register.
1264 * @rx_psinfo_present:
1265 * UDMAP receive flow PS words present configuration to be programmed into the
1266 * rx_psinfo_present field of the flow's RFLOW_RFA register.
1268 * @rx_error_handling:
1269 * UDMAP receive flow error handling configuration to be programmed into the
1270 * rx_error_handling field of the flow's RFLOW_RFA register.
1273 * UDMAP receive flow descriptor type configuration to be programmed into the
1274 * rx_desc_type field field of the flow's RFLOW_RFA register.
1277 * UDMAP receive flow start of packet offset configuration to be programmed
1278 * into the rx_sop_offset field of the RFLOW_RFA register. See the UDMAP
1279 * section of the TRM for more information on this setting. Valid values for
1280 * this field are 0-255 bytes.
1283 * UDMAP receive flow destination queue configuration to be programmed into the
1284 * rx_dest_qnum field of the flow's RFLOW_RFA register. The specified
1285 * destination queue must be valid within the Navigator Subsystem and must be
1286 * owned by the host, or a subordinate of the host, requesting allocation and
1287 * configuration of the receive flow.
1290 * UDMAP receive flow source tag high byte constant configuration to be
1291 * programmed into the rx_src_tag_hi field of the flow's RFLOW_RFB register.
1292 * See the UDMAP section of the TRM for more information on this setting.
1295 * UDMAP receive flow source tag low byte constant configuration to be
1296 * programmed into the rx_src_tag_lo field of the flow's RFLOW_RFB register.
1297 * See the UDMAP section of the TRM for more information on this setting.
1300 * UDMAP receive flow destination tag high byte constant configuration to be
1301 * programmed into the rx_dest_tag_hi field of the flow's RFLOW_RFB register.
1302 * See the UDMAP section of the TRM for more information on this setting.
1305 * UDMAP receive flow destination tag low byte constant configuration to be
1306 * programmed into the rx_dest_tag_lo field of the flow's RFLOW_RFB register.
1307 * See the UDMAP section of the TRM for more information on this setting.
1309 * @rx_src_tag_hi_sel:
1310 * UDMAP receive flow source tag high byte selector configuration to be
1311 * programmed into the rx_src_tag_hi_sel field of the RFLOW_RFC register. See
1312 * the UDMAP section of the TRM for more information on this setting.
1314 * @rx_src_tag_lo_sel:
1315 * UDMAP receive flow source tag low byte selector configuration to be
1316 * programmed into the rx_src_tag_lo_sel field of the RFLOW_RFC register. See
1317 * the UDMAP section of the TRM for more information on this setting.
1319 * @rx_dest_tag_hi_sel:
1320 * UDMAP receive flow destination tag high byte selector configuration to be
1321 * programmed into the rx_dest_tag_hi_sel field of the RFLOW_RFC register. See
1322 * the UDMAP section of the TRM for more information on this setting.
1324 * @rx_dest_tag_lo_sel:
1325 * UDMAP receive flow destination tag low byte selector configuration to be
1326 * programmed into the rx_dest_tag_lo_sel field of the RFLOW_RFC register. See
1327 * the UDMAP section of the TRM for more information on this setting.
1329 * @rx_fdq0_sz0_qnum:
1330 * UDMAP receive flow free descriptor queue 0 configuration to be programmed
1331 * into the rx_fdq0_sz0_qnum field of the flow's RFLOW_RFD register. See the
1332 * UDMAP section of the TRM for more information on this setting. The specified
1333 * free queue must be valid within the Navigator Subsystem and must be owned
1334 * by the host, or a subordinate of the host, requesting allocation and
1335 * configuration of the receive flow.
1338 * UDMAP receive flow free descriptor queue 1 configuration to be programmed
1339 * into the rx_fdq1_qnum field of the flow's RFLOW_RFD register. See the
1340 * UDMAP section of the TRM for more information on this setting. The specified
1341 * free queue must be valid within the Navigator Subsystem and must be owned
1342 * by the host, or a subordinate of the host, requesting allocation and
1343 * configuration of the receive flow.
1346 * UDMAP receive flow free descriptor queue 2 configuration to be programmed
1347 * into the rx_fdq2_qnum field of the flow's RFLOW_RFE register. See the
1348 * UDMAP section of the TRM for more information on this setting. The specified
1349 * free queue must be valid within the Navigator Subsystem and must be owned
1350 * by the host, or a subordinate of the host, requesting allocation and
1351 * configuration of the receive flow.
1354 * UDMAP receive flow free descriptor queue 3 configuration to be programmed
1355 * into the rx_fdq3_qnum field of the flow's RFLOW_RFE register. See the
1356 * UDMAP section of the TRM for more information on this setting. The specified
1357 * free queue must be valid within the Navigator Subsystem and must be owned
1358 * by the host, or a subordinate of the host, requesting allocation and
1359 * configuration of the receive flow.
1362 * UDMAP receive flow PS words location configuration to be programmed into the
1363 * rx_ps_location field of the flow's RFLOW_RFA register.
1365 struct ti_sci_msg_rm_udmap_flow_cfg_req {
1366 struct ti_sci_msg_hdr hdr;
1370 u8 rx_einfo_present;
1371 u8 rx_psinfo_present;
1372 u8 rx_error_handling;
1380 u8 rx_src_tag_hi_sel;
1381 u8 rx_src_tag_lo_sel;
1382 u8 rx_dest_tag_hi_sel;
1383 u8 rx_dest_tag_lo_sel;
1384 u16 rx_fdq0_sz0_qnum;
1392 * Response to configuring a Navigator Subsystem UDMAP receive flow
1394 * @hdr: Standard TISCI header
1396 struct ti_sci_msg_rm_udmap_flow_cfg_resp {
1397 struct ti_sci_msg_hdr hdr;
1400 #define FWL_MAX_PRIVID_SLOTS 3U
1403 * struct ti_sci_msg_fwl_set_firewall_region_req - Request for configuring the firewall permissions.
1405 * @hdr: Generic Header
1407 * @fwl_id: Firewall ID in question
1408 * @region: Region or channel number to set config info
1409 * This field is unused in case of a simple firewall and must be initialized
1410 * to zero. In case of a region based firewall, this field indicates the
1411 * region in question. (index starting from 0) In case of a channel based
1412 * firewall, this field indicates the channel in question (index starting
1414 * @n_permission_regs: Number of permission registers to set
1415 * @control: Contents of the firewall CONTROL register to set
1416 * @permissions: Contents of the firewall PERMISSION register to set
1417 * @start_address: Contents of the firewall START_ADDRESS register to set
1418 * @end_address: Contents of the firewall END_ADDRESS register to set
1421 struct ti_sci_msg_fwl_set_firewall_region_req {
1422 struct ti_sci_msg_hdr hdr;
1425 u32 n_permission_regs;
1427 u32 permissions[FWL_MAX_PRIVID_SLOTS];
1433 * struct ti_sci_msg_fwl_get_firewall_region_req - Request for retrieving the firewall permissions
1435 * @hdr: Generic Header
1437 * @fwl_id: Firewall ID in question
1438 * @region: Region or channel number to get config info
1439 * This field is unused in case of a simple firewall and must be initialized
1440 * to zero. In case of a region based firewall, this field indicates the
1441 * region in question (index starting from 0). In case of a channel based
1442 * firewall, this field indicates the channel in question (index starting
1444 * @n_permission_regs: Number of permission registers to retrieve
1446 struct ti_sci_msg_fwl_get_firewall_region_req {
1447 struct ti_sci_msg_hdr hdr;
1450 u32 n_permission_regs;
1454 * struct ti_sci_msg_fwl_get_firewall_region_resp - Response for retrieving the firewall permissions
1456 * @hdr: Generic Header
1458 * @fwl_id: Firewall ID in question
1459 * @region: Region or channel number to set config info This field is
1460 * unused in case of a simple firewall and must be initialized to zero. In
1461 * case of a region based firewall, this field indicates the region in
1462 * question. (index starting from 0) In case of a channel based firewall, this
1463 * field indicates the channel in question (index starting from 0)
1464 * @n_permission_regs: Number of permission registers retrieved
1465 * @control: Contents of the firewall CONTROL register
1466 * @permissions: Contents of the firewall PERMISSION registers
1467 * @start_address: Contents of the firewall START_ADDRESS register This is not applicable for channelized firewalls.
1468 * @end_address: Contents of the firewall END_ADDRESS register This is not applicable for channelized firewalls.
1470 struct ti_sci_msg_fwl_get_firewall_region_resp {
1471 struct ti_sci_msg_hdr hdr;
1474 u32 n_permission_regs;
1476 u32 permissions[FWL_MAX_PRIVID_SLOTS];
1482 * struct ti_sci_msg_fwl_change_owner_info_req - Request for a firewall owner change
1484 * @hdr: Generic Header
1486 * @fwl_id: Firewall ID in question
1487 * @region: Region or channel number if applicable
1488 * @owner_index: New owner index to transfer ownership to
1490 struct ti_sci_msg_fwl_change_owner_info_req {
1491 struct ti_sci_msg_hdr hdr;
1498 * struct ti_sci_msg_fwl_change_owner_info_resp - Response for a firewall owner change
1500 * @hdr: Generic Header
1502 * @fwl_id: Firewall ID specified in request
1503 * @region: Region or channel number specified in request
1504 * @owner_index: Owner index specified in request
1505 * @owner_privid: New owner priv-ID returned by DMSC.
1506 * @owner_permission_bits: New owner permission bits returned by DMSC.
1508 struct ti_sci_msg_fwl_change_owner_info_resp {
1509 struct ti_sci_msg_hdr hdr;
1514 u16 owner_permission_bits;
1517 #endif /* __TI_SCI_H */