Boards: add da14695_dk_usb

This commit adds board files for the da14695_dk_usb.
The board features two Mikrobus sockets, these are added to the dts

Signed-off-by: Niek Ilmer <niek.ilmer.aj@renesas.com>
This commit is contained in:
Niek Ilmer 2023-06-21 13:46:37 +02:00 committed by Carles Cufí
parent 4b38ee65db
commit bbba08ffe6
10 changed files with 488 additions and 0 deletions

View file

@ -0,0 +1,4 @@
# DA14695 Development Kit USB board configuration
# Copyright (c) 2023 Renesas Electronics Corporation and/or its affiliates
# SPDX-License-Identifier: Apache-2.0

View file

@ -0,0 +1,8 @@
# DA14695 Development Kit USB board configuration
# Copyright (c) 2023 Renesas Electronics Corporation and/or its affiliates
# SPDX-License-Identifier: Apache-2.0
config BOARD_DA14695_DK_USB
bool "DA14695 Development Kit USB board"
depends on SOC_SERIES_DA1469X

View file

@ -0,0 +1,11 @@
# DA14695 Development Kit USB board configuration
# Copyright (c) 2023 Renesas Electronics Corporation and/or its affiliates
# SPDX-License-Identifier: Apache-2.0
if BOARD_DA14695_DK_USB
config BOARD
default "da14695_dk_usb"
endif # BOARD_DA14695_DK_USB

View file

