embeded/raspberry pi2015. 4. 29. 22:05




$ dtc

프로그램 'dtc'을(를) 설치하지 않습니다. 다음을 입력해 설치할 수 있습니다:

sudo apt-get install device-tree-compiler 


$ fdtdump bcm2709-rpi-2-b.dtb

/dts-v1/;

// magic:               0xd00dfeed

// totalsize:           0x163a (5690)

// off_dt_struct:       0x38

// off_dt_strings:      0x139c

// off_mem_rsvmap:      0x28

// version:             17

// last_comp_version:   16

// boot_cpuid_phys:     0x0

// size_dt_strings:     0x29e

// size_dt_struct:      0x1364


/ {

    #address-cells = <0x00000001>;

    #size-cells = <0x00000001>;

    compatible = "brcm,bcm2709";

    model = "Raspberry Pi 2 Model B";

    interrupt-parent = <0x00000001>;

    chosen {

        bootargs = [00];

    };

    aliases {

        soc = "/soc";

        spi0 = "/soc/spi@7e204000";

        i2c0 = "/soc/i2c@7e205000";

        i2c1 = "/soc/i2c@7e804000";

        i2s = "/soc/i2s@7e203000";

        gpio = "/soc/gpio";

        intc = "/soc/interrupt-controller";

        leds = "/soc/leds";

        sound = "/sound";

    };

    memory {

        device_type = "memory";

        reg = <0x00000000 0x736f6300>;

    };

    soc {

        compatible = "simple-bus";

        #address-cells = <0x00000001>;

        #size-cells = <0x00000001>;

        ranges = <0x7e000000 0x00000004 0x00000004>;

        linux,phandle = <0x00000013>;

        phandle = <0x00000013>;

        interrupt-controller {

            compatible = "brcm,bcm2708-armctrl-ic";

            reg = <0x7e00b200 0x00000097>;

            interrupt-controller;

            #interrupt-cells = <0x00000002>;

            linux,phandle = <0x00000001>;

            phandle = <0x00000001>;

        };

        gpio {

            compatible = "brcm,bcm2835-gpio";

            reg = <0x7e200000 0x000000bd>;

            interrupts = <0x00000002 0x00000003 0x00000004 0x00000000>;

            gpio-controller;

            #gpio-cells = <0x00000002>;

            interrupt-controller;

            #interrupt-cells = <0x00000002>;

            linux,phandle = <0x00000008>;

            phandle = <0x00000008>;

            spi0_pins {

                brcm,pins = <0x00000007 0x0000000b 0x00000004 0x00000004 0x00000004>;

                brcm,function = <0x00000004>;

                linux,phandle = <0x00000004>;

                phandle = <0x00000004>;

            };

            i2c0 {

                brcm,pins = <0x00000000 0x000000ee>;

                brcm,function = <0x00000004>;

                linux,phandle = <0x00000006>;

                phandle = <0x00000006>;

            };

            i2c1 {

                brcm,pins = <0x00000002 0x000000ee>;

                brcm,function = <0x00000004>;

                linux,phandle = <0x00000007>;

                phandle = <0x00000007>;

            };

            i2s {

                brcm,pins = <0x00000012 0x00000003 0x00000003 0x00000003>;

                brcm,function = <0x00000004>;

                linux,phandle = <0x00000002>;

                phandle = <0x00000002>;

            };

        };

        i2s@7e203000 {

            compatible = "brcm,bcm2708-i2s";

            reg = <0x7e203000 0x00000003 0x78000000 0x64697361>;

            dma-names = "tx", "rx";

            status = "disabled";

            #sound-dai-cells = <0x00000000>;

            pinctrl-names = "default";

            pinctrl-0 = <0x00000002>;

            linux,phandle = <0x0000000d>;

            phandle = <0x0000000d>;

        };

        spi@7e204000 {

            compatible = "brcm,bcm2708-spi";

            reg = <0x7e204000 0x000000bd>;

            interrupts = <0x00000002 0x00000136>;

            clocks = <0x00000003>;

            #address-cells = <0x00000001>;

            #size-cells = <0x00000000>;

            status = "disabled";

            pinctrl-names = "default";

            pinctrl-0 = <0x00000004>;

            linux,phandle = <0x0000000e>;

            phandle = <0x0000000e>;

            spidev@0 {

                compatible = "spidev";

                reg = <0x00000000>;

                #address-cells = <0x00000001>;

                #size-cells = <0x00000000>;

                spi-max-frequency = <0x0007a120>;

            };

            spidev@1 {

                compatible = "spidev";

                reg = <0x00000001>;

                #address-cells = <0x00000001>;

                #size-cells = <0x00000000>;

                spi-max-frequency = <0x0007a120>;

            };

        };

        i2c@7e205000 {

            compatible = "brcm,bcm2708-i2c";

            reg = <0x7e205000 0x000000bd>;

            interrupts = <0x00000002 0x00000136>;

            clocks = <0x00000005>;

            #address-cells = <0x00000001>;

            #size-cells = <0x00000000>;

            status = "disabled";

            pinctrl-names = "default";

            pinctrl-0 = <0x00000006>;

            clock-frequency = <0x000186a0>;

            linux,phandle = <0x0000000f>;

            phandle = <0x0000000f>;

        };

        i2c@7e804000 {

            compatible = "brcm,bcm2708-i2c";

            reg = <0x7e804000 0x000000bd>;

            interrupts = <0x00000002 0x00000136>;

            clocks = <0x00000005>;

            #address-cells = <0x00000001>;

            #size-cells = <0x00000000>;

            status = "disabled";

            pinctrl-names = "default";

            pinctrl-0 = <0x00000007>;

            clock-frequency = <0x000186a0>;

            linux,phandle = <0x00000010>;

            phandle = <0x00000010>;

        };

        leds {

            compatible = "gpio-leds";

            linux,phandle = <0x00000014>;

            phandle = <0x00000014>;

            act {

                label = "led0";

                linux,default-trigger = "mmc0";

                gpios = <0x00000008 0x00000004 0x00000004>;

                linux,phandle = <0x00000011>;

                phandle = <0x00000011>;

            };

            pwr {

                label = "led1";

                linux,default-trigger = "input";

                gpios = <0x00000008 0x00000004 0x00000004>;

                linux,phandle = <0x00000012>;

                phandle = <0x00000012>;

            };

        };

        arm-pmu {

            compatible = "arm,cortex-a7-pmu";

            interrupts = <0x00000003 0x00000001>;

        };

    };

    clocks {

        compatible = "simple-bus";

        #address-cells = <0x00000001>;

        #size-cells = <0x00000000>;

        i2c {

            compatible = "fixed-clock";

            reg = <0x00000001>;

            #clock-cells = <0x00000000>;

            clock-frequency = <0x0ee6b280>;

            linux,phandle = <0x00000005>;

            phandle = <0x00000005>;

        };

        clock@2 {

            compatible = "fixed-clock";

            reg = <0x00000002>;

            #clock-cells = <0x00000000>;

            clock-output-names = "spi";

            clock-frequency = <0x0ee6b280>;

            linux,phandle = <0x00000003>;

            phandle = <0x00000003>;

        };

    };

    timer {

        compatible = "arm,armv7-timer";

        clock-frequency = <0x0124f800>;

        interrupts = <0x00000003 0x00000003 0x00000003 0x00000001 0x00000004 0x00000004 0x00000004 0x00000004>;

        always-on;

    };

    cpus {

        #address-cells = <0x00000001>;

        #size-cells = <0x00000000>;

        linux,phandle = <0x00000015>;

        phandle = <0x00000015>;

        cpu@0 {

            device_type = "cpu";

            compatible = "arm,cortex-a7";

            reg = <0x00000f00>;

            clock-frequency = <0x2faf0800>;

            linux,phandle = <0x00000009>;

            phandle = <0x00000009>;

        };

        cpu@1 {

            device_type = "cpu";

            compatible = "arm,cortex-a7";

            reg = <0x00000f01>;

            clock-frequency = <0x2faf0800>;

            linux,phandle = <0x0000000a>;

            phandle = <0x0000000a>;

        };

        cpu@2 {

            device_type = "cpu";

            compatible = "arm,cortex-a7";

            reg = <0x00000f02>;

            clock-frequency = <0x2faf0800>;

            linux,phandle = <0x0000000b>;

            phandle = <0x0000000b>;

        };

        cpu@3 {

            device_type = "cpu";

            compatible = "arm,cortex-a7";

            reg = <0x00000f03>;

            clock-frequency = <0x2faf0800>;

            linux,phandle = <0x0000000c>;

            phandle = <0x0000000c>;

        };

    };

    __overrides__ {

        arm_freq = <0x00000009 0x6e63793a 0x66726571 0x636c6f63 0x30000000 0x75656e63 0x00000059 0x00000003 0x73746174 0x0000004f 0x00000003 0x73746174 0x000001b8 0x65717565 0x00000016 0x6b2d6672 0x00000003 0x6770696f 0x000001e1 0x00000003 0x6c696e75 0x69676765>;

        i2s = [00 00 00 0d 73 74 61 74 75 73 00];

        spi = [00 00 00 0e 73 74 61 74 75 73 00];

        i2c0 = [00 00 00 0f 73 74 61 74 75 73 00];

        i2c1 = [00 00 00 10 73 74 61 74 75 73 00];

        i2c0_baudrate = [00 00 00 0f 63 6c 6f 63 6b 2d 66 72 65 71 75 65 6e 63 79 3a 30 00];

        i2c1_baudrate = [00 00 00 10 63 6c 6f 63 6b 2d 66 72 65 71 75 65 6e 63 79 3a 30 00];

        act_led_gpio = <0x00000011 0x0000000c 0x733a3800>;

        act_led_activelow = <0x00000011 0x0000001a 0x782c6465>;

        act_led_trigger = [00 00 00 11 6c 69 6e 75 78 2c 64 65 66 61 75 6c 74 2d 74 72 69 67 67 65 72 00];

        pwr_led_gpio = <0x00000012 0x0000000c 0x733a3800>;

        pwr_led_activelow = <0x00000012 0x0000001a 0x782c6465>;

        pwr_led_trigger = [00 00 00 12 6c 69 6e 75 78 2c 64 65 66 61 75 6c 74 2d 74 72 69 67 67 65 72 00];

    };

    sound {

        linux,phandle = <0x00000016>;

        phandle = <0x00000016>;

    };

    __symbols__ {

        soc = "/soc";

        intc = "/soc/interrupt-controller";

        gpio = "/soc/gpio";

        spi0_pins = "/soc/gpio/spi0_pins";

        i2c0_pins = "/soc/gpio/i2c0";

        i2c1_pins = "/soc/gpio/i2c1";

        i2s_pins = "/soc/gpio/i2s";

        i2s = "/soc/i2s@7e203000";

        spi0 = "/soc/spi@7e204000";

        i2c0 = "/soc/i2c@7e205000";

        i2c1 = "/soc/i2c@7e804000";

        leds = "/soc/leds";

        act_led = "/soc/leds/act";

        pwr_led = "/soc/leds/pwr";

        clk_i2c = "/clocks/i2c";

        clk_spi = "/clocks/clock@2";

        cpus = "/cpus";

        v7_cpu0 = "/cpus/cpu@0";

        v7_cpu1 = "/cpus/cpu@1";

        v7_cpu2 = "/cpus/cpu@2";

        v7_cpu3 = "/cpus/cpu@3";

        sound = "/sound";

    };

};

