GPIOs general questions

      GPIOs general questions

      I have two questions about the GPIOs of the efusA9.

      1) Can I use the GPIOs for LCD_Bx (GPIO5_IO06 - GPIO05_IO11) as soon as I disable the displays in the efusa9dl.dts file? Or is there something other I have to change?

      Source Code


      2) Are the GPIOs usable in C wihtout using the /proc files? We don't need to toggle them really fast but I don't know how much overhead the proc files will add.

      1.) Theoretically yes. If a pad is not used by another function, it can be accessed as GPIO. But actually it depends on the function it was set before, either in the bootloader or how the pad is initialized by the CPU at reset time. Most pads *are* initialized as GPIO, then it will work directly. But some pads are set to a different function, and then you also have to add a pad setting to the iomuxc section of the device tree, to set the pad to GPIO function. If I remember correctly, the LCD color data signals should be initialized as GPIOs, so this should work without having to add anything to iomuxc in the device tree.

      2.) Where do you need /proc for GPIO? Or do you mean /sys? The overhead by the sysfs with regard to GPIOS was discussed a lot among the kernel developers. This is why they introduced a new way of accessing GPIOs around kernel 4.6 or so. However as long as we use kernel 4.1, this new method is not available. And NXP is still staying with this kernel for a while. My guess is that porting the code to the upcoming i.MX8 was so complex that they did not want a kernel version change as additional complication. So I believe they will stay with 4.1 until i.MX8 is out and the code is more or less stable.

      Your F&S Support Team
      F&S Elektronik Systeme GmbH
      As this is an international forum, please try to post in English.
      Da dies ein internationales Forum ist, bitten wir darum, Beiträge möglichst in Englisch zu verfassen.