diff --git a/boards/arm/qomu/CMakeLists.txt b/boards/arm/qomu/CMakeLists.txt deleted file mode 100644 index a17def9a23147a0..000000000000000 --- a/boards/arm/qomu/CMakeLists.txt +++ /dev/null @@ -1,4 +0,0 @@ -# Copyright (c) 2022 Antmicro -# SPDX-License-Identifier: Apache-2.0 - -zephyr_library_sources(board.c) diff --git a/boards/arm/qomu/board.c b/boards/arm/qomu/board.c deleted file mode 100644 index d6752dff91338cc..000000000000000 --- a/boards/arm/qomu/board.c +++ /dev/null @@ -1,28 +0,0 @@ -/* - * Copyright (c) 2022 Antmicro - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include -#include "board.h" - -static int qomu_board_init(void) -{ - - /* IO MUX setup for UART */ - eos_s3_io_mux(UART_TX_PAD, UART_TX_PAD_CFG); - eos_s3_io_mux(UART_RX_PAD, UART_RX_PAD_CFG); - - IO_MUX->UART_rxd_SEL = UART_RX_SEL; - - /* IO MUX setup for USB */ - eos_s3_io_mux(USB_PU_CTRL_PAD, USB_PAD_CFG); - eos_s3_io_mux(USB_DN_PAD, USB_PAD_CFG); - eos_s3_io_mux(USB_DP_PAD, USB_PAD_CFG); - - return 0; -} - -SYS_INIT(qomu_board_init, PRE_KERNEL_1, CONFIG_BOARD_INIT_PRIORITY); diff --git a/boards/arm/qomu/board.h b/boards/arm/qomu/board.h deleted file mode 100644 index 9bcd5820b10f237..000000000000000 --- a/boards/arm/qomu/board.h +++ /dev/null @@ -1,25 +0,0 @@ -/* - * Copyright (c) 2022 Antmicro - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#ifndef __INC_BOARD_H -#define __INC_BOARD_H - -#include - -#define USB_PU_CTRL_PAD 23 -#define USB_DN_PAD 28 -#define USB_DP_PAD 31 -#define USB_PAD_CFG (PAD_E_4MA | PAD_P_Z | PAD_OEN_NORMAL | PAD_SMT_DISABLE \ - | PAD_REN_DISABLE | PAD_SR_SLOW | PAD_CTRL_SEL_FPGA) - -#define UART_TX_PAD 44 -#define UART_TX_PAD_CFG UART_TXD_PAD44 -#define UART_RX_PAD 45 -#define UART_RX_PAD_CFG UART_RXD_PAD45 - -#define UART_RX_SEL UART_RXD_SEL_PAD45 - -#endif /* __INC_BOARD_H */ diff --git a/boards/arm/qomu/qomu.dts b/boards/arm/qomu/qomu.dts index c58825a5f4f6608..33adf6dfb7f77e8 100644 --- a/boards/arm/qomu/qomu.dts +++ b/boards/arm/qomu/qomu.dts @@ -6,6 +6,7 @@ /dts-v1/; #include +#include / { model = "QuickLogic Qomu board"; @@ -56,6 +57,40 @@ }; }; +&pinctrl { + uart1_rx_default: uart1_rx_default { + pinmux = ; + input-enable; + }; + uart1_tx_default: uart1_tx_default { + pinmux = ; + output-enable; + }; + usb_pu_default: usb_pu_default { + pinmux = ; + bias-high-impedance; + control-selection = "fabric"; + output-enable; + }; + usb_dn_default: usb_dn_default { + pinmux = ; + bias-high-impedance; + control-selection = "fabric"; + output-enable; + }; + usb_dp_default: usb_dp_default { + pinmux = ; + bias-high-impedance; + control-selection = "fabric"; + output-enable; + }; +}; + &cpu0 { clock-frequency = <61440000>; }; @@ -71,4 +106,7 @@ &uart1 { status = "okay"; current-speed = <115200>; + pinctrl-0 = <&uart1_rx_default &uart1_tx_default + &usb_pu_default &usb_dn_default &usb_dp_default>; + pinctrl-names = "default"; };