Skip to content

Commit 2eda5f3

Browse files
jadonkhenrikbrixandersen
authored andcommitted
boards: beagle: add BeaglePlay on-board CC1352P7
Add support for BeaglePlay, a TI AM6254 SoC based development board with a CC1352P7 wireless microcontroller for supporting software defined 2.4GHz and SubGHz wireless protocols. Support for running Zephyr on the quad-A53 SoC or the programmable M4 on the SoC would be provided separately. See https://beagleplay.org for details. Signed-off-by: Jason Kridner <[email protected]> Signed-off-by: Ayush Singh <[email protected]>
1 parent 2c1274f commit 2eda5f3

File tree

13 files changed

+428
-0
lines changed

13 files changed

+428
-0
lines changed
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
zephyr_library()
4+
5+
if(CONFIG_SOC_CC1352P7)
6+
zephyr_library_sources(../beagleconnect_freedom/board_antenna.c)
7+
zephyr_library_compile_definitions("DeviceFamily_CC13X2X7")
8+
endif()

boards/beagle/beagleplay/Kconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# BeaglePlay CC1352 board configuration
2+
3+
# Copyright (c) 2020 Erik Larson
4+
# Copyright (c) 2021-2022 Jason Kridner, BeagleBoard.org Foundation
5+
# Copyright (c) 2024 Ayush Singh <[email protected]>
6+
# SPDX-License-Identifier: Apache-2.0
7+
8+
if BOARD_BEAGLEPLAY_CC1352P7
9+
10+
config BOARD_ANTENNA_INIT_PRIO
11+
int "Board antenna switch initialization priority"
12+
default 70
13+
help
14+
Set the priority for board init, must be greater than
15+
KERNEL_INIT_PRIORITY_DEVICE but smaller than
16+
IEEE802154_CC13XX_CC26XX_SUB_GHZ_INIT_PRIO.
17+
18+
endif # BOARD_BEAGLEPLAY_CC1352
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# BeaglePlay board configuration
2+
3+
# Copyright (c) 2020 Erik Larson
4+
# Copyright (c) 2021-2022 Jason Kridner, BeagleBoard.org Foundation
5+
# Copyright (c) 2024 Ayush Singh, BeagleBoard.org Foundation
6+
# SPDX-License-Identifier: Apache-2.0
7+
8+
config BOARD_BEAGLEPLAY
9+
select SOC_CC1352P7 if BOARD_BEAGLEPLAY_CC1352P7
10+
help
11+
BeagleBoard.org BeaglePlay CC1352P7
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (c) 2022 Vaishnav Achath
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/pinctrl/cc13xx_cc26xx-pinctrl.h>
8+
9+
&pinctrl {
10+
/* UART0 */
11+
uart0_tx_default: uart0_tx_default {
12+
pinmux = <13 IOC_PORT_MCU_UART0_TX>;
13+
bias-disable;
14+
};
15+
uart0_rx_default: uart0_rx_default {
16+
pinmux = <12 IOC_PORT_MCU_UART0_RX>;
17+
bias-disable;
18+
input-enable;
19+
};
20+
21+
/* Antenna pinmux states */
22+
board_ant_tx_pa_off: board_ant_tx_pa_off {
23+
pinmux = <29 IOC_PORT_GPIO>;
24+
bias-disable;
25+
};
26+
board_ant_tx_pa_on: board_ant_tx_pa_on {
27+
pinmux = <29 IOC_PORT_RFC_GPO3>;
28+
bias-disable;
29+
};
30+
board_ant_subg_off: board_ant_subg_off {
31+
pinmux = <30 IOC_PORT_GPIO>;
32+
bias-disable;
33+
};
34+
board_ant_subg_on: board_ant_subg_on {
35+
pinmux = <30 IOC_PORT_RFC_GPO0>;
36+
bias-disable;
37+
};
38+
};
Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
/*
2+
* Copyright (c) 2022 Jason Kridner, BeagleBoard.org Foundation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <ti/cc1352r7.dtsi>
10+
#include "beagleplay-cc1352p7-pinctrl.dtsi"
11+
12+
/ {
13+
model = "beagleplay";
14+
compatible = "beagle,beagleplay-cc1352p7";
15+
16+
aliases {
17+
led0 = &led0;
18+
led1 = &led1;
19+
};
20+
21+
chosen {
22+
zephyr,sram = &sram0;
23+
zephyr,console = &uart0;
24+
zephyr,shell-uart = &uart0;
25+
zephyr,flash = &flash0;
26+
zephyr,ieee802154 = &ieee802154g;
27+
};
28+
29+
leds: leds {
30+
compatible = "gpio-leds";
31+
led0: led_0 {
32+
gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
33+
label = "LED1";
34+
};
35+
36+
led1: led_1 {
37+
gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
38+
label = "LED2";
39+
};
40+
};
41+
42+
/**
43+
* The BeaglePlay cc1352 has an on-board antenna switch (SKY13317-373LF) used to
44+
* select the appropriate RF signal port based on the currently-used PHY.
45+
*
46+
* Truth table:
47+
*
48+
* Path DIO29 DIO30
49+
* =========== ===== =====
50+
* Off 0 0
51+
* Sub-1 GHz 0 1 // DIO30 mux to IOC_PORT_RFC_GPO0 for auto
52+
* 20 dBm TX 1 0 // DIO29 mux to IOC_PORT_RFC_GPO3 for auto
53+
*/
54+
antenna_mux0: antenna_mux0 {
55+
compatible = "skyworks,sky13317";
56+
status = "okay";
57+
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>, <&gpio0 30 GPIO_ACTIVE_HIGH>;
58+
pinctrl-0 = <&board_ant_tx_pa_off &board_ant_subg_off>;
59+
pinctrl-1 = <&board_ant_tx_pa_off &board_ant_subg_on>;
60+
pinctrl-2 = <&board_ant_tx_pa_on &board_ant_subg_on>;
61+
pinctrl-names = "default", "ant_subg", "ant_subg_pa";
62+
};
63+
};
64+
65+
&cpu0 {
66+
clock-frequency = <48000000>;
67+
cpu-power-states = <&idle &standby>;
68+
};
69+
70+
&trng {
71+
status = "okay";
72+
};
73+
74+
&gpio0 {
75+
status = "okay";
76+
};
77+
78+
&uart0 {
79+
status = "okay";
80+
current-speed = <115200>;
81+
pinctrl-0 = <&uart0_rx_default &uart0_tx_default>;
82+
pinctrl-names = "default";
83+
};
84+
85+
&rtc {
86+
status = "okay";
87+
};
88+
89+
&ieee802154 {
90+
status = "okay";
91+
};
92+
93+
&ieee802154g {
94+
status = "okay";
95+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
identifier: beagleplay/cc1352p7
2+
name: BeaglePlay CC1352P7
3+
type: mcu
4+
arch: arm
5+
ram: 144
6+
flash: 704
7+
toolchain:
8+
- zephyr
9+
- gnuarmemb
10+
- xtools
11+
supported:
12+
- gpio
13+
- uart
14+
- hwinfo
15+
vendor: beagle
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#
2+
# Copyright (c) 2022 Jason Kridner, BeagleBoard.org Foundation
3+
#
4+
# SPDX-License-Identifier: Apache-2.0
5+
#
6+
7+
CONFIG_GPIO=y
8+
9+
CONFIG_BUILD_OUTPUT_HEX=y
10+
# Custom callback for the antenna switch configuration
11+
CONFIG_CC13X2_CC26X2_HAS_CUSTOM_RF_HWATTRS=y
12+
CONFIG_CC13X2_CC26X2_BOOTLOADER_ENABLE=y
13+
CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_ENABLE=y
14+
CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_PIN=15
15+
16+
CONFIG_ARM_MPU=y
17+
CONFIG_HW_STACK_PROTECTION=y
18+
19+
# Adjust for oscillator capacitors
20+
CONFIG_CC13X2_CC26X2_XOSC_CAPARRAY_DELTA=0x02

boards/beagle/beagleplay/board.cmake

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2020 Erik Larson
2+
# Copyright (c) 2023 Jason Kridner, BeagleBoard.org Foundation
3+
# Copyright (c) 2024 Ayush Singh, BeagleBoard.org Foundation
4+
#
5+
# SPDX-License-Identifier: Apache-2.0
6+
7+
# Download cc1352-flasher (https://pypi.org/project/cc1352-flasher/) using the following command:
8+
# pip3 install cc1352-flasher
9+
# Be sure to disable the bcfserial driver because it will capture /dev/ttyS4
10+
11+
if(CONFIG_SOC_CC1352P7)
12+
find_program(CC1352_FLASHER NAMES cc1352_flasher)
13+
board_set_flasher_ifnset(misc-flasher)
14+
board_finalize_runner_args(misc-flasher ${CC1352_FLASHER} --play)
15+
endif()

boards/beagle/beagleplay/board.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: beagleplay
3+
vendor: beagle
4+
socs:
5+
- name: cc1352p7

0 commit comments

Comments
 (0)