Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions boards/beagle/beagleplay/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_library()

if(CONFIG_SOC_CC1352P7)
zephyr_library_sources(../beagleconnect_freedom/board_antenna.c)
zephyr_library_compile_definitions("DeviceFamily_CC13X2X7")
endif()
18 changes: 18 additions & 0 deletions boards/beagle/beagleplay/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# BeaglePlay CC1352 board configuration

# Copyright (c) 2020 Erik Larson
# Copyright (c) 2021-2022 Jason Kridner, BeagleBoard.org Foundation
# Copyright (c) 2024 Ayush Singh <[email protected]>
# SPDX-License-Identifier: Apache-2.0

if BOARD_BEAGLEPLAY_CC1352P7

config BOARD_ANTENNA_INIT_PRIO
int "Board antenna switch initialization priority"
default 70
help
Set the priority for board init, must be greater than
KERNEL_INIT_PRIORITY_DEVICE but smaller than
IEEE802154_CC13XX_CC26XX_SUB_GHZ_INIT_PRIO.

endif # BOARD_BEAGLEPLAY_CC1352
11 changes: 11 additions & 0 deletions boards/beagle/beagleplay/Kconfig.beagleplay
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# BeaglePlay board configuration

# Copyright (c) 2020 Erik Larson
# Copyright (c) 2021-2022 Jason Kridner, BeagleBoard.org Foundation
# Copyright (c) 2024 Ayush Singh, BeagleBoard.org Foundation
# SPDX-License-Identifier: Apache-2.0

config BOARD_BEAGLEPLAY
select SOC_CC1352P7 if BOARD_BEAGLEPLAY_CC1352P7
help
BeagleBoard.org BeaglePlay CC1352P7
38 changes: 38 additions & 0 deletions boards/beagle/beagleplay/beagleplay-cc1352p7-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* Copyright (c) 2022 Vaishnav Achath
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/dt-bindings/pinctrl/cc13xx_cc26xx-pinctrl.h>

&pinctrl {
/* UART0 */
uart0_tx_default: uart0_tx_default {
pinmux = <13 IOC_PORT_MCU_UART0_TX>;
bias-disable;
};
uart0_rx_default: uart0_rx_default {
pinmux = <12 IOC_PORT_MCU_UART0_RX>;
bias-disable;
input-enable;
};

/* Antenna pinmux states */
board_ant_tx_pa_off: board_ant_tx_pa_off {
pinmux = <29 IOC_PORT_GPIO>;
bias-disable;
};
board_ant_tx_pa_on: board_ant_tx_pa_on {
pinmux = <29 IOC_PORT_RFC_GPO3>;
bias-disable;
};
board_ant_subg_off: board_ant_subg_off {
pinmux = <30 IOC_PORT_GPIO>;
bias-disable;
};
board_ant_subg_on: board_ant_subg_on {
pinmux = <30 IOC_PORT_RFC_GPO0>;
bias-disable;
};
};
95 changes: 95 additions & 0 deletions boards/beagle/beagleplay/beagleplay_cc1352p7.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
/*
* Copyright (c) 2022 Jason Kridner, BeagleBoard.org Foundation
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <ti/cc1352r7.dtsi>
#include "beagleplay-cc1352p7-pinctrl.dtsi"

/ {
model = "beagleplay";
compatible = "beagle,beagleplay-cc1352p7";

aliases {
led0 = &led0;
led1 = &led1;
};

chosen {
zephyr,sram = &sram0;
zephyr,console = &uart0;
zephyr,shell-uart = &uart0;
zephyr,flash = &flash0;
zephyr,ieee802154 = &ieee802154g;
};

leds: leds {
compatible = "gpio-leds";
led0: led_0 {
gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
label = "LED1";
};

led1: led_1 {
gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
label = "LED2";
};
};

/**
* The BeaglePlay cc1352 has an on-board antenna switch (SKY13317-373LF) used to
* select the appropriate RF signal port based on the currently-used PHY.
*
* Truth table:
*
* Path DIO29 DIO30
* =========== ===== =====
* Off 0 0
* Sub-1 GHz 0 1 // DIO30 mux to IOC_PORT_RFC_GPO0 for auto
* 20 dBm TX 1 0 // DIO29 mux to IOC_PORT_RFC_GPO3 for auto
*/
antenna_mux0: antenna_mux0 {
compatible = "skyworks,sky13317";
status = "okay";
gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>, <&gpio0 30 GPIO_ACTIVE_HIGH>;
pinctrl-0 = <&board_ant_tx_pa_off &board_ant_subg_off>;
pinctrl-1 = <&board_ant_tx_pa_off &board_ant_subg_on>;
pinctrl-2 = <&board_ant_tx_pa_on &board_ant_subg_on>;
pinctrl-names = "default", "ant_subg", "ant_subg_pa";
};
};

&cpu0 {
clock-frequency = <48000000>;
cpu-power-states = <&idle &standby>;
};

&trng {
status = "okay";
};

&gpio0 {
status = "okay";
};

&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&uart0_rx_default &uart0_tx_default>;
pinctrl-names = "default";
};

&rtc {
status = "okay";
};

&ieee802154 {
status = "okay";
};

&ieee802154g {
status = "okay";
};
15 changes: 15 additions & 0 deletions boards/beagle/beagleplay/beagleplay_cc1352p7.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
identifier: beagleplay/cc1352p7
name: BeaglePlay CC1352P7
type: mcu
arch: arm
ram: 144
flash: 704
toolchain:
- zephyr
- gnuarmemb
- xtools
supported:
- gpio
- uart
- hwinfo
vendor: beagle
20 changes: 20 additions & 0 deletions boards/beagle/beagleplay/beagleplay_cc1352p7_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#
# Copyright (c) 2022 Jason Kridner, BeagleBoard.org Foundation
#
# SPDX-License-Identifier: Apache-2.0
#

CONFIG_GPIO=y

CONFIG_BUILD_OUTPUT_HEX=y
# Custom callback for the antenna switch configuration
CONFIG_CC13X2_CC26X2_HAS_CUSTOM_RF_HWATTRS=y
CONFIG_CC13X2_CC26X2_BOOTLOADER_ENABLE=y
CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_ENABLE=y
CONFIG_CC13X2_CC26X2_BOOTLOADER_BACKDOOR_PIN=15

CONFIG_ARM_MPU=y
CONFIG_HW_STACK_PROTECTION=y

# Adjust for oscillator capacitors
CONFIG_CC13X2_CC26X2_XOSC_CAPARRAY_DELTA=0x02
15 changes: 15 additions & 0 deletions boards/beagle/beagleplay/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2020 Erik Larson
# Copyright (c) 2023 Jason Kridner, BeagleBoard.org Foundation
# Copyright (c) 2024 Ayush Singh, BeagleBoard.org Foundation
#
# SPDX-License-Identifier: Apache-2.0

# Download cc1352-flasher (https://pypi.org/project/cc1352-flasher/) using the following command:
# pip3 install cc1352-flasher
# Be sure to disable the bcfserial driver because it will capture /dev/ttyS4

if(CONFIG_SOC_CC1352P7)
find_program(CC1352_FLASHER NAMES cc1352_flasher)
board_set_flasher_ifnset(misc-flasher)
board_finalize_runner_args(misc-flasher ${CC1352_FLASHER} --play)
endif()
5 changes: 5 additions & 0 deletions boards/beagle/beagleplay/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: beagleplay
vendor: beagle
socs:
- name: cc1352p7
Loading
Loading