Skip to content

Commit

Permalink
boards: arm: Introduce Infineon CYW920829M2EVK-02 board
Browse files Browse the repository at this point in the history
- Add initial version of CYW920829M2EVK-02 board
- [drivers: clock_control] Make it possible to set up both iho and imo
  clocks instead of just one or the other

Signed-off-by: Sreeram Tatapudi <[email protected]>
  • Loading branch information
sreeramIfx authored and nashif committed May 24, 2024
1 parent 33db820 commit f96e6cc
Show file tree
Hide file tree
Showing 46 changed files with 2,952 additions and 12 deletions.
7 changes: 7 additions & 0 deletions boards/infineon/cyw920829m2evk_02/Kconfig.cyw920829m2evk_02
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
# The Infineon AIROC™ CYW20829 Bluetooth® LE evaluation kit (CYW92089M2EVK-02)

# Copyright (c) 2024 Cypress Semiconductor Corporation.
# SPDX-License-Identifier: Apache-2.0

config BOARD_CYW920829M2EVK_02
select SOC_CYW20829B0LKML
4 changes: 4 additions & 0 deletions boards/infineon/cyw920829m2evk_02/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# Copyright (c) 2024 Cypress Semiconductor Corporation.
# SPDX-License-Identifier: Apache-2.0

include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
5 changes: 5 additions & 0 deletions boards/infineon/cyw920829m2evk_02/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: cyw920829m2evk_02
vendor: infineon
socs:
- name: cyw20829b0lkml
60 changes: 60 additions & 0 deletions boards/infineon/cyw920829m2evk_02/cyw920829m2evk_02-common.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/*
* Copyright (c) 2024 Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/dt-bindings/input/input-event-codes.h>

/ {
aliases {
led0 = &user_led0;
led1 = &user_led1;
sw0 = &user_bt0;
sw1 = &user_bt1;
};

leds {
compatible = "gpio-leds";
user_led0: led_0 {
label = "LED_0";
gpios = <&gpio_prt1 1 GPIO_ACTIVE_LOW>;
};

user_led1: led_1 {
label = "LED_1";
gpios = <&gpio_prt5 2 GPIO_ACTIVE_LOW>;
};
};

gpio_keys {
compatible = "gpio-keys";

user_bt0: user_btn0 {
label = "SW_1";
gpios = <&gpio_prt0 5 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
zephyr,code = <INPUT_KEY_0>;
};

user_bt1: user_btn1 {
label = "SW_2";
gpios = <&gpio_prt1 0 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
zephyr,code = <INPUT_KEY_1>;
};
};
};

&gpio_prt0 {
status = "okay";
};

&gpio_prt1 {
status = "okay";
};

&gpio_prt3 {
status = "okay";
};

&gpio_prt5 {
status = "okay";
};
13 changes: 13 additions & 0 deletions boards/infineon/cyw920829m2evk_02/cyw920829m2evk_02-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
/*
* Copyright (c) 2024 Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*/

/* Configure pin control bias mode for uart2 pins */
&p3_3_scb2_uart_tx {
drive-push-pull;
};