@ -0,0 +1,10 @@
#
# Copyright (c) 2023 Renesas Electronics Corporation and/or its affiliates
#
# SPDX-License-Identifier: Apache-2.0
#
board_runner_args(ezflashcli)
board_runner_args(jlink --device=DA14695)
include(${ZEPHYR_BASE}/boards/common/ezflashcli.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

View file

@ -0,0 +1,78 @@
/*
* Copyright (c) 2023 Renesas Electronics Corporation and/or its affiliates
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr/dt-bindings/pinctrl/smartbond-pinctrl.h>
&pinctrl {
uart_default: uart_default {
group1 {
pinmux = <SMARTBOND_PINMUX(UART_TX, 0, 9)>;
};
group2 {
pinmux = <SMARTBOND_PINMUX(UART_RX, 0, 8)>;
bias-pull-up;
};
};
uart2_default: uart2_default {
group1 {
pinmux = <SMARTBOND_PINMUX(UART_TX, 0, 17)>;
};
group2 {
pinmux = <SMARTBOND_PINMUX(UART_RX, 1, 8)>;
bias-pull-up;
};
};
uart3_default: uart3_default {
group1 {
pinmux = <SMARTBOND_PINMUX(UART_TX, 0, 29)>;
};
group2 {
pinmux = <SMARTBOND_PINMUX(UART_RX, 0, 28)>;
bias-pull-up;
};
};
i2c_default: i2c_default {
group1 {
pinmux = <SMARTBOND_PINMUX(I2C_SDA, 0, 31)>,
<SMARTBOND_PINMUX(I2C_SCL, 0, 30)>;
bias-pull-up;
};
};
i2c2_default: i2c2_default {
group1 {
pinmux = <SMARTBOND_PINMUX(I2C2_SDA, 0, 19)>,
<SMARTBOND_PINMUX(I2C2_SCL, 0, 18)>;
bias-pull-up;
};
};
spi_controller: spi_controller {
group1 {
pinmux = < SMARTBOND_PINMUX(SPI_CLK, 0, 21) >,
<SMARTBOND_PINMUX(SPI_DO, 0, 26)>;
output-enable;
};
group2 {
pinmux = <SMARTBOND_PINMUX(SPI_DI, 0, 24)>;
input-enable;
};
};
spi2_controller: spi2_controller {
group1 {
pinmux = < SMARTBOND_PINMUX(SPI2_CLK, 1, 3) >,
<SMARTBOND_PINMUX(SPI2_DO, 1, 5)>;
output-enable;
};
group2 {
pinmux = <SMARTBOND_PINMUX(SPI2_DI, 1, 4)>;
input-enable;
};
};
};

View file

@ -0,0 +1,223 @@
/*
* Copyright (c) 2023 Renesas Electronics Corporation and/or its affiliates
* SPDX-License-Identifier: Apache-2.0
*/
/dts-v1/;
#include <renesas/smartbond/da14695.dtsi>
#include "da14695_dk_usb-pinctrl.dtsi"
#include <zephyr/dt-bindings/input/input-event-codes.h>
/ {
model = "DA14695 series Development Kit USB";
compatible = "renesas,da14695_dk_usb";
#address-cells = <1>;
#size-cells = <1>;
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &uart;
zephyr,shell-uart = &uart;
zephyr,code-partition = &slot0_partition;
};
leds {
compatible = "gpio-leds";
red_led: led_0 {
gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
};
};
buttons {
compatible = "gpio-keys";
button0: button_0 {
gpios = <&gpio0 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
label = "Push button switch K1";
zephyr,code = <INPUT_KEY_0>;
};
};
mikrobus_header{
mikrobus-connector-1 {
compatible = "mikro-bus";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpio0 25 0>, /* AN */
/* Not a GPIO*/ /* RST */
<2 0 &gpio1 2 0>, /* CS */
<3 0 &gpio1 3 0>, /* SCK */
<4 0 &gpio1 4 0>, /* MISO */
<5 0 &gpio1 5 0>, /* MOSI */
/* +3.3V */
/* GND */
<6 0 &gpio1 6 0>, /* PWM */
<7 0 &gpio1 7 0>, /* INT */
<8 0 &gpio1 8 0>, /* RX */
<9 0 &gpio0 17 0>, /* TX */
<10 0 &gpio0 18 0>, /* SCL */
<11 0 &gpio0 19 0>; /* SDA */
/* +5V */
/* GND */
};
mikrobus-connector-2 {
compatible = "mikro-bus";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpio1 9 0>, /* AN */
/* Not a GPIO*/ /* RST */
<2 0 &gpio0 20 0>, /* CS */
<3 0 &gpio0 21 0>, /* SCK */
<4 0 &gpio0 24 0>, /* MISO */
<5 0 &gpio0 26 0>, /* MOSI */
/* +3.3V */
/* GND */
<6 0 &gpio1 1 0>, /* PWM */
<7 0 &gpio0 27 0>, /* INT */
<8 0 &gpio0 28 0>, /* RX */
<9 0 &gpio0 29 0>, /* TX */
<10 0 &gpio0 30 0>, /* SCL */
<11 0 &gpio0 31 0>; /* SDA */
/* +5V */
/* GND */
};
};
aliases {
led0 = &red_led;
watchdog0 = &wdog;
};
sysclk: system-clock {
compatible = "fixed-clock";
clock-frequency = <32000000>;
#clock-cells = <0>;
};
};
&flash0 {
reg = <0x16000000 DT_SIZE_M(1)>;
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;
/*
* Flash area from 0x0000 to 0x2400 is reserved
* for product header added by flasher.
*/
boot_partition: partition@2400 {
label = "mcuboot";
reg = <0x000002400 0x00009c00>;
};
slot0_partition: partition@c000 {
label = "image-0";
reg = <0x0000c000 0x00076000>;
};
slot1_partition: partition@80000 {
label = "image-1";
reg = <0x00082000 0x00076000>;
};
storage_partition: partition@f8000 {
label = "storage";
reg = <0x000f8000 0x00008000>;
};
};
};
&gpio0 {
status = "okay";
};
&gpio1 {
status = "okay";
};
&uart {
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&uart_default>;
pinctrl-names = "default";
};
&uart2 {
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&uart2_default>;
pinctrl-names = "default";
};
&uart3 {
current-speed = <115200>;
status = "okay";
pinctrl-0 = <&uart3_default>;
pinctrl-names = "default";
};
zephyr_udc0: &usbd {
compatible = "renesas,smartbond-usbd";
status = "okay";
};
&rc32m {
status = "disabled";
};
&xtal32m {
status = "okay";
};
&xtal32k {
status = "okay";
};
&lp_clk {
clock-src = <&xtal32k>;
};
&sys_clk {
clock-src = <&xtal32m>;
};
&pll {
status = "okay";
};
&i2c {
status = "okay";
pinctrl-0 = <&i2c_default>;
pinctrl-names = "default";
};
&i2c2 {
status = "okay";
pinctrl-0 = <&i2c2_default>;
pinctrl-names = "default";
};
&spi {
status = "okay";
pinctrl-0 = <&spi_controller>;
pinctrl-names = "default";
};
&spi2 {
status = "okay";
pinctrl-0 = <&spi2_controller>;
pinctrl-names = "default";
};
mikrobus_1_i2c: &i2c {};
mikrobus_1_spi: &spi {};
mikrobus_1_uart: &uart2 {};
mikrobus_2_i2c: &i2c2 {};
mikrobus_2_spi: &spi2 {};
mikrobus_2_uart: &uart3 {};

