Gyver Posted March 20, 2017 Posted March 20, 2017 Hello everyone, I was used to use the cubox-i running on a hummingboard (2 years ago) and tried to install a pps source using pps-gpio module and the GPIO1 (pin 7) of the HummingBoard jumpers. Given that pps-gpio requires an entry in the device tree for pps, and I couldn't find/patch/recompile again sources (image was built by another person), I decompiled the imx6q-hummingvboard.dtb present in /boot, then modified it adding : pps { compatible = "pps-gpio"; gpios = <0x01 0x01 0x01>; }; and then I recompiled this source and copied into /boot. When I rebooted, the new /dev/pps1 was created and the pulses were received by the hummingboard (checked using ppstest program from pps-tools package). Then I installed the armbian in the same Hummingboard (from image downloaded from this website) and followed the same procedure; the problem is that i got the error in dmesg: [ 0.090676] pps_core: LinuxPPS API ver. 1 registered [ 0.090685] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it> [ 23.022017] /pps: could not get #gpio-cells for /interrupt-controller@00a01000 [ 23.027445] pps-gpio pps.24: failed to get GPIO from device tree [ 23.039236] pps-gpio: probe of pps.24 failed with error -22 and the pps source is not created. Would anyone help me with the right definition of the device tree in order to make it work? Thank you very much! Gyver
zador.blood.stained Posted March 20, 2017 Posted March 20, 2017 First cell (number) in "gpios" property should be the phandle of your GPIO controller, it's not a fixed number.
Gyver Posted March 20, 2017 Author Posted March 20, 2017 Thanks a lot! I found that the phandle was 0x24 and put that number as first cell in gpios. The pps source is created now and it works. God Blesses! Thank you!
Recommended Posts