Quantcast
Channel: Active questions tagged kernel - Stack Overflow
Viewing all articles
Browse latest Browse all 6502

Understanding the Device Tree mechanism

$
0
0

Was reading the Device Tree Usage and reached to the section describing the ranges key attribute for a node.

external-bus {        #address-cells = <2>        #size-cells = <1>;        ranges = <0 0  0x10100000   0x10000     // Chipselect 1, Ethernet                  1 0  0x10160000   0x10000     // Chipselect 2, i2c controller                  2 0  0x30000000   0x1000000>; // Chipselect 3, NOR Flash        ethernet@0,0 {            compatible = "smc,smc91c111";            reg = <0 0 0x1000>;            interrupts = < 5 2 >;        };        i2c@1,0 {            compatible = "acme,a1234-i2c-bus";            #address-cells = <1>;            #size-cells = <0>;            reg = <1 0 0x1000>;            interrupts = < 6 2 >;            rtc@58 {                compatible = "maxim,ds1338";                reg = <58>;                interrupts = < 7 3 >;            };        };        flash@2,0 {            compatible = "samsung,k8f1315ebm", "cfi-flash";            reg = <2 0 0x4000000>;        };    };
  1. What is the difference between ranges and reg ?
  2. What are the dimensions for the ranges, how the parser figure out what is written in it?
  3. One missing part I didn't understand yet? Can't include .h files instead of hard-coding values in a the .dts file?

Viewing all articles
Browse latest Browse all 6502

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>