View file

@ -0,0 +1,16 @@
identifier: da14695_dk_usb
name: DA14695_DK_USB
type: mcu
arch: arm
ram: 512
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- arduino_gpio
- gpio
- watchdog
- i2c
- spi
- usb_device

View file

@ -0,0 +1,22 @@
#
# Copyright (c) 2023 Renesas Electronics Corporation and/or its affiliates
#
# SPDX-License-Identifier: Apache-2.0
#
CONFIG_SOC_SERIES_DA1469X=y
CONFIG_SOC_DA14695=y
CONFIG_BOARD_DA14695_DK_USB=y
CONFIG_HW_STACK_PROTECTION=y
CONFIG_GPIO=y
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_SERIAL=y
CONFIG_BUILD_OUTPUT_HEX=n
CONFIG_I2C=y
CONFIG_I2C_CALLBACK=y

Binary file not shown.

After

Width:  |  Height:  |  Size: 51 KiB

View file

@ -0,0 +1,116 @@
.. _da14695_dk_usb:
DA14695 Development Kit USB
###########################
Overview
********
The DA14695 Development Kit USB is a low cost development board for DA14695.
The development kit comes with an integrated debugger and an USB hub
to have both the on-chip USB and the J-Link connected via a single port.
.. figure:: da14695-00hqdevkt-u-usb-board.jpg
:width: 442px
:align: center
:alt: DA14695 Development Kit USB
DA14695 Development Kit USB (Credit: Renesas Electronics Corporation)
Hardware
********
DA14695 Development Kit USB has two external oscillators. The frequency of
the sleep clock is 32768 Hz. The frequency of the system clock is 32 MHz.
Supported Features
==================
The _da14695_dk_usb board configuration supports the following
hardware features:
+-----------+------------+----------------------+
| Interface | Controller | Driver/Component |
+===========+============+======================+
| FLASH | on-chip | flash |
+-----------+------------+----------------------+
| GPIO | on-chip | gpio |
+-----------+------------+----------------------+
| MPU | on-chip | arch/arm |
+-----------+------------+----------------------+
| NVIC | on-chip | arch/arm |
+-----------+------------+----------------------+
| RTT | Segger | console |
+-----------+------------+----------------------+
| UART | on-chip | serial |
+-----------+------------+----------------------+
| SPI | on-chip | spi |
+-----------+------------+----------------------+
Other hardware features, including the Configurable MAC (CMAC) controller,
are currently not supported by the port.
For more information about the DA14695 Development Kit see:
- `DA14695 DK USB website`_
System Clock
============
The DA14695 Development Kit USB is configured to use the 32 MHz external oscillator
on the board.
Connections and IOs
===================
The DA14695 Development Kit USB has one LED and one push button which can be used
by applications. The UART is connected to on-board serial converter and accessible
via USB1 port on motherboard.
The pin connections are as follows:
* LED (red), = P1.01
* BUTTON, labeled k1 = P0.06
* UART RX, connected to J-Link serial = P0.08
* UART TX, connected to J-Link serial = P0.09
Programming and Debugging
*************************
Applications for the ``da14695_dk_usb`` board configuration can be
built, flashed, and debugged in the usual way. See
:ref:`build_an_application` and :ref:`application_run` for more details on
building and running.
Flashing
========
The DA14695 boots from an external flash connected to QSPI interface. The image
written to flash has to have proper header prepended. The process is simplified
by using dedicated `eZFlashCLI`_ tool that takes care of writing header and can
handle different types of flash chips connected to DA1469x MCU. Follow instructions
on `ezFlashCLI`_ to install the tool. Once installed, flashing can be done in the
usual way.
.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: da14695_dk_usb
:goals: build flash
Debugging
=========
The DA14695 Development Kit USB includes a `J-Link`_ adaptor built-in
which provides both debugging interface and serial port.
Application can be debugged in the usual way once DA14695 Development Kit USB
is connected to PC via USB.
References
**********
.. target-notes::
.. _DA14695 DK USB website: https://www.renesas.com/us/en/products/wireless-connectivity/bluetooth-low-energy/da14695-00hqdevkt-u-smartbond-da14695-bluetooth-low-energy-52-usb-development-kit
.. _DA1469x Datasheet: https://www.renesas.com/eu/en/document/dst/da1469x-datasheet
.. _J-Link: https://www.segger.com/jlink-debug-probes.html
.. _ezFlashCLI: https://github.com/ezflash/ezFlashCLI/