Skip to content

Commit e4824c0

Browse files
committed
boards: Add support for SecureIoT1702
Add basic secureiot1072 support with serial ports. Tested with hello_world to run and work as expected. Signed-off-by: Timo Teräs <[email protected]>
1 parent 3581464 commit e4824c0

File tree

8 files changed

+246
-0
lines changed

8 files changed

+246
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
#
2+
# Copyright (c) 2019 Crypta Labs Ltd.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
zephyr_library()
8+
zephyr_library_sources(pinmux.c)
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#
2+
# Copyright (c) 2019 Crypta Labs Ltd.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
config BOARD_SECUREIOT1702
8+
bool "Microchip SecureIoT1702"
9+
depends on SOC_SERIES_CEC1702
10+
select HAS_DTS
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
#
2+
# Copyright (c) 2019 Crypta Labs Ltd.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
if BOARD_SECUREIOT1702
8+
9+
config BOARD
10+
default "secureiot1702"
11+
12+
endif
Lines changed: 124 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,124 @@
1+
.. _secureiot1702:
2+
3+
Microchip SecureIoT1702
4+
#######################
5+
6+
Overview
7+
********
8+
9+
This demo board features a Microchip CEC1702 cryptographic
10+
embedded controlled based on an ARM Cortex-M4.
11+
12+
Highlights of the board:
13+
14+
- CEC1702 32-bit ARM® Cortex®-M4F Controller with Integrated Crypto
15+
- Compact, high-contrast, serial graphic LCD Display Module with back-light
16+
- 2x4 matrix of push buttons inputs
17+
- USB-UART Converter as debug interface
18+
- Potentiometer to ADC channel
19+
- Serial Quad I/O (SQI) flash
20+
- OTP programmable in CEC1702
21+
- Two expansion headers compatible with MikroElektronika mikroBUS™ Expansion interface
22+
23+
More information can be found on the `SecureIoT1702 website`_ and
24+
`CEC1702 website`_, and SoC programming information is available
25+
in the `CEC1702 datasheet`_.
26+
27+
Supported Features
28+
==================
29+
30+
The following devices are supported:
31+
32+
- Nested Vectored Interrupt Controller (NVIC)
33+
- System Tick System Clock (SYSTICK)
34+
- Serial Ports (NS16550)
35+
36+
37+
Connections and IOs
38+
===================
39+
40+
Please refer to the `SecureIoT1702 schematics`_ for the pin routings.
41+
Additional devices can be connected via mikroBUS expansion interface.
42+
43+
Programming and Debugging
44+
*************************
45+
46+
This board comes with a 10-pin Cortext Debug port and a separate SPI
47+
flash programming header.
48+
49+
Applications for the ``secureiot1702`` board configuration can be
50+
built the usual way (see :ref:`build_an_application` for more details) which
51+
is then programmed directly to the external SPI flash chip.
52+
53+
Flashing
54+
========
55+
56+
# Add extra configuration :code:`CONFIG_BOOT_DELAY=4000` in :code:`prj.conf`.
57+
This is needed for the host USB drivers to be ready to see the boot messages.
58+
Build :ref:`hello_world` application. The build will result
59+
in :code:`zephyr_spi_image.bin`.
60+
61+
.. zephyr-app-commands::
62+
:zephyr-app: samples/hello_world
63+
:board: secureiot1702
64+
:goals: build
65+
66+
#. Connect your SPI programmer to SecureIoT1702 connector X12 in order to flash.
67+
Then proceed to flash using flashrom v1.1 or a similar tool for flashing
68+
SPI chip with :code:`zephyr_spi_image.bin`.
69+
70+
.. code-block:: console
71+
72+
$ flashrom -w zephyr_spi_image.bin
73+
74+
#. Run your favorite terminal program to listen for output. Under Linux the
75+
terminal should be :code:`/dev/ttyUSB0`. For example:
76+
77+
.. code-block:: console
78+
79+
$ minicom -D /dev/ttyUSB0 -o -b 115200
80+
81+
The -o option tells minicom not to send the modem initialization
82+
string. Connection should be configured as follows:
83+
84+
- Speed: 115200
85+
- Data: 8 bits
86+
- Parity: None
87+
- Stop bits: 1
88+
89+
#. Connect the SecureIoT1702 to your host computer using the USB connector.
90+
91+
You should see "Hello World! secureiot1702" in your terminal.
92+
93+
Debugging
94+
=========
95+
96+
You can debug an application in the usual way. Here is an example for the
97+
:ref:`hello_world` application.
98+
99+
.. zephyr-app-commands::
100+
:zephyr-app: samples/hello_world
101+
:board: mec15xxevb_assy6853
102+
:maybe-skip-config:
103+
:goals: debug
104+
105+
106+
References
107+
**********
108+
109+
.. target-notes::
110+
111+
.. _CEC1702 website:
112+
http://www.microchip.com/CEC1702
113+
114+
.. _CEC1702 datasheet:
115+
http://www.microchip.com/p/207/
116+
117+
.. _CEC1702 quick start guide:
118+
http://ww1.microchip.com/downloads/en/DeviceDoc/50002665A.pdf
119+
120+
.. _SecureIoT1702 website:
121+
http://www.microchip.com/Developmenttools/ProductDetails.aspx?PartNO=DM990012
122+
123+
.. _SecureIoT1702 schematics:
124+
http://microchipdeveloper.com/secureiot1702:schematic

