1/*
2 * Copyright (c) 2024  Arrow Electronics.
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6 #include <zephyr/dt-bindings/gpio/gpio.h>
7 #include <zephyr/dt-bindings/gpio/st-morpho-header.h>
8
9/ {
10	 st_morpho_header: st-morpho-header {
11		 compatible = "st-morpho-header";
12		 #gpio-cells = <2>;
13		 gpio-map-mask = <ST_MORPHO_PIN_MASK 0x0>;
14		 gpio-map-pass-thru = <0x0 GPIO_DT_FLAGS_MASK>;
15		 gpio-map = <ST_MORPHO_L_1 0 &gpioc 10 0>,
16				<ST_MORPHO_L_2 0 &gpioc 11 0>,
17				<ST_MORPHO_L_3 0 &gpioc 12 0>,
18				<ST_MORPHO_L_4 0 &gpiod 2 0>,
19				/* By default, PA13 and PA14 are used as SWD signals
20				 * (SB40=ON, SB41=ON)
21				 */
22				<ST_MORPHO_L_13 0 &gpioa 13 0>,
23				<ST_MORPHO_L_15 0 &gpioa 14 0>,
24				<ST_MORPHO_L_17 0 &gpioa 15 0>,
25				<ST_MORPHO_L_23 0 &gpioc 13 0>,
26				<ST_MORPHO_L_25 0 &gpioc 14 0>,
27				<ST_MORPHO_L_27 0 &gpioc 15 0>,
28				<ST_MORPHO_L_28 0 &gpioa 0 0>,
29				/* STM32H503xx has no pin PF0 as described in manual (UM3121) */
30				<ST_MORPHO_L_30 0 &gpioa 1 0>,
31				/* STM32H503xx has no pin PF1 as described in manual (UM3121) */
32				<ST_MORPHO_L_32 0 &gpioa 2 0>,
33				<ST_MORPHO_L_34 0 &gpiob 0 0>,
34				<ST_MORPHO_L_35 0 &gpioc 2 0>,
35				<ST_MORPHO_L_36 0 &gpioc 1 0>,
36				<ST_MORPHO_L_37 0 &gpioc 3 0>,
37				<ST_MORPHO_L_38 0 &gpioc 0 0>,
38
39				<ST_MORPHO_R_2 0 &gpioc 8 0>,
40				<ST_MORPHO_R_3 0 &gpiob 6 0>,
41				<ST_MORPHO_R_5 0 &gpiob 7 0>,
42				<ST_MORPHO_R_6 0 &gpioc 5 0>,
43				<ST_MORPHO_R_11 0 &gpioa 5 0>,
44				/* By default, connected to USB connector (SB13=ON, SB17=ON) */
45				<ST_MORPHO_R_12 0 &gpioa 12 0>,
46				<ST_MORPHO_R_13 0 &gpioa 6 0>,
47				/* By default, connected to USB connector (SB13=ON, SB17=ON) */
48				<ST_MORPHO_R_14 0 &gpioa 11 0>,
49				<ST_MORPHO_R_15 0 &gpioa 7 0>,
50				<ST_MORPHO_R_16 0 &gpiob 12 0>,
51				<ST_MORPHO_R_17 0 &gpioc 9 0>,
52				<ST_MORPHO_R_19 0 &gpioc 6 0>,
53				<ST_MORPHO_R_21 0 &gpioc 7 0>,
54				<ST_MORPHO_R_22 0 &gpiob 2 0>,
55				<ST_MORPHO_R_23 0 &gpioa 8 0>,
56				<ST_MORPHO_R_24 0 &gpiob 1 0>,
57				<ST_MORPHO_R_25 0 &gpiob 10 0>,
58				<ST_MORPHO_R_26 0 &gpiob 15 0>,
59				<ST_MORPHO_R_27 0 &gpiob 4 0>,
60				<ST_MORPHO_R_28 0 &gpiob 14 0>,
61				<ST_MORPHO_R_29 0 &gpiob 5 0>,
62				<ST_MORPHO_R_30 0 &gpiob 13 0>,
63				<ST_MORPHO_R_31 0 &gpiob 3 0>,
64				<ST_MORPHO_R_33 0 &gpioa 10 0>,
65				<ST_MORPHO_R_34 0 &gpioc 4 0>,
66				<ST_MORPHO_R_35 0 &gpiob 14 0>,
67				<ST_MORPHO_R_36 0 &gpiob 8 0>,
68				<ST_MORPHO_R_37 0 &gpiob 15 0>;
69	 };
70};
71