boards: arm: Add Qomu board

Add Qomu board device tree and configuration files.
Qomu source files: https://github.com/QuickLogic-Corp/qomu-dev-board/

Signed-off-by: Michal Sieron <msieron@antmicro.com>
This commit is contained in:
Michal Sieron 2022-06-06 17:03:06 +02:00 committed by Carles Cufí
commit 20a8dd5491
11 changed files with 277 additions and 0 deletions

View file

@ -0,0 +1,4 @@
# Copyright (c) 2022 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
zephyr_library_sources(board.c)

10
boards/arm/qomu/Kconfig Normal file
View file

@ -0,0 +1,10 @@
# QuickLogic Qomu board
# Copyright (c) 2022 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
config BOARD_INIT_PRIORITY
int
default KERNEL_INIT_PRIORITY_DEFAULT
help
Board initialization priority.

View file

@ -0,0 +1,8 @@
# QuickLogic Qomu board
# Copyright (c) 2022 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
config BOARD_QOMU
bool "QuickLogic Qomu target"
depends on SOC_EOS_S3

View file

@ -0,0 +1,11 @@
# QuickLogic Qomu board
# Copyright (c) 2022 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
if BOARD_QOMU
config BOARD
default "qomu"
endif # BOARD_QOMU

29
boards/arm/qomu/board.c Normal file
View file

@ -0,0 +1,29 @@
/*
* Copyright (c) 2022 Antmicro <www.antmicro.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/init.h>
#include <soc.h>
#include "board.h"
static int qomu_board_init(const struct device *arg)
{
ARG_UNUSED(arg);
/* IO MUX setup for UART */
eos_s3_io_mux(UART_TX_PAD, UART_TX_PAD_CFG);
eos_s3_io_mux(UART_RX_PAD, UART_RX_PAD_CFG);
IO_MUX->UART_rxd_SEL = UART_RX_SEL;
/* IO MUX setup for USB */
eos_s3_io_mux(USB_PU_CTRL_PAD, USB_PAD_CFG);
eos_s3_io_mux(USB_DN_PAD, USB_PAD_CFG);
eos_s3_io_mux(USB_DP_PAD, USB_PAD_CFG);
return 0;
}
SYS_INIT(qomu_board_init, PRE_KERNEL_1, CONFIG_BOARD_INIT_PRIORITY);

25
boards/arm/qomu/board.h Normal file
View file

@ -0,0 +1,25 @@
/*
* Copyright (c) 2022 Antmicro <www.antmicro.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef __INC_BOARD_H
#define __INC_BOARD_H
#include <soc_pinmap.h>
#define USB_PU_CTRL_PAD 23
#define USB_DN_PAD 28
#define USB_DP_PAD 31
#define USB_PAD_CFG (PAD_E_4MA | PAD_P_Z | PAD_OEN_NORMAL | PAD_SMT_DISABLE \
| PAD_REN_DISABLE | PAD_SR_SLOW | PAD_CTRL_SEL_FPGA)
#define UART_TX_PAD 44
#define UART_TX_PAD_CFG UART_TXD_PAD44
#define UART_RX_PAD 45
#define UART_RX_PAD_CFG UART_RXD_PAD45
#define UART_RX_SEL UART_RXD_SEL_PAD45
#endif /* __INC_BOARD_H */

Binary file not shown.

After

Width:  |  Height:  |  Size: 184 KiB

View file

@ -0,0 +1,77 @@
.. _qomu:
Qomu
####
Overview
********
The Qomu board is a platform with an on-board QuickLogic EOS S3 Sensor Processing Platform.
.. figure:: img/qomu-board.png
:align: center
:alt: Qomu
Qomu (Credit: QuickLogic)
Hardware
********
- QuickLogic EOS S3 MCU Platform
- 16 Mbit of on-board flash memory
- Touchpads (4)
- RGB LED
- Powered from USB
Detailed information about the board can be found in a `Qomu repository`_ and `Qomu User Guide`_.
Connections and IOs
===================
Detailed information about pinouts is available in the `schematics document`_.
Programming
***********
The Qomu platform by default boots from flash.
Below are steps to run Qomu sample application:
#. Build the sample in an usual way:
.. zephyr-app-commands::
:zephyr-app: samples/boards/qomu
:board: qomu
:goals: build
#. Remove Qomu board from USB port.
#. Insert Qomu board to USB port.
#. While the blue LED is blinking (for 5 seconds), touch the touch-pads with your finger.
On success, the green led will start flashing.
#. Use TinyFpgaProgrammer application to load the target application:
.. code-block:: console
python3 /path/to/TinyFPGA-Programmer-Application/tinyfpga-programmer-gui.py --mode m4 --m4app build/zephyr/zephyr.bin --reset
Refer to `TinyFPGA Programmer Application repo`_ for detailed information on installation
and program usage.
References
**********
.. target-notes::
.. _Qomu repository:
https://github.com/QuickLogic-Corp/qomu-dev-board
.. _Qomu User Guide:
https://github.com/QuickLogic-Corp/qomu-dev-board/blob/master/doc/Qomu_UserGuide.pdf
.. _schematics document:
https://github.com/QuickLogic-Corp/qomu-dev-board/blob/master/doc/qomu-board.pdf
.. _TinyFPGA Programmer Application repo:
https://github.com/QuickLogic-Corp/TinyFPGA-Programmer-Application

74
boards/arm/qomu/qomu.dts Normal file
View file

@ -0,0 +1,74 @@
/*
* Copyright (c) 2022 Antmicro <www.antmicro.com>
*
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <quicklogic/quicklogic_eos_s3.dtsi>
/ {
model = "QuickLogic Qomu board";
compatible = "quicklogic,eos_s3";
chosen {
zephyr,sram = &sram0;
zephyr,console = &uart1;
zephyr,shell-uart = &uart1;
zephyr,uart-pipe = &uart1;
};
aliases {
led0 = &blue_led;
led1 = &green_led;
led2 = &red_led;
sw0 = &button0;
};
leds {
compatible = "gpio-leds";
blue_led: led_0 {
gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
label = "LED 0";
};
green_led: led_1 {
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
label = "LED 1";
};
red_led: led_2 {
gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
label = "LED 2";
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
label = "User Push Button 0";
};
};
fpga0: fpga {
status = "okay";
};
};
&cpu0 {
clock-frequency = <61440000>;
};
&gpio {
status = "okay";
};
&uart0 {
status = "disabled";
};
&uart1 {
status = "okay";
current-speed = <115200>;
};

12
boards/arm/qomu/qomu.yaml Normal file
View file

@ -0,0 +1,12 @@
identifier: qomu
name: QuickLogic Qomu
type: mcu
arch: arm
toolchain:
- zephyr
- gnuarmemb
- xtools
testing:
ignore_tags:
- net
- bluetooth

View file

@ -0,0 +1,27 @@
# Copyright (c) 2022 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
CONFIG_ARM_MPU=n
CONFIG_SOC_EOS_S3=y
CONFIG_BOARD_QOMU=y
# system clock
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=61440000
CONFIG_CORTEX_M_SYSTICK=y
# console
CONFIG_SERIAL=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
# EOS S3 Configuration Manager copies software from external flash to MCU
# memory using preconfigured DMA and execute it there.
# Thus we do not use flash directly.
CONFIG_XIP=n
CONFIG_FLASH=n
CONFIG_FLASH_SIZE=0
CONFIG_FLASH_BASE_ADDRESS=0x0
# GPIO
CONFIG_GPIO=y