1 * STM32 GPIO and Pin Mux/Config controller
3 STMicroelectronics's STM32 MCUs intregrate a GPIO and Pin mux/config hardware
4 controller. It controls the input/output settings on the available pins and
5 also provides ability to multiplex and configure the output of various on-chip
6 controllers onto these pads.
10 - compatible: value should be one of the following:
11 (a) "st,stm32f429-pinctrl"
12 - #address-cells: The value of this property must be 1
13 - #size-cells : The value of this property must be 1
14 - ranges : defines mapping between pin controller node (parent) to
15 gpio-bank node (children).
16 - pins-are-numbered: Specify the subnodes are using numbered pinmux to
19 GPIO controller/bank node:
21 - gpio-controller : Indicates this device is a GPIO controller
22 - #gpio-cells : Should be two.
23 The first cell is the pin number
24 The second one is the polarity:
27 - reg : The gpio address range, relative to the pinctrl range
28 - clocks : clock that drives this bank
29 - st,bank-name : Should be a name string for this bank as specified in
33 - reset: : Reference to the reset controller
36 #include <dt-bindings/pinctrl/stm32f429-pinfunc.h>
42 compatible = "st,stm32f429-pinctrl";
43 ranges = <0 0x40020000 0x3000>;
46 gpioa: gpio@40020000 {
50 resets = <&reset_ahb1 0>;
51 st,bank-name = "GPIOA";
54 pin-functions nodes follow...
57 Contents of function subnode node:
58 ----------------------------------
60 A pinctrl node should contain at least one subnode representing the
61 pinctrl group available on the machine. Each subnode will list the
62 pins it needs, and how they should be configured, with regard to muxer
63 configuration, pullups, drive, output high/low and output speed.
66 pinmux = <PIN_NUMBER_PINMUX>;
71 - pinmux: integer array, represents gpio pin number and mux setting.
72 Supported pin number and mux varies for different SoCs, and are defined in
73 dt-bindings/pinctrl/<soc>-pinfunc.h directly.
74 These defines are calculated as:
75 ((port * 16 + line) << 8) | function
77 - port: The gpio port index (PA = 0, PB = 1, ..., PK = 11)
78 - line: The line offset within the port (PA0 = 0, PA1 = 1, ..., PA15 = 15)
79 - function: The function number, can be:
81 * 1 : Alternate Function 0
82 * 2 : Alternate Function 1
83 * 3 : Alternate Function 2
85 * 16 : Alternate Function 15
89 - GENERIC_PINCONFIG: is the generic pinconfig options to use.
90 Available options are:
98 - slew-rate = <x>, with x being:
108 usart1_pins_a: usart1@0 {
110 pinmux = <STM32F429_PA9_FUNC_USART1_TX>;
116 pinmux = <STM32F429_PA10_FUNC_USART1_RX>;
123 pinctrl-0 = <&usart1_pins_a>;
124 pinctrl-names = "default";