Zephyr API Documentation 3.7.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches

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.
 

Detailed Description

MSPI Configure API .

Enumeration Type Documentation

◆ mspi_timing_param

#include <zephyr/drivers/mspi.h>

Stub for timing parameter.

Enumerator
MSPI_TIMING_PARAM_DUMMY 

Function Documentation

◆ mspi_config()

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

See also
mspi_cfg can be found in mspi-controller.yaml.
Parameters
specPointer to MSPI DT information.
Return values
0If successful.
-EIOGeneral input / output error, failed to configure device.
-EINVALinvalid capabilities, failed to configure device.
-ENOTSUPcapability not supported by MSPI peripheral.

◆ mspi_dev_config()

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

See also
mspi_dev_id defined as the device index and CE GPIO from device tree, the API supports multiple devices on the same controller instance. It is up to the controller driver implementation whether to support device switching either by software or by hardware or not at all. If by software, the switching should be done in this API's implementation. The implementation may also support individual parameter configurations specified by
mspi_dev_cfg_mask. The Settings within
mspi_dev_cfg don't typically change once the mode of operation is determined after the device initialization. The bindings for
mspi_dev_cfg can be found in mspi-device.yaml.
Parameters
controllerPointer to the device structure for the driver instance.
dev_idPointer to the device ID structure from a device.
param_maskMacro definition of what to be configured in cfg.
cfgThe device runtime configuration for the MSPI controller.
Return values
0If successful.
-EIOGeneral input / output error, failed to configure device.
-EINVALinvalid capabilities, failed to configure device.
-ENOTSUPcapability not supported by MSPI peripheral.

◆ mspi_get_channel_status()

int mspi_get_channel_status ( const struct device * controller,
uint8_t ch )

#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.

Parameters
controllerPointer to the device structure for the driver instance.
chthe MSPI channel for which status is to be retrieved.
Return values
0If MSPI channel is ready.

◆ mspi_scramble_config()

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.

Parameters
controllerPointer to the device structure for the driver instance.
dev_idPointer to the device ID structure from a device.
cfgThe controller scramble configuration for MSPI.
Return values
0If successful.
-EIOGeneral input / output error, failed to configure device.
-EINVALinvalid capabilities, failed to configure device.
-ENOTSUPcapability not supported by MSPI peripheral.

◆ mspi_timing_config()

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.

Parameters
controllerPointer to the device structure for the driver instance.
dev_idPointer to the device ID structure from a device.
param_maskThe macro definition of what should be configured in cfg.
cfgThe controller timing configuration for MSPI.
Return values
0If successful.
-EIOGeneral input / output error, failed to configure device.
-EINVALinvalid capabilities, failed to configure device.
-ENOTSUPcapability not supported by MSPI peripheral.

◆ mspi_xip_config()

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.

Parameters
controllerPointer to the device structure for the driver instance.
dev_idPointer to the device ID structure from a device.
cfgThe controller XIP configuration for MSPI.
Return values
0If successful.
-EIOGeneral input / output error, failed to configure device.
-EINVALinvalid capabilities, failed to configure device.
-ENOTSUPcapability not supported by MSPI peripheral.