Lines Matching +full:mspi +full:- +full:data +full:- +full:rate

4  * SPDX-License-Identifier: Apache-2.0
9 * @brief Public APIs for MSPI driver
30 * @brief MSPI Driver APIs
31 * @defgroup mspi_interface MSPI Driver APIs
37 * @brief MSPI operational mode
45 * @brief MSPI duplex mode
53 * @brief MSPI I/O mode capabilities
55 * command, address and data phases.
76 * @brief MSPI data rate capabilities
77 * SINGLE stands for single data rate for all phases.
78 * DUAL stands for dual data rate for all phases.
79 * S_S_D stands for single data rate for command and address phases but
80 * dual data rate for data phase.
81 * S_D_D stands for single data rate for command phase but dual data rate
82 * for address and data phases.
93 * @brief MSPI Polarity & Phase Modes
103 * @brief MSPI Endian
111 * @brief MSPI chip enable polarity
119 * @brief MSPI bus event.
131 * @brief MSPI bus event callback mask
143 * @brief MSPI transfer modes
151 * @brief MSPI transfer directions
159 * @brief MSPI controller device specific configuration mask
183 * @brief MSPI XIP access permissions
191 * @brief MSPI Configure API
192 * @defgroup mspi_configure_api MSPI Configure API
214 * @brief MSPI device ID
226 * @brief MSPI controller configuration
229 /** @brief mspi channel number */
241 /** @brief GPIO chip-select line numbers (optional) */
247 /** @brief Whether to re-initialize controller */
252 * @brief MSPI DT information
255 /** @brief MSPI bus */
257 /** @brief MSPI hardware specific configuration */
262 * @brief MSPI controller device specific configuration
271 /** @brief Configure data rate */
282 * addr and data in RX direction
286 * addr and data in TX direction
304 * @brief MSPI controller XIP configuration
320 * @brief MSPI controller scramble configuration
336 * @brief MSPI Transfer API
337 * @defgroup mspi_transfer_api MSPI Transfer API
342 * @brief MSPI Chip Select control structure
353 * the same as in MSPI configuration.
365 * @brief MSPI peripheral xfer packet format
378 /** @brief Data Buffer */
383 * @brief MSPI peripheral xfer format
419 * @brief MSPI callback API
420 * @defgroup mspi_callback_api MSPI callback API
425 * @brief MSPI event data
434 /** @brief MSPI event status */
441 * @brief MSPI event
446 /** Data associated to the event */
451 * @brief MSPI callback context
454 /** @brief MSPI event */
464 * @param mspi_cb_ctx Pointer to the MSPI callback context
472 * MSPI driver API definition and system call entry points
522 * @brief Configure a MSPI controller.
524 * This routine provides a generic interface to override MSPI controller
528 * re-initialize their controller hardware. Additional SoC platform specific
530 * binding(xxx,mspi-controller.yaml) so that one may derive the settings from
532 * change during run-time. The bindings for @see mspi_cfg can be found in
533 * mspi-controller.yaml.
535 * @param spec Pointer to MSPI DT information.
538 * @retval -EIO General input / output error, failed to configure device.
539 * @retval -EINVAL invalid capabilities, failed to configure device.
540 * @retval -ENOTSUP capability not supported by MSPI peripheral.
546 const struct mspi_driver_api *api = (const struct mspi_driver_api *)spec->bus->api; in z_impl_mspi_config()
548 return api->config(spec); in z_impl_mspi_config()
552 * @brief Configure a MSPI controller with device specific parameters.
554 * This routine provides a generic interface to override MSPI controller
566 * The bindings for @see mspi_dev_cfg can be found in mspi-device.yaml.
571 * @param cfg The device runtime configuration for the MSPI controller.
574 * @retval -EIO General input / output error, failed to configure device.
575 * @retval -EINVAL invalid capabilities, failed to configure device.
576 * @retval -ENOTSUP capability not supported by MSPI peripheral.
588 const struct mspi_driver_api *api = (const struct mspi_driver_api *)controller->api; in z_impl_mspi_dev_config()
590 return api->dev_config(controller, dev_id, param_mask, cfg); in z_impl_mspi_dev_config()
600 * @param ch the MSPI channel for which status is to be retrieved.
602 * @retval 0 If MSPI channel is ready.
608 const struct mspi_driver_api *api = (const struct mspi_driver_api *)controller->api; in z_impl_mspi_get_channel_status()
610 return api->get_channel_status(controller, ch); in z_impl_mspi_get_channel_status()
621 * @brief Transfer request over MSPI.
641 * @retval -ENOTSUP
642 * @retval -EIO General input / output error, failed to send over the bus.
652 const struct mspi_driver_api *api = (const struct mspi_driver_api *)controller->api; in z_impl_mspi_transceive()
654 if (!api->transceive) { in z_impl_mspi_transceive()
655 return -ENOTSUP; in z_impl_mspi_transceive()
658 return api->transceive(controller, dev_id, req); in z_impl_mspi_transceive()
669 * @brief Configure a MSPI XIP settings.
675 * @param cfg The controller XIP configuration for MSPI.
678 * @retval -EIO General input / output error, failed to configure device.
679 * @retval -EINVAL invalid capabilities, failed to configure device.
680 * @retval -ENOTSUP capability not supported by MSPI peripheral.
690 const struct mspi_driver_api *api = (const struct mspi_driver_api *)controller->api; in z_impl_mspi_xip_config()
692 if (!api->xip_config) { in z_impl_mspi_xip_config()
693 return -ENOTSUP; in z_impl_mspi_xip_config()
696 return api->xip_config(controller, dev_id, cfg); in z_impl_mspi_xip_config()
700 * @brief Configure a MSPI scrambling settings.
707 * @param cfg The controller scramble configuration for MSPI.
710 * @retval -EIO General input / output error, failed to configure device.
711 * @retval -EINVAL invalid capabilities, failed to configure device.
712 * @retval -ENOTSUP capability not supported by MSPI peripheral.
722 const struct mspi_driver_api *api = (const struct mspi_driver_api *)controller->api; in z_impl_mspi_scramble_config()
724 if (!api->scramble_config) { in z_impl_mspi_scramble_config()
725 return -ENOTSUP; in z_impl_mspi_scramble_config()
728 return api->scramble_config(controller, dev_id, cfg); in z_impl_mspi_scramble_config()
732 * @brief Configure a MSPI timing settings.
734 * This routine provides a generic interface to configure MSPI controller
740 * @param cfg The controller timing configuration for MSPI.
743 * @retval -EIO General input / output error, failed to configure device.
744 * @retval -EINVAL invalid capabilities, failed to configure device.
745 * @retval -ENOTSUP capability not supported by MSPI peripheral.
755 const struct mspi_driver_api *api = (const struct mspi_driver_api *)controller->api; in z_impl_mspi_timing_config()
757 if (!api->timing_config) { in z_impl_mspi_timing_config()
758 return -ENOTSUP; in z_impl_mspi_timing_config()
761 return api->timing_config(controller, dev_id, param_mask, cfg); in z_impl_mspi_timing_config()
772 * @brief Register the mspi callback functions.
774 * This routines provides a generic interface to register mspi callback functions.
784 * @retval -ENOTSUP
792 const struct mspi_driver_api *api = (const struct mspi_driver_api *)controller->api; in mspi_register_callback()
794 if (!api->register_callback) { in mspi_register_callback()
795 return -ENOTSUP; in mspi_register_callback()
798 return api->register_callback(controller, dev_id, evt_type, cb, ctx); in mspi_register_callback()
807 #include <zephyr/drivers/mspi/devicetree.h>
812 #include <zephyr/syscalls/mspi.h>