/* * Copyright (C) 2025 TU Dresden * * This file is subject to the terms and conditions of the GNU Lesser * General Public License v2.1. See the file LICENSE in the top level * directory for more details. */ /** * @ingroup boards_adafruit-feather-nrf52840-express * @{ * * @file * @brief MTD configuration for the Feather nRF52840 * * @author Mikolai Gütschow * * @} */ #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