overlays$ fdtdump lirc-rpi-overlay.dtb

/dts-v1/;

// magic:               0xd00dfeed

// totalsize:           0x594 (1428)

// off_dt_struct:       0x38

// off_dt_strings:      0x4b4

// off_mem_rsvmap:      0x28

// version:             17

// last_comp_version:   16

// boot_cpuid_phys:     0x0

// size_dt_strings:     0xe0

// size_dt_struct:      0x47c


/ {

    compatible = "brcm,bcm2708";

    fragment@0 {

        target-path = "/";

        __overlay__ {

            lirc_rpi {

                compatible = "rpi,lirc-rpi";

                pinctrl-names = "default";

                pinctrl-0 = <0x00000001>;

                status = "okay";

                rpi,sense = <0xffffffff>;

                rpi,softcarrier = <0x00000001>;

                rpi,invert = <0x00000000>;

                rpi,debug = <0x00000000>;

                linux,phandle = <0x00000002>;

                phandle = <0x00000002>;

            };

        };

    };

    fragment@1 {

        target = <0xdeadbeef>;

        __overlay__ {

            lirc_pins {

                brcm,pins = <0x00000011 0x00000084>;

                brcm,function = <0x00000001 0x00000092>;

                brcm,pull = <0x00000000 0x00000065>;

                linux,phandle = <0x00000001>;

                phandle = <0x00000001>;

            };

        };

    };

    __overrides__ {

        gpio_out_pin = <0x00000001 0x00000003 0x6272636d 0x00000010>;

        gpio_in_pin = <0x00000001 0x00000003 0x6272636d 0x00000010>;

        gpio_in_pull = <0x00000001 0x00000003 0x7270692c 0x00000016>;

        sense = <0x00000002 0x00000003 0x7270692c 0x30000000>;

        softcarrier = [00 00 00 02 72 70 69 2c 73 6f 66 74 63 61 72 72 69 65 72 3a 30 00];

        invert = [00 00 00 02 72 70 69 2c 69 6e 76 65 72 74 3a 30 00];

        debug = <0x00000002 0x00000002 0x735f5f00 0x2f667261>;

    };

    __symbols__ {

        lirc_rpi = "/fragment@0/__overlay__/lirc_rpi";

        lirc_pins = "/fragment@1/__overlay__/lirc_pins";

    };

    __fixups__ {

        gpio = "/fragment@1:target:0";

    };

    __local_fixups__ {

        fixup = "/fragment@0/__overlay__/lirc_rpi:pinctrl-0:0", "/__overrides__:gpio_out_pin:0", "/__overrides__:gpio_in_pin:0", "/__overrides__:gpio_in_pull:0", "/__overrides__:sense:0", "/__overrides__:softcarrier:0", "/__overrides__:invert:0", "/__overrides__:debug:0";

    };

}; 

Posted by 구차니