Skip to content

Commit 441112f

Browse files
it-klingerkartben
authored andcommitted
dts: stm32-pinctrl.yaml: remove calculation of pinmux
- remove calculation of pinmux value for stm32 in device tree binding documentation. - stm32-pinctrl.yaml contains wrong calculation as can be compared to #define STM32_PINMUX in stm32-pinctrl.h. - stm32f1-pinctrl.yaml also contains different wrong calculation compared to #define STM32F1_PINMUX in stm32f1-pinctrl.h. Signed-off-by: Andreas Klinger <ak@it-klinger.de>
1 parent a0303d3 commit 441112f

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

dts/bindings/pinctrl/st,stm32-pinctrl.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ child-binding:
5454
description: |
5555
Reused from
5656
https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml
57-
Integer array, represents gpio pin number and mux setting.
58-
These defines are calculated as: ((port * 16 + line) << 8) | function
57+
Integer represents gpio pin number and mux setting.
58+
Each integer encodes a port, line and alternate function.
5959
With:
6060
- port: The gpio port index (PA = 0, PB = 1, ..., PK = 11)
6161
- line: The line offset within the port (PA0 = 0, PA1 = 1, ..., PA15 = 15)
@@ -74,7 +74,7 @@ child-binding:
7474
7575
To simplify the usage, macro is available to generate "pinmux" field.
7676
This macro is available here:
77-
-include/zephyr/dt-bindings/pinctrl/stm32-pinctrl-common.h
77+
-include/zephyr/dt-bindings/pinctrl/stm32-pinctrl.h
7878
Some examples of macro usage:
7979
GPIO A9 set as alternate function 2
8080
... {

dts/bindings/pinctrl/st,stm32f1-pinctrl.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,8 @@ child-binding:
6161
description: |
6262
Adapted from
6363
https://github.com/torvalds/linux/blob/master/Documentation/devicetree/bindings/pinctrl/st,stm32-pinctrl.yaml
64-
Integer array, represents gpio pin number and mux setting.
65-
These defines are calculated as: ((port * 16 + line) << 8) | (function << 6) | remap)
64+
Integer represents gpio pin number and mux setting.
65+
Each integer encodes a port, line, alternate function and remap.
6666
With:
6767
- port: The gpio port index (PA = 0, PB = 1, ..., PK = 11)
6868
- line: The line offset within the port (PA0 = 0, PA1 = 1, ..., PA15 = 15)

0 commit comments

Comments
 (0)