PIN muxing in embedded Linux kernel

最后都变了- 提交于 2020-06-28 03:57:00

问题


I am using SAMA5D27-SOM1-EK1 Microchip embedded board. I am using Linux kernel 4.14.73 version that I build using Yocto project.

That board has a J27 connector that is used as Image Sensor Interface as shown in 4.3.2 Title, page 31 from the board user guide document, besides, Table 4-16. ISC Connector J27 Pin Assignment, page 32, shows the connector PIN features.

This is a link to the board document :

SAMA5D27_User_guide

My goal is to change some PIN features of this connector, in order to use it as GPIO PIN, that I will use in order to make a simple wire circuit with a PUSH BUTTON and LED. I think that I must not let it as ISC data pins.

I think that I must change something in the board device-tree which you can find here :

SAMA5D27_Device_tree

But I don't know what to change and how ? I just want to have 2 GPIO PINS , one for input and the other as output.

Please help me out ? I will be grateful !


回答1:


As I replied to you on IRC, you can simply remove line 101 or the whole isc node, that will ensure the isc is not muxing the pins. The question you are not really answering is how will you use those GPIOS, will you write a kernel driver or use libgpio?

If you want to write a kernel driver, then you will have to learn about the device tree soon if you want to get your driver to probe.



来源:https://stackoverflow.com/questions/62322924/pin-muxing-in-embedded-linux-kernel

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!