嵌入式Linux内核中的PIN混合 [英] PIN muxing in embedded Linux kernel

查看:146
本文介绍了嵌入式Linux内核中的PIN混合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用 SAMA5D27-SOM1-EK1 Microchip 嵌入式板.我正在使用通过 Yocto 项目构建的 Linux内核4.14.73 版本.

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

该板具有一个 J27连接器,用作该板的图像传感器接口,如 4.3.2标题,第31页中所示用户指南文档,以及表4-16. ISC连接器J27引脚分配,第32页,显示了连接器PIN功能.

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

我的目标是更改此连接器的一些PIN功能,以便将其用作GPIO PIN,以便使用按钮和LED制作简单的线路.我认为我绝对不能将其作为ISC数据引脚.

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.

我认为我必须在板 device-tree 中进行一些更改,您可以在此处找到

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

SAMA5D27_Device_tree

但是我不知道该更改什么以及如何更改?我只想拥有2个GPIO PINS,一个用于输入,另一个作为输出.

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 !

推荐答案

正如我在IRC上回复给您的那样,您可以简单地删除第101行或整个isc节点,以确保isc不会混合引脚.您未真正回答的问题是如何使用这些GPIOS,编写内核驱动程序或使用libgpio?

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.

这篇关于嵌入式Linux内核中的PIN混合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