st,stm32-pinctrl

Vendor: STMicroelectronics

Description

STM32 Pin controller Node
Based on pincfg-node.yaml binding.

Note: `bias-disable` and `drive-push-pull` are default pin configurations.
       They will be applied in case no `bias-foo` or `driver-bar` properties
       are set.

Properties

Top level properties

These property descriptions apply to “st,stm32-pinctrl” nodes themselves. This page also describes child node properties in the following sections.

Properties not inherited from the base binding file.

(None)

Child node properties

Name

Type

Details

pinmux

int

Reused from https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml
Integer array, represents gpio pin number and mux setting.
These defines are calculated as: ((port * 16 + line) << 8) | function
With:
- port: The gpio port index (PA = 0, PB = 1, ..., PK = 11)
- line: The line offset within the port (PA0 = 0, PA1 = 1, ..., PA15 = 15)
- function: The function number, can be:
* 0 : Alternate Function 0
* 1 : Alternate Function 1
* 2 : Alternate Function 2
* ...
* 15 : Alternate Function 15
* 16 : Analog
To simplify the usage, macro is available to generate "pinmux" field.
This macro is available here:
  -include/dt-bindings/pinctrl/stm32-pinctrl-common.h
Some examples of macro usage:
   GPIO A9 set as alernate function 2
... {
         pinmux = <STM32_PINMUX('A', 9, AF2)>;
};
   GPIO A9 set as analog
... {
         pinmux = <STM32_PINMUX('A', 9, ANALOG)>;
};

This property is required.

slew-rate

string

Pin speed. Default to low-speed. For few pins (PA11 and PB3 depending on SoCs)hardware reset value could differ (very-high-speed). Carefully check reference manual for these pins.

Default value: low-speed

Legal values: 'low-speed', 'medium-speed', 'high-speed', 'very-high-speed'

bias-disable

boolean

disable any pin bias

bias-pull-up

boolean

enable pull-up resistor

bias-pull-down

boolean

enable pull-down resistor

drive-push-pull

boolean

drive actively high and low

drive-open-drain

boolean

drive with open drain (hardware AND)