/*
 * Copyright (c) 2022 Nordic Semiconductor ASA
 *
 * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
 */

#include <nrf9160dk_nrf52840_reset_on_if5.dtsi>

/ {
	chosen {
		zephyr,bt-uart=&lpuart;
	};
};

&gpiote {
	interrupts = <49 NRF_DEFAULT_IRQ_PRIORITY>;
};

&uart2 {
	current-speed = <1000000>;
	status = "okay";
	/delete-property/ rts-pin;
	/delete-property/ cts-pin;
	/delete-property/ hw-flow-control;

	pinctrl-0 = <&uart2_default_alt>;
	pinctrl-1 = <&uart2_sleep_alt>;
	lpuart: nrf-sw-lpuart {
		compatible = "nordic,nrf-sw-lpuart";
		status = "okay";
		req-pin = <21>; /* <&interface_to_nrf52840 3 0>; */
		rdy-pin = <19>; /* <&interface_to_nrf52840 2 0>; */
	};
};
&uart1 {
	status = "disabled";
};

&pinctrl {
	uart2_default_alt: uart2_default_alt {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 18)>,
				<NRF_PSEL(UART_RX, 0, 17)>;
		};
	};

	uart2_sleep_alt: uart2_sleep_alt {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 18)>,
				<NRF_PSEL(UART_RX, 0, 17)>;
			low-power-enable;
		};
	};
};
