Skip to content

Commit 37c855f

Browse files
gmarullnashif
authored andcommitted
boards: gd32f450i_eval: use pinctrl
Enable usage of the pinctrl driver. Signed-off-by: Gerard Marull-Paretas <[email protected]>
1 parent 285f558 commit 37c855f

File tree

4 files changed

+17
-32
lines changed

4 files changed

+17
-32
lines changed

boards/arm/gd32f450i_eval/CMakeLists.txt

Lines changed: 0 additions & 5 deletions
This file was deleted.

boards/arm/gd32f450i_eval/board.c

Lines changed: 0 additions & 27 deletions
This file was deleted.
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2021, Teslabs Engineering S.L.
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <dt-bindings/pinctrl/gd32f450i(g-i-k)xx-pinctrl.h>
7+
8+
&pinctrl {
9+
usart0_default: usart0_default {
10+
group1 {
11+
pinmux = <USART0_TX_PA9>, <USART0_RX_PA10>;
12+
};
13+
};
14+
};

boards/arm/gd32f450i_eval/gd32f450i_eval.dts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/dts-v1/;
77

88
#include <gigadevice/gd32f4xx/gd32f450ik.dtsi>
9+
#include "gd32f450i_eval-pinctrl.dtsi"
910

1011
/ {
1112
model = "GigaDevice GD32F450I-EVAL";
@@ -22,4 +23,6 @@
2223
&usart0 {
2324
status = "okay";
2425
current-speed = <115200>;
26+
pinctrl-0 = <&usart0_default>;
27+
pinctrl-names = "default";
2528
};

0 commit comments

Comments
 (0)