Zephyr API Documentation 4.5.99
A Scalable Open Source RTOS
Loading...
Searching...
No Matches
memc_nxp_semc.h
Go to the documentation of this file.
1/*
2 * Copyright 2026 NXP
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
11
12#ifndef ZEPHYR_INCLUDE_DRIVERS_MEMC_NXP_SEMC_H_
13#define ZEPHYR_INCLUDE_DRIVERS_MEMC_NXP_SEMC_H_
14
15#include <zephyr/device.h>
16#include <fsl_semc.h>
17
18#ifdef __cplusplus
19extern "C" {
20#endif
21
22/*
23 * The SEMC controller can drive several memory types (SDRAM, SRAM/PSRAM,
24 * NOR and NAND) on independent chip-selects. The memc driver only owns the
25 * controller: memc_nxp_semc_reconfigure()/memc_nxp_semc_soft_reset()
26 * initialize the SEMC core block itself, and the memc_nxp_semc_configure_*()
27 * calls program the controller interface for one memory type per chip-select.
28 *
29 * After SEMC_Init()/reconfigure() no external device is configured yet; a
30 * configure_*() call is required before the corresponding memory region can
31 * be accessed.
32 *
33 * NOR/NAND configuration below only sets up the controller side of the
34 * interface. Actual flash operations (read/write/erase) are meant to be
35 * implemented by flash drivers on top of the SEMC IP-command path, e.g. via
36 * SEMC_SendIPCommand()/SEMC_IPCommandNorRead()/SEMC_IPCommandNorWrite() and
37 * the NAND equivalents.
38 *
39 * All functions here are synchronous and block until the operation completes
40 * (they serialize access to the controller with a mutex).
41 */
42
51int memc_nxp_semc_get_default_config(semc_config_t *config);
52
68int memc_nxp_semc_reconfigure(const struct device *dev, const semc_config_t *config);
69
80int memc_nxp_semc_soft_reset(const struct device *dev);
81
85int memc_nxp_semc_configure_sdram(const struct device *dev, semc_sdram_cs_t cs,
86 semc_sdram_config_t *config, uint32_t clk_src_hz);
87
91int memc_nxp_semc_configure_sram(const struct device *dev, semc_sram_cs_t cs,
92 semc_sram_config_t *config, uint32_t clk_src_hz);
93
97int memc_nxp_semc_configure_nor(const struct device *dev, semc_nor_config_t *config,
98 uint32_t clk_src_hz);
99
103int memc_nxp_semc_configure_nand(const struct device *dev, semc_nand_config_t *config,
104 uint32_t clk_src_hz);
105
106#ifdef __cplusplus
107}
108#endif
109
110#endif /* ZEPHYR_INCLUDE_DRIVERS_MEMC_NXP_SEMC_H_ */
APIs and macros for the Zephyr device model.
int memc_nxp_semc_reconfigure(const struct device *dev, const semc_config_t *config)
Reconfigure the SEMC core block.
int memc_nxp_semc_configure_nor(const struct device *dev, semc_nor_config_t *config, uint32_t clk_src_hz)
Configure a NOR target on SEMC.
int memc_nxp_semc_configure_sdram(const struct device *dev, semc_sdram_cs_t cs, semc_sdram_config_t *config, uint32_t clk_src_hz)
Configure an SDRAM target on SEMC.
int memc_nxp_semc_configure_nand(const struct device *dev, semc_nand_config_t *config, uint32_t clk_src_hz)
Configure a NAND target on SEMC.
int memc_nxp_semc_configure_sram(const struct device *dev, semc_sram_cs_t cs, semc_sram_config_t *config, uint32_t clk_src_hz)
Configure an SRAM target on SEMC.
int memc_nxp_semc_soft_reset(const struct device *dev)
Trigger SEMC software reset.
int memc_nxp_semc_get_default_config(semc_config_t *config)
Populate a SEMC configuration with MCUX defaults.
__UINT32_TYPE__ uint32_t
Definition stdint.h:90
Runtime device structure (in ROM) per driver instance.
Definition device.h:543