Skip to content

Commit bdafb6c

Browse files
committed
Troubleshooting: Add FAQ about GPIO numbering & available I²C interfaces
Signed-off-by: Stefan Wahren <stefan.wahren@chargebyte.com>
1 parent 07fd315 commit bdafb6c

1 file changed

Lines changed: 29 additions & 0 deletions

File tree

docs/source/troubleshooting.rst

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,21 @@ we recommend the usage of chardev GPIO and libgpiod. The modification of the bia
4949
settings via libgpiod is not yet implemented, so it needs to be done via device tree.
5050

5151

52+
My application depends on libgpiod but requires GPIO numbers, how can I figure them out?
53+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54+
55+
For such legacy applications which rely on GPIO numbers, you can use the following:
56+
57+
.. code-block:: console
58+
59+
root@chargesom:/# cat /sys/kernel/debug/gpio
60+
gpiochip0: GPIOs 512-541, parent: platform/43810000.gpio, 43810000.gpio:
61+
gpio-512 (SPI_PLC_nCS0 |spi1 CS0 ) out hi ACTIVE LOW
62+
...
63+
64+
The GPIO number is in the first column ( gpio-XXX ).
65+
66+
5267
What is the difference between CHSTOP_IN and SAFETY_ESTOPx?
5368
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5469

@@ -85,6 +100,20 @@ counting from zero (ttyLP0 = UART1, ...).
85100
4: uart:FSL_LPUART mmio:0x42590010 irq:20 tx:0 rx:0 CTS|DSR|CD
86101
87102
103+
How can I list the available I²C interfaces?
104+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
105+
106+
All I²C interfaces are available via I²C device driver. Please keep in mind that
107+
Linux starts counting from zero (i2c-0 = I2C1, ...).
108+
109+
.. code-block:: console
110+
111+
root@chargesom:/# i2cdetect -l
112+
i2c-0 i2c 44340000.i2c I2C adapter
113+
i2c-1 i2c 44350000.i2c I2C adapter
114+
i2c-2 i2c 42530000.i2c I2C adapter
115+
116+
88117
How can I print the current pin/pad control settings (e.g. bias, drive strength)?
89118
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90119

0 commit comments

Comments
 (0)