Skip to content

Commit 890ebe8

Browse files
authored
Merge pull request #84 from chargebyte/everest/charge_som_faq2
Extend FAQ regarding GPIO numbering & available I²C interfaces
2 parents 3765f1e + 863d05d commit 890ebe8

2 files changed

Lines changed: 37 additions & 1 deletion

File tree

docs/source/troubleshooting.rst

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,28 @@ 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 chip and line, how can I figure them out?
53+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
54+
55+
For such applications which doesn't support GPIO line names, 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+
gpio-519 ( |int ) in lo IRQ
63+
...
64+
65+
The GPIO line is calculated as following:
66+
67+
.. code-block::
68+
69+
Line = GPIO number - GPIO chip offset
70+
Line = 519 - 512
71+
Line = 7
72+
73+
5274
What is the difference between CHSTOP_IN and SAFETY_ESTOPx?
5375
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
5476

@@ -85,6 +107,20 @@ counting from zero (ttyLP0 = UART1, ...).
85107
4: uart:FSL_LPUART mmio:0x42590010 irq:20 tx:0 rx:0 CTS|DSR|CD
86108
87109
110+
How can I list the available I²C interfaces?
111+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
112+
113+
All I²C interfaces are available via I²C device driver. Please keep in mind that
114+
Linux starts counting from zero (i2c-0 = I2C1, ...).
115+
116+
.. code-block:: console
117+
118+
root@chargesom:/# i2cdetect -l
119+
i2c-0 i2c 44340000.i2c I2C adapter
120+
i2c-1 i2c 44350000.i2c I2C adapter
121+
i2c-2 i2c 42530000.i2c I2C adapter
122+
123+
88124
How can I print the current pin/pad control settings (e.g. bias, drive strength)?
89125
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
90126

includes

0 commit comments

Comments
 (0)