alif/boards/ALIF_ENSEMBLE: Add Alif Ensemble board config.

Signed-off-by: iabdalkader <i.abdalkader@gmail.com>
Signed-off-by: Damien George <damien@micropython.org>
This commit is contained in:
iabdalkader
2023-12-17 12:12:06 +01:00
committed by Damien George
parent b79b64a726
commit 7c216d17b6
6 changed files with 172 additions and 0 deletions

View File

@@ -0,0 +1,56 @@
/*
* This file is part of the MicroPython project, http://micropython.org/
*
* The MIT License (MIT)
*
* Copyright (c) 2024 OpenMV LLC.
*
* Permission is hereby granted, free of charge, to any person obtaining a copy
* of this software and associated documentation files (the "Software"), to deal
* in the Software without restriction, including without limitation the rights
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
* copies of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included in
* all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include "py/mphal.h"
#include "ospi_ext.h"
#include "ospi_flash.h"
const ospi_pin_settings_t ospi_pin_settings = {
.peripheral_number = 1,
.pin_reset = pin_OSPI1_RESET,
.pin_cs = pin_OSPI1_CS,
.pin_clk_p = pin_OSPI1_SCLK,
.pin_clk_n = NULL,
.pin_rwds = pin_OSPI1_RXDS,
.pin_d0 = pin_OSPI1_D0,
.pin_d1 = pin_OSPI1_D1,
.pin_d2 = pin_OSPI1_D2,
.pin_d3 = pin_OSPI1_D3,
.pin_d4 = pin_OSPI1_D4,
.pin_d5 = pin_OSPI1_D5,
.pin_d6 = pin_OSPI1_D6,
.pin_d7 = pin_OSPI1_D7,
};
const ospi_flash_settings_t ospi_flash_settings[] = {
{
.jedec_id = 0x1a5b9d,
.freq_hz = 100000000,
.read_dummy_cycles = 9,
OSPI_FLASH_SETTINGS_IS25,
},
};
const size_t ospi_flash_settings_len = 1;

View File

@@ -0,0 +1,14 @@
#include "mcu/ensemble.ld.S"
/* Define ROMFS partition locations. */
#if CORE_M55_HP
/* The HP core has access to the external OSPI1 flash and MRAM ROMFS partitions. */
_micropy_hw_romfs_part0_start = 0xc1000000;
_micropy_hw_romfs_part0_size = 16M;
_micropy_hw_romfs_part1_start = ORIGIN(MRAM_FS);
_micropy_hw_romfs_part1_size = LENGTH(MRAM_FS);
#else
/* The HP core has access to the MRAM ROMFS partition. */
_micropy_hw_romfs_part0_start = ORIGIN(MRAM_FS);
_micropy_hw_romfs_part0_size = LENGTH(MRAM_FS);
#endif

View File

@@ -0,0 +1,56 @@
#define MICROPY_HW_BOARD_NAME "Alif Ensemble DevKit"
#define MICROPY_HW_MCU_NAME "AE722F80F55D5XX"
#define MICROPY_HW_ENABLE_UART_REPL (CORE_M55_HP)
#define MICROPY_HW_UART_REPL (4)
#define MICROPY_HW_USB_MSC (1)
#define MICROPY_HW_ENABLE_HW_I2C (1)
// ROMFS partitions
#define MICROPY_HW_ROMFS_ENABLE_PART0 (1)
#define MICROPY_HW_ROMFS_ENABLE_PART1 (CORE_M55_HP)
// I2C buses
#define MICROPY_HW_I2C0_SCL (pin_P0_3)
#define MICROPY_HW_I2C0_SDA (pin_P0_2)
#define MICROPY_HW_I2C1_SCL (pin_P3_7)
#define MICROPY_HW_I2C1_SDA (pin_P3_6)
#define MICROPY_HW_I2C2_SCL (pin_P5_1)
#define MICROPY_HW_I2C2_SDA (pin_P5_0)
#define MICROPY_HW_I2C3_SCL (pin_P1_1)
#define MICROPY_HW_I2C3_SDA (pin_P1_0)
// SPI buses
#define MICROPY_HW_SPI0_MISO (pin_P1_0)
#define MICROPY_HW_SPI0_MOSI (pin_P1_1)
#define MICROPY_HW_SPI0_SCK (pin_P1_2)
#define MICROPY_HW_SPI1_MISO (pin_P2_4)
#define MICROPY_HW_SPI1_MOSI (pin_P2_5)
#define MICROPY_HW_SPI1_SCK (pin_P2_6)
#define MICROPY_HW_SPI2_MISO (pin_P4_2)
#define MICROPY_HW_SPI2_MOSI (pin_P4_3)
#define MICROPY_HW_SPI2_SCK (pin_P4_4)
#define MICROPY_HW_SPI3_MISO (pin_P12_4)
#define MICROPY_HW_SPI3_MOSI (pin_P12_5)
#define MICROPY_HW_SPI3_SCK (pin_P12_6)
#define MICROPY_HW_LPSPI0_MISO (pin_P7_4)
#define MICROPY_HW_LPSPI0_MOSI (pin_P7_5)
#define MICROPY_HW_LPSPI0_SCK (pin_P7_6)
// UART buses
#define MICROPY_HW_UART0_TX (pin_P0_1)
#define MICROPY_HW_UART0_RX (pin_P0_0)
#define MICROPY_HW_UART0_RTS (pin_P0_3)
#define MICROPY_HW_UART0_CTS (pin_P0_2)
#define MICROPY_HW_UART1_TX (pin_P0_5)
#define MICROPY_HW_UART1_RX (pin_P0_4)
#define MICROPY_HW_UART1_RTS (pin_P0_7)
#define MICROPY_HW_UART1_CTS (pin_P0_6)
#define MICROPY_HW_REPL_UART_TX (pin_P12_2)
#define MICROPY_HW_REPL_UART_RX (pin_P12_1)
// This is used for alif.Flash() and USB MSC.
#define MICROPY_HW_FLASH_STORAGE_BASE_ADDR (0)
#define MICROPY_HW_FLASH_STORAGE_BYTES (32 * 1024 * 1024)
#define MICROPY_HW_FLASH_STORAGE_FS_BYTES (16 * 1024 * 1024)
#define MICROPY_HW_FLASH_STORAGE_ROMFS_BYTES (16 * 1024 * 1024)

