diff --git a/boards/wch/ch32v003f4p6_dev_board/CMakeLists.txt b/boards/wch/ch32v003f4p6_dev_board/CMakeLists.txt deleted file mode 100644 index a1268429b152..000000000000 --- a/boards/wch/ch32v003f4p6_dev_board/CMakeLists.txt +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright (c) 2025 Andrei-Edward Popa . -# SPDX-License-Identifier: Apache-2.0 - -zephyr_library() -zephyr_library_sources(board.c) diff --git a/boards/wch/ch32v003f4p6_dev_board/Kconfig b/boards/wch/ch32v003f4p6_dev_board/Kconfig deleted file mode 100644 index 8e159b39cd22..000000000000 --- a/boards/wch/ch32v003f4p6_dev_board/Kconfig +++ /dev/null @@ -1,5 +0,0 @@ -# Copyright (c) 2025 Andrei-Edward Popa -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_CH32V003F4P6_DEV_BOARD - select BOARD_LATE_INIT_HOOK diff --git a/boards/wch/ch32v003f4p6_dev_board/board.c b/boards/wch/ch32v003f4p6_dev_board/board.c deleted file mode 100644 index ff48852dc44a..000000000000 --- a/boards/wch/ch32v003f4p6_dev_board/board.c +++ /dev/null @@ -1,35 +0,0 @@ -/* - * Copyright (c) 2025 Andrei-Edward Popa - * - * SPDX-License-Identifier: Apache-2.0 - */ - -#include -#include - -#include - -#define AFIO_SWCFG_MASK 0x07000000 -#define AFIO_SWCFG_SWD_OFF 0x04000000 - -void board_late_init_hook(void) -{ -#if DT_NODE_HAS_STATUS_OKAY(DT_NODELABEL(gpiod)) - const struct device *gpiod = DEVICE_DT_GET(DT_NODELABEL(gpiod)); - uint32_t pcfr1; - - /* - * PD1 is wired to led and to SWDIO pin. - * If PD1 is not put to ground, change the function to GPIO to use - * the led as a user led. - * If PD1 is put to ground, let the pin as SWDIO pin (default) to be - * able to program the board. - */ - if (gpio_pin_get(gpiod, 1) == 1) { - RCC->APB2PCENR |= RCC_AFIOEN; - pcfr1 = AFIO->PCFR1; - pcfr1 = (pcfr1 & ~AFIO_SWCFG_MASK) | (AFIO_SWCFG_SWD_OFF & AFIO_SWCFG_MASK); - AFIO->PCFR1 = pcfr1; - } -#endif -}