mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-12-16 10:03:50 +01:00
61 lines
1.4 KiB
C
61 lines
1.4 KiB
C
/*
|
|
* SPDX-FileCopyrightText: 2025 TU Dresden
|
|
* SPDX-License-Identifier: LGPL-2.1-only
|
|
*/
|
|
|
|
/**
|
|
* @ingroup boards_adafruit-feather-nrf52840-express
|
|
* @{
|
|
*
|
|
* @file
|
|
* @brief MTD configuration for the Feather nRF52840
|
|
*
|
|
* @author Mikolai Gütschow <mikolai.guetschow@tu-dresden.de>
|
|
*
|
|
* @}
|
|
*/
|
|
|
|
#ifdef MODULE_MTD
|
|
|
|
#include "board.h"
|
|
#include "mtd.h"
|
|
#include "mtd_spi_nor.h"
|
|
#include "periph_conf.h"
|
|
#include "timex.h"
|
|
|
|
/* GD25Q16C */
|
|
static const mtd_spi_nor_params_t _feather_nrf52840_nor_params = {
|
|
.opcode = &mtd_spi_nor_opcode_default,
|
|
.wait_chip_erase = 15 * US_PER_SEC,
|
|
.wait_32k_erase = 150 * US_PER_MS,
|
|
.wait_64k_erase = 250 * US_PER_MS,
|
|
.wait_sector_erase = 50 * US_PER_MS,
|
|
.wait_chip_wake_up = 1 * US_PER_MS,
|
|
.clk = SPI_CLK_10MHZ,
|
|
.flag = SPI_NOR_F_SECT_4K
|
|
| SPI_NOR_F_SECT_32K
|
|
| SPI_NOR_F_SECT_64K,
|
|
.spi = SPI_DEV(1),
|
|
.mode = SPI_MODE_0,
|
|
.cs = GPIO_PIN(0, 20),
|
|
.wp = GPIO_PIN(0, 23),
|
|
.hold = GPIO_PIN(0, 21),
|
|
};
|
|
|
|
static mtd_spi_nor_t feather_nrf52840_nor_dev = {
|
|
.base = {
|
|
.driver = &mtd_spi_nor_driver,
|
|
.page_size = 256,
|
|
.pages_per_sector = 16,
|
|
},
|
|
.params = &_feather_nrf52840_nor_params,
|
|
};
|
|
|
|
MTD_XFA_ADD(feather_nrf52840_nor_dev, 0);
|
|
|
|
#ifdef MODULE_VFS_DEFAULT
|
|
#include "vfs_default.h"
|
|
VFS_AUTO_MOUNT(littlefs2, VFS_MTD(feather_nrf52840_nor_dev), VFS_DEFAULT_NVM(0), 0);
|
|
#endif
|
|
#endif
|