AnsweredAssumed Answered

Cannot read values from zc706 gpio leds in linux OS

Question asked by kharobangdo on Feb 24, 2018
Latest reply on Mar 28, 2018 by kharobangdo

A followup question to "Linux Kernel panic error due to kernel file update".


I am working on zc706-fmcomms5 board. I am using the 4 gpio leds on zc706 (L, R, C, 0) for some purpose through PL. In the earlier version of kernel & device tree files, I was able to read correct values of each of these in linux os. I had to "unbind" them & then access them through "/sys/class/gpio" by exporting whichever I wanted.


Now when I upgrade my design (only kernel & device tree files). The Leds (which are controlled by fpga) are glowing accordingly but I can't seem to get correct values in linux OS. It is always 0 even though the led is glowing. 


For reference, I used the same "system_top.hdf" file to generate the Petalinux project. Then, from "linux-master" kernel, I used files

1. zynq-zc706-adv7511-ad9361-fmcomms5.dts (which I renamed to system-top.dts in petalinux device tree directory)

2. zynq-zc706-adv7511.dtsi

3. zynq-7000.dtsi

4. adi-fmcomms5.dtsi

Additionally, I included files generated by petalinux

5. system-conf.dtsi

6. skeleton.dtsi

7. pl.dtsi

8. pcw.dtsi


leds are not included by default in the petalinux created device tree so I copy pasted the "leds" node from zynq-zc706.dtsi into pl.dtsi.


So, why can't I read the led values correctly in this version.