boards/arm/secureiot1702/dts_fixup.h

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
/*
2+
* Copyright (c) 2017 Crypta Labs Ltd
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/* This file is a temporary workaround for mapping of the generated information
8+
* to the current driver definitions. This will be removed when the drivers
9+
* are modified to handle the generated information, or the mapping of
10+
* generated data matches the driver definitions.
11+
*/
12+
13+
#define DT_NUM_IRQ_PRIO_BITS DT_ARM_V7M_NVIC_E000E100_ARM_NUM_IRQ_PRIORITY_BITS

boards/arm/secureiot1702/pinmux.c

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
/*
2+
* Copyright (c) 2017 Crypta Labs Ltd
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <device.h>
8+
#include <init.h>
9+
#include <kernel.h>
10+
11+
#include "soc.h"
12+
13+
static int board_init(struct device *dev)
14+
{
15+
#ifdef DT_NS16550_400F2400_BASE_ADDRESS
16+
/* Set clock request, muxing and power up UART0 */
17+
PCR_INST->CLK_REQ_2_b.UART_0_CLK_REQ = 1;
18+
GPIO_100_137_INST->GPIO_104_PIN_CONTROL_b.MUX_CONTROL = 1;
19+
GPIO_100_137_INST->GPIO_105_PIN_CONTROL_b.MUX_CONTROL = 1;
20+
UART0_INST->CONFIG = 0;
21+
UART0_INST->ACTIVATE = 1;
22+
#endif
23+
#ifdef DT_NS16550_400F2800_BASE_ADDRESS
24+
/* Set clock request, muxing, UART1_RX_EN and power up UART1 */
25+
PCR_INST->CLK_REQ_2_b.UART_1_CLK_REQ = 1;
26+
GPIO_140_176_INST->GPIO_170_PIN_CONTROL_b.MUX_CONTROL = 2;
27+
GPIO_140_176_INST->GPIO_171_PIN_CONTROL_b.MUX_CONTROL = 2;
28+
GPIO_100_137_INST->GPIO_113_PIN_CONTROL_b.GPIO_DIRECTION = 1;
29+
UART1_INST->CONFIG = 0;
30+
UART1_INST->ACTIVATE = 1;
31+
#endif
32+
return 0;
33+
}
34+
35+
SYS_INIT(board_init, PRE_KERNEL_1, CONFIG_KERNEL_INIT_PRIORITY_DEFAULT);
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2017 Crypta Labs Ltd
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include "microchip/cec1702.dtsi"
10+
11+
/ {
12+
model = "Microchip SecureIoT1702 board";
13+
compatible = "microchip,secureiot1702", "microchip,cec1702";
14+
15+
chosen {
16+
zephyr,sram = &sram0;
17+
zephyr,console = &uart1;
18+
zephyr,flash = &flash0;
19+
};
20+
};
21+
22+
&uart0 {
23+
status = "okay";
24+
current-speed = <115200>;
25+
};
26+
27+
&uart1 {
28+
status = "okay";
29+
current-speed = <115200>;
30+
};
31+
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (c) 2019 Crypta Labs Ltd.
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
CONFIG_SOC_SERIES_CEC1702=y
8+
CONFIG_BOARD_SECUREIOT1702=y
9+
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=48000000
10+
11+
CONFIG_SERIAL=y
12+
CONFIG_CONSOLE=y
13+
CONFIG_UART_CONSOLE=y

0 commit comments

Comments
 (0)