From 6bcc9de7de39d985dfce42beb6e6ddb486cb3b45 Mon Sep 17 00:00:00 2001 From: Iuliana Prodan Date: Thu, 22 Jun 2023 17:11:20 +0300 Subject: [PATCH] boards: xtensa: nxp: remove uart overlay Remove uart overlay and add the node to base dts and config. Now, it can be used for multiple samples. Signed-off-by: Iuliana Prodan --- .../xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m.dts | 23 +++++++++++++ .../nxp_adsp_imx8m/nxp_adsp_imx8m_defconfig | 15 +++++++++ .../nxp_adsp_imx8m/nxp_adsp_imx8m_uart.conf | 7 ---- .../nxp_adsp_imx8m_uart.overlay | 33 ------------------- 4 files changed, 38 insertions(+), 40 deletions(-) delete mode 100644 boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_uart.conf delete mode 100644 boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_uart.overlay diff --git a/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m.dts b/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m.dts index ae1b38ba379355..bc5b663f57d454 100644 --- a/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m.dts +++ b/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m.dts @@ -7,6 +7,7 @@ /dts-v1/; #include +#include / { model = "nxp_adsp_imx8m"; @@ -14,5 +15,27 @@ chosen { zephyr,sram = &sram0; + + zephyr,console = &uart4; + zephyr,shell-uart = &uart4; + }; +}; + +&pinctrl { + /omit-if-no-ref/ uart4_default: uart4_default { + group0 { + pinmux = <&iomuxc_uart4_rxd_uart_rx_uart4_rx>, + <&iomuxc_uart4_txd_uart_tx_uart4_tx>; + bias-pull-up; + slew-rate = "slow"; + drive-strength = "x1"; + }; }; }; + +&uart4 { + status = "okay"; + current-speed = <115200>; + pinctrl-0 = <&uart4_default>; + pinctrl-names = "default"; +}; diff --git a/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_defconfig b/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_defconfig index 9779d9b3d03a13..2aa634b97afefa 100644 --- a/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_defconfig +++ b/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_defconfig @@ -22,3 +22,18 @@ CONFIG_BUILD_OUTPUT_BIN=n CONFIG_CLEANUP_INTERMEDIATE_FILES=y CONFIG_DCACHE_LINE_SIZE=128 + +# enable uart driver +CONFIG_SERIAL=y + +# clock configuration +CONFIG_CLOCK_CONTROL=y + +# console (remote proc console by default) +CONFIG_CONSOLE=y + +# uart console (overrides remote proc console) +CONFIG_UART_CONSOLE=y + +# enable pin controller +CONFIG_PINCTRL=y diff --git a/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_uart.conf b/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_uart.conf deleted file mode 100644 index e662fa1f4b7af2..00000000000000 --- a/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_uart.conf +++ /dev/null @@ -1,7 +0,0 @@ -# SPDX-License-Identifier: Apache-2.0 - -CONFIG_CLOCK_CONTROL=y -CONFIG_UART_CONSOLE=y -CONFIG_SERIAL=y -CONFIG_CONSOLE=y -CONFIG_PINCTRL=y diff --git a/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_uart.overlay b/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_uart.overlay deleted file mode 100644 index 24bf474c606976..00000000000000 --- a/boards/xtensa/nxp_adsp_imx8m/nxp_adsp_imx8m_uart.overlay +++ /dev/null @@ -1,33 +0,0 @@ -/* - * Copyright (c) 2023 NXP - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include - -/ { - chosen { - zephyr,console = &uart4; - zephyr,shell-uart = &uart4; - }; -}; - -&pinctrl { - /omit-if-no-ref/ uart4_default: uart4_default { - group0 { - pinmux = <&iomuxc_uart4_rxd_uart_rx_uart4_rx>, - <&iomuxc_uart4_txd_uart_tx_uart4_tx>; - bias-pull-up; - slew-rate = "slow"; - drive-strength = "x1"; - }; - }; -}; - -&uart4 { - status = "okay"; - current-speed = <115200>; - pinctrl-0 = <&uart4_default>; - pinctrl-names = "default"; -};