zephyr/drivers/memc/memc_nxp_s32_qspi.h
Manuel Argüelles 5dad944351 drivers: memc: add NXP S32 QSPI controller
The NXP S32 QSPI controller acts as an interface to up to two serial
flash memory devices, each with up to eight bidirectional data lines,
depending on the platform. It is based on a LUT enginee to interface
through commands with different memory types including flash NOR and
Hyperram.

This patch adds support for the QSPI in S32K344 which supports a single
memory device (side A) with up to four bidirectional data lines and SDR
only. Nevertheless, the memory controller is implemented flexible enough
to be extended to support more feature-rich QSPI blocks.

Signed-off-by: Manuel Argüelles <manuel.arguelles@nxp.com>
2023-07-26 09:44:14 +02:00

30 lines
624 B
C

/*
* Copyright 2023 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/device.h>
#include <sys/types.h>
#include <Qspi_Ip.h>
/**
* @brief Build a QSPI Look-up Table (LUT) sequence entry.
*
* @param inst instruction
* @param pads pad information
* @param op operand
*/
#define QSPI_LUT_OP(inst, pads, op) \
((Qspi_Ip_InstrOpType)((Qspi_Ip_InstrOpType)(inst) \
| (Qspi_Ip_InstrOpType)(pads) \
| (Qspi_Ip_InstrOpType)(op)))
/**
* @brief Get the QSPI peripheral hardware instance number.
*
* @param dev device pointer
*/
uint8_t memc_nxp_s32_qspi_get_instance(const struct device *dev);