zephyr/dts/arm/nordic/mem.h
Carles Cufi 0f6bd5c891 arch: arm: nrf: Add support for the nRF52810
The nRF52810 is a low-cost variant of the nRF52832, with a reduced set
of peripherals and memory. This commit adds basic support for it in the
arch SoC and dts folders.

Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Signed-off-by: Ioannis Glaropoulos <ioannis.glaropoulos@nordicsemi.no>
2018-06-25 19:34:33 +02:00

40 lines
1.2 KiB
C

/*
* Copyright (c) 2017 Linaro Limited
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __DT_BINDING_ST_MEM_H
#define __DT_BINDING_ST_MEM_H
#define __SIZE_K(x) ((x) * 1024)
#if defined(CONFIG_SOC_NRF51822_QFAA)
#define DT_FLASH_SIZE __SIZE_K(256)
#define DT_SRAM_SIZE __SIZE_K(16)
#elif defined(CONFIG_SOC_NRF51822_QFAB)
#define DT_FLASH_SIZE __SIZE_K(128)
#define DT_SRAM_SIZE __SIZE_K(16)
#elif defined(CONFIG_SOC_NRF51822_QFAC)
#define DT_FLASH_SIZE __SIZE_K(256)
#define DT_SRAM_SIZE __SIZE_K(32)
#elif defined(CONFIG_SOC_NRF52810_QFAA)
#define DT_FLASH_SIZE __SIZE_K(192)
#define DT_SRAM_SIZE __SIZE_K(24)
#elif defined(CONFIG_SOC_NRF52832_QFAA)
#define DT_FLASH_SIZE __SIZE_K(512)
#define DT_SRAM_SIZE __SIZE_K(64)
#elif defined(CONFIG_SOC_NRF52832_CIAA)
#define DT_FLASH_SIZE __SIZE_K(512)
#define DT_SRAM_SIZE __SIZE_K(64)
#elif defined(CONFIG_SOC_NRF52832_QFAB)
#define DT_FLASH_SIZE __SIZE_K(256)
#define DT_SRAM_SIZE __SIZE_K(32)
#elif defined(CONFIG_SOC_NRF52840_QIAA)
#define DT_FLASH_SIZE __SIZE_K(1024)
#define DT_SRAM_SIZE __SIZE_K(256)
#else
#error "Flash and RAM sizes not defined for this chip"
#endif
#endif /* __DT_BINDING_ST_MEM_H */