What are the two values inside angle brackets < > in a device tree .dts file

device-treedevicesembedded

Following is the code snippet in a device tree file:

flash@0 {
                compatible = "n25q128";
                reg = <0x0>;
                spi-max-frequency = <50000000>;
                #address-cells = <1>;
                #size-cells = <1>;
                partition@qspi-fsbl-uboot {
                    label = "qspi-fsbl-uboot";
                    reg = <0x0 0x100000>;
                };
                partition@qspi-linux {
                    label = "qspi-linux";
                    reg = <0x100000 0x500000>;
                };
                partition@qspi-device-tree {
                    label = "qspi-device-tree";
                    reg = <0x600000 0x20000>;
                };
                partition@qspi-rootfs {
                    label = "qspi-rootfs";
                    reg = <0x620000 0x5E0000>;
                };
                partition@qspi-bitstream {
                    label = "qspi-bitstream";
                    reg = <0xC00000 0x400000>;
                };
            };

My simple question is what are the two values in < >? for example in reg = <0x600000 0x20000>;

I thought it is initial and final address , but this will be meaning less here since final cannot be lower than initial.

Best Answer

Angle brackets (<>) denotes a "32-bit unsigned integer array" and I believe they are often refereed to as "cells". In the case with the reg property, the first value is the (offset) address and the second the length of the register(s). Note that it is also possible to have multiple ranges i.e.

reg = <addr1 addr1_length addr2 addr2_length  ... addrN addrN_length>

Sources:

Related Question