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

&uart1 {
	status = "okay";
	pinctrl-0 = <&uart1_default_alt>;
	pinctrl-1 = <&uart1_sleep_alt>;
	pinctrl-names = "default", "sleep";
};

&uart0 {
	pinctrl-0 = <&uart0_default_alt>;
	pinctrl-1 = <&uart0_sleep_alt>;
	pinctrl-names = "default", "sleep";
};

&zephyr_udc0 {
	cdc_acm_uart0: cdc_acm_uart0 {
		compatible = "zephyr,cdc-acm-uart";
	};
};

&pinctrl {
	uart1_default_alt: uart1_default_alt {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 6)>,
				<NRF_PSEL(UART_RX, 0, 8)>,
				<NRF_PSEL(UART_RTS, 0, 5)>,
				<NRF_PSEL(UART_CTS, 0, 7)>;
		};
	};

	uart1_sleep_alt: uart1_sleep_alt {
		group1 {
			psels = <NRF_PSEL(UART_TX, 0, 6)>,
				<NRF_PSEL(UART_RX, 0, 8)>,
				<NRF_PSEL(UART_RTS, 0, 5)>,
				<NRF_PSEL(UART_CTS, 0, 7)>;
			low-power-enable;
		};
	};

	uart0_default_alt: uart0_default_alt {
		group1 {
			psels = <NRF_PSEL(UART_RX, 1, 1)>,
				<NRF_PSEL(UART_TX, 1, 2)>;
		};
	};

	uart0_sleep_alt: uart0_sleep_alt {
		group1 {
			psels = <NRF_PSEL(UART_RX, 1, 1)>,
				<NRF_PSEL(UART_TX, 1, 2)>;
			low-power-enable;
		};
	};

};

/ {
	chosen {
		ncs,zigbee-uart = &uart1;
	};
};