DTS文件可禁用LCD并在iMX6ULL中使用其GPIO [英] DTS File to disable LCD and use it's GPIO in iMX6ULL
问题描述
我正在将Toradex
模块系统colibri imx6ULL
与自定义板一起使用.
我试图禁用LCD并将其GPIO用于我的传感器.我已经在链接中找到了答案.我陷入了答案中的一项建议.
I am using the Toradex
system-on-module colibri imx6ULL
with a custom board.
I am trying to disable the LCD and use it's GPIOs for my sensors. I have followed the answer in this link. I got stuck with one of the suggestion in the answer.
除了将这些ping分配给iomuxc pinctrl组之外,您还需要将pinctrl组分配给已启用的节点,以便对其进行初始化.您可以根据需要专门为此创建一个新节点.
In addition to assigning these pings to an iomuxc pinctrl group, you'll also need to assign the pinctrl group to an enabled node for them to get initialized. You can create a new node specifically for this purpose if you'd like.
-
那行是什么意思?我是否需要创建一个将
status
属性设置为okay
的虚拟节点?
What does that line mean? Do I need to create a dummy node with
status
property set tookay
?
我可以更改/dev/中用于uart端口的名称吗?
Can I change of the name appearing in /dev/ for uart port?
如何在自定义面板中启用JTAG
?
How can I enable JTAG
in my custom board?
我的设备树源文件如下:
My device tree source file is below:
/dts-v1/;
#include "imx6ull-colibri-nonwifi.dtsi"
#include "imx6ull-colibri-eval-v3.dtsi"
/ {
model = "Toradex Colibri iMX6ULL 256MB on Colibri Evaluation Board V3";
compatible = "toradex,colibri_imx6ull-eval", "fsl,imx6ull";
&uart1 {
status = "okay";
};
&uart2 {
status = "okay";
};
&uart3 {
status = "okay";
};
&uart4 {
status = "disabled";
};
&uart5 {
status = "disabled";
};
&ecspi1 {
status = "okay";
};
&i2c1 {
status = "okay";
/* M41T0M6 real time clock on carrier board */
rtc: m41t0m6@68 {
status = "disabled";
};
};
&pwm1 {
status = "okay";
};
&pwm2 {
status = "okay";
};
&lcdif {
status = "disabled";
};
&iomux {
imx6ull-colibri {
pinctrl_additionalgpio: additionalgpios {
fsl,pins = <
MX6UL_PAD_UART2_RTS_B__GPIO1_IO23 0x14 // Pin 34 => GPS SafeBoot
MX6UL_PAD_CSI_DATA00__GPIO4_IO21 0x14 // Pin 101 => 1V8 Power Supply Enable
MX6UL_PAD_LCD_ENABLE__GPIO3_IO01 0x14 // Pin 44 => GPS EXINT
MX6UL_PAD_LCD_DATA07__GPIO3_IO12 0x14 // Pin 46 => GPS RST
MX6UL_PAD_LCD_DATA09__GPIO3_IO14 0x14 // Pin 48 => UNUSED
MX6UL_PAD_LCD_DATA06__GPIO3_IO11 0x14 // Pin 80 => SX1301 RST
>;
};
};
};
};
可以在
The device tree imx6ull-colibri-nonwifi.dtsi
can be found over here.
设备树imx6ull-colibri-eval-v3.dtsi
可以在
在dts
上在线阅读一些文档后,我已经尝试了几次.在下面找到我的DTS的最新版本.我还发现SPI
在董事会中不起作用,因此我编辑了dts以包含spi.
I have tried few times on my own after reading some documents online on dts
. Find the latest version of my dts below. I have also found out SPI
is not working in my board so that I have edited my dts to include spi.
我添加了一个虚拟节点以启用gpio.
I have added a dummy node to enable gpio.
/dts-v1/;
#include "imx6ull-colibri-nonwifi.dtsi"
#include "imx6ull-colibri-eval-v3.dtsi"
/ {
model = "Toradex Colibri iMX6ULL 256MB on Colibri Evaluation Board V3";
compatible = "toradex,colibri_imx6ull-eval", "fsl,imx6ull";
&uart1 {
status = "okay";
};
&uart2 {
status = "okay";
};
&uart3 {
status = "okay";
};
&uart4 {
status = "disabled";
};
&uart5 {
status = "disabled";
};
&ecspi1 {
status = "okay";
};
&i2c1 {
status = "okay";
/* M41T0M6 real time clock on carrier board */
rtc: m41t0m6@68 {
status = "disabled";
};
};
&pwm1 {
status = "okay";
};
&pwm2 {
status = "okay";
};
&lcdif {
status = "disabled";
};
gpio_additional {
pinctrl-name = "default";
pinctrl-0 = <&pinctrl_additionalgpio>;
status = "okay";
};
&ecspi1 {
status = "okay";
};
&iomux {
imx6ull-colibri {
pinctrl_additionalgpio: additionalgpios {
fsl,pins = <
MX6UL_PAD_UART2_RTS_B__GPIO1_IO23 0x14 // Pin 34 => GPS SafeBoot
MX6UL_PAD_CSI_DATA00__GPIO4_IO21 0x14 // Pin 101 => 1V8 Power Supply Enable
MX6UL_PAD_LCD_ENABLE__GPIO3_IO01 0x14 // Pin 44 => GPS EXINT
MX6UL_PAD_LCD_DATA07__GPIO3_IO12 0x14 // Pin 46 => GPS RST
MX6UL_PAD_LCD_DATA09__GPIO3_IO14 0x14 // Pin 48 => UNUSED
MX6UL_PAD_LCD_DATA06__GPIO3_IO11 0x14 // Pin 80 => SX1301 RST
>;
};
};
};
};
推荐答案
1)这意味着您需要添加pinctrl-group,例如您在节点上创建的pinctrl_additionalgpio
.
1) It means you need to add the pinctrl-group e.g. the one you have created pinctrl_additionalgpio
to a node.
我将以您在设备树中已禁用的lcdif节点为例,以说明添加到节点的pinctrl组.在此示例中,pinctrl_lcdif_dat
和pinctrl_lcdif_ctrl
被添加到lcdif
节点:
I'll take for instance the lcdif node you have disabled in you device-tree to illustrate a pinctrl-group added to a node. In this example, pinctrl_lcdif_dat
and pinctrl_lcdif_ctrl
are added to the lcdif
node:
&lcdif {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_lcdif_dat
&pinctrl_lcdif_ctrl>;
};
您必须创建自己的节点并添加pinctrl-group或找到合适的节点,例如:
You have to either create a node of your own and add the pinctrl-group or find a suitable node, e.g.:
myadditionalgpio {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_additionalgpio>;
};
2)我从未更改过设备名称.如果您只需要一个备用名称,则可以使用udev规则创建符号链接:
2) I have not ever got as far as changing the name of the device. If all you need is to have an alternative name, you can use a udev rule to create a symlink:
/etc/udev/rules.d/rename-uart.rules
KERNEL=="ttymxc0", SYMLINK+="test_serial"
然后您将拥有一个指向/dev/ttymxc0
的/dev/test_serial
设备.
Then you will have a /dev/test_serial
device that points to /dev/ttymxc0
.
3)您可以查看通用JTAG Toradex文档 https://developer. toradex.com/knowledge-base/jtag .
3) You can have a look at the generic JTAG Toradex documentation https://developer.toradex.com/knowledge-base/jtag.
这篇关于DTS文件可禁用LCD并在iMX6ULL中使用其GPIO的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!