BBB无法加载已更改的dts文件

时间:2015-11-03 11:24:11

标签: beagleboneblack

我正在尝试将LCD7 capeSerial cape一起使用,但UART4的引脚存在冲突。我没有使用UART4所以我通过从dts文件中删除配置来禁用它,将文件保存在/ lib / firmware中的名称下。 编译在cmd行上完成:

  

dtc -O dtb -o cape-CBB-Serial-r02.dtbo -b 0 - @   斗篷CBB-串行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>;
    };
  };
};

不知何故,串口斗篷会从某个地方自动加载? :(

1 个答案:

答案 0 :(得分:1)

请注意,CBB-Serial条目没有L标志 - 这意味着它没有加载。它仍然显示在插槽文件中,因为capemgr看到了开普敦的EEPROM。您仍然可以手动加载您的版本。尝试加载版本后$ dmesg | tail -n 100的输出是什么?

此外,当您删除UART4片段时,uart4数组中仍然列出exclusive-use,这是capemgr查找冲突的地方。你想要删除它,你也应该调整你的片段编号,使它们一致地增加(不确定这是否真的重要):

/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",
    "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@2 {
    target = <&dcan1>;
    __overlay__ {
      status = "okay";
      pinctrl-names = "default";
      pinctrl-0 = <&cbb_serial_dcan1_pins>;
    };
  };
};