운영체제
2020.01.12 15:53

디바이스 트리(Device Tree, DT)

조회 수 9713 추천 수 0 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄
?

단축키

Prev이전 문서

Next다음 문서

크게 작게 위로 아래로 댓글로 가기 인쇄

디바이스트리는 시스템의 장치를 설명하는 노드가있는 트리 구조의 데이터다. 장치들에 관한 세부 사항을 운영체제에 하드코딩하지 않고 부팅시 운영체제로 전달되는 데이터로 설명 할 수 있다. 예를들어 부트로더는 디바이스트리를 메모리에 로드하고 디바이스트리에 대한 포인터를 커널에 전달한다. 커널은 CPU, 메모리, 버스 및 주변 장치를 포함하여 이러한 구성 요소를 조금 더 유연하게 사용하고 관리 할 수 있다.

 

임베디드 시스템의 리눅스커널에서도 전면적으로 디바이스트리 구조를 도입함으로써 데이터 기반 플랫폼 설정으로 인해 코드 중복이 줄어들고 단일 커널 이미지로 광범위한 하드웨어를 보다 쉽게 지원할 수 있게 됐다.

 

일반적으로 디바이스트리는 커널이 동적으로 감지 할 수 없는 시스템의 장치 정보를 설명한다. 예를 들어 PCI 구조는 커널이 언제든 연결된 장치를 검사하고 감지 할 수 있으므로 PCI 장치를 설명하는 장치 트리 노드가 필요하지 않을 수 있다. 반면 프로빙으로 감지 할 수없는 경우 시스템에서 PCI 호스트 브리지 장치를 설명해야한다.

 

디바이스트리 노드에는 장치의 특성을 설명하는 property 가 있다. property 는 값이 비어 있거나 임의의 바이트 스트림을 포함 할 수있는 key-value 쌍이다. 그리고 각 노드에는 부모가없는 루트 노드를 제외하고 정확히 하나의 부모가 있다. 

 

다음은 .dts 형식의 엔비디아 테그라 보드에 대한 디바이스트리의 일부이다.

/{
        compatible = "nvidia,harmony", "nvidia,tegra20";
        #address-cells = <1>;
        #size-cells = <1>;
        interrupt-parent = <&intc>;

        chosen { };
        aliases { };

        memory {
                device_type = "memory";
                reg = <0x00000000 0x40000000>;
        };

        soc {
                compatible = "nvidia,tegra20-soc", "simple-bus";
                #address-cells = <1>;
                #size-cells = <1>;
                ranges;


                intc: interrupt-controller@50041000 {
                        compatible = "nvidia,tegra20-gic";
                        interrupt-controller;
                        #interrupt-cells = <1>;
                        reg = <0x50041000 0x1000>, < 0x50040100 0x0100 >;
                };

                serial@70006300 {
                        compatible = "nvidia,tegra20-uart";
                        reg = <0x70006300 0x100>;
                        interrupts = <122>;
                };

                i2s1: i2s@70002800 {
                        compatible = "nvidia,tegra20-i2s";
                        reg = <0x70002800 0x100>;
                        interrupts = <77>;
                        codec = <&wm8903>;
                };

                i2c@7000c000 {
                        compatible = "nvidia,tegra20-i2c";
                        #address-cells = <1>;
                        #size-cells = <0>;
                        reg = <0x7000c000 0x100>;
                        interrupts = <70>;

                        wm8903: codec@1a {
                                compatible = "wlf,wm8903";
                                reg = <0x1a>;
                                interrupts = <347>;
                        };
                };
        }

        sound {
                compatible = "nvidia,harmony-sound";
                i2s-controller = <&i2s1>;
                i2s-codec = <&wm8903>;
        };
};

 

노드의 이름은 정확한 장치모델이 아니라 장치의 기능을 반영하여 다소 일반적이어야한다.

• adc

• accelerometer

• atm

• audio-codec

• audio-controller

• backlight

• bluetooth

• bus

• cache-controller

• camera

• can

• charger

• clock

• clock-controller

• compact-flash

• cpu

• cpus

• crypto

• disk

• display

• dma-controller

• dsi

• dsp

• eeprom

• efuse

• endpoint

• ethernet

• ethernet-phy

• fdc

• flash

• gnss

• gpio

• gpu

• gyrometer

• hdmi

• hwlock

• i2c

• i2c-mux

• ide

• interrupt-controller

• iommu

• isa

• keyboard

• key

• keys

• lcd-controller

• led

• leds

• led-controller

 

• light-sensor

• magnetometer

• mailbox

