Helios64: Update GPIO usage and SATA
This commit is contained in:
parent
c520335912
commit
1f5b1539e4
2 changed files with 82 additions and 0 deletions
|
@ -28,3 +28,83 @@ Helios64 provides 16 GPIOs via a 20-Pin header (P5). Those GPIOs are provided vi
|
||||||
| 18 | EXP_P1_6 | |
|
| 18 | EXP_P1_6 | |
|
||||||
| 19 | EXP_P1_7 | |
|
| 19 | EXP_P1_7 | |
|
||||||
| 20 | - | GND |
|
| 20 | - | GND |
|
||||||
|
|
||||||
|
## Accessing GPIOs under Linux
|
||||||
|
|
||||||
|
If the kernel supports debugfs (*CONFIG_DEBUG_FS=y*), list of GPIOs can be retrieved with the following command
|
||||||
|
|
||||||
|
```bash
|
||||||
|
sudo cat /sys/kernel/debug/gpio
|
||||||
|
```
|
||||||
|
|
||||||
|
Look for the **gpiochip5: GPIOs XXX-YYY** section, whereas **XXX** is first GPIO number and **YYY** is last GPIO number of IO expander.
|
||||||
|
|
||||||
|
```
|
||||||
|
gpiochip5: GPIOs 496-511, parent: i2c/2-0020, 2-0020, can sleep:
|
||||||
|
```
|
||||||
|
|
||||||
|
Another way to get first GPIO number of the IO expander
|
||||||
|
|
||||||
|
```
|
||||||
|
cat /sys/bus/i2c/devices/2-0020/gpio/gpiochip*/base
|
||||||
|
```
|
||||||
|
|
||||||
|
Therefore the mapping between header P5 Pins and Sysfs GPIO numbers will be as described in the following table
|
||||||
|
|
||||||
|
### GPIO Table
|
||||||
|
|
||||||
|
| PIN | Sysfs GPIO number | Remarks |
|
||||||
|
|-----|------|-------------|
|
||||||
|
| 1 | - | 3.3V Supply |
|
||||||
|
| 2 | - | 5V Supply |
|
||||||
|
| 3 | - | GND |
|
||||||
|
| 4 | 496 | |
|
||||||
|
| 5 | 497 | |
|
||||||
|
| 6 | 498 | |
|
||||||
|
| 7 | 499 | |
|
||||||
|
| 8 | 500 | |
|
||||||
|
| 9 | 501 | |
|
||||||
|
| 10 | 502 | |
|
||||||
|
| 11 | 503 | |
|
||||||
|
| 12 | 504 | |
|
||||||
|
| 13 | 505 | |
|
||||||
|
| 14 | 506 | |
|
||||||
|
| 15 | 507 | |
|
||||||
|
| 16 | 508 | |
|
||||||
|
| 17 | 509 | |
|
||||||
|
| 18 | 510 | |
|
||||||
|
| 19 | 511 | |
|
||||||
|
| 20 | - | GND |
|
||||||
|
|
||||||
|
### GPIO Control
|
||||||
|
|
||||||
|
**1.** Export the GPIO number you want to use
|
||||||
|
|
||||||
|
```
|
||||||
|
echo N | sudo tee -a /sys/class/gpio/export
|
||||||
|
```
|
||||||
|
|
||||||
|
**2.** Set the direction, "out" for Output or "in" for Input
|
||||||
|
|
||||||
|
```
|
||||||
|
echo DIRECTION | sudo tee -a /sys/class/gpio/gpioN/direction
|
||||||
|
```
|
||||||
|
|
||||||
|
**3.** Now you can read or change the GPIO value
|
||||||
|
|
||||||
|
To read GPIO value
|
||||||
|
|
||||||
|
```
|
||||||
|
cat /sys/class/gpio/gpioN/value
|
||||||
|
```
|
||||||
|
|
||||||
|
To change GPIO value (only if GPIO set as Output)
|
||||||
|
|
||||||
|
```
|
||||||
|
echo VALUE | sudo tee -a /sys/class/gpio/gpioN/value
|
||||||
|
```
|
||||||
|
|
||||||
|
!!! notes
|
||||||
|
Pay attention to the path, /sys/class/gpio/gpio**N**/ where **N** is the GPIO number.
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -37,6 +37,8 @@ The power delivery of the HDDs is devided into two group:
|
||||||
|
|
||||||
Helios64 implements a power staggering approach where *HDD Rail A* will be powered up first, then few seconds later *HDD Rail B* will be powered up. This power control scenario is performed to reduce the inrush current during disk spin-up.
|
Helios64 implements a power staggering approach where *HDD Rail A* will be powered up first, then few seconds later *HDD Rail B* will be powered up. This power control scenario is performed to reduce the inrush current during disk spin-up.
|
||||||
|
|
||||||
|
The power staggering mechanism is not user configurable. It is done by bootloader.
|
||||||
|
|
||||||
### J8 Pinout
|
### J8 Pinout
|
||||||
|
|
||||||
![J8 Location](/helios64/img/sata/j8_pinout.jpg)
|
![J8 Location](/helios64/img/sata/j8_pinout.jpg)
|
||||||
|
|
Loading…
Reference in a new issue