【问题标题】:BBB unable to load changed dts fileBBB 无法加载更改的 dts 文件
【发布时间】:2015-11-03 11:24:10
【问题描述】:

我正在尝试将 LCD7 capeSerial 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


    【解决方案1】:

    请注意,CBB-Serial 条目没有 L 标志 - 这意味着它没有加载。它仍然显示在插槽文件中,因为 capemgr 看到了 cape 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>;
        };
      };
    };
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2021-07-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2011-07-16
      相关资源
      最近更新 更多