Initial commit for hci_uart

This commit is contained in:
2025-02-13 16:23:03 +01:00
commit 59248c1b98
38 changed files with 1238 additions and 0 deletions

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: Apache-2.0 */
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <1000000>;
hw-flow-control;
status = "okay";
};

8
boards/bbc_microbit.conf Normal file
View File

@@ -0,0 +1,8 @@
CONFIG_MAIN_STACK_SIZE=512
CONFIG_IDLE_STACK_SIZE=256
CONFIG_ISR_STACK_SIZE=512
CONFIG_BT_MAX_CONN=10
# Revert values set in prj.conf, set them to their Kconfig default value
CONFIG_BT_BUF_CMD_TX_SIZE=65
CONFIG_BT_BUF_ACL_RX_SIZE=69
CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=43

View File

@@ -0,0 +1,4 @@
CONFIG_CONSOLE=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_BT_MAX_CONN=9

View File

@@ -0,0 +1,34 @@
/*
* Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
chosen {
zephyr,bt-c2h-uart = &uart1;
};
};
&pinctrl {
uart1_default: uart1_default {
group1 {
pinmux = <UART1_TX_GPIO5>,
<UART1_RX_GPIO18>,
<UART1_RTS_GPIO19>;
};
group2 {
pinmux = <UART1_CTS_GPIO23>;
bias-pull-up;
};
};
};
&uart1 {
status = "okay";
current-speed = <921600>;
pinctrl-0 = <&uart1_default>;
pinctrl-names = "default";
};

View File

@@ -0,0 +1,8 @@
CONFIG_MAIN_STACK_SIZE=512
CONFIG_BT_MAX_CONN=10
CONFIG_IDLE_STACK_SIZE=256
CONFIG_ISR_STACK_SIZE=512
# Revert values set in prj.conf, set them to their Kconfig default value
CONFIG_BT_BUF_CMD_TX_SIZE=65
CONFIG_BT_BUF_ACL_RX_SIZE=69
CONFIG_BT_BUF_EVT_DISCARDABLE_SIZE=43

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: Apache-2.0 */
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};

View File

@@ -0,0 +1 @@
CONFIG_MAIN_STACK_SIZE=512

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: Apache-2.0 */
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};

View File

@@ -0,0 +1 @@
CONFIG_MAIN_STACK_SIZE=512

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: Apache-2.0 */
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};

View File

@@ -0,0 +1,12 @@
/*
* Copyright (c) 2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};

View File

@@ -0,0 +1,33 @@
/*
* Copyright (c) 2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};
&radio {
status = "okay";
/* This is an example number of antennas that may be available
* on antenna matrix board.
*/
dfe-antenna-num = <10>;
/* This is an example switch pattern that will be used to set an
* antenna for Tx PDU (period before start of Tx CTE).
*/
dfe-pdu-antenna = <0x0>;
/* These are example GPIO pin numbers that are provided to
* Radio peripheral. The pins will be acquired by Radio to
* drive antenna switching when AoD is enabled.
*/
dfegpio0-gpios = <&gpio0 3 0>;
dfegpio1-gpios = <&gpio0 4 0>;
dfegpio2-gpios = <&gpio0 28 0>;
dfegpio3-gpios = <&gpio0 29 0>;
};

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: Apache-2.0 */
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};

View File

@@ -0,0 +1,4 @@
CONFIG_USB_DEVICE_STACK=y
CONFIG_USB_DEVICE_PRODUCT="Zephyr HCI UART sample"
CONFIG_USB_CDC_ACM=y
CONFIG_USB_DEVICE_INITIALIZE_AT_BOOT=n

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: Apache-2.0 */
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: Apache-2.0 */
&uart0 {
compatible = "nordic,nrf-uart";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: Apache-2.0 */
&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: Apache-2.0 */
&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};

View File

