Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
mspi.h
Go to the documentation of this file.
1/*
2 * Copyright (c) 2025, Ambiq Micro Inc. <www.ambiq.com>
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
12
13#ifndef ZEPHYR_INCLUDE_MSPI_H_
14#define ZEPHYR_INCLUDE_MSPI_H_
15
16#include <errno.h>
17
18#include <zephyr/sys/__assert.h>
19#include <zephyr/types.h>
20#include <zephyr/kernel.h>
21#include <zephyr/device.h>
22#include <zephyr/drivers/gpio.h>
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
37
45
53
76
93
103
111
119
133
146
166
176
184
208
216
222
229
234#ifdef __cplusplus
235 /* For C++ compatibility. */
236 uint8_t dummy;
237#endif
238};
239
251
277
283 const struct device *bus;
286};
287
329
345
359
361
367
390
408
440
442
448
464
474
484
491typedef void (*mspi_callback_handler_t)(struct mspi_callback_context *mspi_cb_ctx, ...);
492
494
499
504typedef int (*mspi_api_config)(const struct mspi_dt_spec *spec);
505
510typedef int (*mspi_api_dev_config)(const struct device *controller,
511 const struct mspi_dev_id *dev_id,
512 const enum mspi_dev_cfg_mask param_mask,
513 const struct mspi_dev_cfg *cfg);
514
519typedef int (*mspi_api_get_channel_status)(const struct device *controller, uint8_t ch);
520
525typedef int (*mspi_api_transceive)(const struct device *controller,
526 const struct mspi_dev_id *dev_id,
527 const struct mspi_xfer *req);
528
533typedef int (*mspi_api_register_callback)(const struct device *controller,
534 const struct mspi_dev_id *dev_id,
535 const enum mspi_bus_event evt_type,
537 struct mspi_callback_context *ctx);
538
543typedef int (*mspi_api_memmap_config)(const struct device *controller,
544 const struct mspi_dev_id *dev_id,
545 const struct mspi_memmap_cfg *memmap_cfg);
546
551typedef int (*mspi_api_scramble_config)(const struct device *controller,
552 const struct mspi_dev_id *dev_id,
553 const struct mspi_scramble_cfg *scramble_cfg);
554
559typedef int (*mspi_api_timing_config)(const struct device *controller,
560 const struct mspi_dev_id *dev_id, const uint32_t param_mask,
561 void *timing_cfg);
562
584
586
591
613__syscall int mspi_config(const struct mspi_dt_spec *spec);
614
615static inline int z_impl_mspi_config(const struct mspi_dt_spec *spec)
616{
617 return DEVICE_API_GET(mspi, spec->bus)->config(spec);
618}
619
647__syscall int mspi_dev_config(const struct device *controller,
648 const struct mspi_dev_id *dev_id,
649 const enum mspi_dev_cfg_mask param_mask,
650 const struct mspi_dev_cfg *cfg);
651
652static inline int z_impl_mspi_dev_config(const struct device *controller,
653 const struct mspi_dev_id *dev_id,
654 const enum mspi_dev_cfg_mask param_mask,
655 const struct mspi_dev_cfg *cfg)
656{
657 return DEVICE_API_GET(mspi, controller)->dev_config(controller, dev_id, param_mask, cfg);
658}
659
671__syscall int mspi_get_channel_status(const struct device *controller, uint8_t ch);
672
673static inline int z_impl_mspi_get_channel_status(const struct device *controller, uint8_t ch)
674{
675 return DEVICE_API_GET(mspi, controller)->get_channel_status(controller, ch);
676}
677
679
684
714__syscall int mspi_transceive(const struct device *controller,
715 const struct mspi_dev_id *dev_id,
716 const struct mspi_xfer *req);
717
718static inline int z_impl_mspi_transceive(const struct device *controller,
719 const struct mspi_dev_id *dev_id,
720 const struct mspi_xfer *req)
721{
722 const struct mspi_driver_api *api = DEVICE_API_GET(mspi, controller);
723
724 if (!api->transceive) {
725 return -ENOTSUP;
726 }
727
728 return api->transceive(controller, dev_id, req);
729}
730
762static inline int mspi_transceive_data_only(const struct device *controller,
763 const struct mspi_dev_id *dev_id,
764 const struct mspi_xfer_packet *packets,
765 uint32_t num_packet,
766 enum mspi_xfer_mode xfer_mode,
767 bool async,
768 uint32_t timeout)
769{
770 struct mspi_xfer xfer = {
771 .async = async,
772 .xfer_mode = xfer_mode,
773 .cmd_length = 0,
774 .addr_length = 0,
775 .packets = packets,
776 .num_packet = num_packet,
777 .timeout = timeout,
778 };
779
780 return mspi_transceive(controller, dev_id, &xfer);
781}
782
784
789
804__syscall int mspi_memmap_config(const struct device *controller,
805 const struct mspi_dev_id *dev_id,
806 const struct mspi_memmap_cfg *cfg);
807
808static inline int z_impl_mspi_memmap_config(const struct device *controller,
809 const struct mspi_dev_id *dev_id,
810 const struct mspi_memmap_cfg *cfg)
811{
812 const struct mspi_driver_api *api = DEVICE_API_GET(mspi, controller);
813
814 if (!api->memmap_config) {
815 return -ENOTSUP;
816 }
817
818 return api->memmap_config(controller, dev_id, cfg);
819}
820
836__syscall int mspi_scramble_config(const struct device *controller,
837 const struct mspi_dev_id *dev_id,
838 const struct mspi_scramble_cfg *cfg);
839
840static inline int z_impl_mspi_scramble_config(const struct device *controller,
841 const struct mspi_dev_id *dev_id,
842 const struct mspi_scramble_cfg *cfg)
843{
844 const struct mspi_driver_api *api = DEVICE_API_GET(mspi, controller);
845
846 if (!api->scramble_config) {
847 return -ENOTSUP;
848 }
849
850 return api->scramble_config(controller, dev_id, cfg);
851}
852
869__syscall int mspi_timing_config(const struct device *controller,
870 const struct mspi_dev_id *dev_id,
871 const uint32_t param_mask, void *cfg);
872
873static inline int z_impl_mspi_timing_config(const struct device *controller,
874 const struct mspi_dev_id *dev_id,
875 const uint32_t param_mask, void *cfg)
876{
877 const struct mspi_driver_api *api = DEVICE_API_GET(mspi, controller);
878
879 if (!api->timing_config) {
880 return -ENOTSUP;
881 }
882
883 return api->timing_config(controller, dev_id, param_mask, cfg);
884}
885
887
892
908static inline int mspi_register_callback(const struct device *controller,
909 const struct mspi_dev_id *dev_id,
910 const enum mspi_bus_event evt_type,
912 struct mspi_callback_context *ctx)
913{
914 const struct mspi_driver_api *api = DEVICE_API_GET(mspi, controller);
915
916 if (!api->register_callback) {
917 return -ENOTSUP;
918 }
919
920 return api->register_callback(controller, dev_id, evt_type, cb, ctx);
921}
922
924
925#ifdef __cplusplus
926}
927#endif
928
930
936
940#define MSPI_MEMMAP_CFG_STRUCT_DECLARE(_name) \
941 IF_ENABLED(CONFIG_MSPI_MEMMAP, (struct mspi_memmap_cfg _name;))
942
946#define MSPI_MEMMAP_BASE_ADDR_DECLARE(_name) \
947 IF_ENABLED(CONFIG_MSPI_MEMMAP, (uint32_t _name;))
948
952#define MSPI_SCRAMBLE_CFG_STRUCT_DECLARE(_name) \
953 IF_ENABLED(CONFIG_MSPI_SCRAMBLE, (struct mspi_scramble_cfg _name;))
954
958#define MSPI_TIMING_CFG_STRUCT_DECLARE(_name) \
959 IF_ENABLED(CONFIG_MSPI_TIMING, (mspi_timing_cfg _name;))
960
964#define MSPI_TIMING_PARAM_DECLARE(_name) \
965 IF_ENABLED(CONFIG_MSPI_TIMING, (mspi_timing_param _name;))
966
970#define MSPI_OPTIONAL_CFG_STRUCT_INIT(code, _name, _object) \
971 IF_ENABLED(code, (._name = _object,))
972
976#define MSPI_MEMMAP_BASE_ADDR_INIT(_name, _bus) \
977 IF_ENABLED(CONFIG_MSPI_MEMMAP, (._name = DT_REG_ADDR_BY_IDX(_bus, 1),))
978
980
984#include <zephyr/syscalls/mspi.h>
985#endif /* ZEPHYR_INCLUDE_MSPI_H_ */
APIs and macros for the Zephyr device model.
#define DEVICE_API_GET(_class, _dev)
Expands to the pointer of a device's API for a given class.
Definition device.h:1505
Main header file for GPIO driver API.
MSPI devicetree helper macros.
System error numbers.
void(* mspi_callback_handler_t)(struct mspi_callback_context *mspi_cb_ctx,...)
Define the application callback handler function signature.
Definition mspi.h:491
static int mspi_register_callback(const struct device *controller, const struct mspi_dev_id *dev_id, const enum mspi_bus_event evt_type, mspi_callback_handler_t cb, struct mspi_callback_context *ctx)
Register the mspi callback functions.
Definition mspi.h:908
int mspi_config(const struct mspi_dt_spec *spec)
Configure an MSPI controller.
int mspi_get_channel_status(const struct device *controller, uint8_t ch)
Query to see if it a channel is ready.
mspi_timing_param
Stub for timing parameter.
Definition mspi.h:226
int mspi_dev_config(const struct device *controller, const struct mspi_dev_id *dev_id, const enum mspi_dev_cfg_mask param_mask, const struct mspi_dev_cfg *cfg)
Configure an MSPI controller with device specific parameters.
int mspi_memmap_config(const struct device *controller, const struct mspi_dev_id *dev_id, const struct mspi_memmap_cfg *cfg)
Configure MSPI memory map settings.
int mspi_scramble_config(const struct device *controller, const struct mspi_dev_id *dev_id, const struct mspi_scramble_cfg *cfg)
Configure MSPI scrambling settings.
int mspi_timing_config(const struct device *controller, const struct mspi_dev_id *dev_id, const uint32_t param_mask, void *cfg)
Configure MSPI timing settings.
@ MSPI_TIMING_PARAM_DUMMY
Definition mspi.h:227
int(* mspi_api_memmap_config)(const struct device *controller, const struct mspi_dev_id *dev_id, const struct mspi_memmap_cfg *memmap_cfg)
Configure MSPI memory map settings.
Definition mspi.h:543
int(* mspi_api_scramble_config)(const struct device *controller, const struct mspi_dev_id *dev_id, const struct mspi_scramble_cfg *scramble_cfg)
Configure MSPI scrambling settings.
Definition mspi.h:551
int(* mspi_api_transceive)(const struct device *controller, const struct mspi_dev_id *dev_id, const struct mspi_xfer *req)
Transfer request over MSPI.
Definition mspi.h:525
int(* mspi_api_config)(const struct mspi_dt_spec *spec)
Configure an MSPI controller.
Definition mspi.h:504
int(* mspi_api_timing_config)(const struct device *controller, const struct mspi_dev_id *dev_id, const uint32_t param_mask, void *timing_cfg)
Configure MSPI timing settings.
Definition mspi.h:559
int(* mspi_api_dev_config)(const struct device *controller, const struct mspi_dev_id *dev_id, const enum mspi_dev_cfg_mask param_mask, const struct mspi_dev_cfg *cfg)
Configure an MSPI controller with device specific parameters.
Definition mspi.h:510
int(* mspi_api_register_callback)(const struct device *controller, const struct mspi_dev_id *dev_id, const enum mspi_bus_event evt_type, mspi_callback_handler_t cb, struct mspi_callback_context *ctx)
Register the mspi callback functions.
Definition mspi.h:533
int(* mspi_api_get_channel_status)(const struct device *controller, uint8_t ch)
Query to see if it a channel is ready.
Definition mspi.h:519
mspi_xfer_mode
MSPI transfer modes.
Definition mspi.h:150
mspi_duplex
MSPI duplex mode.
Definition mspi.h:49
mspi_ce_polarity
MSPI chip enable polarity.
Definition mspi.h:115
mspi_endian
MSPI Endian.
Definition mspi.h:107
mspi_op_mode
MSPI operational mode.
Definition mspi.h:41
mspi_xfer_direction
MSPI transfer directions.
Definition mspi.h:180
mspi_bus_event
MSPI bus event.
Definition mspi.h:125
mspi_xfer_priority
MSPI transfer priority This is a preliminary list of priorities that are typically used with DMA.
Definition mspi.h:171
mspi_cpp_mode
MSPI Polarity & Phase Modes.
Definition mspi.h:97
mspi_dev_cfg_mask
MSPI controller device specific configuration mask.
Definition mspi.h:188
mspi_io_mode
MSPI I/O mode capabilities Postfix like 1_4_4 stands for the number of lines used for command,...
Definition mspi.h:60
mspi_data_rate
MSPI data rate capabilities SINGLE stands for single data rate for all phases.
Definition mspi.h:86
mspi_bus_event_cb_mask
MSPI bus event callback mask This is a preliminary list same as mspi_bus_event.
Definition mspi.h:139
mspi_memmap_permit
MSPI memory map access permissions.
Definition mspi.h:212
@ MSPI_DMA
The controller moves the data with a DMA engine.
Definition mspi.h:154
@ MSPI_MEMMAP
The controller services the packets through the memory mapped region set up with mspi_memmap_config()...
Definition mspi.h:164
@ MSPI_PIO
The controller moves the data with programmed IO.
Definition mspi.h:152
@ MSPI_FULL_DUPLEX
Definition mspi.h:51
@ MSPI_HALF_DUPLEX
Definition mspi.h:50
@ MSPI_CE_ACTIVE_HIGH
Definition mspi.h:117
@ MSPI_CE_ACTIVE_LOW
Definition mspi.h:116
@ MSPI_XFER_BIG_ENDIAN
Definition mspi.h:109
@ MSPI_XFER_LITTLE_ENDIAN
Definition mspi.h:108
@ MSPI_OP_MODE_PERIPHERAL
Definition mspi.h:43
@ MSPI_OP_MODE_CONTROLLER
Definition mspi.h:42
@ MSPI_RX
Definition mspi.h:181
@ MSPI_TX
Definition mspi.h:182
@ MSPI_BUS_EVENT_MAX
Definition mspi.h:131
@ MSPI_BUS_TIMEOUT
When a request or xfer has timed out.
Definition mspi.h:130
@ MSPI_BUS_XFER_COMPLETE
Definition mspi.h:128
@ MSPI_BUS_ERROR
Definition mspi.h:127
@ MSPI_BUS_RESET
Definition mspi.h:126
@ MSPI_XFER_PRIORITY_HIGH
Definition mspi.h:174
@ MSPI_XFER_PRIORITY_LOW
Definition mspi.h:172
@ MSPI_XFER_PRIORITY_MEDIUM
Definition mspi.h:173
@ MSPI_CPP_MODE_3
Definition mspi.h:101
@ MSPI_CPP_MODE_1
Definition mspi.h:99
@ MSPI_CPP_MODE_2
Definition mspi.h:100
@ MSPI_CPP_MODE_0
Definition mspi.h:98
@ MSPI_DEVICE_CONFIG_CPP
Definition mspi.h:194
@ MSPI_DEVICE_CONFIG_DATA_RATE
Definition mspi.h:193
@ MSPI_DEVICE_CONFIG_RX_DUMMY
Definition mspi.h:198
@ MSPI_DEVICE_CONFIG_FREQUENCY
Definition mspi.h:191
@ MSPI_DEVICE_CONFIG_CMD_LEN
Definition mspi.h:202
@ MSPI_DEVICE_CONFIG_CE_NUM
Definition mspi.h:190
@ MSPI_DEVICE_CONFIG_IO_MODE
Definition mspi.h:192
@ MSPI_DEVICE_CONFIG_CE_POL
Definition mspi.h:196
@ MSPI_DEVICE_CONFIG_DQS
Definition mspi.h:197
@ MSPI_DEVICE_CONFIG_TX_DUMMY
Definition mspi.h:199
@ MSPI_DEVICE_CONFIG_ALL
Definition mspi.h:206
@ MSPI_DEVICE_CONFIG_WRITE_CMD
Definition mspi.h:201
@ MSPI_DEVICE_CONFIG_ADDR_LEN
Definition mspi.h:203
@ MSPI_DEVICE_CONFIG_ENDIAN
Definition mspi.h:195
@ MSPI_DEVICE_CONFIG_NONE
Definition mspi.h:189
@ MSPI_DEVICE_CONFIG_BREAK_TIME
Definition mspi.h:205
@ MSPI_DEVICE_CONFIG_MEM_BOUND
Definition mspi.h:204
@ MSPI_DEVICE_CONFIG_READ_CMD
Definition mspi.h:200
@ MSPI_IO_MODE_HEX
Definition mspi.h:71
@ MSPI_IO_MODE_QUAD_1_4_4
Definition mspi.h:67
@ MSPI_IO_MODE_OCTAL_1_8_8
Definition mspi.h:70
@ MSPI_IO_MODE_HEX_8_16_16
Definition mspi.h:73
@ MSPI_IO_MODE_SINGLE
Definition mspi.h:61
@ MSPI_IO_MODE_DUAL_1_1_2
Definition mspi.h:63
@ MSPI_IO_MODE_DUAL
Definition mspi.h:62
@ MSPI_IO_MODE_MAX
Definition mspi.h:74
@ MSPI_IO_MODE_DUAL_1_2_2
Definition mspi.h:64
@ MSPI_IO_MODE_QUAD_1_1_4
Definition mspi.h:66
@ MSPI_IO_MODE_OCTAL_1_1_8
Definition mspi.h:69
@ MSPI_IO_MODE_OCTAL
Definition mspi.h:68
@ MSPI_IO_MODE_HEX_8_8_16
Definition mspi.h:72
@ MSPI_IO_MODE_QUAD
Definition mspi.h:65
@ MSPI_DATA_RATE_SINGLE
Definition mspi.h:87
@ MSPI_DATA_RATE_S_S_D
Definition mspi.h:88
@ MSPI_DATA_RATE_MAX
Definition mspi.h:91
@ MSPI_DATA_RATE_S_D_D
Definition mspi.h:89
@ MSPI_DATA_RATE_DUAL
Definition mspi.h:90
@ MSPI_BUS_ERROR_CB
Definition mspi.h:142
@ MSPI_BUS_RESET_CB
Definition mspi.h:141
@ MSPI_BUS_XFER_COMPLETE_CB
Definition mspi.h:143
@ MSPI_BUS_NO_CB
Definition mspi.h:140
@ MSPI_BUS_TIMEOUT_CB
Definition mspi.h:144
@ MSPI_MEMMAP_READ_WRITE
Allow read/write access to the memory mapped region.
Definition mspi.h:213
@ MSPI_MEMMAP_READ_ONLY
Allow read only access to the memory mapped region.
Definition mspi.h:214
int mspi_transceive(const struct device *controller, const struct mspi_dev_id *dev_id, const struct mspi_xfer *req)
Transfer request over MSPI.
static int mspi_transceive_data_only(const struct device *controller, const struct mspi_dev_id *dev_id, const struct mspi_xfer_packet *packets, uint32_t num_packet, enum mspi_xfer_mode xfer_mode, bool async, uint32_t timeout)
Transfer data over MSPI without command or address phases.
Definition mspi.h:762
#define BIT(n)
Unsigned integer with bit position n set (signed in assembly language).
Definition util_macro.h:44
#define BIT_MASK(n)
Bit mask with bits 0 through n-1 (inclusive) set, or 0 if n is 0.
Definition util_macro.h:74
#define ENOTSUP
Unsupported value.
Definition errno.h:115
Public kernel APIs.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
__UINT8_TYPE__ uint8_t
Definition stdint.h:88
__UINT16_TYPE__ uint16_t
Definition stdint.h:89
Runtime device structure (in ROM) per driver instance.
Definition device.h:543
Container for GPIO pin information specified in devicetree.
Definition gpio.h:296
MSPI callback context.
Definition mspi.h:478
struct mspi_event mspi_evt
MSPI event.
Definition mspi.h:480
void * ctx
user defined context
Definition mspi.h:482
MSPI Chip Select control structure.
Definition mspi.h:375
struct gpio_dt_spec gpio
GPIO devicetree specification of CE GPIO.
Definition mspi.h:382
uint32_t delay
Delay to wait.
Definition mspi.h:388
MSPI controller configuration.
Definition mspi.h:255
bool sw_multi_periph
Software managed multi peripheral enable.
Definition mspi.h:265
uint32_t num_ce_gpios
GPIO chip-select line numbers (optional).
Definition mspi.h:269
bool dqs_support
DQS support flag.
Definition mspi.h:263
struct gpio_dt_spec * ce_group
GPIO chip select lines (optional).
Definition mspi.h:267
enum mspi_duplex duplex
Configure duplex mode.
Definition mspi.h:261
uint32_t num_periph
Peripheral number from 0 to host controller peripheral limit.
Definition mspi.h:271
uint32_t max_freq
Maximum supported frequency in MHz.
Definition mspi.h:273
enum mspi_op_mode op_mode
Configure operation mode.
Definition mspi.h:259
uint8_t channel_num
mspi channel number
Definition mspi.h:257
bool re_init
Whether to re-initialize controller.
Definition mspi.h:275
MSPI controller device specific configuration.
Definition mspi.h:291
uint8_t cmd_length
Configure command length.
Definition mspi.h:321
enum mspi_data_rate data_rate
Configure data rate.
Definition mspi.h:299
enum mspi_endian endian
Configure transfer endian.
Definition mspi.h:303
enum mspi_cpp_mode cpp
Configure clock polarity and phase.
Definition mspi.h:301
uint32_t mem_boundary
Configure memory boundary.
Definition mspi.h:325
uint32_t time_to_break
Configure the time to break up a transfer into 2.
Definition mspi.h:327
uint8_t addr_length
Configure address length.
Definition mspi.h:323
uint32_t freq
Configure frequency.
Definition mspi.h:295
uint16_t tx_dummy
Configure number of clock cycles between addr and data in TX direction.
Definition mspi.h:315
uint16_t rx_dummy
Configure number of clock cycles between addr and data in RX direction.
Definition mspi.h:311
enum mspi_ce_polarity ce_polarity
Configure chip enable polarity.
Definition mspi.h:305
uint8_t ce_num
Configure CE0 or CE1 or more.
Definition mspi.h:293
uint32_t read_cmd
Configure read command.
Definition mspi.h:317
uint32_t write_cmd
Configure write command.
Definition mspi.h:319
enum mspi_io_mode io_mode
Configure I/O mode.
Definition mspi.h:297
bool dqs_enable
Configure DQS mode.
Definition mspi.h:307
MSPI device ID The controller can identify its devices and determine whether the access is allowed in...
Definition mspi.h:245
uint16_t dev_idx
device index on DT
Definition mspi.h:249
struct gpio_dt_spec ce
device gpio ce
Definition mspi.h:247
<span class="mlabel">Driver Operations</span> MSPI driver operations
Definition mspi.h:566
mspi_api_config config
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition mspi.h:568
mspi_api_register_callback register_callback
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition mspi.h:576
mspi_api_dev_config dev_config
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition mspi.h:570
mspi_api_get_channel_status get_channel_status
<span class="op-badge op-req" title="This operation MUST be implemented by the driver....
Definition mspi.h:572
mspi_api_memmap_config memmap_config
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition mspi.h:578
mspi_api_timing_config timing_config
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition mspi.h:582
mspi_api_scramble_config scramble_config
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition mspi.h:580
mspi_api_transceive transceive
<span class="op-badge op-opt" title="This operation MAY optionally be implemented by the driver....
Definition mspi.h:574
MSPI DT information.
Definition mspi.h:281
struct mspi_cfg config
MSPI hardware specific configuration.
Definition mspi.h:285
const struct device * bus
MSPI bus.
Definition mspi.h:283
MSPI event data.
Definition mspi.h:452
const struct mspi_xfer_packet * packet
Pointer to a transfer packet.
Definition mspi.h:458
uint32_t status
MSPI event status.
Definition mspi.h:460
uint32_t packet_idx
Packet index.
Definition mspi.h:462
const struct mspi_dev_id * dev_id
Pointer to the peripheral device ID.
Definition mspi.h:456
const struct device * controller
Pointer to the bus controller.
Definition mspi.h:454
MSPI event.
Definition mspi.h:468
enum mspi_bus_event evt_type
Event type.
Definition mspi.h:470
struct mspi_event_data evt_data
Data associated to the event.
Definition mspi.h:472
MSPI controller memory map configuration.
Definition mspi.h:333
uint32_t size
Memory map region size.
Definition mspi.h:341
uint32_t address_offset
Memory map region start address = hardware default + address offset.
Definition mspi.h:339
enum mspi_memmap_permit permission
Memory map access permission.
Definition mspi.h:343
bool enable
Memory map enable.
Definition mspi.h:335
MSPI controller scramble configuration.
Definition mspi.h:349
bool enable
scramble enable
Definition mspi.h:351
uint32_t size
scramble region size
Definition mspi.h:357
uint32_t address_offset
scramble region start address = hardware default + address offset
Definition mspi.h:355
Stub for struct timing_cfg.
Definition mspi.h:233
MSPI peripheral xfer packet format.
Definition mspi.h:394
uint32_t num_bytes
Number of bytes to transfer.
Definition mspi.h:404
uint32_t address
Transfer Address.
Definition mspi.h:402
uint8_t * data_buf
Data Buffer.
Definition mspi.h:406
uint32_t cmd
Transfer command.
Definition mspi.h:400
enum mspi_bus_event_cb_mask cb_mask
Bus event callback masks.
Definition mspi.h:398
enum mspi_xfer_direction dir
Direction (Transmit/Receive).
Definition mspi.h:396
MSPI peripheral xfer format This includes transfer related settings that may require configuring the ...
Definition mspi.h:414
bool hold_ce
Hold CE active after xfer.
Definition mspi.h:428
uint8_t cmd_length
Configure command length.
Definition mspi.h:424
uint32_t num_packet
Number of transfer packets.
Definition mspi.h:436
const struct mspi_xfer_packet * packets
Transfer packets.
Definition mspi.h:434
uint16_t rx_dummy
Configure RX dummy cycles.
Definition mspi.h:422
enum mspi_xfer_priority priority
MSPI transfer priority.
Definition mspi.h:432
bool async
Async or sync transfer.
Definition mspi.h:416
uint8_t addr_length
Configure address length.
Definition mspi.h:426
uint16_t tx_dummy
Configure TX dummy cycles.
Definition mspi.h:420
struct mspi_ce_control ce_sw_ctrl
Software CE control.
Definition mspi.h:430
enum mspi_xfer_mode xfer_mode
Transfer Mode.
Definition mspi.h:418
uint32_t timeout
Transfer timeout value(ms).
Definition mspi.h:438
Macro utilities.