Skip to content

Commit 17d3f3a

Browse files
duda-patrykfabiobaltieri
authored andcommitted
boards: arm: Introduce Google Dragonclaw Development Board
Dragonclaw is a board created by Google for fingerprint-related functionality development. Board schematics, layout and BOM is available at: https://chromium.googlesource.com/chromiumos/platform/ec/+/HEAD/docs/schematics/dragonclaw Signed-off-by: Patryk Duda <[email protected]>
1 parent d0f08e5 commit 17d3f3a

File tree

7 files changed

+212
-0
lines changed

7 files changed

+212
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2022 Google LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_GOOGLE_DRAGONCLAW
5+
bool "Google Dragonclaw Development Board"
6+
depends on SOC_STM32F412CX
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2022 Google LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if BOARD_GOOGLE_DRAGONCLAW
5+
6+
config BOARD
7+
default "google_dragonclaw"
8+
9+
endif # BOARD_GOOGLE_DRAGONCLAW
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Copyright (c) 2022 Google LLC
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
board_runner_args(jlink "--device=STM32F412CG" "--speed=4000")
5+
6+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
7+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
.. _google_dragonclaw_board:
2+
3+
Google Dragonclaw Development Board
4+
###################################
5+
6+
Overview
7+
********
8+
9+
Dragonclaw is a board created by Google for fingerprint-related functionality
10+
development. See the `Dragonclaw Schematics`_ for board schematics, layout and
11+
BOM.
12+
13+
Board has connectors for fingerprint sensors. Console is exposed over μServo
14+
connector. MCU can be flashed using μServo or SWD.
15+
16+
Hardware
17+
********
18+
19+
- STM32F412CGU6 UFQFPN48 package
20+
21+
Peripherial Mapping
22+
===================
23+
24+
- USART_1 TX/RX : PA9/PA10
25+
- USART_2 TX/RX : PA2/PA3
26+
- SPI_1 CS/CLK/MISO/MOSI : PA4/PA5/PA6/PA7
27+
- SPI_2 CS/CLK/MISO/MOSI : PB12/PB13/PB14/PB15
28+
29+
Programming and Debugging
30+
*************************
31+
32+
Build application as usual for the ``dragonclaw`` board, and flash
33+
using μServo or an external J-Link connected to J4. If μServo is used, please
34+
follow the `Chromium EC Flashing Documentation`_.
35+
36+
Debugging
37+
=========
38+
39+
Use SWD with a J-Link or ST-Link. Remember that SW2 must be set to CORESIGHT.
40+
41+
References
42+
**********
43+
44+
.. target-notes::
45+
46+
.. _Dragonclaw Schematics:
47+
https://chromium.googlesource.com/chromiumos/platform/ec/+/HEAD/docs/schematics/dragonclaw
48+
49+
.. _Chromium EC Flashing Documentation:
50+
https://chromium.googlesource.com/chromiumos/platform/ec#Flashing-via-the-servo-debug-board
Lines changed: 103 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,103 @@
1+
/*
2+
* Copyright (c) 2022 Google LLC
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <st/f4/stm32f412Xg.dtsi>
10+
#include <st/f4/stm32f412z(e-g)tx-pinctrl.dtsi>
11+
12+
/ {
13+
model = "Google Dragonclaw development board";
14+
compatible = "google,dragonclaw-fpmcu";
15+
16+
chosen {
17+
zephyr,console = &usart2;
18+
zephyr,shell-uart = &usart2;
19+
zephyr,sram = &sram0;
20+
zephyr,flash = &flash0;
21+
zephyr,flash-controller = &flash;
22+
};
23+
};
24+
25+
&clk_hsi {
26+
/* HSI clock frequency is 16MHz */
27+
status = "okay";
28+
};
29+
30+
&clk_lsi {
31+
/* LSI clock frequency is 32768kHz */
32+
status = "okay";
33+
};
34+
35+
&pll {
36+
div-m = <8>;
37+
mul-n = <192>; /* 16MHz * 192/8 = 384MHz VCO clock */
38+
div-p = <4>; /* 96MHz PLL general clock output */
39+
div-q = <8>; /* 48MHz PLL output for USB, SDIO, RNG */
40+
clocks = <&clk_hsi>;
41+
status = "okay";
42+
};
43+
44+
&rcc {
45+
clocks = <&pll>; /* Select PLL as SYSCLK source (96MHz) */
46+
ahb-prescaler = <1>; /* SYSCLK not divided */
47+
clock-frequency = <DT_FREQ_M(96)>; /* AHB frequency */
48+
apb1-prescaler = <2>; /* AHB clock divided by 2 */
49+
apb2-prescaler = <2>; /* AHB clock divided by 2 */
50+
};
51+
52+
/* USART1: AP UART (Host Commands and MKBP) */
53+
&usart1 {
54+
pinctrl-0 = <&usart1_tx_pa9 &usart1_rx_pa10>;
55+
pinctrl-names = "default";
56+
current-speed = <115200>;
57+
status = "okay";
58+
};
59+
60+
/* USART2: Servo UART (console) */
61+
&usart2 {
62+
pinctrl-0 = <&usart2_tx_pa2 &usart2_rx_pa3>;
63+
pinctrl-names = "default";
64+
current-speed = <115200>;
65+
status = "okay";
66+
};
67+
68+
/* SPI1: communication with the AP */
69+
&spi1 {
70+
pinctrl-0 = <&spi1_nss_pa4 &spi1_sck_pa5
71+
&spi1_miso_pa6 &spi1_mosi_pa7>;
72+
pinctrl-names = "default";
73+
status = "okay";
74+
};
75+
76+
/* SPI2: communication with the fingerprint sensor */
77+
&spi2 {
78+
pinctrl-0 = <&spi2_nss_pb12 &spi2_sck_pb13
79+
&spi2_miso_pb14 &spi2_mosi_pb15>;
80+
pinctrl-names = "default";
81+
status = "okay";
82+
};
83+
84+
&rtc {
85+
clocks = <&rcc STM32_CLOCK_BUS_APB1 0x10000000>,
86+
<&rcc STM32_SRC_LSI RTC_SEL(2)>;
87+
status = "okay";
88+
89+
backup_regs {
90+
status = "okay";
91+
};
92+
};
93+
94+
/*
95+
* The board uses STM32F412CG in UFQFPN48 package in which gpio[c-h] is not
96+
* exposed, so disable it.
97+
*/
98+
&gpioc {status = "disabled";};
99+
&gpiod {status = "disabled";};
100+
&gpioe {status = "disabled";};
101+
&gpiof {status = "disabled";};
102+
&gpiog {status = "disabled";};
103+
&gpioh {status = "disabled";};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
identifier: google_dragonclaw
2+
name: Google Dragonclaw Development Board
3+
type: mcu
4+
arch: arm
5+
toolchain:
6+
- zephyr
7+
- gnuarmemb
8+
- xtools
9+
ram: 256
10+
flash: 1024
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
# Copyright (c) 2022 Google Inc
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
CONFIG_SOC_SERIES_STM32F4X=y
5+
CONFIG_SOC_STM32F412CX=y
6+
CONFIG_BOARD_GOOGLE_DRAGONCLAW=y
7+
8+
# Serial Drivers
9+
CONFIG_SERIAL=y
10+
CONFIG_UART_INTERRUPT_DRIVEN=y
11+
12+
# Console
13+
CONFIG_CONSOLE=y
14+
CONFIG_UART_CONSOLE=y
15+
16+
# GPIO Controller
17+
CONFIG_GPIO=y
18+
19+
# Clock Controller
20+
CONFIG_CLOCK_CONTROL=y
21+
22+
# Pin Controller
23+
CONFIG_PINCTRL=y
24+
25+
# Enable MPU and HW stack protection
26+
CONFIG_ARM_MPU=y
27+
CONFIG_HW_STACK_PROTECTION=y

0 commit comments

Comments
 (0)