[PATCH] doc: Add gpio status output fields description

Patrice Chotard patrice.chotard at foss.st.com
Tue Aug 30 16:56:28 CEST 2022


Add gpio status output fields description and one output example.

Signed-off-by: Patrice Chotard <patrice.chotard at foss.st.com>
---

 doc/usage/cmd/gpio.rst | 26 ++++++++++++++++++++++++++
 1 file changed, 26 insertions(+)

diff --git a/doc/usage/cmd/gpio.rst b/doc/usage/cmd/gpio.rst
index f6a5668388..b768b08a9b 100644
--- a/doc/usage/cmd/gpio.rst
+++ b/doc/usage/cmd/gpio.rst
@@ -45,6 +45,17 @@ gpio status
 
 Display the status of one or multiple GPIOs. By default only claimed GPIOs
 are displayed.
+gpio status command output fields are : [name]: [function]: [value] [x] [label]
+
+[function] can be:
+  - "output" : pin configured in gpio output.
+  - "input"  : pin configured in gpio input.
+  - "func"   : pin configured in alternate function, followed by [label]
+     which shows pinmuxing label.
+  - "unused" : pin not configured.
+
+For [function] "output" or "input", [value] field indicates pin's level,
+[x] or [ ] indicates respectively if gpio is used or not, [label] shows gpio label.
 
 -a
     Display GPIOs irrespective of being claimed.
@@ -77,6 +88,21 @@ Switch the status of a GPIO::
     => echo $myvar
     0
 
+    => gpio status
+    Bank GPIOA:
+    GPIOA1: func rgmii-0
+    GPIOA2: func rgmii-0
+    GPIOA7: func rgmii-0
+    GPIOA10: output: 0 [x] hdmi-transmitter at 39.reset-gpios
+    GPIOA13: output: 1 [x] red.gpios
+
+    Bank GPIOB:
+    GPIOB0: func rgmii-0
+    GPIOB1: func rgmii-0
+    GPIOB2: func uart4-0
+    GPIOB7: input: 0 [x] mmc at 58005000.cd-gpios
+    GPIOB11: func rgmii-0
+
 Configuration
 -------------
 
-- 
2.25.1



More information about the U-Boot mailing list