3 lookup kernel's view of pinouts on different boards (useful for device tree and gpio debugging)
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.
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.
13 For device tree information, best source right now is this presentation:
14 https://elinux.org/images/d/dc/Elce_2017_dt_bof.pdf
17 device-tree/ directory contains examples
19 to use device trees, do something like:
21 vi device-tree/gpio-leds.dts
22 armbian-add-overlay device-tree/gpio-led.dts
24 ./overlay-load.sh /boot/overlay-user/gpio-led.dtbo
26 To load kernel module for i2c sensors without writing device tree
27 echo module_name address into i2c bus:
29 echo lm75 0x49 > /sys/bus/i2c/devices/i2c-1/new_device
33 i2c-usersapce/ contains random i2c userspace device drivers
36 If you get following error when using armbian-add-overlay
38 Missing dtc compiler in kernel headers directory. Please reinstall the kernel headers package
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:
43 git clone https://git.kernel.org/pub/scm/utils/dtc/dtc.git
45 which in turn needs bison and flex to compile:
47 apt-get install bison flex
49 type make to compile it and create symlink to it:
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’