Add a driver for the Arm Ethos-U NPU, including a Devicetree entry for
the mps3_an547 platform.
Signed-off-by: Kristofer Jonsson <kristofer.jonsson@arm.com>
Signed-off-by: Fredrik Knutsson <fredrik.knutsson@arm.com>
This commit adds the flash and RAM size attributes to the board YAML
file so that the board can be properly filtered by memory sizes.
Signed-off-by: Stephanos Ioannidis <stephanos.ioannidis@nordicsemi.no>
Now that timer drivers are enabled based on devicetree we can
remove any cases of them getting enabled by *_defconfig files.
Signed-off-by: Kumar Gala <galak@kernel.org>
The boards folder uses ~142.8 MB, being the largest in the repository.
This is due mostly to board images, which are in most cases not
optimized for web content. This patch tries to address this problem by
converting all pictures to JPEG (quality 75) and by adjusting its size
up to 750 px (the width of the documentation content). Images that
specified a fixed width in rst files are converted down to that value
instead.
With this patch, folder goes down to ~53.5 MB from 142.8 MB (-~63%).
Note that this patch introduces a new set of binary files to git
history, though (bad).
The process has been automated using this quickly crafted Python script:
```python
from pathlib import Path
import re
import subprocess
def process(doc, image, image_jpeg, size):
subprocess.run(
(
f"convert {image}"
"-background white -alpha remove -alpha off -quality 75"
f"-resize {size}\> {image_jpeg}"
),
shell=True,
check=True,
cwd=doc.parent,
)
if image != image_jpeg:
(doc.parent / image).unlink()
for doc in Path(".").glob("boards/**/*.rst"):
with open(doc) as f:
content = ""
image = None
for line in f:
m = re.match(r"^(\s*)\.\. (image|figure):: (.*)$", line)
if m:
if image:
process(doc, image, image_jpeg, size)
image = Path(m.group(3))
if image.suffix not in (".jpg", ".jpeg", ".png"):
content += line
image = None
continue
image_jpeg = image.parent / (image.stem + ".jpg")
size = 750
content += (
f"{m.group(1)}.. {m.group(2)}:: {image_jpeg}\n"
)
elif image:
m = re.match(r"\s*:height:\s*[0-9]+.*$", line)
if m:
continue
m = re.match(r"\s*:width:\s*([0-9]+).*$", line)
if m:
size = min(int(m.group(1)), size)
continue
content += line
if line == "\n":
process(doc, image, image_jpeg, size)
image = None
else:
content += line
with open(doc, "w") as f:
f.write(content)
```
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
According to the board porting guidelines, boards should "leave
peripherals and their drivers disabled by default". In Zephyr we
tipically enable GPIO and SERIAL, as they are virtually required by all
samples/tests in tree. However, for the rest of peripherals it is up to
the application/test to enable the necessary driver classes. It is also
useful that board's Kconfig.defconfig enables certain driver peripherals
based on a condition, e.g. enable I2C if SENSOR=y.
Ref. https://docs.zephyrproject.org/latest/hardware/porting/
board_porting.html#general-recommendations
This patch removes the following driver classes from defconfig files:
- CONFIG_ADC
- CONFIG_COUNTER
- CONFIG_EEPROM
- CONFIG_ENTROPY
- CONFIG_ESPI
- CONFIG_HWINFO
- CONFIG_I2C
- CONFIG_LED
- CONFIG_NETWORKING
- CONFIG_PS2
- CONFIG_PWM
- CONFIG_SENSOR
- CONFIG_SPI
- CONFIG_SPI_SLAVE
- CONFIG_WATCHDOG
Note that a previous attempt was done in #38510.
Fixes#30694
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
Now that I2C drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.
Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the I2C.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.
Signed-off-by: Kumar Gala <galak@kernel.org>
Now that serial drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.
Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the serial.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.
Signed-off-by: Kumar Gala <galak@kernel.org>
Now that serial drivers are enabled based on devicetree we can remove
any cases of them getting enabled by *defconfig and proj.conf files.
Signed-off-by: Kumar Gala <galak@kernel.org>
Now that gpio drivers are enabled based on devicetree
we need to remove any cases of them getting enabled by
Kconfig.defconfig* files as this can lead to errors.
Typically the Kconfig.defconfig* will blindly enable a
sensor and not respect the devicetree state of the GPIO.
Additionally we can get problems with prj.conf/defconfig
getting incorrectly overridden.
Signed-off-by: Kumar Gala <galak@kernel.org>
In order to bring consistency in-tree, migrate all boards code to the
new prefix <zephyr/...>. Note that the conversion has been scripted,
refer to zephyrproject-rtos#45388 for more details.
Signed-off-by: Gerard Marull-Paretas <gerard.marull@nordicsemi.no>
The commit 94428044e2, which introduced
this behavioural change, forgot to update the instructions provided in
the comments.
This commit updates the obsolete instructions for using an alternate
emulation platform in the comments.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Introduce a new "zephyr,memory-region" compatible to be used when a new
memory region must be created in the linker script from the devicetree
nodes using the compatible.
Remove also the LINKER_DT_REGION_FROM_NODE macro and add a new
LINKER_DT_REGIONS macro to cycle through all the compatible regions.
In the same PR modify the DTS files and the linker scripts.
Signed-off-by: Carlo Caione <ccaione@baylibre.com>
mps2_an521 and mps3_an547 need more time with TFM 1.5 to pass their
tests. This change gives it 2x as many instructions by changing the
tick speed of the watchdog to half it's prior frequency.
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Signed-off-by: Sebastian Bøe <sebastian.boe@nordicsemi.no>
Zephyr will try to run the `zephyr.elf` file by default. This is
problematic for any `..._ns` target, as they all need to boot through
[mcuboot and] TF-M. They simply hardfault without the rest of their
system image.
This corrects the `west build -t run ...` for the `mps3_an547_ns`
board, as it now has special treatment.
Signed-off-by: Jimmy Brisson <jimmy.brisson@linaro.org>
Currently there is no way to support running a board on multiple
emulation platforms nor to choose a desired emulation platform for the
simulation to be run on. This commit introduces a new
SUPPORTED_EMU_PLATFORMS list, which defines available emulation
platforms for a given board.
Fixes#12375.
Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
The mps3_an547 board documentation incorrectly referred to the
Ethos-U55 coprocessor as an FPU (floating point unit) when it is really
an NPU (neural processing unit).
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
This commit disables the Cortex-M null pointer detection feature for
the QEMU mps3_an547 targets because QEMU permits bus access to the
unmapped 0x0-0x400 region used by the MPU-based null pointer detection
feature.
Signed-off-by: Stephanos Ioannidis <root@stephanos.io>
Now that SDK 0.13.0 is out we can enable QEMU support on the
MPS3-AN547 to get coverage on Cortex-M55.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
This commit enables emulation of the `mps3_an547` platform
using, by default, The Arm Corstone-300 MPS3 FVP executable.
This FVP includes support for emulating the Ethos-U55 NPU.
Optionally, the default FVP selection can be overriden in favor
of QEMU, which supports the MPS3 without the proprietary
Ethos-U55 FPU extension. To enable qemu as an emulation target,
add `-DEMU_PLATFORM=qemu` when building an mps3_an547 image.
Signed-off-by: Kevin Townsend <kevin.townsend@linaro.org>
Add initial board support for the MPS3 AN547. The board support is
based on the MPS2+ AN521 board support.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>