View File

@@ -0,0 +1,11 @@
MCU_SERIES = E7
MCU_VARIANT = AE722F80F55D5XX
JLINK_DEV = AE722F80F55D5_HP
LD_FILE = boards/ALIF_ENSEMBLE/board.ld.S
ALIF_TOOLKIT_CFG_PART = AE722F80F55D5LS
ALIF_TOOLKIT_CFG_FILE = \"app-device-config-ae7.json\"
MICROPY_FLOAT_IMPL = float
MICROPY_PY_OPENAMP = 1
MICROPY_PY_OPENAMP_REMOTEPROC = 1

View File

@@ -0,0 +1,5 @@
// This file is needed by ospi_xip/source/ospi/ospi_drv.c.
#define OSPI_XIP_ENABLE_AES_DECRYPTION (0)
#define OSPI_XIP_RX_SAMPLE_DELAY (3)
#define OSPI_XIP_DDR_DRIVE_EDGE (1)
#define OSPI_XIP_RXDS_DELAY (12)

View File

@@ -0,0 +1,30 @@
# OSP1 flash
OSPI1_RESET,P15_7
OSPI1_CS,P5_7
OSPI1_SCLK,P5_5
OSPI1_D0,P9_5
OSPI1_D1,P9_6
OSPI1_D2,P9_7
OSPI1_D3,P10_0
OSPI1_D4,P10_1
OSPI1_D5,P10_2
OSPI1_D6,P10_3
OSPI1_D7,P10_4
OSPI1_RXDS,P10_7
LED_BLUE,P12_0
LED_RED,P12_3
JOY_LEFT,P15_0
JOY_RIGHT,P15_1
# UART buses
UART0_TX,P0_1
UART0_RX,P0_0
UART0_RTS,P0_3
UART0_CTS,P0_2
UART1_TX,P0_5
UART1_RX,P0_4
UART1_RTS,P0_7
UART1_CTS,P0_6
REPL_UART_TX,P12_2
REPL_UART_RX,P12_1
1 # OSP1 flash
2 OSPI1_RESET,P15_7
3 OSPI1_CS,P5_7
4 OSPI1_SCLK,P5_5
5 OSPI1_D0,P9_5
6 OSPI1_D1,P9_6
7 OSPI1_D2,P9_7
8 OSPI1_D3,P10_0
9 OSPI1_D4,P10_1
10 OSPI1_D5,P10_2
11 OSPI1_D6,P10_3
12 OSPI1_D7,P10_4
13 OSPI1_RXDS,P10_7
14 LED_BLUE,P12_0
15 LED_RED,P12_3
16 JOY_LEFT,P15_0
17 JOY_RIGHT,P15_1
18 # UART buses
19 UART0_TX,P0_1
20 UART0_RX,P0_0
21 UART0_RTS,P0_3
22 UART0_CTS,P0_2
23 UART1_TX,P0_5
24 UART1_RX,P0_4
25 UART1_RTS,P0_7
26 UART1_CTS,P0_6
27 REPL_UART_TX,P12_2
28 REPL_UART_RX,P12_1