Skip to content
Discussion options

You must be logged in to vote

Some more notes and thoughts on DT representation. Feel free to edit, comment, discuss pros/cons, etc.

1. DT node for each state, containing all pins (Linux approach, e.g. for ST)

board.dts: pinctrl-N properties reference a node that contains the whole configuration set for a given state. Nodes are defined in a board-pinctrl.dtsi file.

#include "board-pinctrl.dtsi"

...
&usart2 {
	pinctrl-names = "default", "sleep", "idle";
	pinctrl-0 = <&usart2_pins_c>;
	pinctrl-1 = <&usart2_sleep_pins_c>;
	pinctrl-2 = <&usart2_idle_pins_c>;
};
...

board-pinctrl.dtsi: contains all configurations for a given board.

pinctrl: ... {
	compatible = "st,socmodel-pinctrl";
        usart2_pins_c: ... {
         …

Replies: 7 comments 13 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
3 replies
@mbolivar-nordic
Comment options

@gmarull
Comment options

gmarull Aug 11, 2021
Collaborator

@mbolivar-nordic
Comment options

Comment options

You must be logged in to vote
9 replies
@erwango
Comment options

erwango Aug 24, 2021
Collaborator

@gmarull
Comment options

gmarull Aug 24, 2021
Collaborator

@gmarull
Comment options

gmarull Sep 7, 2021
Collaborator

@trond-snekvik
Comment options

@trond-snekvik
Comment options

Answer selected by henrikbrixandersen
Comment options

You must be logged in to vote
1 reply
@gmarull
Comment options

gmarull Aug 23, 2021
Collaborator

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Ideas
7 participants