Skip to content

Commit

Permalink
Boards: add da14695_dk_usb
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
NiekIlmer committed Aug 22, 2023
1 parent fd99ac3 commit 9604897
Show file tree
Hide file tree
Showing 10 changed files with 486 additions and 0 deletions.
4 changes: 4 additions & 0 deletions boards/arm/da14695_dk_usb/Kconfig
@@ -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
8 changes: 8 additions & 0 deletions boards/arm/da14695_dk_usb/Kconfig.board
@@ -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
11 changes: 11 additions & 0 deletions boards/arm/da14695_dk_usb/Kconfig.defconfig
@@ -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
10 changes: 10 additions & 0 deletions boards/arm/da14695_dk_usb/board.cmake
@@ -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)
78 changes: 78 additions & 0 deletions boards/arm/da14695_dk_usb/da14695_dk_usb-pinctrl.dtsi
@@ -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;
};
};
};
221 changes: 221 additions & 0 deletions boards/arm/da14695_dk_usb/da14695_dk_usb.dts
@@ -0,0 +1,221 @@
/*
* 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"

/ {
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";
};
};

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 {};
16 changes: 16 additions & 0 deletions boards/arm/da14695_dk_usb/da14695_dk_usb.yaml
@@ -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
22 changes: 22 additions & 0 deletions boards/arm/da14695_dk_usb/da14695_dk_usb_defconfig
@@ -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
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 9604897

Please sign in to comment.