| Main index | Section 4 | Options |
On fdt(4) based systems, the pinmux controller is represented by a node in the device tree. It may have any number of child nodes representing pin configuration groups. Properties of such nodes are hardware-specific and handled by individual pinctrl drivers.
pinctrl@7e220000 {
compatible = "vndr,soc1715-pinctrl";
reg = <0x7e220000 0x100>
spi0_pins: spi0 {
vndr,pins = <11 12>
vndr,functions = <ALT0 ALT5>
}
i2c0_pins: i2c0 {
...
}
}
Client devices are hardware devices that require certain pin configurations to function properly. Depending on the state the device is in (active, idle) it might require different pin configurations. Each configuration is described by setting the pinctrl-N property to the list of phandles pointing to specific child nodes of the pinmux controller node. N is an integer value starting with 0 and incremented by 1 for every new set of pin configurations. pinctrl-0 is a default configuration that is applied in the fdt_pinctrl_configure_tree(9) call. In addition to referring to pin configurations by index, they can be referred to by name if the pinctrl-names property is set. The value of pinctrl-names is a list of strings with names for each pinctrl-N property. Client devices can request specific configuration using fdt_pinctrl_configure(9) and fdt_pinctrl_configure_by_name(9).
backlight@7f000000 {
compatible = "vndr,vndr-bl"
reg = <0x7f000000 0x20>
...
pinctrl-name = "active", "idle"
pinctrl-0 = <&backlight_active_pins>
pinctrl-1 = <&backlight_idle_pins>
}
The pinctrl driver should implement the FDT_PINCTRL_CONFIGURE method, register itself as a pin configuration handler by calling fdt_pinctrl_register function, and call fdt_pinctrl_configure_tree(9) to configure pins for all enabled devices (devices where the "status" property is not set to "disabled").
| FDT_PINCTRL (4) | March 3, 2018 |
| Main index | Section 4 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
| “ | "I liken starting one's computing career with Unix, say as an undergraduate, to being born in East Africa. It is intolerably hot, your body is covered with lice and flies, you are malnourished and you suffer from numerous curable diseases. But, as far as young East Africans can tell, this is simply the natural condition and they live within it. By the time they find out differently, it is too late. They already think that the writing of shell scripts is a natural act." | ” |
| — Ken Pier, Xerox PARC | ||