【发布时间】:2015-11-03 11:24:10
【问题描述】:
我正在尝试将 LCD7 cape 与 Serial cape 一起使用,但 UART4 的引脚冲突。我不使用 UART4,所以我通过从 dts 文件中删除配置来禁用它,将文件保存在 /lib/firmware 中的名称下。 编译是在 cmd 行上完成的:
dtc -O dtb -o cape-CBB-Serial-r02.dtbo -b 0 -@ Cape-CBB-Serial-r02.dts
装载斗篷: echo cape-CBB-Serial:r02 > 插槽
问题:
出于某种原因,即使在禁用斗篷后它仍然显示在插槽中:
root@beaglebone:/lib/firmware# cat /sys/devices/bone_capemgr.9/slots
0: 54:PF--- 1: 55:P---- cape-CBB-Serial,r01,Logic Supply,cape-CBB-Serial
2: 56:PF--- 3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
/boot/uEnv.txt 的内容:
cat /boot/uEnv.txt
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0
uname_r=3.8.13-bone70
#dtb= cmdline=quiet init=/lib/systemd/systemd
##Example
#cape_disable=capemgr.disable_partno=
#cape_enable=capemgr.enable_partno=
##Disable HDMI/eMMC
#cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G
##Disable HDMI cape_disable=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
##Disable eMMC
#cape_disable=capemgr.disable_partno=BB-BONE-EMMC-2G
##Audio Cape (needs HDMI Audio disabled)
#cape_disable=capemgr.disable_partno=BB-BONELT-HDMI
#cape_enable=capemgr.enable_partno=BB-BONE-AUDI-02
##enable BBB: eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh
cape_disable=capemgr.disable_partno=cape-CBB-Serial
我的 dts 版本永远不会被加载:
/* cape-CBB-Serial-r01.dts
* Written by Alexander Hiam <hiamalexander@gmail.com>
* for Logic Supply - http://logicsupply.com
* Jan 28, 2014
*
* This is the Device Tree overlay for the CBB-Serial BeagleBone and
* BeagleBone Black cape. It will enable the UART2, UART4 and DCAN1
* interfaces, as well as mux GPIO1_16 for userspace control for
* using software control of the RS485 receiver/driver enable.
*
* Note: the BeagleBone Black has GPIO1_16 tied to GPIO2_0 (which
* is not exposed on the header), so this overlay muxes and controls
* both pins.
*
* Copyright (c) 2014 - Logic Supply (http://logicsupply.com)
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 as
* published by the Free Software Foundation.
*/
/dts-v1/;
/plugin/;
/{
compatible = "ti,beaglebone", "ti,beaglebone-black";
part-number = "cape-CBB-Serial";
version = "r02";
/* state the resources this cape uses */
exclusive-use =
"P9.21", /* uart2_txd */
"P9.22", /* uart2_rxd */
"P9.24", /* dcan1_rx */
"P9.26", /* dcan1_tx */
/* the hardware IP uses */
"gpio1_16",
"gpio2_0",
"uart2",
"uart4",
"dcan1";
fragment@0 {
target = <&am33xx_pinmux>;
__overlay__ {
cbb_serial_uart2_pins: pinmux_cbb_serial_uart2_pins {
pinctrl-single,pins = <
0x150 0x21 /* spi0_sclk - RX_ENABLED | MODE6 (UART2 RX) */
0x154 0x01 /* spi0_d0 - MODE6 (UART2 TX) */
>;
};
cbb_serial_dcan1_pins: pinmux_cbb_serial_dcan1_pins {
pinctrl-single,pins = <
0x180 0x12 /* uart1_rxd - PULLUP | MODE2 (DCAN TX) */
0x184 0x32 /* uart1_txd - RX_ENABLED | PULLUP | MODE2 (DCAN1 RX) */
>;
};
};
};
fragment@1 {
target = <&uart3>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&cbb_serial_uart2_pins>;
};
};
fragment@3 {
target = <&dcan1>;
__overlay__ {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&cbb_serial_dcan1_pins>;
};
};
};
不知何故串行斗篷从某个地方自动加载? :(
【问题讨论】:
标签: beagleboneblack