@@ -0,0 +1,33 @@
/*
* Copyright (c) 2022 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};
&radio {
status = "okay";
/* This is an example number of antennas that may be available
* on antenna matrix board.
*/
dfe-antenna-num = <10>;
/* This is an example switch pattern that will be used to set an
* antenna for Tx PDU (period before start of Tx CTE).
*/
dfe-pdu-antenna = <0x0>;
/* These are example GPIO pin numbers that are provided to
* Radio peripheral. The pins will be acquired by Radio to
* drive antenna switching when AoD is enabled.
*/
dfegpio0-gpios = <&gpio0 4 0>;
dfegpio1-gpios = <&gpio0 5 0>;
dfegpio2-gpios = <&gpio0 6 0>;
dfegpio3-gpios = <&gpio0 7 0>;
};

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: Apache-2.0 */
&uart0 {
compatible = "nordic,nrf-uarte";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};

View File

@@ -0,0 +1,12 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
&uart20 {
compatible = "nordic,nrf-uarte";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};

View File

@@ -0,0 +1,33 @@
/*
* Copyright (c) 2024 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
&uart20 {
compatible = "nordic,nrf-uarte";
current-speed = <1000000>;
status = "okay";
hw-flow-control;
};
&radio {
status = "okay";
/* This is an example number of antennas that may be available
* on antenna matrix board.
*/
dfe-antenna-num = <10>;
/* This is an example switch pattern that will be used to set an
* antenna for Tx PDU (period before start of Tx CTE).
*/
dfe-pdu-antenna = <0x0>;
/* These are example GPIO pin numbers that are provided to
* Radio peripheral. The pins will be acquired by Radio to
* drive antenna switching when AoD is enabled.
*/
dfegpio0-gpios = <&gpio1 4 0>;
dfegpio1-gpios = <&gpio1 5 0>;
dfegpio2-gpios = <&gpio1 6 0>;
dfegpio3-gpios = <&gpio1 7 0>;
};

View File

@@ -0,0 +1,4 @@
# Override prj.conf defaults
CONFIG_CONSOLE=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_UART_CONSOLE=y

View File

@@ -0,0 +1,20 @@
/*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <nrf52840/nrf9160dk_nrf52840_reset_on_if5.dtsi>
#include <nrf52840/nrf9160dk_uart1_on_if0_3.dtsi>
&uart1 {
current-speed = <1000000>;
hw-flow-control;
};
/ {
chosen {
zephyr,bt-c2h-uart=&uart1;
};
};

View File

@@ -0,0 +1,8 @@
/*
* Copyright (c) 2021 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: Apache-2.0
*/
/* Use the reset line that is available starting from v0.14.0 of the DK. */
#include <nrf52840/nrf9160dk_nrf52840_reset_on_if9.dtsi>

View File

@@ -0,0 +1,7 @@
#
# Copyright 2020, NXP
#
# SPDX-License-Identifier: Apache-2.0
#
CONFIG_UART_INTERRUPT_DRIVEN=y

View File

@@ -0,0 +1,28 @@
/*
* Copyright 2019 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
chosen {
zephyr,bt-c2h-uart = &lpuart0;
};
};
&lptmr1 {
interrupt-parent = <&intmux0_ch2>;
};
&intmux0_ch2 {
status = "okay";
};
&intmux0_ch3 {
status = "okay";
};
&generic_fsk {
interrupt-parent = <&intmux0_ch3>;
status = "okay";
};

View File

@@ -0,0 +1,4 @@
CONFIG_CONSOLE=y
CONFIG_STDOUT_CONSOLE=y
CONFIG_UART_CONSOLE=y
CONFIG_BT_MAX_CONN=9

View File

@@ -0,0 +1,34 @@
/*
* Copyright (c) 2021 Espressif Systems (Shanghai) Co., Ltd.
*
* SPDX-License-Identifier: Apache-2.0
*/
/ {
chosen {
zephyr,bt-c2h-uart = &uart1;
};
};
&pinctrl {
uart1_default: uart1_default {
group1 {
pinmux = <UART1_TX_GPIO5>,
<UART1_RX_GPIO18>,
<UART1_RTS_GPIO19>;
};
group2 {
pinmux = <UART1_CTS_GPIO23>;
bias-pull-up;
};
};
};
&uart1 {
status = "okay";
current-speed = <921600>;
pinctrl-0 = <&uart1_default>;
pinctrl-names = "default";
};