在哪里可以找到设备树源包含 (.dtsi) 文件?

在哪里可以找到设备树源包含 (.dtsi) 文件?

我正在尝试查看我的设备树,以了解有关如何定义 USB 端点的更多信息,并且只是了解有关设备树的更多信息。我当前正在使用 BeagleBone Black 映像,并且我相信我是从 am335x-boneblack-uboot-univ.dtb 设备树 blob 启动的。您可以在下面看到我的设备在启动时给出的输出:

U-Boot SPL 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600)
Trying to boot from MMC2
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **


U-Boot 2019.04-00002-g07d5700e21 (Mar 06 2020 - 11:24:55 -0600), Build: jenkins-github_Bootloader-Builder-137

CPU  : AM335X-GP rev 2.1
I2C:   ready
DRAM:  512 MiB
No match for driver 'omap_hsmmc'
No match for driver 'omap_hsmmc'
Some drivers were not found
Reset Source: Global warm SW reset has occurred.
Reset Source: Power-on reset has occurred.
RTC 32KCLK Source: External.
MMC:   OMAP SD/MMC: 0, OMAP SD/MMC: 1
Loading Environment from EXT4... ** File not found /boot/uboot.env **

** Unable to read "/boot/uboot.env" from mmc0:1 **
Board: BeagleBone Black
<ethaddr> not set. Validating first E-fuse MAC
BeagleBone Black:
BeagleBone: cape eeprom: i2c_probe: 0x54:
BeagleBone: cape eeprom: i2c_probe: 0x55:
BeagleBone: cape eeprom: i2c_probe: 0x56:
BeagleBone: cape eeprom: i2c_probe: 0x57:
Net:   eth0: MII MODE
Could not get PHY for cpsw: addr 0
cpsw, usb_ether
Press SPACE to abort autoboot in 0 seconds
board_name=[A335BNLT] ...
board_rev=[] ...
switch to partitions #0, OK
mmc0 is current device
SD/MMC found on device 0
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
gpio: pin 56 (gpio 56) value is 0
gpio: pin 55 (gpio 55) value is 0
gpio: pin 54 (gpio 54) value is 0
gpio: pin 53 (gpio 53) value is 1
switch to partitions #0, OK
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
Checking for: /uEnv.txt ...
Checking for: /boot.scr ...
Checking for: /boot/boot.scr ...
Checking for: /boot/uEnv.txt ...
gpio: pin 55 (gpio 55) value is 1
2082 bytes read in 28 ms (72.3 KiB/s)
Loaded environment from /boot/uEnv.txt
Checking if uname_r is set in /boot/uEnv.txt...
gpio: pin 56 (gpio 56) value is 1
Running uname_boot ...
loading /boot/vmlinuz-4.19.94-ti-r42 ...
10095592 bytes read in 657 ms (14.7 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb ...
loading /boot/dtbs/4.19.94-ti-r42/am335x-boneblack-uboot-univ.dtb ...
174145 bytes read in 53 ms (3.1 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] ...
uboot_overlays: uboot loading of [/lib/firmware/BB-ADC-00A0.dtbo] disabled by /boot/uEnv.txt [disable_uboot_overlay_adc=1]...
uboot_overlays: loading /lib/firmware/am335x-osd3358-mt-01.dtbo ...
5769 bytes read in 1078 ms (4.9 KiB/s)
uboot_overlays: loading /lib/firmware/BB-BBBW-WL1835-00A0.dtbo ...
3536 bytes read in 1650 ms (2 KiB/s)
uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo ...
1614 bytes read in 1351 ms (1000 Bytes/s)
uboot_overlays: uboot loading of [/lib/firmware/BB-HDMI-TDA998x-00A0.dtbo] disabled by /boot/uEnv.txt [disable_uboot_overlay_video=1]...
uboot_overlays: loading /lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo ...
3653 bytes read in 1216 ms (2.9 KiB/s)
loading /boot/initrd.img-4.19.94-ti-r42 ...
7051030 bytes read in 468 ms (14.4 MiB/s)
debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet] ...
debug: [bootz 0x82000000 0x88080000:6b9716 88000000] ...
## Flattened Device Tree blob at 88000000
   Booting using the fdt blob at 0x88000000
   Loading Ramdisk to 8f946000, end 8ffff716 ... OK
   Loading Device Tree to 8f8b6000, end 8f945fff ... OK

Starting kernel ...

查看 am335x-boneblack-uboot-univ.dts 源文件后,我可以看到其中有一些 .dtsi 包含文件。 .dts 文件如下所示:

