blob: 30c5eb16a689202fc5b571f3d85ee2a4f932a77b [file] [log] [blame]
Patrick Delaunayd77c8112021-06-02 13:56:45 +02001.. SPDX-License-Identifier: GPL-2.0+:
2
Heinrich Schuchardt1b0c3162024-01-14 14:53:13 +01003.. index::
4 single: pinmux (command)
5
Patrick Delaunayd77c8112021-06-02 13:56:45 +02006pinmux command
7==============
8
9Synopsis
10--------
11
12::
13
14 pinmux list
15 pinmux dev [pincontroller-name]
16 pinmux status [-a | pin-name]
17
18Description
19-----------
20
21The pinmux command is used to show the pin-controller muxing.
22
23The 'pinmux list' command diplays the available pin-controller.
24
25The 'pinmux dev' command selects the pin-controller for next commands.
26
27 pincontroller-name
28 name of the pin-controller to select
29
30The 'pinmux status' command displays the pin muxing information.
31
32 \-a
33 display pin muxing of all pin-controllers.
34 pin-name
35 name of the pin to display
36
37Example
38-------
39
40::
41
42 => pinmux list
43 | Device | Driver | Parent
44 | pinctrl-gpio | sandbox_pinctrl_gpio | root_driver
45 | pinctrl | sandbox_pinctrl | root_driver
46 =>
47 => pinmux dev pinctrl
48 dev: pinctrl
49 =>
50 => pinmux status
51 P0 : UART TX.
52 P1 : UART RX.
53 P2 : I2S SCK.
54 P3 : I2S SD.
55 P4 : I2S WS.
56 P5 : GPIO0 bias-pull-up input-disable.
57 P6 : GPIO1 drive-open-drain.
58 P7 : GPIO2 bias-pull-down input-enable.
59 P8 : GPIO3 bias-disable.
60 =>
61 => pinmux status P0
62 P0 : UART TX.
63 =>
64 => pinmux status -a
65 --------------------------
66 pinctrl-gpio:
67 a0 : gpio input .
68 a1 : gpio input .
69 a2 : gpio input .
70 a3 : gpio input .
71 a4 : gpio input .
72 a5 : gpio output .
73 a6 : gpio output .
74 a7 : gpio input .
75 a8 : gpio input .
76 a9 : gpio input .
77 --------------------------
78 pinctrl:
79 P0 : UART TX.
80 P1 : UART RX.
81 P2 : I2S SCK.
82 P3 : I2S SD.
83 P4 : I2S WS.
84 P5 : GPIO0 bias-pull-up input-disable.
85 P6 : GPIO1 drive-open-drain.
86 P7 : GPIO2 bias-pull-down input-enable.
87 P8 : GPIO3 bias-disable.
88
89Configuration
90-------------
91
92The pinmux command is only available if CONFIG_CMD_PINMUX=y.
93
94Return value
95------------
96
97The return value $? is set to 0 (true) if the command succeded and to 1 (false)
98otherwise.