added gpio-ir-tx for IR board from RM Mini 3
[linux-gpio-pinout] / README.md
1 # linux-gpio-pinout
2
3 lookup kernel's view of pinouts on different boards (useful for device tree and gpio debugging)
4
5
6 It supports simple one or two row pin headers with 2.54mm pin spacing which are specified in
7 simple text form at end of file based on model derived from device tree.
8
9 This tool also creates svg pinouts which you can print out with correct 2.54mm spacing and put
10 on your board to make wiring easier.
11
12
13 For device tree information, best source right now is this presentation:
14 https://elinux.org/images/d/dc/Elce_2017_dt_bof.pdf
15
16
17 device-tree/ directory contains examples
18
19 to use device trees, do something like:
20
21         vi device-tree/gpio-leds.dts
22         armbian-add-overlay device-tree/gpio-led.dts
23         dmesg -w &
24         ./overlay-load.sh /boot/overlay-user/gpio-led.dtbo
25
26 To load kernel module for i2c sensors without writing device tree
27 echo module_name address into i2c bus:
28
29 echo lm75 0x49 > /sys/bus/i2c/devices/i2c-1/new_device
30
31
32
33 i2c-usersapce/ contains random i2c userspace device drivers
34
35
36 If you get following error when using armbian-add-overlay
37
38 Missing dtc compiler in kernel headers directory. Please reinstall the kernel headers package
39
40 then you are missing /lib/modules/$(uname -r)/build/scripts/dtc/dtc
41 For overlay to work on 4.17 kernels you need recent dtc compiler from:
42
43         git clone https://git.kernel.org/pub/scm/utils/dtc/dtc.git
44
45 which in turn needs bison and flex to compile:
46
47         apt-get install bison flex
48
49 type make to compile it and create symlink to it:
50
51 dpavlin@cubieboard2:~/linux-gpio-pinout/dtc$ sudo ln -sfv `pwd`/dtc /lib/modules/$(uname -r)/build/scripts/dtc/dtc
52 ‘/lib/modules/4.17.14-sunxi/build/scripts/dtc/dtc’ -> ‘/home/dpavlin/linux-gpio-pinout/dtc/dtc’
53