• mdio

• memory

• memory-controller

• mmc

• mmc-slot

• mouse

• nand-controller

• nvram

• oscillator

• parallel

• pc-card

• pci

• pcie

• phy

• pinctrl

• pmic

• pmu

• port

• ports

• power-monitor

• pwm

• regulator

• reset-controller

• rng

• rtc

• sata

• scsi

• serial

• sound

• spi

• sram-controller

• ssi-controller

• syscon

• temperature-sensor

• timer

• touchscreen

• tpm

• usb

• usb-hub

• usb-phy

• video-codec

• vme

• watchdog

• wifi

 

이미 많이 알려진 디바이스트리는 arch/arm/boot/dts/ 에 위치하고 있으며 두 개의 확장자로 존재한다.

*.dtsi 파일은 여러 플랫폼에 공통적인 하드웨어를 설명한다. 일반적으로 *.dts 파일에서 이러한 파일을 포함한다.

*.dts 파일은 디바이스트리 소스 파일로써 하나의 특정 플랫폼을 설명한다. 이 파일은 dtc(Device tree compiler)로 컴파일 하게된다.

 


  1. 임베디드 리눅스 시스템에서 Flutter와 Wayland의 조합

    Date2025.08.21 Category그래픽스 Bymakersweb Views3144
    Read More
  2. OpenAMP 간단한 소개

    Date2024.09.21 Category통신 Bymakersweb Views3386
    Read More
  3. No Image

    Rockchip VOP

    Date2024.04.22 Category드라이버 Bymakersweb Views3408
    Read More
  4. No Image

    Raspberry Pi에서 I²C 그리고 Bit-bang (비트뱅)

    Date2023.08.27 Category통신 Bymakersweb Views4239
    Read More
  5. No Image

    Yocto 프로젝트 3.4 릴리스(honister) 이상 버전으로 마이그레이션 시 참고 사항

    Date2023.03.21 Category개발환경 Bymakersweb Views4491
    Read More
  6. Raspberry Pi 와 ATtiny85 간 I²C 통신

    Date2023.03.18 Category통신 Bymakersweb Views4173
    Read More
  7. 로직분석기와 함께 PulseView 를 사용해서 CAN 신호 캡쳐

    Date2023.03.16 Category통신 Bymakersweb Views3837
    Read More
  8. 임베디드 개발자를 위한 Hex,Bin,Dec 변환기 유틸

    Date2023.02.27 Category개발환경 Bymakersweb Views6149
    Read More
  9. ATtiny85 개발보드(HW-260)

    Date2023.01.02 Category개발환경 Bymakersweb Views4053
    Read More
  10. No Image

    플랫폼 디바이스 및 디바이스 트리

    Date2021.03.20 Category드라이버 Bymakersweb Views6401
    Read More
  11. Android 기기를 사용하여 Raspberry Pi SD 카드 작성 방법

    Date2020.08.01 CategorySBC Bymakersweb Views4764
    Read More
  12. No Image

    Raspberry Pi 의 프레임버퍼(Framebuffer)구성

    Date2020.05.15 CategorySBC Bymakersweb Views6164
    Read More
  13. 라즈베리파이2에서 RTOS기반 GPIO제어(LED)

    Date2020.04.21 CategorySBC Bymakersweb Views5170
    Read More
  14. POSIX를 지원하는 오픈소스 RTOS, RTEMS

    Date2020.04.15 Category운영체제 Bymakersweb Views5198
    Read More
  15. No Image

    라즈베리파이 부팅 가능한 sd카드 파티션 생성

    Date2020.04.15 Category운영체제 Bymakersweb Views5268
    Read More
  16. No Image

    플랫폼 디바이스 및 드라이버에 대해서

    Date2020.02.01 Category드라이버 Bymakersweb Views11558
    Read More
  17. No Image

    디바이스 트리(Device Tree, DT)

    Date2020.01.12 Category운영체제 Bymakersweb Views9713
    Read More
  18. RISC-V : 자유롭고 개방 된 RISC 명령어 세트 아키텍처

    Date2020.01.01 CategoryMCU Bymakersweb Views4487
    Read More
  19. 임베디드 비대칭 멀티 프로세싱(asymmetric multiprocessing) 시스템

    Date2019.12.31 Category운영체제 Bymakersweb Views4498
    Read More
  20. No Image

    임베디드 시스템에서 베어메탈(Bare metal) 이란?

    Date2019.12.11 Category펌웨어 Bymakersweb Views8323
    Read More
Board Pagination Prev 1 2 3 Next
/ 3