Skip to content

Commit adeb181

Browse files
attie-argentumfabiobaltieri
authored andcommitted
boards: arm: atsamr34: Add SAMR34 Xplained board
Implement support for SAMR34 Xplained Pro dev board. Signed-off-by: Attie Grande <[email protected]>
1 parent a10b8cb commit adeb181

File tree

15 files changed

+553
-1
lines changed

15 files changed

+553
-1
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SAM R34 Xplained Pro board configuration
2+
3+
# Copyright (c) 2021 Argentum Systems Ltd.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD_ATSAMR34_XPRO
7+
bool "SAM R34 Xplained Pro"
8+
depends on SOC_PART_NUMBER_SAMR34J18B
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SAM R34 Xplained Pro board configuration
2+
3+
# Copyright (c) 2021 Argentum Systems Ltd.
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD
7+
default "atsamr34_xpro"
8+
depends on BOARD_ATSAMR34_XPRO
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright (c) 2021 Argentum Systems Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <dt-bindings/pinctrl/samr34j-pinctrl.h>
8+
9+
&pinctrl {
10+
tcc0_default: tcc0_default {
11+
group1 {
12+
pinmux = <PA19F_TCC0_WO3>;
13+
};
14+
};
15+
16+
sercom0_default: sercom0_default {
17+
group1 {
18+
pinmux = <PA4D_SERCOM0_PAD0>,
19+
<PA5D_SERCOM0_PAD1>;
20+
};
21+
};
22+
23+
sercom1_default: sercom1_default {
24+
group1 {
25+
pinmux = <PA16C_SERCOM1_PAD0>,
26+
<PA17C_SERCOM1_PAD1>;
27+
};
28+
};
29+
30+
sercom4_default: sercom4_default {
31+
group1 {
32+
pinmux = <PB30F_SERCOM4_PAD2>,
33+
<PB31F_SERCOM4_PAD1>,
34+
<PC18F_SERCOM4_PAD3>,
35+
<PC19F_SERCOM4_PAD0>;
36+
};
37+
};
38+
39+
sercom5_default: sercom5_default {
40+
group1 {
41+
pinmux = <PB2D_SERCOM5_PAD0>,
42+
<PB22D_SERCOM5_PAD2>,
43+
<PB23D_SERCOM5_PAD3>;
44+
};
45+
};
46+
};
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
/*
2+
* Copyright (c) 2021 Argentum Systems Ltd.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
#include <atmel/samr34.dtsi>
9+
#include "atsamr34_xpro-pinctrl.dtsi"
10+
11+
/ {
12+
model = "SAM R34 Xplained Pro";
13+
compatible = "atsamr34,xpro", "atmel,samr34j18b", "atmel,samr34";
14+
15+
chosen {
16+
zephyr,console = &sercom0;
17+
zephyr,shell-uart = &sercom0;
18+
zephyr,sram = &sram0;
19+
zephyr,flash = &flash0;
20+
};
21+
22+
/* These aliases are provided for compatibility with samples */
23+
aliases {
24+
led0 = &led0;
25+
pwm-led0 = &pwm_led0;
26+
sw0 = &user_button;
27+
};
28+
29+
leds {
30+
compatible = "gpio-leds";
31+
led0: led_0 {
32+
gpios = <&porta 19 GPIO_ACTIVE_LOW>;
33+
label = "Yellow LED";
34+
};
35+
};
36+
37+
pwmleds {
38+
compatible = "pwm-leds";
39+
pwm_led0: pwm_led_0 {
40+
pwms = <&tcc0 3 PWM_MSEC(20)>;
41+
};
42+
};
43+
44+
buttons {
45+
compatible = "gpio-keys";
46+
user_button: button_0 {
47+
gpios = <&porta 28 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
48+
label = "SW0";
49+
};
50+
};
51+
};
52+
53+
&cpu0 {
54+
clock-frequency = <48000000>;
55+
};
56+
57+
&adc {
58+
status = "okay";
59+
};
60+
61+
&tcc0 {
62+
status = "okay";
63+
compatible = "atmel,sam0-tcc-pwm";
64+
/* Gives a maximum period of 1.4s */
65+
prescaler = <4>;
66+
#pwm-cells = <2>;
67+
68+
pinctrl-0 = <&tcc0_default>;
69+
pinctrl-names = "default";
70+
};
71+
72+
&sercom0 {
73+
status = "okay";
74+
compatible = "atmel,sam0-uart";
75+
current-speed = <115200>;
76+
rxpo = <1>;
77+
txpo = <0>;
78+
79+
pinctrl-0 = <&sercom0_default>;
80+
pinctrl-names = "default";
81+
};
82+
83+
&sercom1 {
84+
status = "okay";
85+
compatible = "atmel,sam0-i2c";
86+
clock-frequency = <I2C_BITRATE_FAST>;
87+
#address-cells = <1>;
88+
#size-cells = <0>;
89+
90+
pinctrl-0 = <&sercom1_default>;
91+
pinctrl-names = "default";
92+
};
93+
94+
/* SERCOM4 is used for the internal LoRa radio */
95+
&sercom4 {
96+
status = "okay";
97+
98+
pinctrl-0 = <&sercom4_default>;
99+
pinctrl-names = "default";
100+
};
101+
&lora {
102+
tcxo-power-gpios = <&porta 9 GPIO_ACTIVE_HIGH>; /* TCXO_PWR */
103+
tcxo-power-startup-delay-ms = <5>;
104+
rfi-enable-gpios = <&porta 13 GPIO_ACTIVE_HIGH>; /* BAND_SEL */
105+
rfo-enable-gpios = <&porta 13 GPIO_ACTIVE_HIGH>; /* BAND_SEL */
106+
};
107+
108+
&sercom5 {
109+
status = "okay";
110+
compatible = "atmel,sam0-spi";
111+
dipo = <0>;
112+
dopo = <1>;
113+
#address-cells = <1>;
114+
#size-cells = <0>;
115+
116+
pinctrl-0 = <&sercom5_default>;
117+
pinctrl-names = "default";
118+
};
119+
120+
zephyr_udc0: &usb0 {
121+
status = "okay";
122+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
# Copyright (c) 2021 Argentum Systems Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
identifier: atsamr34_xpro
4+
name: SAM R34 Xplained Pro
5+
type: mcu
6+
arch: arm
7+
ram: 32
8+
flash: 256
9+
toolchain:
10+
- zephyr
11+
- gnuarmemb
12+
- xtools
13+
supported:
14+
- adc
15+
- counter
16+
- dma
17+
- gpio
18+
- i2c
19+
- pwm
20+
- spi
21+
- usb_cdc
22+
- usb_device
23+
- watchdog
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# Copyright (c) 2021 Argentum Systems Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
CONFIG_SOC_SERIES_SAMR34=y
4+
CONFIG_SOC_PART_NUMBER_SAMR34J18B=y
5+
CONFIG_BOARD_ATSAMR34_XPRO=y
6+
CONFIG_BUILD_OUTPUT_HEX=y
7+
CONFIG_CORTEX_M_SYSTICK=y
8+
CONFIG_CONSOLE=y
9+
CONFIG_UART_CONSOLE=y
10+
CONFIG_SERIAL=y
11+
CONFIG_UART_SAM0=y
12+
CONFIG_UART_INTERRUPT_DRIVEN=y
13+
CONFIG_GPIO=y
14+
CONFIG_GPIO_SAM0=y
15+
CONFIG_SOC_ATMEL_SAML_XOSC32K=y
16+
CONFIG_SOC_ATMEL_SAML_XOSC32K_AS_MAIN=y
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Copyright (c) 2021 Argentum Systems Ltd.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
include(${ZEPHYR_BASE}/boards/common/openocd.board.cmake)
398 KB
Loading
290 KB
Loading

0 commit comments

Comments
 (0)