Commit 6fee105b authored by Alberto Escolar Piedras's avatar Alberto Escolar Piedras Committed by Carles Cufi
Browse files

boards nrf52_bsim: Provide default UART configuration



Provide a good enough UART configuration, but do not
select it as backend by default, let apps do that.

The UART and its driver are very heavy compared to
other backends it may replace, so let's avoid
enabling it by default.

Signed-off-by: default avatarAlberto Escolar Piedras <alberto.escolar.piedras@nordicsemi.no>
parent 0bdf9439
Loading
Loading
Loading
Loading
+1 −4
Original line number Diff line number Diff line
@@ -87,10 +87,7 @@ endif # LOG
if CONSOLE

config POSIX_ARCH_CONSOLE
	default y if !SERIAL

config UART_CONSOLE
	default y if SERIAL
	default y

endif # CONSOLE

+25 −0
Original line number Diff line number Diff line
@@ -9,6 +9,8 @@

#include <mem.h>
#include <arm/nordic/nrf52833.dtsi>
/* We resuse the pinctrl definitions directly from the real board : */
#include <../boards/arm/nrf52833dk_nrf52833/nrf52833dk_nrf52833-pinctrl.dtsi>

/ {
	model = "nrf52 bsim";
@@ -34,6 +36,10 @@
	chosen {
		zephyr,ieee802154 = &ieee802154;
		zephyr,flash = &flash0;
		/* UART used by the BT controller UART HCI driver by default: */
		zephyr,bt-c2h-uart = &uart1;
		/* UART used by the BT host UART HCI driver by default: */
		zephyr,bt-uart = &uart1;
	};

	soc {
@@ -94,3 +100,22 @@
		};
	};
};

&uart0 {
	compatible = "nordic,nrf-uarte";
	status = "okay";
	current-speed = <115200>;
	pinctrl-0 = <&uart0_default>;
	pinctrl-1 = <&uart0_sleep>;
	pinctrl-names = "default", "sleep";
};

&uart1 {
	compatible = "nordic,nrf-uarte";
	status = "okay";
	current-speed = <115200>;
	pinctrl-0 = <&uart1_default>;
	pinctrl-1 = <&uart1_sleep>;
	pinctrl-names = "default", "sleep";
	hw-flow-control;
};