/*
 * Copyright (C) 2012 Texas Instruments Incorporated - http://www.ti.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/;

#include "am33xx.dtsi"
#include "am335x-bone-common.dtsi"
#include "am335x-bone-common-univ.dtsi"

/ {
    model = "TI AM335x BeagleBone Black";
    compatible = "ti,am335x-bone-black", "ti,am335x-bone", "ti,am33xx";
};

&sgx {
    status = "okay";
};

&cpu0_opp_table {
    /*
    * All PG 2.0 silicon may not support 1GHz but some of the early
    * BeagleBone Blacks have PG 2.0 silicon which is guaranteed
    * to support 1GHz OPP so enable it for PG 2.0 on this board.
    */
    oppnitro-1000000000 {
        opp-supported-hw = <0x06 0x0100>;
    };
};

&ldo3_reg {
    regulator-min-microvolt = <1800000>;
    regulator-max-microvolt = <1800000>;
    regulator-always-on;
};

&mmc1 {
    vmmc-supply = <&vmmcsd_fixed>;
};

我想知道在哪里可以找到 .dtsi 包含文件,以及它们是否包含剩余的设备树信息。也许这甚至不是我应该查看的设备树。我不确定,因为我的/boot/dtbs/4.19.94-ti-r42目录中有很多。

在我的研究中,.dtsi 文件似乎存储在其中,arch/arm/boot/dts但我在 arm32 系统上并且没有arch目录。

当我了解有关编辑设备树的更多信息时,我将不胜感激。

有关更多信息,这是我的 uEnv.txt 文件:

#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.19.94-ti-r42
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
uboot_overlay_addr0=/lib/firmware/am335x-osd3358-mt-01.dtbo
uboot_overlay_addr1=/lib/firmware/BB-BBBW-WL1835-00A0.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

这是目录的内容/boot/dtbs/4.19.94-ti-r42

debian@beaglebone:~$ ls /boot/dtbs/4.19.94-ti-r42/
am335x-abbbi.dtb
am335x-baltos-ir2110.dtb
am335x-baltos-ir3220.dtb
am335x-baltos-ir5221.dtb
am335x-base0033.dtb
am335x-boneblack-audio.dtb
am335x-boneblack-bbb-exp-c.dtb
am335x-boneblack-bbb-exp-r.dtb
am335x-boneblack-bbbmini.dtb
am335x-boneblack.dtb
am335x-boneblack-prusuart.dtb
am335x-boneblack-roboticscape.dtb
am335x-boneblack-uboot.dtb
am335x-boneblack-uboot-univ.dtb
am335x-boneblack-wireless.dtb
am335x-boneblack-wireless-roboticscape.dtb
am335x-boneblack-wl1835mod.dtb
am335x-boneblue.dtb
am335x-bone.dtb
am335x-bonegreen.dtb
am335x-bonegreen-gateway.dtb
am335x-bonegreen-wireless.dtb
am335x-bonegreen-wireless-uboot-univ.dtb
am335x-bone-uboot-univ.dtb
am335x-chiliboard.dtb
am335x-cm-t335.dtb
am335x-evm.dtb
am335x-evmsk.dtb
am335x-icev2.dtb
am335x-icev2-prueth.dtb
am335x-lxm.dtb
am335x-moxa-uc-8100-me-t.dtb
am335x-nano.dtb
am335x-osd3358-sm-red.dtb
am335x-pdu001.dtb
am335x-pepper.dtb
am335x-phycore-rdk.dtb
am335x-pocketbeagle.dtb
am335x-revolve.dtb
am335x-sancloud-bbe.dtb
am335x-sbc-t335.dtb
am335x-shc.dtb
am335x-sl50.dtb
am335x-wega-rdk.dtb
am437x-cm-t43.dtb
am437x-gp-evm.dtb
am437x-gp-evm-hdmi.dtb
am437x-idk-evm.dtb
am437x-sbc-t43.dtb
am437x-sk-evm.dtb
am43x-epos-evm.dtb
am43x-epos-evm-hdmi.dtb
am5729-beagleboneai.dtb
am5729-beagleboneai-roboticscape.dtb
am572x-idk.dtb
am574x-idk.dtb
am57xx-beagle-x15.dtb
am57xx-beagle-x15-revb1.dtb
am57xx-beagle-x15-revc.dtb
am57xx-cl-som-am57x.dtb
am57xx-sbc-am57x.dtb
dra71-evm.dtb
dra72-evm.dtb
dra72-evm-revc.dtb
dra76-evm.dtb
dra7-evm.dtb
omap5-cm-t54.dtb
omap5-igep0050.dtb
omap5-sbc-t54.dtb
omap5-uevm.dtb

答案1

您正在查找的“ dtsi”文件位于实际的源目录中。不是引导安装座。在这种情况下,现在“ dtsi”文件被“编译成”“ dtb”文件。它们的功能类似于 C 头文件,并被“添加”到 ' dts' 文件,然后编译成 ' dtb'。

对于arm来说,在linux源代码中,看看下面arch/arm/boot/dts/有什么!我希望这有帮助!

相关内容