&p3_2_scb2_uart_rx {
input-enable;
};
107 changes: 107 additions & 0 deletions boards/infineon/cyw920829m2evk_02/cyw920829m2evk_02.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,107 @@
/*
* Copyright (c) 2024 Cypress Semiconductor Corporation.
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;
#include <arm/infineon/cat1b/mpns/CYW20829B0LKML.dtsi>
#include <arm/infineon/cat1b/cyw20829/system_clocks.dtsi>
#include "cyw920829m2evk_02-common.dtsi"
#include "cyw920829m2evk_02-pinctrl.dtsi"

/ {
model = "The Infineon AIROC™ CYW20829 Bluetooth® LE evaluation kit (CYW92089M2EVK-02)";
compatible = "infineon,cyw920829m2evk_02", "infineon,CYW20829";

chosen {
zephyr,sram = &sram0;
zephyr,flash = &app_region;
zephyr,console = &uart2;
zephyr,shell-uart = &uart2;
};
};

&nvic {
arm,num-irq-priority-bits = <3>;
};

uart2: &scb2 {
compatible = "infineon,cat1-uart";
status = "okay";
current-speed = <115200>;

pinctrl-0 = <&p3_3_scb2_uart_tx &p3_2_scb2_uart_rx>;
pinctrl-names = "default";
};

&fll0 {
status = "okay";
};

&path_mux0 {
status = "okay";
};

&path_mux1 {
status = "okay";
};

&path_mux2 {
status = "okay";
};

&path_mux3 {
status = "okay";
};

&clk_hf0 {
status = "okay";
clocks = <&fll0>;
};

&clk_hf1 {
status = "okay";
};

&clk_hf2 {
status = "okay";
};

&clk_hf3 {
status = "okay";
};

&flash_controller {

flash0: flash@60000000 {
compatible = "soc-nv-flash";
reg = <0x60000000 DT_SIZE_K(512)>;
write-block-size = <16>;
erase-block-size = <256>;

partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

toc2_region: flash@60000000 {
compatible = "zephyr,memory-region", "soc-nv-flash";
zephyr,memory-region = "APP_HEADER_FLASH";
reg = <0x60000000 0x50>;
};
bootstrap_region: flash@60000050 {
compatible = "zephyr,memory-region", "soc-nv-flash";
zephyr,memory-region = "BOOTSTRAP_FLASH";
reg = <0x60000050 0x2550>;
};
app_region: flash@60002600 {
compatible = "soc-nv-flash";
reg = <0x60002600 0x5da00>;
};
storage_partition: flash@60060000 {
compatible = "soc-nv-flash";
reg = <0x60060000 0x20000>;
};
};
};
};
21 changes: 21 additions & 0 deletions boards/infineon/cyw920829m2evk_02/cyw920829m2evk_02.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#
# Copyright (c) 2024 Cypress Semiconductor Corporation.
# SPDX-License-Identifier: Apache-2.0
#

identifier: cyw920829m2evk_02
name: The Infineon AIROC™ CYW20829 Bluetooth® LE evaluation kit (CYW92089M2EVK-02)
type: mcu
arch: arm
ram: 1024
flash: 2048
toolchain:
- zephyr
- gnuarmemb
supported:
- gpio
- uart
- clock_control
- bluetooth

vendor: infineon
31 changes: 31 additions & 0 deletions boards/infineon/cyw920829m2evk_02/cyw920829m2evk_02_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#
# Copyright (c) 2024 Cypress Semiconductor Corporation.
# SPDX-License-Identifier: Apache-2.0
#

# General configuration
CONFIG_CORTEX_M_SYSTICK=y
CONFIG_BUILD_OUTPUT_HEX=y
CONFIG_BUILD_OUTPUT_BIN=y

CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y

# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# Enable UART driver
CONFIG_SERIAL=y

# Enable pin controller
CONFIG_PINCTRL=y

# Enable GPIO driver
CONFIG_GPIO=y

# Enable clock controller
CONFIG_CLOCK_CONTROL=y

# Main Stack Size
CONFIG_MAIN_STACK_SIZE=2048
Binary file not shown.
125 changes: 125 additions & 0 deletions boards/infineon/cyw920829m2evk_02/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
.. _cyw920829m2evk_02:

INFINEON CYW920829M2EVK-02
############################

Overview
********

The AIROC™ CYW20829 Bluetooth® LE MCU Evaluation Kit (CYW920829M2EVK-02) with its included on-board peripherals enables evaluation, prototyping, and development of a wide array of Bluetooth® Low Energy applications, all on Infineon's low power, high performance AIROC™ CYW20829. The AIROC™ CYW20829's robust RF performance and 10 dBm TX output power without an external power amplifier (PA). This provides enough link budget for the entire spectrum of Bluetooth® LE use cases including industrial IoT applications, smart home, asset tracking, beacons and sensors, and medical devices.

The system features Dual Arm® Cortex® - M33s for powering the MCU and Bluetooth subsystem with programmable and reconfigurable analog and digital blocks. In addition, on the kit, there is a suite of on-board peripherals including six-axis inertial measurement unit (IMU), thermistor, analog mic, user programmable buttons (2), LEDs (2), and RGB LED. There is also extensive GPIO support with extended headers and Arduino Uno R3 compatibility for third-party shields.

.. image:: img/cyw920829m2evk_02.webp
:align: center
:alt: CYW920829M2EVK_02

Hardware
********

For more information about the CYW20829 SoC and CYW920829M2EVK-02 board:

- `CYW920829M2EVK-02 Website`_
- `CYW920829M2EVK-02 BT User Guide`_


Kit Features:
=============

- AIROC™ CYW20829 Bluetooth® LE MCU in 56 pin QFN package
- Arduino compatible headers for hardware expansion
- On-board sensors - 6-axis IMU, Thermistor, Infineon analog microphone, and Infineon digital microphone
- User switches, RGB LED and user LEDs
- USB connector for power, programming and USB-UART bridge

Kit Contents:
=============

- CYW20829 evaluation board (CYW9BTM2BASE3+CYW920829M2IPA2)
- USB Type-A to Micro-B cable
- Six jumper wires (five inches each)
- Quick start guide


Supported Features
==================

The board configuration supports the following hardware features:

+-----------+------------+-----------------------+
| Interface | Controller | Driver/Component |
+===========+============+=======================+
| NVIC | on-chip | nested vectored |
| | | interrupt controller |
+-----------+------------+-----------------------+
| SYSTICK | on-chip | system clock |
+-----------+------------+-----------------------+
| GPIO | on-chip | GPIO |
+-----------+------------+-----------------------+
| UART | on-chip | serial port-polling; |
| | | serial port-interrupt |
+-----------+------------+-----------------------+


The default configuration can be found in the Kconfig

:zephyr_file:`boards/infineon/cyw920829m2evk_02/cyw920829m2evk_02_defconfig`

System Clock
============

The AIROC™ CYW20829 Bluetooth® MCU SoC is configured to use the internal IMO+FLL as a source for
the system clock. Other sources for the system clock are provided in the SOC, depending on your
system requirements.

Build blinking led sample
*************************

Here is an example for the :zephyr:code-sample:`blinky` application.

.. zephyr-app-commands::
:zephyr-app: samples/basic/blinky
:board: cyw920829m2evk_02
:goals: build flash

OpenOCD Installation
====================

To get the OpenOCD package, it is required that you

1. Download and install the `ModusToolbox`_ software.
2. After the installation, add the directory containing the OpenOCD scripts to your environment's PATH variable.


Programming and Debugging
*************************

The CYW920829M2EVK-02 includes an onboard programmer/debugger (KitProg3) to provide debugging, flash programming, and serial communication over USB. Flash and debug commands must be pointed to the Cypress OpenOCD you downloaded above.

On Windows:

.. code-block:: console
west flash --openocd path/to/infineon/openocd/bin/openocd.exe
west debug --openocd path/to/infineon/openocd/bin/openocd.exe
On Linux:

.. code-block:: console
west flash --openocd path/to/infineon/openocd/bin/openocd
west debug --openocd path/to/infineon/openocd/bin/openocd
Once the gdb console starts after executing the west debug command, you may now set breakpoints and perform other standard GDB debugging on the CYW20829 CM33 core.

.. _CYW920829M2EVK-02 Website:
https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-bluetooth-le-bluetooth-multiprotocol/airoc-bluetooth-le/cyw20829/

.. _CYW920829M2EVK-02 BT User Guide:
https://www.infineon.com/cms/en/product/wireless-connectivity/airoc-bluetooth-le-bluetooth-multiprotocol/airoc-bluetooth-le/cyw20829/#!?fileId=8ac78c8c8929aa4d018a16f726c46b26

.. _ModusToolbox:
https://softwaretools.infineon.com/tools/com.ifx.tb.tool.modustoolbox

.. _Infineon OpenOCD:
https://github.com/infineon/openocd/releases/tag/release-v4.3.0
10 changes: 10 additions & 0 deletions boards/infineon/cyw920829m2evk_02/support/openocd.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#
# Copyright (c) 2018 Linaro Limited.
#
# SPDX-License-Identifier: Apache-2.0

source [find interface/kitprog3.cfg]

transport select swd

source [find target/cyw20829.cfg]
Loading

0 comments on commit f96e6cc

Please sign in to comment.