11e0a6014SLokesh Vutla // SPDX-License-Identifier: BSD-3-Clause 2aa276781SNishanth Menon /* 3aa276781SNishanth Menon * Texas Instruments System Control Interface (TISCI) Protocol 4aa276781SNishanth Menon * 5aa276781SNishanth Menon * Communication protocol with TI SCI hardware 6aa276781SNishanth Menon * The system works in a message response protocol 7aa276781SNishanth Menon * See: http://processors.wiki.ti.com/index.php/TISCI for details 8aa276781SNishanth Menon * 9aa276781SNishanth Menon * Copyright (C) 2015-2016 Texas Instruments Incorporated - http://www.ti.com/ 10aa276781SNishanth Menon */ 11aa276781SNishanth Menon 12aa276781SNishanth Menon #ifndef __TI_SCI_H 13aa276781SNishanth Menon #define __TI_SCI_H 14aa276781SNishanth Menon 15aa276781SNishanth Menon /* Generic Messages */ 16aa276781SNishanth Menon #define TI_SCI_MSG_ENABLE_WDT 0x0000 17aa276781SNishanth Menon #define TI_SCI_MSG_WAKE_RESET 0x0001 18aa276781SNishanth Menon #define TI_SCI_MSG_VERSION 0x0002 19aa276781SNishanth Menon #define TI_SCI_MSG_WAKE_REASON 0x0003 20aa276781SNishanth Menon #define TI_SCI_MSG_GOODBYE 0x0004 21912cffb4SNishanth Menon #define TI_SCI_MSG_SYS_RESET 0x0005 22aa276781SNishanth Menon 239e7d756dSNishanth Menon /* Device requests */ 249e7d756dSNishanth Menon #define TI_SCI_MSG_SET_DEVICE_STATE 0x0200 259e7d756dSNishanth Menon #define TI_SCI_MSG_GET_DEVICE_STATE 0x0201 269e7d756dSNishanth Menon #define TI_SCI_MSG_SET_DEVICE_RESETS 0x0202 279e7d756dSNishanth Menon 289f723220SNishanth Menon /* Clock requests */ 299f723220SNishanth Menon #define TI_SCI_MSG_SET_CLOCK_STATE 0x0100 309f723220SNishanth Menon #define TI_SCI_MSG_GET_CLOCK_STATE 0x0101 319f723220SNishanth Menon #define TI_SCI_MSG_SET_CLOCK_PARENT 0x0102 329f723220SNishanth Menon #define TI_SCI_MSG_GET_CLOCK_PARENT 0x0103 339f723220SNishanth Menon #define TI_SCI_MSG_GET_NUM_CLOCK_PARENTS 0x0104 349f723220SNishanth Menon #define TI_SCI_MSG_SET_CLOCK_FREQ 0x010c 359f723220SNishanth Menon #define TI_SCI_MSG_QUERY_CLOCK_FREQ 0x010d 369f723220SNishanth Menon #define TI_SCI_MSG_GET_CLOCK_FREQ 0x010e 379f723220SNishanth Menon 389c19fb68SLokesh Vutla /* Resource Management Requests */ 399c19fb68SLokesh Vutla #define TI_SCI_MSG_GET_RESOURCE_RANGE 0x1500 409c19fb68SLokesh Vutla 41997b001fSLokesh Vutla /* IRQ requests */ 42997b001fSLokesh Vutla #define TI_SCI_MSG_SET_IRQ 0x1000 43997b001fSLokesh Vutla #define TI_SCI_MSG_FREE_IRQ 0x1001 44997b001fSLokesh Vutla 4568608b5eSPeter Ujfalusi /* NAVSS resource management */ 4668608b5eSPeter Ujfalusi /* Ringacc requests */ 4768608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_RING_ALLOCATE 0x1100 4868608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_RING_FREE 0x1101 4968608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_RING_RECONFIG 0x1102 5068608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_RING_RESET 0x1103 5168608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_RING_CFG 0x1110 5268608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_RING_GET_CFG 0x1111 5368608b5eSPeter Ujfalusi 5468608b5eSPeter Ujfalusi /* PSI-L requests */ 5568608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_PSIL_PAIR 0x1280 5668608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_PSIL_UNPAIR 0x1281 5768608b5eSPeter Ujfalusi 5868608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_UDMAP_TX_ALLOC 0x1200 5968608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_UDMAP_TX_FREE 0x1201 6068608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_UDMAP_RX_ALLOC 0x1210 6168608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_UDMAP_RX_FREE 0x1211 6268608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_UDMAP_FLOW_CFG 0x1220 6368608b5eSPeter Ujfalusi #define TI_SCI_MSG_RM_UDMAP_OPT_FLOW_CFG 0x1221 6468608b5eSPeter Ujfalusi 6568608b5eSPeter Ujfalusi #define TISCI_MSG_RM_UDMAP_TX_CH_CFG 0x1205 6668608b5eSPeter Ujfalusi #define TISCI_MSG_RM_UDMAP_TX_CH_GET_CFG 0x1206 6768608b5eSPeter Ujfalusi #define TISCI_MSG_RM_UDMAP_RX_CH_CFG 0x1215 6868608b5eSPeter Ujfalusi #define TISCI_MSG_RM_UDMAP_RX_CH_GET_CFG 0x1216 6968608b5eSPeter Ujfalusi #define TISCI_MSG_RM_UDMAP_FLOW_CFG 0x1230 7068608b5eSPeter Ujfalusi #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_CFG 0x1231 7168608b5eSPeter Ujfalusi #define TISCI_MSG_RM_UDMAP_FLOW_GET_CFG 0x1232 7268608b5eSPeter Ujfalusi #define TISCI_MSG_RM_UDMAP_FLOW_SIZE_THRESH_GET_CFG 0x1233 7368608b5eSPeter Ujfalusi 74*1e407f33SSuman Anna /* Processor Control requests */ 75*1e407f33SSuman Anna #define TI_SCI_MSG_PROC_REQUEST 0xc000 76*1e407f33SSuman Anna #define TI_SCI_MSG_PROC_RELEASE 0xc001 77*1e407f33SSuman Anna #define TI_SCI_MSG_PROC_HANDOVER 0xc005 78*1e407f33SSuman Anna #define TI_SCI_MSG_SET_CONFIG 0xc100 79*1e407f33SSuman Anna #define TI_SCI_MSG_SET_CTRL 0xc101 80*1e407f33SSuman Anna #define TI_SCI_MSG_GET_STATUS 0xc400 81*1e407f33SSuman Anna 82aa276781SNishanth Menon /** 83aa276781SNishanth Menon * struct ti_sci_msg_hdr - Generic Message Header for All messages and responses 84aa276781SNishanth Menon * @type: Type of messages: One of TI_SCI_MSG* values 85aa276781SNishanth Menon * @host: Host of the message 86aa276781SNishanth Menon * @seq: Message identifier indicating a transfer sequence 87aa276781SNishanth Menon * @flags: Flag for the message 88aa276781SNishanth Menon */ 89aa276781SNishanth Menon struct ti_sci_msg_hdr { 90aa276781SNishanth Menon u16 type; 91aa276781SNishanth Menon u8 host; 92aa276781SNishanth Menon u8 seq; 93aa276781SNishanth Menon #define TI_SCI_MSG_FLAG(val) (1 << (val)) 94aa276781SNishanth Menon #define TI_SCI_FLAG_REQ_GENERIC_NORESPONSE 0x0 95aa276781SNishanth Menon #define TI_SCI_FLAG_REQ_ACK_ON_RECEIVED TI_SCI_MSG_FLAG(0) 96aa276781SNishanth Menon #define TI_SCI_FLAG_REQ_ACK_ON_PROCESSED TI_SCI_MSG_FLAG(1) 97aa276781SNishanth Menon #define TI_SCI_FLAG_RESP_GENERIC_NACK 0x0 98aa276781SNishanth Menon #define TI_SCI_FLAG_RESP_GENERIC_ACK TI_SCI_MSG_FLAG(1) 99aa276781SNishanth Menon /* Additional Flags */ 100aa276781SNishanth Menon u32 flags; 101aa276781SNishanth Menon } __packed; 102aa276781SNishanth Menon 103aa276781SNishanth Menon /** 104aa276781SNishanth Menon * struct ti_sci_msg_resp_version - Response for a message 105aa276781SNishanth Menon * @hdr: Generic header 106aa276781SNishanth Menon * @firmware_description: String describing the firmware 107aa276781SNishanth Menon * @firmware_revision: Firmware revision 108aa276781SNishanth Menon * @abi_major: Major version of the ABI that firmware supports 109aa276781SNishanth Menon * @abi_minor: Minor version of the ABI that firmware supports 110aa276781SNishanth Menon * 111aa276781SNishanth Menon * In general, ABI version changes follow the rule that minor version increments 112aa276781SNishanth Menon * are backward compatible. Major revision changes in ABI may not be 113aa276781SNishanth Menon * backward compatible. 114aa276781SNishanth Menon * 115aa276781SNishanth Menon * Response to a generic message with message type TI_SCI_MSG_VERSION 116aa276781SNishanth Menon */ 117aa276781SNishanth Menon struct ti_sci_msg_resp_version { 118aa276781SNishanth Menon struct ti_sci_msg_hdr hdr; 119aa276781SNishanth Menon char firmware_description[32]; 120aa276781SNishanth Menon u16 firmware_revision; 121aa276781SNishanth Menon u8 abi_major; 122aa276781SNishanth Menon u8 abi_minor; 123aa276781SNishanth Menon } __packed; 124aa276781SNishanth Menon 1259e7d756dSNishanth Menon /** 126912cffb4SNishanth Menon * struct ti_sci_msg_req_reboot - Reboot the SoC 127912cffb4SNishanth Menon * @hdr: Generic Header 128912cffb4SNishanth Menon * 129912cffb4SNishanth Menon * Request type is TI_SCI_MSG_SYS_RESET, responded with a generic 130912cffb4SNishanth Menon * ACK/NACK message. 131912cffb4SNishanth Menon */ 132912cffb4SNishanth Menon struct ti_sci_msg_req_reboot { 133912cffb4SNishanth Menon struct ti_sci_msg_hdr hdr; 134912cffb4SNishanth Menon } __packed; 135912cffb4SNishanth Menon 136912cffb4SNishanth Menon /** 1379e7d756dSNishanth Menon * struct ti_sci_msg_req_set_device_state - Set the desired state of the device 1389e7d756dSNishanth Menon * @hdr: Generic header 1399e7d756dSNishanth Menon * @id: Indicates which device to modify 1409e7d756dSNishanth Menon * @reserved: Reserved space in message, must be 0 for backward compatibility 1419e7d756dSNishanth Menon * @state: The desired state of the device. 1429e7d756dSNishanth Menon * 1439e7d756dSNishanth Menon * Certain flags can also be set to alter the device state: 1449e7d756dSNishanth Menon * + MSG_FLAG_DEVICE_WAKE_ENABLED - Configure the device to be a wake source. 1459e7d756dSNishanth Menon * The meaning of this flag will vary slightly from device to device and from 1469e7d756dSNishanth Menon * SoC to SoC but it generally allows the device to wake the SoC out of deep 1479e7d756dSNishanth Menon * suspend states. 1489e7d756dSNishanth Menon * + MSG_FLAG_DEVICE_RESET_ISO - Enable reset isolation for this device. 1499e7d756dSNishanth Menon * + MSG_FLAG_DEVICE_EXCLUSIVE - Claim this device exclusively. When passed 1509e7d756dSNishanth Menon * with STATE_RETENTION or STATE_ON, it will claim the device exclusively. 1519e7d756dSNishanth Menon * If another host already has this device set to STATE_RETENTION or STATE_ON, 1529e7d756dSNishanth Menon * the message will fail. Once successful, other hosts attempting to set 1539e7d756dSNishanth Menon * STATE_RETENTION or STATE_ON will fail. 1549e7d756dSNishanth Menon * 1559e7d756dSNishanth Menon * Request type is TI_SCI_MSG_SET_DEVICE_STATE, responded with a generic 1569e7d756dSNishanth Menon * ACK/NACK message. 1579e7d756dSNishanth Menon */ 1589e7d756dSNishanth Menon struct ti_sci_msg_req_set_device_state { 1599e7d756dSNishanth Menon /* Additional hdr->flags options */ 1609e7d756dSNishanth Menon #define MSG_FLAG_DEVICE_WAKE_ENABLED TI_SCI_MSG_FLAG(8) 1619e7d756dSNishanth Menon #define MSG_FLAG_DEVICE_RESET_ISO TI_SCI_MSG_FLAG(9) 1629e7d756dSNishanth Menon #define MSG_FLAG_DEVICE_EXCLUSIVE TI_SCI_MSG_FLAG(10) 1639e7d756dSNishanth Menon struct ti_sci_msg_hdr hdr; 1649e7d756dSNishanth Menon u32 id; 1659e7d756dSNishanth Menon u32 reserved; 1669e7d756dSNishanth Menon 1679e7d756dSNishanth Menon #define MSG_DEVICE_SW_STATE_AUTO_OFF 0 1689e7d756dSNishanth Menon #define MSG_DEVICE_SW_STATE_RETENTION 1 1699e7d756dSNishanth Menon #define MSG_DEVICE_SW_STATE_ON 2 1709e7d756dSNishanth Menon u8 state; 1719e7d756dSNishanth Menon } __packed; 1729e7d756dSNishanth Menon 1739e7d756dSNishanth Menon /** 1749e7d756dSNishanth Menon * struct ti_sci_msg_req_get_device_state - Request to get device. 1759e7d756dSNishanth Menon * @hdr: Generic header 1769e7d756dSNishanth Menon * @id: Device Identifier 1779e7d756dSNishanth Menon * 1789e7d756dSNishanth Menon * Request type is TI_SCI_MSG_GET_DEVICE_STATE, responded device state 1799e7d756dSNishanth Menon * information 1809e7d756dSNishanth Menon */ 1819e7d756dSNishanth Menon struct ti_sci_msg_req_get_device_state { 1829e7d756dSNishanth Menon struct ti_sci_msg_hdr hdr; 1839e7d756dSNishanth Menon u32 id; 1849e7d756dSNishanth Menon } __packed; 1859e7d756dSNishanth Menon 1869e7d756dSNishanth Menon /** 1879e7d756dSNishanth Menon * struct ti_sci_msg_resp_get_device_state - Response to get device request. 1889e7d756dSNishanth Menon * @hdr: Generic header 1899e7d756dSNishanth Menon * @context_loss_count: Indicates how many times the device has lost context. A 1909e7d756dSNishanth Menon * driver can use this monotonic counter to determine if the device has 1919e7d756dSNishanth Menon * lost context since the last time this message was exchanged. 1929e7d756dSNishanth Menon * @resets: Programmed state of the reset lines. 1939e7d756dSNishanth Menon * @programmed_state: The state as programmed by set_device. 1949e7d756dSNishanth Menon * - Uses the MSG_DEVICE_SW_* macros 1959e7d756dSNishanth Menon * @current_state: The actual state of the hardware. 1969e7d756dSNishanth Menon * 1979e7d756dSNishanth Menon * Response to request TI_SCI_MSG_GET_DEVICE_STATE. 1989e7d756dSNishanth Menon */ 1999e7d756dSNishanth Menon struct ti_sci_msg_resp_get_device_state { 2009e7d756dSNishanth Menon struct ti_sci_msg_hdr hdr; 2019e7d756dSNishanth Menon u32 context_loss_count; 2029e7d756dSNishanth Menon u32 resets; 2039e7d756dSNishanth Menon u8 programmed_state; 2049e7d756dSNishanth Menon #define MSG_DEVICE_HW_STATE_OFF 0 2059e7d756dSNishanth Menon #define MSG_DEVICE_HW_STATE_ON 1 2069e7d756dSNishanth Menon #define MSG_DEVICE_HW_STATE_TRANS 2 2079e7d756dSNishanth Menon u8 current_state; 2089e7d756dSNishanth Menon } __packed; 2099e7d756dSNishanth Menon 2109e7d756dSNishanth Menon /** 2119e7d756dSNishanth Menon * struct ti_sci_msg_req_set_device_resets - Set the desired resets 2129e7d756dSNishanth Menon * configuration of the device 2139e7d756dSNishanth Menon * @hdr: Generic header 2149e7d756dSNishanth Menon * @id: Indicates which device to modify 2159e7d756dSNishanth Menon * @resets: A bit field of resets for the device. The meaning, behavior, 2169e7d756dSNishanth Menon * and usage of the reset flags are device specific. 0 for a bit 2179e7d756dSNishanth Menon * indicates releasing the reset represented by that bit while 1 2189e7d756dSNishanth Menon * indicates keeping it held. 2199e7d756dSNishanth Menon * 2209e7d756dSNishanth Menon * Request type is TI_SCI_MSG_SET_DEVICE_RESETS, responded with a generic 2219e7d756dSNishanth Menon * ACK/NACK message. 2229e7d756dSNishanth Menon */ 2239e7d756dSNishanth Menon struct ti_sci_msg_req_set_device_resets { 2249e7d756dSNishanth Menon struct ti_sci_msg_hdr hdr; 2259e7d756dSNishanth Menon u32 id; 2269e7d756dSNishanth Menon u32 resets; 2279e7d756dSNishanth Menon } __packed; 2289e7d756dSNishanth Menon 2299f723220SNishanth Menon /** 2309f723220SNishanth Menon * struct ti_sci_msg_req_set_clock_state - Request to setup a Clock state 2319f723220SNishanth Menon * @hdr: Generic Header, Certain flags can be set specific to the clocks: 2329f723220SNishanth Menon * MSG_FLAG_CLOCK_ALLOW_SSC: Allow this clock to be modified 2339f723220SNishanth Menon * via spread spectrum clocking. 2349f723220SNishanth Menon * MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE: Allow this clock's 2359f723220SNishanth Menon * frequency to be changed while it is running so long as it 2369f723220SNishanth Menon * is within the min/max limits. 2379f723220SNishanth Menon * MSG_FLAG_CLOCK_INPUT_TERM: Enable input termination, this 2389f723220SNishanth Menon * is only applicable to clock inputs on the SoC pseudo-device. 2399f723220SNishanth Menon * @dev_id: Device identifier this request is for 2409f723220SNishanth Menon * @clk_id: Clock identifier for the device for this request. 2419f723220SNishanth Menon * Each device has it's own set of clock inputs. This indexes 2429f723220SNishanth Menon * which clock input to modify. 2439f723220SNishanth Menon * @request_state: Request the state for the clock to be set to. 2449f723220SNishanth Menon * MSG_CLOCK_SW_STATE_UNREQ: The IP does not require this clock, 2459f723220SNishanth Menon * it can be disabled, regardless of the state of the device 2469f723220SNishanth Menon * MSG_CLOCK_SW_STATE_AUTO: Allow the System Controller to 2479f723220SNishanth Menon * automatically manage the state of this clock. If the device 2489f723220SNishanth Menon * is enabled, then the clock is enabled. If the device is set 2499f723220SNishanth Menon * to off or retention, then the clock is internally set as not 2509f723220SNishanth Menon * being required by the device.(default) 2519f723220SNishanth Menon * MSG_CLOCK_SW_STATE_REQ: Configure the clock to be enabled, 2529f723220SNishanth Menon * regardless of the state of the device. 2539f723220SNishanth Menon * 2549f723220SNishanth Menon * Normally, all required clocks are managed by TISCI entity, this is used 2559f723220SNishanth Menon * only for specific control *IF* required. Auto managed state is 2569f723220SNishanth Menon * MSG_CLOCK_SW_STATE_AUTO, in other states, TISCI entity assume remote 2579f723220SNishanth Menon * will explicitly control. 2589f723220SNishanth Menon * 2599f723220SNishanth Menon * Request type is TI_SCI_MSG_SET_CLOCK_STATE, response is a generic 2609f723220SNishanth Menon * ACK or NACK message. 2619f723220SNishanth Menon */ 2629f723220SNishanth Menon struct ti_sci_msg_req_set_clock_state { 2639f723220SNishanth Menon /* Additional hdr->flags options */ 2649f723220SNishanth Menon #define MSG_FLAG_CLOCK_ALLOW_SSC TI_SCI_MSG_FLAG(8) 2659f723220SNishanth Menon #define MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE TI_SCI_MSG_FLAG(9) 2669f723220SNishanth Menon #define MSG_FLAG_CLOCK_INPUT_TERM TI_SCI_MSG_FLAG(10) 2679f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 2689f723220SNishanth Menon u32 dev_id; 2699f723220SNishanth Menon u8 clk_id; 2709f723220SNishanth Menon #define MSG_CLOCK_SW_STATE_UNREQ 0 2719f723220SNishanth Menon #define MSG_CLOCK_SW_STATE_AUTO 1 2729f723220SNishanth Menon #define MSG_CLOCK_SW_STATE_REQ 2 2739f723220SNishanth Menon u8 request_state; 2749f723220SNishanth Menon } __packed; 2759f723220SNishanth Menon 2769f723220SNishanth Menon /** 2779f723220SNishanth Menon * struct ti_sci_msg_req_get_clock_state - Request for clock state 2789f723220SNishanth Menon * @hdr: Generic Header 2799f723220SNishanth Menon * @dev_id: Device identifier this request is for 2809f723220SNishanth Menon * @clk_id: Clock identifier for the device for this request. 2819f723220SNishanth Menon * Each device has it's own set of clock inputs. This indexes 2829f723220SNishanth Menon * which clock input to get state of. 2839f723220SNishanth Menon * 2849f723220SNishanth Menon * Request type is TI_SCI_MSG_GET_CLOCK_STATE, response is state 2859f723220SNishanth Menon * of the clock 2869f723220SNishanth Menon */ 2879f723220SNishanth Menon struct ti_sci_msg_req_get_clock_state { 2889f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 2899f723220SNishanth Menon u32 dev_id; 2909f723220SNishanth Menon u8 clk_id; 2919f723220SNishanth Menon } __packed; 2929f723220SNishanth Menon 2939f723220SNishanth Menon /** 2949f723220SNishanth Menon * struct ti_sci_msg_resp_get_clock_state - Response to get clock state 2959f723220SNishanth Menon * @hdr: Generic Header 2969f723220SNishanth Menon * @programmed_state: Any programmed state of the clock. This is one of 2979f723220SNishanth Menon * MSG_CLOCK_SW_STATE* values. 2989f723220SNishanth Menon * @current_state: Current state of the clock. This is one of: 2999f723220SNishanth Menon * MSG_CLOCK_HW_STATE_NOT_READY: Clock is not ready 3009f723220SNishanth Menon * MSG_CLOCK_HW_STATE_READY: Clock is ready 3019f723220SNishanth Menon * 3029f723220SNishanth Menon * Response to TI_SCI_MSG_GET_CLOCK_STATE. 3039f723220SNishanth Menon */ 3049f723220SNishanth Menon struct ti_sci_msg_resp_get_clock_state { 3059f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 3069f723220SNishanth Menon u8 programmed_state; 3079f723220SNishanth Menon #define MSG_CLOCK_HW_STATE_NOT_READY 0 3089f723220SNishanth Menon #define MSG_CLOCK_HW_STATE_READY 1 3099f723220SNishanth Menon u8 current_state; 3109f723220SNishanth Menon } __packed; 3119f723220SNishanth Menon 3129f723220SNishanth Menon /** 3139f723220SNishanth Menon * struct ti_sci_msg_req_set_clock_parent - Set the clock parent 3149f723220SNishanth Menon * @hdr: Generic Header 3159f723220SNishanth Menon * @dev_id: Device identifier this request is for 3169f723220SNishanth Menon * @clk_id: Clock identifier for the device for this request. 3179f723220SNishanth Menon * Each device has it's own set of clock inputs. This indexes 3189f723220SNishanth Menon * which clock input to modify. 3199f723220SNishanth Menon * @parent_id: The new clock parent is selectable by an index via this 3209f723220SNishanth Menon * parameter. 3219f723220SNishanth Menon * 3229f723220SNishanth Menon * Request type is TI_SCI_MSG_SET_CLOCK_PARENT, response is generic 3239f723220SNishanth Menon * ACK / NACK message. 3249f723220SNishanth Menon */ 3259f723220SNishanth Menon struct ti_sci_msg_req_set_clock_parent { 3269f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 3279f723220SNishanth Menon u32 dev_id; 3289f723220SNishanth Menon u8 clk_id; 3299f723220SNishanth Menon u8 parent_id; 3309f723220SNishanth Menon } __packed; 3319f723220SNishanth Menon 3329f723220SNishanth Menon /** 3339f723220SNishanth Menon * struct ti_sci_msg_req_get_clock_parent - Get the clock parent 3349f723220SNishanth Menon * @hdr: Generic Header 3359f723220SNishanth Menon * @dev_id: Device identifier this request is for 3369f723220SNishanth Menon * @clk_id: Clock identifier for the device for this request. 3379f723220SNishanth Menon * Each device has it's own set of clock inputs. This indexes 3389f723220SNishanth Menon * which clock input to get the parent for. 3399f723220SNishanth Menon * 3409f723220SNishanth Menon * Request type is TI_SCI_MSG_GET_CLOCK_PARENT, response is parent information 3419f723220SNishanth Menon */ 3429f723220SNishanth Menon struct ti_sci_msg_req_get_clock_parent { 3439f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 3449f723220SNishanth Menon u32 dev_id; 3459f723220SNishanth Menon u8 clk_id; 3469f723220SNishanth Menon } __packed; 3479f723220SNishanth Menon 3489f723220SNishanth Menon /** 3499f723220SNishanth Menon * struct ti_sci_msg_resp_get_clock_parent - Response with clock parent 3509f723220SNishanth Menon * @hdr: Generic Header 3519f723220SNishanth Menon * @parent_id: The current clock parent 3529f723220SNishanth Menon * 3539f723220SNishanth Menon * Response to TI_SCI_MSG_GET_CLOCK_PARENT. 3549f723220SNishanth Menon */ 3559f723220SNishanth Menon struct ti_sci_msg_resp_get_clock_parent { 3569f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 3579f723220SNishanth Menon u8 parent_id; 3589f723220SNishanth Menon } __packed; 3599f723220SNishanth Menon 3609f723220SNishanth Menon /** 3619f723220SNishanth Menon * struct ti_sci_msg_req_get_clock_num_parents - Request to get clock parents 3629f723220SNishanth Menon * @hdr: Generic header 3639f723220SNishanth Menon * @dev_id: Device identifier this request is for 3649f723220SNishanth Menon * @clk_id: Clock identifier for the device for this request. 3659f723220SNishanth Menon * 3669f723220SNishanth Menon * This request provides information about how many clock parent options 3679f723220SNishanth Menon * are available for a given clock to a device. This is typically used 3689f723220SNishanth Menon * for input clocks. 3699f723220SNishanth Menon * 3709f723220SNishanth Menon * Request type is TI_SCI_MSG_GET_NUM_CLOCK_PARENTS, response is appropriate 3719f723220SNishanth Menon * message, or NACK in case of inability to satisfy request. 3729f723220SNishanth Menon */ 3739f723220SNishanth Menon struct ti_sci_msg_req_get_clock_num_parents { 3749f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 3759f723220SNishanth Menon u32 dev_id; 3769f723220SNishanth Menon u8 clk_id; 3779f723220SNishanth Menon } __packed; 3789f723220SNishanth Menon 3799f723220SNishanth Menon /** 3809f723220SNishanth Menon * struct ti_sci_msg_resp_get_clock_num_parents - Response for get clk parents 3819f723220SNishanth Menon * @hdr: Generic header 3829f723220SNishanth Menon * @num_parents: Number of clock parents 3839f723220SNishanth Menon * 3849f723220SNishanth Menon * Response to TI_SCI_MSG_GET_NUM_CLOCK_PARENTS 3859f723220SNishanth Menon */ 3869f723220SNishanth Menon struct ti_sci_msg_resp_get_clock_num_parents { 3879f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 3889f723220SNishanth Menon u8 num_parents; 3899f723220SNishanth Menon } __packed; 3909f723220SNishanth Menon 3919f723220SNishanth Menon /** 3929f723220SNishanth Menon * struct ti_sci_msg_req_query_clock_freq - Request to query a frequency 3939f723220SNishanth Menon * @hdr: Generic Header 3949f723220SNishanth Menon * @dev_id: Device identifier this request is for 3959f723220SNishanth Menon * @min_freq_hz: The minimum allowable frequency in Hz. This is the minimum 3969f723220SNishanth Menon * allowable programmed frequency and does not account for clock 3979f723220SNishanth Menon * tolerances and jitter. 3989f723220SNishanth Menon * @target_freq_hz: The target clock frequency. A frequency will be found 3999f723220SNishanth Menon * as close to this target frequency as possible. 4009f723220SNishanth Menon * @max_freq_hz: The maximum allowable frequency in Hz. This is the maximum 4019f723220SNishanth Menon * allowable programmed frequency and does not account for clock 4029f723220SNishanth Menon * tolerances and jitter. 4039f723220SNishanth Menon * @clk_id: Clock identifier for the device for this request. 4049f723220SNishanth Menon * 4059f723220SNishanth Menon * NOTE: Normally clock frequency management is automatically done by TISCI 4069f723220SNishanth Menon * entity. In case of specific requests, TISCI evaluates capability to achieve 4079f723220SNishanth Menon * requested frequency within provided range and responds with 4089f723220SNishanth Menon * result message. 4099f723220SNishanth Menon * 4109f723220SNishanth Menon * Request type is TI_SCI_MSG_QUERY_CLOCK_FREQ, response is appropriate message, 4119f723220SNishanth Menon * or NACK in case of inability to satisfy request. 4129f723220SNishanth Menon */ 4139f723220SNishanth Menon struct ti_sci_msg_req_query_clock_freq { 4149f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 4159f723220SNishanth Menon u32 dev_id; 4169f723220SNishanth Menon u64 min_freq_hz; 4179f723220SNishanth Menon u64 target_freq_hz; 4189f723220SNishanth Menon u64 max_freq_hz; 4199f723220SNishanth Menon u8 clk_id; 4209f723220SNishanth Menon } __packed; 4219f723220SNishanth Menon 4229f723220SNishanth Menon /** 4239f723220SNishanth Menon * struct ti_sci_msg_resp_query_clock_freq - Response to a clock frequency query 4249f723220SNishanth Menon * @hdr: Generic Header 4259f723220SNishanth Menon * @freq_hz: Frequency that is the best match in Hz. 4269f723220SNishanth Menon * 4279f723220SNishanth Menon * Response to request type TI_SCI_MSG_QUERY_CLOCK_FREQ. NOTE: if the request 4289f723220SNishanth Menon * cannot be satisfied, the message will be of type NACK. 4299f723220SNishanth Menon */ 4309f723220SNishanth Menon struct ti_sci_msg_resp_query_clock_freq { 4319f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 4329f723220SNishanth Menon u64 freq_hz; 4339f723220SNishanth Menon } __packed; 4349f723220SNishanth Menon 4359f723220SNishanth Menon /** 4369f723220SNishanth Menon * struct ti_sci_msg_req_set_clock_freq - Request to setup a clock frequency 4379f723220SNishanth Menon * @hdr: Generic Header 4389f723220SNishanth Menon * @dev_id: Device identifier this request is for 4399f723220SNishanth Menon * @min_freq_hz: The minimum allowable frequency in Hz. This is the minimum 4409f723220SNishanth Menon * allowable programmed frequency and does not account for clock 4419f723220SNishanth Menon * tolerances and jitter. 4429f723220SNishanth Menon * @target_freq_hz: The target clock frequency. The clock will be programmed 4439f723220SNishanth Menon * at a rate as close to this target frequency as possible. 4449f723220SNishanth Menon * @max_freq_hz: The maximum allowable frequency in Hz. This is the maximum 4459f723220SNishanth Menon * allowable programmed frequency and does not account for clock 4469f723220SNishanth Menon * tolerances and jitter. 4479f723220SNishanth Menon * @clk_id: Clock identifier for the device for this request. 4489f723220SNishanth Menon * 4499f723220SNishanth Menon * NOTE: Normally clock frequency management is automatically done by TISCI 4509f723220SNishanth Menon * entity. In case of specific requests, TISCI evaluates capability to achieve 4519f723220SNishanth Menon * requested range and responds with success/failure message. 4529f723220SNishanth Menon * 4539f723220SNishanth Menon * This sets the desired frequency for a clock within an allowable 4549f723220SNishanth Menon * range. This message will fail on an enabled clock unless 4559f723220SNishanth Menon * MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE is set for the clock. Additionally, 4569f723220SNishanth Menon * if other clocks have their frequency modified due to this message, 4579f723220SNishanth Menon * they also must have the MSG_FLAG_CLOCK_ALLOW_FREQ_CHANGE or be disabled. 4589f723220SNishanth Menon * 4599f723220SNishanth Menon * Calling set frequency on a clock input to the SoC pseudo-device will 4609f723220SNishanth Menon * inform the PMMC of that clock's frequency. Setting a frequency of 4619f723220SNishanth Menon * zero will indicate the clock is disabled. 4629f723220SNishanth Menon * 4639f723220SNishanth Menon * Calling set frequency on clock outputs from the SoC pseudo-device will 4649f723220SNishanth Menon * function similarly to setting the clock frequency on a device. 4659f723220SNishanth Menon * 4669f723220SNishanth Menon * Request type is TI_SCI_MSG_SET_CLOCK_FREQ, response is a generic ACK/NACK 4679f723220SNishanth Menon * message. 4689f723220SNishanth Menon */ 4699f723220SNishanth Menon struct ti_sci_msg_req_set_clock_freq { 4709f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 4719f723220SNishanth Menon u32 dev_id; 4729f723220SNishanth Menon u64 min_freq_hz; 4739f723220SNishanth Menon u64 target_freq_hz; 4749f723220SNishanth Menon u64 max_freq_hz; 4759f723220SNishanth Menon u8 clk_id; 4769f723220SNishanth Menon } __packed; 4779f723220SNishanth Menon 4789f723220SNishanth Menon /** 4799f723220SNishanth Menon * struct ti_sci_msg_req_get_clock_freq - Request to get the clock frequency 4809f723220SNishanth Menon * @hdr: Generic Header 4819f723220SNishanth Menon * @dev_id: Device identifier this request is for 4829f723220SNishanth Menon * @clk_id: Clock identifier for the device for this request. 4839f723220SNishanth Menon * 4849f723220SNishanth Menon * NOTE: Normally clock frequency management is automatically done by TISCI 4859f723220SNishanth Menon * entity. In some cases, clock frequencies are configured by host. 4869f723220SNishanth Menon * 4879f723220SNishanth Menon * Request type is TI_SCI_MSG_GET_CLOCK_FREQ, responded with clock frequency 4889f723220SNishanth Menon * that the clock is currently at. 4899f723220SNishanth Menon */ 4909f723220SNishanth Menon struct ti_sci_msg_req_get_clock_freq { 4919f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 4929f723220SNishanth Menon u32 dev_id; 4939f723220SNishanth Menon u8 clk_id; 4949f723220SNishanth Menon } __packed; 4959f723220SNishanth Menon 4969f723220SNishanth Menon /** 4979f723220SNishanth Menon * struct ti_sci_msg_resp_get_clock_freq - Response of clock frequency request 4989f723220SNishanth Menon * @hdr: Generic Header 4999f723220SNishanth Menon * @freq_hz: Frequency that the clock is currently on, in Hz. 5009f723220SNishanth Menon * 5019f723220SNishanth Menon * Response to request type TI_SCI_MSG_GET_CLOCK_FREQ. 5029f723220SNishanth Menon */ 5039f723220SNishanth Menon struct ti_sci_msg_resp_get_clock_freq { 5049f723220SNishanth Menon struct ti_sci_msg_hdr hdr; 5059f723220SNishanth Menon u64 freq_hz; 5069f723220SNishanth Menon } __packed; 5079f723220SNishanth Menon 5089c19fb68SLokesh Vutla #define TI_SCI_IRQ_SECONDARY_HOST_INVALID 0xff 5099c19fb68SLokesh Vutla 5109c19fb68SLokesh Vutla /** 5119c19fb68SLokesh Vutla * struct ti_sci_msg_req_get_resource_range - Request to get a host's assigned 5129c19fb68SLokesh Vutla * range of resources. 5139c19fb68SLokesh Vutla * @hdr: Generic Header 5149c19fb68SLokesh Vutla * @type: Unique resource assignment type 5159c19fb68SLokesh Vutla * @subtype: Resource assignment subtype within the resource type. 5169c19fb68SLokesh Vutla * @secondary_host: Host processing entity to which the resources are 5179c19fb68SLokesh Vutla * allocated. This is required only when the destination 5189c19fb68SLokesh Vutla * host id id different from ti sci interface host id, 5199c19fb68SLokesh Vutla * else TI_SCI_IRQ_SECONDARY_HOST_INVALID can be passed. 5209c19fb68SLokesh Vutla * 5219c19fb68SLokesh Vutla * Request type is TI_SCI_MSG_GET_RESOURCE_RANGE. Responded with requested 5229c19fb68SLokesh Vutla * resource range which is of type TI_SCI_MSG_GET_RESOURCE_RANGE. 5239c19fb68SLokesh Vutla */ 5249c19fb68SLokesh Vutla struct ti_sci_msg_req_get_resource_range { 5259c19fb68SLokesh Vutla struct ti_sci_msg_hdr hdr; 5269c19fb68SLokesh Vutla #define MSG_RM_RESOURCE_TYPE_MASK GENMASK(9, 0) 5279c19fb68SLokesh Vutla #define MSG_RM_RESOURCE_SUBTYPE_MASK GENMASK(5, 0) 5289c19fb68SLokesh Vutla u16 type; 5299c19fb68SLokesh Vutla u8 subtype; 5309c19fb68SLokesh Vutla u8 secondary_host; 5319c19fb68SLokesh Vutla } __packed; 5329c19fb68SLokesh Vutla 5339c19fb68SLokesh Vutla /** 5349c19fb68SLokesh Vutla * struct ti_sci_msg_resp_get_resource_range - Response to resource get range. 5359c19fb68SLokesh Vutla * @hdr: Generic Header 5369c19fb68SLokesh Vutla * @range_start: Start index of the resource range. 5379c19fb68SLokesh Vutla * @range_num: Number of resources in the range. 5389c19fb68SLokesh Vutla * 5399c19fb68SLokesh Vutla * Response to request TI_SCI_MSG_GET_RESOURCE_RANGE. 5409c19fb68SLokesh Vutla */ 5419c19fb68SLokesh Vutla struct ti_sci_msg_resp_get_resource_range { 5429c19fb68SLokesh Vutla struct ti_sci_msg_hdr hdr; 5439c19fb68SLokesh Vutla u16 range_start; 5449c19fb68SLokesh Vutla u16 range_num; 5459c19fb68SLokesh Vutla } __packed; 5469c19fb68SLokesh Vutla 547997b001fSLokesh Vutla /** 548997b001fSLokesh Vutla * struct ti_sci_msg_req_manage_irq - Request to configure/release the route 549997b001fSLokesh Vutla * between the dev and the host. 550997b001fSLokesh Vutla * @hdr: Generic Header 551997b001fSLokesh Vutla * @valid_params: Bit fields defining the validity of interrupt source 552997b001fSLokesh Vutla * parameters. If a bit is not set, then corresponding 553997b001fSLokesh Vutla * field is not valid and will not be used for route set. 554997b001fSLokesh Vutla * Bit field definitions: 555997b001fSLokesh Vutla * 0 - Valid bit for @dst_id 556997b001fSLokesh Vutla * 1 - Valid bit for @dst_host_irq 557997b001fSLokesh Vutla * 2 - Valid bit for @ia_id 558997b001fSLokesh Vutla * 3 - Valid bit for @vint 559997b001fSLokesh Vutla * 4 - Valid bit for @global_event 560997b001fSLokesh Vutla * 5 - Valid bit for @vint_status_bit_index 561997b001fSLokesh Vutla * 31 - Valid bit for @secondary_host 562997b001fSLokesh Vutla * @src_id: IRQ source peripheral ID. 563997b001fSLokesh Vutla * @src_index: IRQ source index within the peripheral 564997b001fSLokesh Vutla * @dst_id: IRQ Destination ID. Based on the architecture it can be 565997b001fSLokesh Vutla * IRQ controller or host processor ID. 566997b001fSLokesh Vutla * @dst_host_irq: IRQ number of the destination host IRQ controller 567997b001fSLokesh Vutla * @ia_id: Device ID of the interrupt aggregator in which the 568997b001fSLokesh Vutla * vint resides. 569997b001fSLokesh Vutla * @vint: Virtual interrupt number if the interrupt route 570997b001fSLokesh Vutla * is through an interrupt aggregator. 571997b001fSLokesh Vutla * @global_event: Global event that is to be mapped to interrupt 572997b001fSLokesh Vutla * aggregator virtual interrupt status bit. 573997b001fSLokesh Vutla * @vint_status_bit: Virtual interrupt status bit if the interrupt route 574997b001fSLokesh Vutla * utilizes an interrupt aggregator status bit. 575997b001fSLokesh Vutla * @secondary_host: Host ID of the IRQ destination computing entity. This is 576997b001fSLokesh Vutla * required only when destination host id is different 577997b001fSLokesh Vutla * from ti sci interface host id. 578997b001fSLokesh Vutla * 579997b001fSLokesh Vutla * Request type is TI_SCI_MSG_SET/RELEASE_IRQ. 580997b001fSLokesh Vutla * Response is generic ACK / NACK message. 581997b001fSLokesh Vutla */ 582997b001fSLokesh Vutla struct ti_sci_msg_req_manage_irq { 583997b001fSLokesh Vutla struct ti_sci_msg_hdr hdr; 584997b001fSLokesh Vutla #define MSG_FLAG_DST_ID_VALID TI_SCI_MSG_FLAG(0) 585997b001fSLokesh Vutla #define MSG_FLAG_DST_HOST_IRQ_VALID TI_SCI_MSG_FLAG(1) 586997b001fSLokesh Vutla #define MSG_FLAG_IA_ID_VALID TI_SCI_MSG_FLAG(2) 587997b001fSLokesh Vutla #define MSG_FLAG_VINT_VALID TI_SCI_MSG_FLAG(3) 588997b001fSLokesh Vutla #define MSG_FLAG_GLB_EVNT_VALID TI_SCI_MSG_FLAG(4) 589997b001fSLokesh Vutla #define MSG_FLAG_VINT_STS_BIT_VALID TI_SCI_MSG_FLAG(5) 590997b001fSLokesh Vutla #define MSG_FLAG_SHOST_VALID TI_SCI_MSG_FLAG(31) 591997b001fSLokesh Vutla u32 valid_params; 592997b001fSLokesh Vutla u16 src_id; 593997b001fSLokesh Vutla u16 src_index; 594997b001fSLokesh Vutla u16 dst_id; 595997b001fSLokesh Vutla u16 dst_host_irq; 596997b001fSLokesh Vutla u16 ia_id; 597997b001fSLokesh Vutla u16 vint; 598997b001fSLokesh Vutla u16 global_event; 599997b001fSLokesh Vutla u8 vint_status_bit; 600997b001fSLokesh Vutla u8 secondary_host; 601997b001fSLokesh Vutla } __packed; 602997b001fSLokesh Vutla 60368608b5eSPeter Ujfalusi /** 60468608b5eSPeter Ujfalusi * struct ti_sci_msg_rm_ring_cfg_req - Configure a Navigator Subsystem ring 60568608b5eSPeter Ujfalusi * 60668608b5eSPeter Ujfalusi * Configures the non-real-time registers of a Navigator Subsystem ring. 60768608b5eSPeter Ujfalusi * @hdr: Generic Header 60868608b5eSPeter Ujfalusi * @valid_params: Bitfield defining validity of ring configuration parameters. 60968608b5eSPeter Ujfalusi * The ring configuration fields are not valid, and will not be used for 61068608b5eSPeter Ujfalusi * ring configuration, if their corresponding valid bit is zero. 61168608b5eSPeter Ujfalusi * Valid bit usage: 61268608b5eSPeter Ujfalusi * 0 - Valid bit for @tisci_msg_rm_ring_cfg_req addr_lo 61368608b5eSPeter Ujfalusi * 1 - Valid bit for @tisci_msg_rm_ring_cfg_req addr_hi 61468608b5eSPeter Ujfalusi * 2 - Valid bit for @tisci_msg_rm_ring_cfg_req count 61568608b5eSPeter Ujfalusi * 3 - Valid bit for @tisci_msg_rm_ring_cfg_req mode 61668608b5eSPeter Ujfalusi * 4 - Valid bit for @tisci_msg_rm_ring_cfg_req size 61768608b5eSPeter Ujfalusi * 5 - Valid bit for @tisci_msg_rm_ring_cfg_req order_id 61868608b5eSPeter Ujfalusi * @nav_id: Device ID of Navigator Subsystem from which the ring is allocated 61968608b5eSPeter Ujfalusi * @index: ring index to be configured. 62068608b5eSPeter Ujfalusi * @addr_lo: 32 LSBs of ring base address to be programmed into the ring's 62168608b5eSPeter Ujfalusi * RING_BA_LO register 62268608b5eSPeter Ujfalusi * @addr_hi: 16 MSBs of ring base address to be programmed into the ring's 62368608b5eSPeter Ujfalusi * RING_BA_HI register. 62468608b5eSPeter Ujfalusi * @count: Number of ring elements. Must be even if mode is CREDENTIALS or QM 62568608b5eSPeter Ujfalusi * modes. 62668608b5eSPeter Ujfalusi * @mode: Specifies the mode the ring is to be configured. 62768608b5eSPeter Ujfalusi * @size: Specifies encoded ring element size. To calculate the encoded size use 62868608b5eSPeter Ujfalusi * the formula (log2(size_bytes) - 2), where size_bytes cannot be 62968608b5eSPeter Ujfalusi * greater than 256. 63068608b5eSPeter Ujfalusi * @order_id: Specifies the ring's bus order ID. 63168608b5eSPeter Ujfalusi */ 63268608b5eSPeter Ujfalusi struct ti_sci_msg_rm_ring_cfg_req { 63368608b5eSPeter Ujfalusi struct ti_sci_msg_hdr hdr; 63468608b5eSPeter Ujfalusi u32 valid_params; 63568608b5eSPeter Ujfalusi u16 nav_id; 63668608b5eSPeter Ujfalusi u16 index; 63768608b5eSPeter Ujfalusi u32 addr_lo; 63868608b5eSPeter Ujfalusi u32 addr_hi; 63968608b5eSPeter Ujfalusi u32 count; 64068608b5eSPeter Ujfalusi u8 mode; 64168608b5eSPeter Ujfalusi u8 size; 64268608b5eSPeter Ujfalusi u8 order_id; 64368608b5eSPeter Ujfalusi } __packed; 64468608b5eSPeter Ujfalusi 64568608b5eSPeter Ujfalusi /** 64668608b5eSPeter Ujfalusi * struct ti_sci_msg_rm_ring_get_cfg_req - Get RA ring's configuration 64768608b5eSPeter Ujfalusi * 64868608b5eSPeter Ujfalusi * Gets the configuration of the non-real-time register fields of a ring. The 64968608b5eSPeter Ujfalusi * host, or a supervisor of the host, who owns the ring must be the requesting 65068608b5eSPeter Ujfalusi * host. The values of the non-real-time registers are returned in 65168608b5eSPeter Ujfalusi * @ti_sci_msg_rm_ring_get_cfg_resp. 65268608b5eSPeter Ujfalusi * 65368608b5eSPeter Ujfalusi * @hdr: Generic Header 65468608b5eSPeter Ujfalusi * @nav_id: Device ID of Navigator Subsystem from which the ring is allocated 65568608b5eSPeter Ujfalusi * @index: ring index. 65668608b5eSPeter Ujfalusi */ 65768608b5eSPeter Ujfalusi struct ti_sci_msg_rm_ring_get_cfg_req { 65868608b5eSPeter Ujfalusi struct ti_sci_msg_hdr hdr; 65968608b5eSPeter Ujfalusi u16 nav_id; 66068608b5eSPeter Ujfalusi u16 index; 66168608b5eSPeter Ujfalusi } __packed; 66268608b5eSPeter Ujfalusi 66368608b5eSPeter Ujfalusi /** 66468608b5eSPeter Ujfalusi * struct ti_sci_msg_rm_ring_get_cfg_resp - Ring get configuration response 66568608b5eSPeter Ujfalusi * 66668608b5eSPeter Ujfalusi * Response received by host processor after RM has handled 66768608b5eSPeter Ujfalusi * @ti_sci_msg_rm_ring_get_cfg_req. The response contains the ring's 66868608b5eSPeter Ujfalusi * non-real-time register values. 66968608b5eSPeter Ujfalusi * 67068608b5eSPeter Ujfalusi * @hdr: Generic Header 67168608b5eSPeter Ujfalusi * @addr_lo: Ring 32 LSBs of base address 67268608b5eSPeter Ujfalusi * @addr_hi: Ring 16 MSBs of base address. 67368608b5eSPeter Ujfalusi * @count: Ring number of elements. 67468608b5eSPeter Ujfalusi * @mode: Ring mode. 67568608b5eSPeter Ujfalusi * @size: encoded Ring element size 67668608b5eSPeter Ujfalusi * @order_id: ing order ID. 67768608b5eSPeter Ujfalusi */ 67868608b5eSPeter Ujfalusi struct ti_sci_msg_rm_ring_get_cfg_resp { 67968608b5eSPeter Ujfalusi struct ti_sci_msg_hdr hdr; 68068608b5eSPeter Ujfalusi u32 addr_lo; 68168608b5eSPeter Ujfalusi u32 addr_hi; 68268608b5eSPeter Ujfalusi u32 count; 68368608b5eSPeter Ujfalusi u8 mode; 68468608b5eSPeter Ujfalusi u8 size; 68568608b5eSPeter Ujfalusi u8 order_id; 68668608b5eSPeter Ujfalusi } __packed; 68768608b5eSPeter Ujfalusi 68868608b5eSPeter Ujfalusi /** 68968608b5eSPeter Ujfalusi * struct ti_sci_msg_psil_pair - Pairs a PSI-L source thread to a destination 69068608b5eSPeter Ujfalusi * thread 69168608b5eSPeter Ujfalusi * @hdr: Generic Header 69268608b5eSPeter Ujfalusi * @nav_id: SoC Navigator Subsystem device ID whose PSI-L config proxy is 69368608b5eSPeter Ujfalusi * used to pair the source and destination threads. 69468608b5eSPeter Ujfalusi * @src_thread: PSI-L source thread ID within the PSI-L System thread map. 69568608b5eSPeter Ujfalusi * 69668608b5eSPeter Ujfalusi * UDMAP transmit channels mapped to source threads will have their 69768608b5eSPeter Ujfalusi * TCHAN_THRD_ID register programmed with the destination thread if the pairing 69868608b5eSPeter Ujfalusi * is successful. 69968608b5eSPeter Ujfalusi 70068608b5eSPeter Ujfalusi * @dst_thread: PSI-L destination thread ID within the PSI-L System thread map. 70168608b5eSPeter Ujfalusi * PSI-L destination threads start at index 0x8000. The request is NACK'd if 70268608b5eSPeter Ujfalusi * the destination thread is not greater than or equal to 0x8000. 70368608b5eSPeter Ujfalusi * 70468608b5eSPeter Ujfalusi * UDMAP receive channels mapped to destination threads will have their 70568608b5eSPeter Ujfalusi * RCHAN_THRD_ID register programmed with the source thread if the pairing 70668608b5eSPeter Ujfalusi * is successful. 70768608b5eSPeter Ujfalusi * 70868608b5eSPeter Ujfalusi * Request type is TI_SCI_MSG_RM_PSIL_PAIR, response is a generic ACK or NACK 70968608b5eSPeter Ujfalusi * message. 71068608b5eSPeter Ujfalusi */ 71168608b5eSPeter Ujfalusi struct ti_sci_msg_psil_pair { 71268608b5eSPeter Ujfalusi struct ti_sci_msg_hdr hdr; 71368608b5eSPeter Ujfalusi u32 nav_id; 71468608b5eSPeter Ujfalusi u32 src_thread; 71568608b5eSPeter Ujfalusi u32 dst_thread; 71668608b5eSPeter Ujfalusi } __packed; 71768608b5eSPeter Ujfalusi 71868608b5eSPeter Ujfalusi /** 71968608b5eSPeter Ujfalusi * struct ti_sci_msg_psil_unpair - Unpairs a PSI-L source thread from a 72068608b5eSPeter Ujfalusi * destination thread 72168608b5eSPeter Ujfalusi * @hdr: Generic Header 72268608b5eSPeter Ujfalusi * @nav_id: SoC Navigator Subsystem device ID whose PSI-L config proxy is 72368608b5eSPeter Ujfalusi * used to unpair the source and destination threads. 72468608b5eSPeter Ujfalusi * @src_thread: PSI-L source thread ID within the PSI-L System thread map. 72568608b5eSPeter Ujfalusi * 72668608b5eSPeter Ujfalusi * UDMAP transmit channels mapped to source threads will have their 72768608b5eSPeter Ujfalusi * TCHAN_THRD_ID register cleared if the unpairing is successful. 72868608b5eSPeter Ujfalusi * 72968608b5eSPeter Ujfalusi * @dst_thread: PSI-L destination thread ID within the PSI-L System thread map. 73068608b5eSPeter Ujfalusi * PSI-L destination threads start at index 0x8000. The request is NACK'd if 73168608b5eSPeter Ujfalusi * the destination thread is not greater than or equal to 0x8000. 73268608b5eSPeter Ujfalusi * 73368608b5eSPeter Ujfalusi * UDMAP receive channels mapped to destination threads will have their 73468608b5eSPeter Ujfalusi * RCHAN_THRD_ID register cleared if the unpairing is successful. 73568608b5eSPeter Ujfalusi * 73668608b5eSPeter Ujfalusi * Request type is TI_SCI_MSG_RM_PSIL_UNPAIR, response is a generic ACK or NACK 73768608b5eSPeter Ujfalusi * message. 73868608b5eSPeter Ujfalusi */ 73968608b5eSPeter Ujfalusi struct ti_sci_msg_psil_unpair { 74068608b5eSPeter Ujfalusi struct ti_sci_msg_hdr hdr; 74168608b5eSPeter Ujfalusi u32 nav_id; 74268608b5eSPeter Ujfalusi u32 src_thread; 74368608b5eSPeter Ujfalusi u32 dst_thread; 74468608b5eSPeter Ujfalusi } __packed; 74568608b5eSPeter Ujfalusi 74668608b5eSPeter Ujfalusi /** 74768608b5eSPeter Ujfalusi * struct ti_sci_msg_udmap_rx_flow_cfg - UDMAP receive flow configuration 74868608b5eSPeter Ujfalusi * message 74968608b5eSPeter Ujfalusi * @hdr: Generic Header 75068608b5eSPeter Ujfalusi * @nav_id: SoC Navigator Subsystem device ID from which the receive flow is 75168608b5eSPeter Ujfalusi * allocated 75268608b5eSPeter Ujfalusi * @flow_index: UDMAP receive flow index for non-optional configuration. 75368608b5eSPeter Ujfalusi * @rx_ch_index: Specifies the index of the receive channel using the flow_index 75468608b5eSPeter Ujfalusi * @rx_einfo_present: UDMAP receive flow extended packet info present. 75568608b5eSPeter Ujfalusi * @rx_psinfo_present: UDMAP receive flow PS words present. 75668608b5eSPeter Ujfalusi * @rx_error_handling: UDMAP receive flow error handling configuration. Valid 75768608b5eSPeter Ujfalusi * values are TI_SCI_RM_UDMAP_RX_FLOW_ERR_DROP/RETRY. 75868608b5eSPeter Ujfalusi * @rx_desc_type: UDMAP receive flow descriptor type. It can be one of 75968608b5eSPeter Ujfalusi * TI_SCI_RM_UDMAP_RX_FLOW_DESC_HOST/MONO. 76068608b5eSPeter Ujfalusi * @rx_sop_offset: UDMAP receive flow start of packet offset. 76168608b5eSPeter Ujfalusi * @rx_dest_qnum: UDMAP receive flow destination queue number. 76268608b5eSPeter Ujfalusi * @rx_ps_location: UDMAP receive flow PS words location. 76368608b5eSPeter Ujfalusi * 0 - end of packet descriptor 76468608b5eSPeter Ujfalusi * 1 - Beginning of the data buffer 76568608b5eSPeter Ujfalusi * @rx_src_tag_hi: UDMAP receive flow source tag high byte constant 76668608b5eSPeter Ujfalusi * @rx_src_tag_lo: UDMAP receive flow source tag low byte constant 76768608b5eSPeter Ujfalusi * @rx_dest_tag_hi: UDMAP receive flow destination tag high byte constant 76868608b5eSPeter Ujfalusi * @rx_dest_tag_lo: UDMAP receive flow destination tag low byte constant 76968608b5eSPeter Ujfalusi * @rx_src_tag_hi_sel: UDMAP receive flow source tag high byte selector 77068608b5eSPeter Ujfalusi * @rx_src_tag_lo_sel: UDMAP receive flow source tag low byte selector 77168608b5eSPeter Ujfalusi * @rx_dest_tag_hi_sel: UDMAP receive flow destination tag high byte selector 77268608b5eSPeter Ujfalusi * @rx_dest_tag_lo_sel: UDMAP receive flow destination tag low byte selector 77368608b5eSPeter Ujfalusi * @rx_size_thresh_en: UDMAP receive flow packet size based free buffer queue 77468608b5eSPeter Ujfalusi * enable. If enabled, the ti_sci_rm_udmap_rx_flow_opt_cfg also need to be 77568608b5eSPeter Ujfalusi * configured and sent. 77668608b5eSPeter Ujfalusi * @rx_fdq0_sz0_qnum: UDMAP receive flow free descriptor queue 0. 77768608b5eSPeter Ujfalusi * @rx_fdq1_qnum: UDMAP receive flow free descriptor queue 1. 77868608b5eSPeter Ujfalusi * @rx_fdq2_qnum: UDMAP receive flow free descriptor queue 2. 77968608b5eSPeter Ujfalusi * @rx_fdq3_qnum: UDMAP receive flow free descriptor queue 3. 78068608b5eSPeter Ujfalusi * 78168608b5eSPeter Ujfalusi * For detailed information on the settings, see the UDMAP section of the TRM. 78268608b5eSPeter Ujfalusi */ 78368608b5eSPeter Ujfalusi struct ti_sci_msg_udmap_rx_flow_cfg { 78468608b5eSPeter Ujfalusi struct ti_sci_msg_hdr hdr; 78568608b5eSPeter Ujfalusi u32 nav_id; 78668608b5eSPeter Ujfalusi u32 flow_index; 78768608b5eSPeter Ujfalusi u32 rx_ch_index; 78868608b5eSPeter Ujfalusi u8 rx_einfo_present; 78968608b5eSPeter Ujfalusi u8 rx_psinfo_present; 79068608b5eSPeter Ujfalusi u8 rx_error_handling; 79168608b5eSPeter Ujfalusi u8 rx_desc_type; 79268608b5eSPeter Ujfalusi u16 rx_sop_offset; 79368608b5eSPeter Ujfalusi u16 rx_dest_qnum; 79468608b5eSPeter Ujfalusi u8 rx_ps_location; 79568608b5eSPeter Ujfalusi u8 rx_src_tag_hi; 79668608b5eSPeter Ujfalusi u8 rx_src_tag_lo; 79768608b5eSPeter Ujfalusi u8 rx_dest_tag_hi; 79868608b5eSPeter Ujfalusi u8 rx_dest_tag_lo; 79968608b5eSPeter Ujfalusi u8 rx_src_tag_hi_sel; 80068608b5eSPeter Ujfalusi u8 rx_src_tag_lo_sel; 80168608b5eSPeter Ujfalusi u8 rx_dest_tag_hi_sel; 80268608b5eSPeter Ujfalusi u8 rx_dest_tag_lo_sel; 80368608b5eSPeter Ujfalusi u8 rx_size_thresh_en; 80468608b5eSPeter Ujfalusi u16 rx_fdq0_sz0_qnum; 80568608b5eSPeter Ujfalusi u16 rx_fdq1_qnum; 80668608b5eSPeter Ujfalusi u16 rx_fdq2_qnum; 80768608b5eSPeter Ujfalusi u16 rx_fdq3_qnum; 80868608b5eSPeter Ujfalusi } __packed; 80968608b5eSPeter Ujfalusi 81068608b5eSPeter Ujfalusi /** 81168608b5eSPeter Ujfalusi * struct rm_ti_sci_msg_udmap_rx_flow_opt_cfg - parameters for UDMAP receive 81268608b5eSPeter Ujfalusi * flow optional configuration 81368608b5eSPeter Ujfalusi * @hdr: Generic Header 81468608b5eSPeter Ujfalusi * @nav_id: SoC Navigator Subsystem device ID from which the receive flow is 81568608b5eSPeter Ujfalusi * allocated 81668608b5eSPeter Ujfalusi * @flow_index: UDMAP receive flow index for optional configuration. 81768608b5eSPeter Ujfalusi * @rx_ch_index: Specifies the index of the receive channel using the flow_index 81868608b5eSPeter Ujfalusi * @rx_size_thresh0: UDMAP receive flow packet size threshold 0. 81968608b5eSPeter Ujfalusi * @rx_size_thresh1: UDMAP receive flow packet size threshold 1. 82068608b5eSPeter Ujfalusi * @rx_size_thresh2: UDMAP receive flow packet size threshold 2. 82168608b5eSPeter Ujfalusi * @rx_fdq0_sz1_qnum: UDMAP receive flow free descriptor queue for size 82268608b5eSPeter Ujfalusi * threshold 1. 82368608b5eSPeter Ujfalusi * @rx_fdq0_sz2_qnum: UDMAP receive flow free descriptor queue for size 82468608b5eSPeter Ujfalusi * threshold 2. 82568608b5eSPeter Ujfalusi * @rx_fdq0_sz3_qnum: UDMAP receive flow free descriptor queue for size 82668608b5eSPeter Ujfalusi * threshold 3. 82768608b5eSPeter Ujfalusi * 82868608b5eSPeter Ujfalusi * For detailed information on the settings, see the UDMAP section of the TRM. 82968608b5eSPeter Ujfalusi */ 83068608b5eSPeter Ujfalusi struct rm_ti_sci_msg_udmap_rx_flow_opt_cfg { 83168608b5eSPeter Ujfalusi struct ti_sci_msg_hdr hdr; 83268608b5eSPeter Ujfalusi u32 nav_id; 83368608b5eSPeter Ujfalusi u32 flow_index; 83468608b5eSPeter Ujfalusi u32 rx_ch_index; 83568608b5eSPeter Ujfalusi u16 rx_size_thresh0; 83668608b5eSPeter Ujfalusi u16 rx_size_thresh1; 83768608b5eSPeter Ujfalusi u16 rx_size_thresh2; 83868608b5eSPeter Ujfalusi u16 rx_fdq0_sz1_qnum; 83968608b5eSPeter Ujfalusi u16 rx_fdq0_sz2_qnum; 84068608b5eSPeter Ujfalusi u16 rx_fdq0_sz3_qnum; 84168608b5eSPeter Ujfalusi } __packed; 84268608b5eSPeter Ujfalusi 84368608b5eSPeter Ujfalusi /** 84468608b5eSPeter Ujfalusi * Configures a Navigator Subsystem UDMAP transmit channel 84568608b5eSPeter Ujfalusi * 84668608b5eSPeter Ujfalusi * Configures the non-real-time registers of a Navigator Subsystem UDMAP 84768608b5eSPeter Ujfalusi * transmit channel. The channel index must be assigned to the host defined 84868608b5eSPeter Ujfalusi * in the TISCI header via the RM board configuration resource assignment 84968608b5eSPeter Ujfalusi * range list. 85068608b5eSPeter Ujfalusi * 85168608b5eSPeter Ujfalusi * @hdr: Generic Header 85268608b5eSPeter Ujfalusi * 85368608b5eSPeter Ujfalusi * @valid_params: Bitfield defining validity of tx channel configuration 85468608b5eSPeter Ujfalusi * parameters. The tx channel configuration fields are not valid, and will not 85568608b5eSPeter Ujfalusi * be used for ch configuration, if their corresponding valid bit is zero. 85668608b5eSPeter Ujfalusi * Valid bit usage: 85768608b5eSPeter Ujfalusi * 0 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_pause_on_err 85868608b5eSPeter Ujfalusi * 1 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_atype 85968608b5eSPeter Ujfalusi * 2 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_chan_type 86068608b5eSPeter Ujfalusi * 3 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_fetch_size 86168608b5eSPeter Ujfalusi * 4 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::txcq_qnum 86268608b5eSPeter Ujfalusi * 5 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_priority 86368608b5eSPeter Ujfalusi * 6 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_qos 86468608b5eSPeter Ujfalusi * 7 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_orderid 86568608b5eSPeter Ujfalusi * 8 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_sched_priority 86668608b5eSPeter Ujfalusi * 9 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_filt_einfo 86768608b5eSPeter Ujfalusi * 10 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_filt_pswords 86868608b5eSPeter Ujfalusi * 11 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_supr_tdpkt 86968608b5eSPeter Ujfalusi * 12 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_credit_count 87068608b5eSPeter Ujfalusi * 13 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::fdepth 87168608b5eSPeter Ujfalusi * 14 - Valid bit for @ref ti_sci_msg_rm_udmap_tx_ch_cfg::tx_burst_size 87268608b5eSPeter Ujfalusi * 87368608b5eSPeter Ujfalusi * @nav_id: SoC device ID of Navigator Subsystem where tx channel is located 87468608b5eSPeter Ujfalusi * 87568608b5eSPeter Ujfalusi * @index: UDMAP transmit channel index. 87668608b5eSPeter Ujfalusi * 87768608b5eSPeter Ujfalusi * @tx_pause_on_err: UDMAP transmit channel pause on error configuration to 87868608b5eSPeter Ujfalusi * be programmed into the tx_pause_on_err field of the channel's TCHAN_TCFG 87968608b5eSPeter Ujfalusi * register. 88068608b5eSPeter Ujfalusi * 88168608b5eSPeter Ujfalusi * @tx_filt_einfo: UDMAP transmit channel extended packet information passing 88268608b5eSPeter Ujfalusi * configuration to be programmed into the tx_filt_einfo field of the 88368608b5eSPeter Ujfalusi * channel's TCHAN_TCFG register. 88468608b5eSPeter Ujfalusi * 88568608b5eSPeter Ujfalusi * @tx_filt_pswords: UDMAP transmit channel protocol specific word passing 88668608b5eSPeter Ujfalusi * configuration to be programmed into the tx_filt_pswords field of the 88768608b5eSPeter Ujfalusi * channel's TCHAN_TCFG register. 88868608b5eSPeter Ujfalusi * 88968608b5eSPeter Ujfalusi * @tx_atype: UDMAP transmit channel non Ring Accelerator access pointer 89068608b5eSPeter Ujfalusi * interpretation configuration to be programmed into the tx_atype field of 89168608b5eSPeter Ujfalusi * the channel's TCHAN_TCFG register. 89268608b5eSPeter Ujfalusi * 89368608b5eSPeter Ujfalusi * @tx_chan_type: UDMAP transmit channel functional channel type and work 89468608b5eSPeter Ujfalusi * passing mechanism configuration to be programmed into the tx_chan_type 89568608b5eSPeter Ujfalusi * field of the channel's TCHAN_TCFG register. 89668608b5eSPeter Ujfalusi * 89768608b5eSPeter Ujfalusi * @tx_supr_tdpkt: UDMAP transmit channel teardown packet generation suppression 89868608b5eSPeter Ujfalusi * configuration to be programmed into the tx_supr_tdpkt field of the channel's 89968608b5eSPeter Ujfalusi * TCHAN_TCFG register. 90068608b5eSPeter Ujfalusi * 90168608b5eSPeter Ujfalusi * @tx_fetch_size: UDMAP transmit channel number of 32-bit descriptor words to 90268608b5eSPeter Ujfalusi * fetch configuration to be programmed into the tx_fetch_size field of the 90368608b5eSPeter Ujfalusi * channel's TCHAN_TCFG register. The user must make sure to set the maximum 90468608b5eSPeter Ujfalusi * word count that can pass through the channel for any allowed descriptor type. 90568608b5eSPeter Ujfalusi * 90668608b5eSPeter Ujfalusi * @tx_credit_count: UDMAP transmit channel transfer request credit count 90768608b5eSPeter Ujfalusi * configuration to be programmed into the count field of the TCHAN_TCREDIT 90868608b5eSPeter Ujfalusi * register. Specifies how many credits for complete TRs are available. 90968608b5eSPeter Ujfalusi * 91068608b5eSPeter Ujfalusi * @txcq_qnum: UDMAP transmit channel completion queue configuration to be 91168608b5eSPeter Ujfalusi * programmed into the txcq_qnum field of the TCHAN_TCQ register. The specified 91268608b5eSPeter Ujfalusi * completion queue must be assigned to the host, or a subordinate of the host, 91368608b5eSPeter Ujfalusi * requesting configuration of the transmit channel. 91468608b5eSPeter Ujfalusi * 91568608b5eSPeter Ujfalusi * @tx_priority: UDMAP transmit channel transmit priority value to be programmed 91668608b5eSPeter Ujfalusi * into the priority field of the channel's TCHAN_TPRI_CTRL register. 91768608b5eSPeter Ujfalusi * 91868608b5eSPeter Ujfalusi * @tx_qos: UDMAP transmit channel transmit qos value to be programmed into the 91968608b5eSPeter Ujfalusi * qos field of the channel's TCHAN_TPRI_CTRL register. 92068608b5eSPeter Ujfalusi * 92168608b5eSPeter Ujfalusi * @tx_orderid: UDMAP transmit channel bus order id value to be programmed into 92268608b5eSPeter Ujfalusi * the orderid field of the channel's TCHAN_TPRI_CTRL register. 92368608b5eSPeter Ujfalusi * 92468608b5eSPeter Ujfalusi * @fdepth: UDMAP transmit channel FIFO depth configuration to be programmed 92568608b5eSPeter Ujfalusi * into the fdepth field of the TCHAN_TFIFO_DEPTH register. Sets the number of 92668608b5eSPeter Ujfalusi * Tx FIFO bytes which are allowed to be stored for the channel. Check the UDMAP 92768608b5eSPeter Ujfalusi * section of the TRM for restrictions regarding this parameter. 92868608b5eSPeter Ujfalusi * 92968608b5eSPeter Ujfalusi * @tx_sched_priority: UDMAP transmit channel tx scheduling priority 93068608b5eSPeter Ujfalusi * configuration to be programmed into the priority field of the channel's 93168608b5eSPeter Ujfalusi * TCHAN_TST_SCHED register. 93268608b5eSPeter Ujfalusi * 93368608b5eSPeter Ujfalusi * @tx_burst_size: UDMAP transmit channel burst size configuration to be 93468608b5eSPeter Ujfalusi * programmed into the tx_burst_size field of the TCHAN_TCFG register. 93568608b5eSPeter Ujfalusi */ 93668608b5eSPeter Ujfalusi struct ti_sci_msg_rm_udmap_tx_ch_cfg_req { 93768608b5eSPeter Ujfalusi struct ti_sci_msg_hdr hdr; 93868608b5eSPeter Ujfalusi u32 valid_params; 93968608b5eSPeter Ujfalusi u16 nav_id; 94068608b5eSPeter Ujfalusi u16 index; 94168608b5eSPeter Ujfalusi u8 tx_pause_on_err; 94268608b5eSPeter Ujfalusi u8 tx_filt_einfo; 94368608b5eSPeter Ujfalusi u8 tx_filt_pswords; 94468608b5eSPeter Ujfalusi u8 tx_atype; 94568608b5eSPeter Ujfalusi u8 tx_chan_type; 94668608b5eSPeter Ujfalusi u8 tx_supr_tdpkt; 94768608b5eSPeter Ujfalusi u16 tx_fetch_size; 94868608b5eSPeter Ujfalusi u8 tx_credit_count; 94968608b5eSPeter Ujfalusi u16 txcq_qnum; 95068608b5eSPeter Ujfalusi u8 tx_priority; 95168608b5eSPeter Ujfalusi u8 tx_qos; 95268608b5eSPeter Ujfalusi u8 tx_orderid; 95368608b5eSPeter Ujfalusi u16 fdepth; 95468608b5eSPeter Ujfalusi u8 tx_sched_priority; 95568608b5eSPeter Ujfalusi u8 tx_burst_size; 95668608b5eSPeter Ujfalusi } __packed; 95768608b5eSPeter Ujfalusi 95868608b5eSPeter Ujfalusi /** 95968608b5eSPeter Ujfalusi * Configures a Navigator Subsystem UDMAP receive channel 96068608b5eSPeter Ujfalusi * 96168608b5eSPeter Ujfalusi * Configures the non-real-time registers of a Navigator Subsystem UDMAP 96268608b5eSPeter Ujfalusi * receive channel. The channel index must be assigned to the host defined 96368608b5eSPeter Ujfalusi * in the TISCI header via the RM board configuration resource assignment 96468608b5eSPeter Ujfalusi * range list. 96568608b5eSPeter Ujfalusi * 96668608b5eSPeter Ujfalusi * @hdr: Generic Header 96768608b5eSPeter Ujfalusi * 96868608b5eSPeter Ujfalusi * @valid_params: Bitfield defining validity of rx channel configuration 96968608b5eSPeter Ujfalusi * parameters. 97068608b5eSPeter Ujfalusi * The rx channel configuration fields are not valid, and will not be used for 97168608b5eSPeter Ujfalusi * ch configuration, if their corresponding valid bit is zero. 97268608b5eSPeter Ujfalusi * Valid bit usage: 97368608b5eSPeter Ujfalusi * 0 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_pause_on_err 97468608b5eSPeter Ujfalusi * 1 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_atype 97568608b5eSPeter Ujfalusi * 2 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_chan_type 97668608b5eSPeter Ujfalusi * 3 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_fetch_size 97768608b5eSPeter Ujfalusi * 4 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rxcq_qnum 97868608b5eSPeter Ujfalusi * 5 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_priority 97968608b5eSPeter Ujfalusi * 6 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_qos 98068608b5eSPeter Ujfalusi * 7 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_orderid 98168608b5eSPeter Ujfalusi * 8 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_sched_priority 98268608b5eSPeter Ujfalusi * 9 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::flowid_start 98368608b5eSPeter Ujfalusi * 10 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::flowid_cnt 98468608b5eSPeter Ujfalusi * 11 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_ignore_short 98568608b5eSPeter Ujfalusi * 12 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_ignore_long 98668608b5eSPeter Ujfalusi * 14 - Valid bit for @ti_sci_msg_rm_udmap_rx_ch_cfg_req::rx_burst_size 98768608b5eSPeter Ujfalusi * 98868608b5eSPeter Ujfalusi * @nav_id: SoC device ID of Navigator Subsystem where rx channel is located 98968608b5eSPeter Ujfalusi * 99068608b5eSPeter Ujfalusi * @index: UDMAP receive channel index. 99168608b5eSPeter Ujfalusi * 99268608b5eSPeter Ujfalusi * @rx_fetch_size: UDMAP receive channel number of 32-bit descriptor words to 99368608b5eSPeter Ujfalusi * fetch configuration to be programmed into the rx_fetch_size field of the 99468608b5eSPeter Ujfalusi * channel's RCHAN_RCFG register. 99568608b5eSPeter Ujfalusi * 99668608b5eSPeter Ujfalusi * @rxcq_qnum: UDMAP receive channel completion queue configuration to be 99768608b5eSPeter Ujfalusi * programmed into the rxcq_qnum field of the RCHAN_RCQ register. 99868608b5eSPeter Ujfalusi * The specified completion queue must be assigned to the host, or a subordinate 99968608b5eSPeter Ujfalusi * of the host, requesting configuration of the receive channel. 100068608b5eSPeter Ujfalusi * 100168608b5eSPeter Ujfalusi * @rx_priority: UDMAP receive channel receive priority value to be programmed 100268608b5eSPeter Ujfalusi * into the priority field of the channel's RCHAN_RPRI_CTRL register. 100368608b5eSPeter Ujfalusi * 100468608b5eSPeter Ujfalusi * @rx_qos: UDMAP receive channel receive qos value to be programmed into the 100568608b5eSPeter Ujfalusi * qos field of the channel's RCHAN_RPRI_CTRL register. 100668608b5eSPeter Ujfalusi * 100768608b5eSPeter Ujfalusi * @rx_orderid: UDMAP receive channel bus order id value to be programmed into 100868608b5eSPeter Ujfalusi * the orderid field of the channel's RCHAN_RPRI_CTRL register. 100968608b5eSPeter Ujfalusi * 101068608b5eSPeter Ujfalusi * @rx_sched_priority: UDMAP receive channel rx scheduling priority 101168608b5eSPeter Ujfalusi * configuration to be programmed into the priority field of the channel's 101268608b5eSPeter Ujfalusi * RCHAN_RST_SCHED register. 101368608b5eSPeter Ujfalusi * 101468608b5eSPeter Ujfalusi * @flowid_start: UDMAP receive channel additional flows starting index 101568608b5eSPeter Ujfalusi * configuration to program into the flow_start field of the RCHAN_RFLOW_RNG 101668608b5eSPeter Ujfalusi * register. Specifies the starting index for flow IDs the receive channel is to 101768608b5eSPeter Ujfalusi * make use of beyond the default flow. flowid_start and @ref flowid_cnt must be 101868608b5eSPeter Ujfalusi * set as valid and configured together. The starting flow ID set by 101968608b5eSPeter Ujfalusi * @ref flowid_cnt must be a flow index within the Navigator Subsystem's subset 102068608b5eSPeter Ujfalusi * of flows beyond the default flows statically mapped to receive channels. 102168608b5eSPeter Ujfalusi * The additional flows must be assigned to the host, or a subordinate of the 102268608b5eSPeter Ujfalusi * host, requesting configuration of the receive channel. 102368608b5eSPeter Ujfalusi * 102468608b5eSPeter Ujfalusi * @flowid_cnt: UDMAP receive channel additional flows count configuration to 102568608b5eSPeter Ujfalusi * program into the flowid_cnt field of the RCHAN_RFLOW_RNG register. 102668608b5eSPeter Ujfalusi * This field specifies how many flow IDs are in the additional contiguous range 102768608b5eSPeter Ujfalusi * of legal flow IDs for the channel. @ref flowid_start and flowid_cnt must be 102868608b5eSPeter Ujfalusi * set as valid and configured together. Disabling the valid_params field bit 102968608b5eSPeter Ujfalusi * for flowid_cnt indicates no flow IDs other than the default are to be 103068608b5eSPeter Ujfalusi * allocated and used by the receive channel. @ref flowid_start plus flowid_cnt 103168608b5eSPeter Ujfalusi * cannot be greater than the number of receive flows in the receive channel's 103268608b5eSPeter Ujfalusi * Navigator Subsystem. The additional flows must be assigned to the host, or a 103368608b5eSPeter Ujfalusi * subordinate of the host, requesting configuration of the receive channel. 103468608b5eSPeter Ujfalusi * 103568608b5eSPeter Ujfalusi * @rx_pause_on_err: UDMAP receive channel pause on error configuration to be 103668608b5eSPeter Ujfalusi * programmed into the rx_pause_on_err field of the channel's RCHAN_RCFG 103768608b5eSPeter Ujfalusi * register. 103868608b5eSPeter Ujfalusi * 103968608b5eSPeter Ujfalusi * @rx_atype: UDMAP receive channel non Ring Accelerator access pointer 104068608b5eSPeter Ujfalusi * interpretation configuration to be programmed into the rx_atype field of the 104168608b5eSPeter Ujfalusi * channel's RCHAN_RCFG register. 104268608b5eSPeter Ujfalusi * 104368608b5eSPeter Ujfalusi * @rx_chan_type: UDMAP receive channel functional channel type and work passing 104468608b5eSPeter Ujfalusi * mechanism configuration to be programmed into the rx_chan_type field of the 104568608b5eSPeter Ujfalusi * channel's RCHAN_RCFG register. 104668608b5eSPeter Ujfalusi * 104768608b5eSPeter Ujfalusi * @rx_ignore_short: UDMAP receive channel short packet treatment configuration 104868608b5eSPeter Ujfalusi * to be programmed into the rx_ignore_short field of the RCHAN_RCFG register. 104968608b5eSPeter Ujfalusi * 105068608b5eSPeter Ujfalusi * @rx_ignore_long: UDMAP receive channel long packet treatment configuration to 105168608b5eSPeter Ujfalusi * be programmed into the rx_ignore_long field of the RCHAN_RCFG register. 105268608b5eSPeter Ujfalusi * 105368608b5eSPeter Ujfalusi * @rx_burst_size: UDMAP receive channel burst size configuration to be 105468608b5eSPeter Ujfalusi * programmed into the rx_burst_size field of the RCHAN_RCFG register. 105568608b5eSPeter Ujfalusi */ 105668608b5eSPeter Ujfalusi struct ti_sci_msg_rm_udmap_rx_ch_cfg_req { 105768608b5eSPeter Ujfalusi struct ti_sci_msg_hdr hdr; 105868608b5eSPeter Ujfalusi u32 valid_params; 105968608b5eSPeter Ujfalusi u16 nav_id; 106068608b5eSPeter Ujfalusi u16 index; 106168608b5eSPeter Ujfalusi u16 rx_fetch_size; 106268608b5eSPeter Ujfalusi u16 rxcq_qnum; 106368608b5eSPeter Ujfalusi u8 rx_priority; 106468608b5eSPeter Ujfalusi u8 rx_qos; 106568608b5eSPeter Ujfalusi u8 rx_orderid; 106668608b5eSPeter Ujfalusi u8 rx_sched_priority; 106768608b5eSPeter Ujfalusi u16 flowid_start; 106868608b5eSPeter Ujfalusi u16 flowid_cnt; 106968608b5eSPeter Ujfalusi u8 rx_pause_on_err; 107068608b5eSPeter Ujfalusi u8 rx_atype; 107168608b5eSPeter Ujfalusi u8 rx_chan_type; 107268608b5eSPeter Ujfalusi u8 rx_ignore_short; 107368608b5eSPeter Ujfalusi u8 rx_ignore_long; 107468608b5eSPeter Ujfalusi u8 rx_burst_size; 107568608b5eSPeter Ujfalusi } __packed; 107668608b5eSPeter Ujfalusi 107768608b5eSPeter Ujfalusi /** 107868608b5eSPeter Ujfalusi * Configures a Navigator Subsystem UDMAP receive flow 107968608b5eSPeter Ujfalusi * 108068608b5eSPeter Ujfalusi * Configures a Navigator Subsystem UDMAP receive flow's registers. 108168608b5eSPeter Ujfalusi * Configuration does not include the flow registers which handle size-based 108268608b5eSPeter Ujfalusi * free descriptor queue routing. 108368608b5eSPeter Ujfalusi * 108468608b5eSPeter Ujfalusi * The flow index must be assigned to the host defined in the TISCI header via 108568608b5eSPeter Ujfalusi * the RM board configuration resource assignment range list. 108668608b5eSPeter Ujfalusi * 108768608b5eSPeter Ujfalusi * @hdr: Standard TISCI header 108868608b5eSPeter Ujfalusi * 108968608b5eSPeter Ujfalusi * @valid_params 109068608b5eSPeter Ujfalusi * Bitfield defining validity of rx flow configuration parameters. The 109168608b5eSPeter Ujfalusi * rx flow configuration fields are not valid, and will not be used for flow 109268608b5eSPeter Ujfalusi * configuration, if their corresponding valid bit is zero. Valid bit usage: 109368608b5eSPeter Ujfalusi * 0 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_einfo_present 109468608b5eSPeter Ujfalusi * 1 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_psinfo_present 109568608b5eSPeter Ujfalusi * 2 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_error_handling 109668608b5eSPeter Ujfalusi * 3 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_desc_type 109768608b5eSPeter Ujfalusi * 4 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_sop_offset 109868608b5eSPeter Ujfalusi * 5 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_qnum 109968608b5eSPeter Ujfalusi * 6 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_hi 110068608b5eSPeter Ujfalusi * 7 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_lo 110168608b5eSPeter Ujfalusi * 8 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_hi 110268608b5eSPeter Ujfalusi * 9 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_lo 110368608b5eSPeter Ujfalusi * 10 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_hi_sel 110468608b5eSPeter Ujfalusi * 11 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_src_tag_lo_sel 110568608b5eSPeter Ujfalusi * 12 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_hi_sel 110668608b5eSPeter Ujfalusi * 13 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_dest_tag_lo_sel 110768608b5eSPeter Ujfalusi * 14 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq0_sz0_qnum 110868608b5eSPeter Ujfalusi * 15 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq1_sz0_qnum 110968608b5eSPeter Ujfalusi * 16 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq2_sz0_qnum 111068608b5eSPeter Ujfalusi * 17 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_fdq3_sz0_qnum 111168608b5eSPeter Ujfalusi * 18 - Valid bit for @tisci_msg_rm_udmap_flow_cfg_req::rx_ps_location 111268608b5eSPeter Ujfalusi * 111368608b5eSPeter Ujfalusi * @nav_id: SoC device ID of Navigator Subsystem from which the receive flow is 111468608b5eSPeter Ujfalusi * allocated 111568608b5eSPeter Ujfalusi * 111668608b5eSPeter Ujfalusi * @flow_index: UDMAP receive flow index for non-optional configuration. 111768608b5eSPeter Ujfalusi * 111868608b5eSPeter Ujfalusi * @rx_einfo_present: 111968608b5eSPeter Ujfalusi * UDMAP receive flow extended packet info present configuration to be 112068608b5eSPeter Ujfalusi * programmed into the rx_einfo_present field of the flow's RFLOW_RFA register. 112168608b5eSPeter Ujfalusi * 112268608b5eSPeter Ujfalusi * @rx_psinfo_present: 112368608b5eSPeter Ujfalusi * UDMAP receive flow PS words present configuration to be programmed into the 112468608b5eSPeter Ujfalusi * rx_psinfo_present field of the flow's RFLOW_RFA register. 112568608b5eSPeter Ujfalusi * 112668608b5eSPeter Ujfalusi * @rx_error_handling: 112768608b5eSPeter Ujfalusi * UDMAP receive flow error handling configuration to be programmed into the 112868608b5eSPeter Ujfalusi * rx_error_handling field of the flow's RFLOW_RFA register. 112968608b5eSPeter Ujfalusi * 113068608b5eSPeter Ujfalusi * @rx_desc_type: 113168608b5eSPeter Ujfalusi * UDMAP receive flow descriptor type configuration to be programmed into the 113268608b5eSPeter Ujfalusi * rx_desc_type field field of the flow's RFLOW_RFA register. 113368608b5eSPeter Ujfalusi * 113468608b5eSPeter Ujfalusi * @rx_sop_offset: 113568608b5eSPeter Ujfalusi * UDMAP receive flow start of packet offset configuration to be programmed 113668608b5eSPeter Ujfalusi * into the rx_sop_offset field of the RFLOW_RFA register. See the UDMAP 113768608b5eSPeter Ujfalusi * section of the TRM for more information on this setting. Valid values for 113868608b5eSPeter Ujfalusi * this field are 0-255 bytes. 113968608b5eSPeter Ujfalusi * 114068608b5eSPeter Ujfalusi * @rx_dest_qnum: 114168608b5eSPeter Ujfalusi * UDMAP receive flow destination queue configuration to be programmed into the 114268608b5eSPeter Ujfalusi * rx_dest_qnum field of the flow's RFLOW_RFA register. The specified 114368608b5eSPeter Ujfalusi * destination queue must be valid within the Navigator Subsystem and must be 114468608b5eSPeter Ujfalusi * owned by the host, or a subordinate of the host, requesting allocation and 114568608b5eSPeter Ujfalusi * configuration of the receive flow. 114668608b5eSPeter Ujfalusi * 114768608b5eSPeter Ujfalusi * @rx_src_tag_hi: 114868608b5eSPeter Ujfalusi * UDMAP receive flow source tag high byte constant configuration to be 114968608b5eSPeter Ujfalusi * programmed into the rx_src_tag_hi field of the flow's RFLOW_RFB register. 115068608b5eSPeter Ujfalusi * See the UDMAP section of the TRM for more information on this setting. 115168608b5eSPeter Ujfalusi * 115268608b5eSPeter Ujfalusi * @rx_src_tag_lo: 115368608b5eSPeter Ujfalusi * UDMAP receive flow source tag low byte constant configuration to be 115468608b5eSPeter Ujfalusi * programmed into the rx_src_tag_lo field of the flow's RFLOW_RFB register. 115568608b5eSPeter Ujfalusi * See the UDMAP section of the TRM for more information on this setting. 115668608b5eSPeter Ujfalusi * 115768608b5eSPeter Ujfalusi * @rx_dest_tag_hi: 115868608b5eSPeter Ujfalusi * UDMAP receive flow destination tag high byte constant configuration to be 115968608b5eSPeter Ujfalusi * programmed into the rx_dest_tag_hi field of the flow's RFLOW_RFB register. 116068608b5eSPeter Ujfalusi * See the UDMAP section of the TRM for more information on this setting. 116168608b5eSPeter Ujfalusi * 116268608b5eSPeter Ujfalusi * @rx_dest_tag_lo: 116368608b5eSPeter Ujfalusi * UDMAP receive flow destination tag low byte constant configuration to be 116468608b5eSPeter Ujfalusi * programmed into the rx_dest_tag_lo field of the flow's RFLOW_RFB register. 116568608b5eSPeter Ujfalusi * See the UDMAP section of the TRM for more information on this setting. 116668608b5eSPeter Ujfalusi * 116768608b5eSPeter Ujfalusi * @rx_src_tag_hi_sel: 116868608b5eSPeter Ujfalusi * UDMAP receive flow source tag high byte selector configuration to be 116968608b5eSPeter Ujfalusi * programmed into the rx_src_tag_hi_sel field of the RFLOW_RFC register. See 117068608b5eSPeter Ujfalusi * the UDMAP section of the TRM for more information on this setting. 117168608b5eSPeter Ujfalusi * 117268608b5eSPeter Ujfalusi * @rx_src_tag_lo_sel: 117368608b5eSPeter Ujfalusi * UDMAP receive flow source tag low byte selector configuration to be 117468608b5eSPeter Ujfalusi * programmed into the rx_src_tag_lo_sel field of the RFLOW_RFC register. See 117568608b5eSPeter Ujfalusi * the UDMAP section of the TRM for more information on this setting. 117668608b5eSPeter Ujfalusi * 117768608b5eSPeter Ujfalusi * @rx_dest_tag_hi_sel: 117868608b5eSPeter Ujfalusi * UDMAP receive flow destination tag high byte selector configuration to be 117968608b5eSPeter Ujfalusi * programmed into the rx_dest_tag_hi_sel field of the RFLOW_RFC register. See 118068608b5eSPeter Ujfalusi * the UDMAP section of the TRM for more information on this setting. 118168608b5eSPeter Ujfalusi * 118268608b5eSPeter Ujfalusi * @rx_dest_tag_lo_sel: 118368608b5eSPeter Ujfalusi * UDMAP receive flow destination tag low byte selector configuration to be 118468608b5eSPeter Ujfalusi * programmed into the rx_dest_tag_lo_sel field of the RFLOW_RFC register. See 118568608b5eSPeter Ujfalusi * the UDMAP section of the TRM for more information on this setting. 118668608b5eSPeter Ujfalusi * 118768608b5eSPeter Ujfalusi * @rx_fdq0_sz0_qnum: 118868608b5eSPeter Ujfalusi * UDMAP receive flow free descriptor queue 0 configuration to be programmed 118968608b5eSPeter Ujfalusi * into the rx_fdq0_sz0_qnum field of the flow's RFLOW_RFD register. See the 119068608b5eSPeter Ujfalusi * UDMAP section of the TRM for more information on this setting. The specified 119168608b5eSPeter Ujfalusi * free queue must be valid within the Navigator Subsystem and must be owned 119268608b5eSPeter Ujfalusi * by the host, or a subordinate of the host, requesting allocation and 119368608b5eSPeter Ujfalusi * configuration of the receive flow. 119468608b5eSPeter Ujfalusi * 119568608b5eSPeter Ujfalusi * @rx_fdq1_qnum: 119668608b5eSPeter Ujfalusi * UDMAP receive flow free descriptor queue 1 configuration to be programmed 119768608b5eSPeter Ujfalusi * into the rx_fdq1_qnum field of the flow's RFLOW_RFD register. See the 119868608b5eSPeter Ujfalusi * UDMAP section of the TRM for more information on this setting. The specified 119968608b5eSPeter Ujfalusi * free queue must be valid within the Navigator Subsystem and must be owned 120068608b5eSPeter Ujfalusi * by the host, or a subordinate of the host, requesting allocation and 120168608b5eSPeter Ujfalusi * configuration of the receive flow. 120268608b5eSPeter Ujfalusi * 120368608b5eSPeter Ujfalusi * @rx_fdq2_qnum: 120468608b5eSPeter Ujfalusi * UDMAP receive flow free descriptor queue 2 configuration to be programmed 120568608b5eSPeter Ujfalusi * into the rx_fdq2_qnum field of the flow's RFLOW_RFE register. See the 120668608b5eSPeter Ujfalusi * UDMAP section of the TRM for more information on this setting. The specified 120768608b5eSPeter Ujfalusi * free queue must be valid within the Navigator Subsystem and must be owned 120868608b5eSPeter Ujfalusi * by the host, or a subordinate of the host, requesting allocation and 120968608b5eSPeter Ujfalusi * configuration of the receive flow. 121068608b5eSPeter Ujfalusi * 121168608b5eSPeter Ujfalusi * @rx_fdq3_qnum: 121268608b5eSPeter Ujfalusi * UDMAP receive flow free descriptor queue 3 configuration to be programmed 121368608b5eSPeter Ujfalusi * into the rx_fdq3_qnum field of the flow's RFLOW_RFE register. See the 121468608b5eSPeter Ujfalusi * UDMAP section of the TRM for more information on this setting. The specified 121568608b5eSPeter Ujfalusi * free queue must be valid within the Navigator Subsystem and must be owned 121668608b5eSPeter Ujfalusi * by the host, or a subordinate of the host, requesting allocation and 121768608b5eSPeter Ujfalusi * configuration of the receive flow. 121868608b5eSPeter Ujfalusi * 121968608b5eSPeter Ujfalusi * @rx_ps_location: 122068608b5eSPeter Ujfalusi * UDMAP receive flow PS words location configuration to be programmed into the 122168608b5eSPeter Ujfalusi * rx_ps_location field of the flow's RFLOW_RFA register. 122268608b5eSPeter Ujfalusi */ 122368608b5eSPeter Ujfalusi struct ti_sci_msg_rm_udmap_flow_cfg_req { 122468608b5eSPeter Ujfalusi struct ti_sci_msg_hdr hdr; 122568608b5eSPeter Ujfalusi u32 valid_params; 122668608b5eSPeter Ujfalusi u16 nav_id; 122768608b5eSPeter Ujfalusi u16 flow_index; 122868608b5eSPeter Ujfalusi u8 rx_einfo_present; 122968608b5eSPeter Ujfalusi u8 rx_psinfo_present; 123068608b5eSPeter Ujfalusi u8 rx_error_handling; 123168608b5eSPeter Ujfalusi u8 rx_desc_type; 123268608b5eSPeter Ujfalusi u16 rx_sop_offset; 123368608b5eSPeter Ujfalusi u16 rx_dest_qnum; 123468608b5eSPeter Ujfalusi u8 rx_src_tag_hi; 123568608b5eSPeter Ujfalusi u8 rx_src_tag_lo; 123668608b5eSPeter Ujfalusi u8 rx_dest_tag_hi; 123768608b5eSPeter Ujfalusi u8 rx_dest_tag_lo; 123868608b5eSPeter Ujfalusi u8 rx_src_tag_hi_sel; 123968608b5eSPeter Ujfalusi u8 rx_src_tag_lo_sel; 124068608b5eSPeter Ujfalusi u8 rx_dest_tag_hi_sel; 124168608b5eSPeter Ujfalusi u8 rx_dest_tag_lo_sel; 124268608b5eSPeter Ujfalusi u16 rx_fdq0_sz0_qnum; 124368608b5eSPeter Ujfalusi u16 rx_fdq1_qnum; 124468608b5eSPeter Ujfalusi u16 rx_fdq2_qnum; 124568608b5eSPeter Ujfalusi u16 rx_fdq3_qnum; 124668608b5eSPeter Ujfalusi u8 rx_ps_location; 124768608b5eSPeter Ujfalusi } __packed; 124868608b5eSPeter Ujfalusi 1249*1e407f33SSuman Anna /** 1250*1e407f33SSuman Anna * struct ti_sci_msg_req_proc_request - Request a processor 1251*1e407f33SSuman Anna * @hdr: Generic Header 1252*1e407f33SSuman Anna * @processor_id: ID of processor being requested 1253*1e407f33SSuman Anna * 1254*1e407f33SSuman Anna * Request type is TI_SCI_MSG_PROC_REQUEST, response is a generic ACK/NACK 1255*1e407f33SSuman Anna * message. 1256*1e407f33SSuman Anna */ 1257*1e407f33SSuman Anna struct ti_sci_msg_req_proc_request { 1258*1e407f33SSuman Anna struct ti_sci_msg_hdr hdr; 1259*1e407f33SSuman Anna u8 processor_id; 1260*1e407f33SSuman Anna } __packed; 1261*1e407f33SSuman Anna 1262*1e407f33SSuman Anna /** 1263*1e407f33SSuman Anna * struct ti_sci_msg_req_proc_release - Release a processor 1264*1e407f33SSuman Anna * @hdr: Generic Header 1265*1e407f33SSuman Anna * @processor_id: ID of processor being released 1266*1e407f33SSuman Anna * 1267*1e407f33SSuman Anna * Request type is TI_SCI_MSG_PROC_RELEASE, response is a generic ACK/NACK 1268*1e407f33SSuman Anna * message. 1269*1e407f33SSuman Anna */ 1270*1e407f33SSuman Anna struct ti_sci_msg_req_proc_release { 1271*1e407f33SSuman Anna struct ti_sci_msg_hdr hdr; 1272*1e407f33SSuman Anna u8 processor_id; 1273*1e407f33SSuman Anna } __packed; 1274*1e407f33SSuman Anna 1275*1e407f33SSuman Anna /** 1276*1e407f33SSuman Anna * struct ti_sci_msg_req_proc_handover - Handover a processor to a host 1277*1e407f33SSuman Anna * @hdr: Generic Header 1278*1e407f33SSuman Anna * @processor_id: ID of processor being handed over 1279*1e407f33SSuman Anna * @host_id: Host ID the control needs to be transferred to 1280*1e407f33SSuman Anna * 1281*1e407f33SSuman Anna * Request type is TI_SCI_MSG_PROC_HANDOVER, response is a generic ACK/NACK 1282*1e407f33SSuman Anna * message. 1283*1e407f33SSuman Anna */ 1284*1e407f33SSuman Anna struct ti_sci_msg_req_proc_handover { 1285*1e407f33SSuman Anna struct ti_sci_msg_hdr hdr; 1286*1e407f33SSuman Anna u8 processor_id; 1287*1e407f33SSuman Anna u8 host_id; 1288*1e407f33SSuman Anna } __packed; 1289*1e407f33SSuman Anna 1290*1e407f33SSuman Anna /* Boot Vector masks */ 1291*1e407f33SSuman Anna #define TI_SCI_ADDR_LOW_MASK GENMASK_ULL(31, 0) 1292*1e407f33SSuman Anna #define TI_SCI_ADDR_HIGH_MASK GENMASK_ULL(63, 32) 1293*1e407f33SSuman Anna #define TI_SCI_ADDR_HIGH_SHIFT 32 1294*1e407f33SSuman Anna 1295*1e407f33SSuman Anna /** 1296*1e407f33SSuman Anna * struct ti_sci_msg_req_set_config - Set Processor boot configuration 1297*1e407f33SSuman Anna * @hdr: Generic Header 1298*1e407f33SSuman Anna * @processor_id: ID of processor being configured 1299*1e407f33SSuman Anna * @bootvector_low: Lower 32 bit address (Little Endian) of boot vector 1300*1e407f33SSuman Anna * @bootvector_high: Higher 32 bit address (Little Endian) of boot vector 1301*1e407f33SSuman Anna * @config_flags_set: Optional Processor specific Config Flags to set. 1302*1e407f33SSuman Anna * Setting a bit here implies the corresponding mode 1303*1e407f33SSuman Anna * will be set 1304*1e407f33SSuman Anna * @config_flags_clear: Optional Processor specific Config Flags to clear. 1305*1e407f33SSuman Anna * Setting a bit here implies the corresponding mode 1306*1e407f33SSuman Anna * will be cleared 1307*1e407f33SSuman Anna * 1308*1e407f33SSuman Anna * Request type is TI_SCI_MSG_PROC_HANDOVER, response is a generic ACK/NACK 1309*1e407f33SSuman Anna * message. 1310*1e407f33SSuman Anna */ 1311*1e407f33SSuman Anna struct ti_sci_msg_req_set_config { 1312*1e407f33SSuman Anna struct ti_sci_msg_hdr hdr; 1313*1e407f33SSuman Anna u8 processor_id; 1314*1e407f33SSuman Anna u32 bootvector_low; 1315*1e407f33SSuman Anna u32 bootvector_high; 1316*1e407f33SSuman Anna u32 config_flags_set; 1317*1e407f33SSuman Anna u32 config_flags_clear; 1318*1e407f33SSuman Anna } __packed; 1319*1e407f33SSuman Anna 1320*1e407f33SSuman Anna /** 1321*1e407f33SSuman Anna * struct ti_sci_msg_req_set_ctrl - Set Processor boot control flags 1322*1e407f33SSuman Anna * @hdr: Generic Header 1323*1e407f33SSuman Anna * @processor_id: ID of processor being configured 1324*1e407f33SSuman Anna * @control_flags_set: Optional Processor specific Control Flags to set. 1325*1e407f33SSuman Anna * Setting a bit here implies the corresponding mode 1326*1e407f33SSuman Anna * will be set 1327*1e407f33SSuman Anna * @control_flags_clear:Optional Processor specific Control Flags to clear. 1328*1e407f33SSuman Anna * Setting a bit here implies the corresponding mode 1329*1e407f33SSuman Anna * will be cleared 1330*1e407f33SSuman Anna * 1331*1e407f33SSuman Anna * Request type is TI_SCI_MSG_SET_CTRL, response is a generic ACK/NACK 1332*1e407f33SSuman Anna * message. 1333*1e407f33SSuman Anna */ 1334*1e407f33SSuman Anna struct ti_sci_msg_req_set_ctrl { 1335*1e407f33SSuman Anna struct ti_sci_msg_hdr hdr; 1336*1e407f33SSuman Anna u8 processor_id; 1337*1e407f33SSuman Anna u32 control_flags_set; 1338*1e407f33SSuman Anna u32 control_flags_clear; 1339*1e407f33SSuman Anna } __packed; 1340*1e407f33SSuman Anna 1341*1e407f33SSuman Anna /** 1342*1e407f33SSuman Anna * struct ti_sci_msg_req_get_status - Processor boot status request 1343*1e407f33SSuman Anna * @hdr: Generic Header 1344*1e407f33SSuman Anna * @processor_id: ID of processor whose status is being requested 1345*1e407f33SSuman Anna * 1346*1e407f33SSuman Anna * Request type is TI_SCI_MSG_GET_STATUS, response is an appropriate 1347*1e407f33SSuman Anna * message, or NACK in case of inability to satisfy request. 1348*1e407f33SSuman Anna */ 1349*1e407f33SSuman Anna struct ti_sci_msg_req_get_status { 1350*1e407f33SSuman Anna struct ti_sci_msg_hdr hdr; 1351*1e407f33SSuman Anna u8 processor_id; 1352*1e407f33SSuman Anna } __packed; 1353*1e407f33SSuman Anna 1354*1e407f33SSuman Anna /** 1355*1e407f33SSuman Anna * struct ti_sci_msg_resp_get_status - Processor boot status response 1356*1e407f33SSuman Anna * @hdr: Generic Header 1357*1e407f33SSuman Anna * @processor_id: ID of processor whose status is returned 1358*1e407f33SSuman Anna * @bootvector_low: Lower 32 bit address (Little Endian) of boot vector 1359*1e407f33SSuman Anna * @bootvector_high: Higher 32 bit address (Little Endian) of boot vector 1360*1e407f33SSuman Anna * @config_flags: Optional Processor specific Config Flags set currently 1361*1e407f33SSuman Anna * @control_flags: Optional Processor specific Control Flags set currently 1362*1e407f33SSuman Anna * @status_flags: Optional Processor specific Status Flags set currently 1363*1e407f33SSuman Anna * 1364*1e407f33SSuman Anna * Response structure to a TI_SCI_MSG_GET_STATUS request. 1365*1e407f33SSuman Anna */ 1366*1e407f33SSuman Anna struct ti_sci_msg_resp_get_status { 1367*1e407f33SSuman Anna struct ti_sci_msg_hdr hdr; 1368*1e407f33SSuman Anna u8 processor_id; 1369*1e407f33SSuman Anna u32 bootvector_low; 1370*1e407f33SSuman Anna u32 bootvector_high; 1371*1e407f33SSuman Anna u32 config_flags; 1372*1e407f33SSuman Anna u32 control_flags; 1373*1e407f33SSuman Anna u32 status_flags; 1374*1e407f33SSuman Anna } __packed; 1375*1e407f33SSuman Anna 1376aa276781SNishanth Menon #endif /* __TI_SCI_H */ 1377