Zephyr API Documentation 4.0.0-rc3
A Scalable Open Source RTOS
|
MSPI Configure API . More...
Data Structures | |
struct | mspi_timing_cfg |
Stub for struct timing_cfg. More... | |
struct | mspi_dev_id |
MSPI device ID The controller can identify its devices and determine whether the access is allowed in a multiple device scheme. More... | |
struct | mspi_cfg |
MSPI controller configuration. More... | |
struct | mspi_dt_spec |
MSPI DT information. More... | |
struct | mspi_dev_cfg |
MSPI controller device specific configuration. More... | |
struct | mspi_xip_cfg |
MSPI controller XIP configuration. More... | |
struct | mspi_scramble_cfg |
MSPI controller scramble configuration. More... | |
Enumerations | |
enum | mspi_timing_param { MSPI_TIMING_PARAM_DUMMY } |
Stub for timing parameter. More... | |
Functions | |
int | mspi_config (const struct mspi_dt_spec *spec) |
Configure a MSPI controller. | |
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 a MSPI controller with device specific parameters. | |
int | mspi_get_channel_status (const struct device *controller, uint8_t ch) |
Query to see if it a channel is ready. | |
int | mspi_xip_config (const struct device *controller, const struct mspi_dev_id *dev_id, const struct mspi_xip_cfg *cfg) |
Configure a MSPI XIP settings. | |
int | mspi_scramble_config (const struct device *controller, const struct mspi_dev_id *dev_id, const struct mspi_scramble_cfg *cfg) |
Configure a 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 a MSPI timing settings. | |
MSPI Configure API .
enum mspi_timing_param |
int mspi_config | ( | const struct mspi_dt_spec * | spec | ) |
#include <zephyr/drivers/mspi.h>
Configure a MSPI controller.
This routine provides a generic interface to override MSPI controller capabilities.
In the controller driver, one may implement this API to initialize or re-initialize their controller hardware. Additional SoC platform specific settings that are not in struct mspi_cfg may be added to one's own binding(xxx,mspi-controller.yaml) so that one may derive the settings from DTS and configure it in this API. In general, these settings should not change during run-time. The bindings for
spec | Pointer to MSPI DT information. |
0 | If successful. |
-EIO | General input / output error, failed to configure device. |
-EINVAL | invalid capabilities, failed to configure device. |
-ENOTSUP | capability not supported by MSPI peripheral. |
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 ) |
#include <zephyr/drivers/mspi.h>
Configure a MSPI controller with device specific parameters.
This routine provides a generic interface to override MSPI controller device specific settings that should be derived from device datasheets.
With
controller | Pointer to the device structure for the driver instance. |
dev_id | Pointer to the device ID structure from a device. |
param_mask | Macro definition of what to be configured in cfg. |
cfg | The device runtime configuration for the MSPI controller. |
0 | If successful. |
-EIO | General input / output error, failed to configure device. |
-EINVAL | invalid capabilities, failed to configure device. |
-ENOTSUP | capability not supported by MSPI peripheral. |
#include <zephyr/drivers/mspi.h>
Query to see if it a channel is ready.
This routine allows to check if logical channel is ready before use. Note that queries for channels not supported will always return false.
controller | Pointer to the device structure for the driver instance. |
ch | the MSPI channel for which status is to be retrieved. |
0 | If MSPI channel is ready. |
int mspi_scramble_config | ( | const struct device * | controller, |
const struct mspi_dev_id * | dev_id, | ||
const struct mspi_scramble_cfg * | cfg ) |
#include <zephyr/drivers/mspi.h>
Configure a MSPI scrambling settings.
This routine provides a generic interface to configure the scrambling feature.
controller | Pointer to the device structure for the driver instance. |
dev_id | Pointer to the device ID structure from a device. |
cfg | The controller scramble configuration for MSPI. |
0 | If successful. |
-EIO | General input / output error, failed to configure device. |
-EINVAL | invalid capabilities, failed to configure device. |
-ENOTSUP | capability not supported by MSPI peripheral. |
int mspi_timing_config | ( | const struct device * | controller, |
const struct mspi_dev_id * | dev_id, | ||
const uint32_t | param_mask, | ||
void * | cfg ) |
#include <zephyr/drivers/mspi.h>
Configure a MSPI timing settings.
This routine provides a generic interface to configure MSPI controller timing if necessary.
controller | Pointer to the device structure for the driver instance. |
dev_id | Pointer to the device ID structure from a device. |
param_mask | The macro definition of what should be configured in cfg. |
cfg | The controller timing configuration for MSPI. |
0 | If successful. |
-EIO | General input / output error, failed to configure device. |
-EINVAL | invalid capabilities, failed to configure device. |
-ENOTSUP | capability not supported by MSPI peripheral. |
int mspi_xip_config | ( | const struct device * | controller, |
const struct mspi_dev_id * | dev_id, | ||
const struct mspi_xip_cfg * | cfg ) |
#include <zephyr/drivers/mspi.h>
Configure a MSPI XIP settings.
This routine provides a generic interface to configure the XIP feature.
controller | Pointer to the device structure for the driver instance. |
dev_id | Pointer to the device ID structure from a device. |
cfg | The controller XIP configuration for MSPI. |
0 | If successful. |
-EIO | General input / output error, failed to configure device. |
-EINVAL | invalid capabilities, failed to configure device. |
-ENOTSUP | capability not supported by MSPI peripheral. |