続々 RouterBoard RB850Gx2

とあるエンジニアの備忘log: Device Tree 入門 を参考にして dtb を fdtdump を使って dts にして見てみたらちゃんと MAC アドレスが設定されてた。
つー事は dtb をデコードする必要があるってことか…。


/dts-v1/;
// magic: 0xd00dfeed
// totalsize: 0x2448 (9288)
// off_dt_struct: 0x38
// off_dt_strings: 0x2178
// off_mem_rsvmap: 0x28
// version: 16
// last_comp_version: 16
// boot_cpuid_phys: 0x0
// size_dt_strings: 0x2d0

/ {
model = "RB850G";
compatible = "MPC85xx";
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
linux,phandle = <0x00000064>;
interrupt-parent = <0x00000001>;
cpus {
#cpus = <0x00000002>;
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
linux,phandle = <0x000000c8>;
PowerPC,P1023@0 {
device_type = "cpu";
reg = <0x00000000>;
next-level-cache = <0x00000002>;
timebase-frequency = <0x01fc9f08>;
clock-frequency = <0x1fc9f080>;
};
PowerPC,P1023@1 {
device_type = "cpu";
reg = <0x00000001>;
next-level-cache = <0x00000002>;
cpu-release-addr = <0x00000000 0x1ffff800>;
timebase-frequency = <0x01fc9f08>;
clock-frequency = <0x1fc9f080>;
};
};
aliases {
ethernet0 = "/soc@ff600000/fman@100000/ethernet@e0000";
ethernet1 = "/soc@ff600000/fman@100000/ethernet@e2000";
};
memory {
device_type = "memory";
linux,phandle = <0x0000012c>;
reg = <0x00000000 0x1ffff000>;
};
qman-portals@ff000000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
compatible = "simple-bus";
ranges = <0x00000000 0xff000000 0x00200000>;
qman-fqids@0 {
compatible = "fsl,fqid-range";
fsl,fqid-range = <0x00000100 0x00000100>;
};
qman-pools@0 {
compatible = "fsl,pool-channel-range";
fsl,pool-channel-range = <0x00000021 0x00000003>;
};
qman-cgrids@0 {
compatible = "fsl,cgrid-range";
fsl,cgrid-range = <0x00000000 0x00000040>;
};
qman-portal@0 {
cell-index = <0x00000000>;
compatible = "fsl,qman-portal";
reg = <0x00000000 0x00004000 0x00100000 0x00001000>;
interrupts = <0x0000001d 0x00000002 0x00000000 0x00000000>;
fsl,qman-channel-id = <0x00000000>;
};
qman-portal@4000 {
cell-index = <0x00000001>;
compatible = "fsl,qman-portal";
reg = <0x00004000 0x00004000 0x00101000 0x00001000>;
interrupts = <0x0000001f 0x00000002 0x00000000 0x00000000>;
fsl,qman-channel-id = <0x00000001>;
};
qman-portal@8000 {
cell-index = <0x00000002>;
compatible = "fsl,qman-portal";
reg = <0x00008000 0x00004000 0x00102000 0x00001000>;
interrupts = <0x00000021 0x00000002 0x00000000 0x00000000>;
fsl,qman-channel-id = <0x00000002>;
};
};
bman-portals@ff200000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
compatible = "simple-bus";
ranges = <0x00000000 0xff200000 0x00200000>;
bman-bpids@0 {
compatible = "fsl,bpid-range";
fsl,bpid-range = <0x00000001 0x00000007>;
};
bman-portal@0 {
cell-index = <0x00000000>;
compatible = "fsl,bman-portal";
reg = <0x00000000 0x00004000 0x00100000 0x00001000>;
interrupts = <0x0000001e 0x00000002 0x00000000 0x00000000>;
};
bman-portal@4000 {
cell-index = <0x00000001>;
compatible = "fsl,bman-portal";
reg = <0x00004000 0x00004000 0x00101000 0x00001000>;
interrupts = <0x00000020 0x00000002 0x00000000 0x00000000>;
};
bman-portal@8000 {
cell-index = <0x00000002>;
compatible = "fsl,bman-portal";
reg = <0x00008000 0x00004000 0x00102000 0x00001000>;
interrupts = <0x00000022 0x00000002 0x00000000 0x00000000>;
};
};
soc@ff600000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
device_type = "soc";
compatible = "fsl,p1023-immr", "simple-bus";
ranges = <0x00000000 0xff600000 0x00200000>;
reg = <0xff600000 0x00200000>;
bus-frequency = <0x00000001>;
ecm-law@0 {
compatible = "fsl,ecm-law";
reg = <0x00000000 0x00001000>;
fsl,num-laws = <0x0000000c>;
};
ecm@1000 {
compatible = "fsl,p1023-ecm", "fsl,ecm";
reg = <0x00001000 0x00001000>;
interrupts = <0x00000010 0x00000002 0x00000000 0x00000000>;
};
memory-controller@2000 {
compatible = "fsl,p1023-memory-controller";
reg = <0x00002000 0x00001000>;
interrupts = <0x00000010 0x00000002 0x00000000 0x00000000>;
};
serial@4600 {
cell-index = <0x00000001>;
device_type = "serial";
compatible = "ns16550";
reg = <0x00004600 0x00000100>;
clock-frequency = <0x0fe4f840>;
interrupts = <0x0000002a 0x00000002 0x00000000 0x00000000>;
};
gpio-controller@f000 {
linux,phandle = <0x00000384>;
#gpio-cells = <0x00000002>;
compatible = "fsl,pq3-gpio";
reg = <0x0000f000 0x00000100>;
interrupts = <0x0000002f 0x00000002 0x00000000 0x00000000>;
gpio-controller;
};
l2-cache-controller@20000 {
compatible = "fsl,p1023-l2-cache-controller";
reg = <0x00020000 0x00001000>;
cache-line-size = <0x00000020>;
cache-size = <0x00040000>;
interrupts = <0x00000010 0x00000002 0x00000000 0x00000000>;
linux,phandle = <0x00000002>;
};
gpio-definitions {
monpulse {
gpios = <0x00000384 0x00000004 0x00000000>;
};
monsel0 {
gpios = <0x00000384 0x00000005 0x00000000>;
};
monsel1 {
gpios = <0x00000384 0x00000006 0x00000000>;
};
};
led {
};
gpio-leds {
compatible = "gpio-leds";
user-led {
label = "user-led";
gpios = <0x00000384 0x00000003 0x00000000>;
active-state = "high";
default-state = "off";
};
};
crypto@300000 {
compatible = "fsl,sec-v4.2", "fsl,sec-v4.0";
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
reg = <0x00030000 0x00010000>;
ranges = <0x00000000 0x00030000 0x00010000>;
interrupts = <0x0000003a 0x00000002 0x00000000 0x00000000>;
jr@1000 {
compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
reg = <0x00001000 0x00001000>;
interrupts = <0x0000002d 0x00000002 0x00000000 0x00000000>;
};
jr@2000 {
compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
reg = <0x00002000 0x00001000>;
interrupts = <0x0000002d 0x00000002 0x00000000 0x00000000>;
};
jr@3000 {
compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
reg = <0x00003000 0x00001000>;
interrupts = <0x00000039 0x00000002 0x00000000 0x00000000>;
};
jr@4000 {
compatible = "fsl,sec-v4.2-job-ring", "fsl,sec-v4.0-job-ring";
reg = <0x00004000 0x00001000>;
interrupts = <0x00000039 0x00000002 0x00000000 0x00000000>;
};
rtic@6000 {
compatible = "fsl,sec-v4.2-rtic", "fsl,sec-v4.0-rtic";
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
reg = <0x00006000 0x00000100>;
ranges = <0x00000000 0x00006100 0x00000e00>;
rtic-a@0 {
compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
reg = <0x00000000 0x00000020 0x00000100 0x00000080>;
};
rtic-b@20 {
compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
reg = <0x00000020 0x00000020 0x00000200 0x00000080>;
};
rtic-c@40 {
compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
reg = <0x00000040 0x00000020 0x00000300 0x00000080>;
};
rtic-d@60 {
compatible = "fsl,sec-v4.2-rtic-memory", "fsl,sec-v4.0-rtic-memory";
reg = <0x00000060 0x00000020 0x00000500 0x00000080>;
};
};
};
pic@40000 {
interrupt-controller;
#address-cells = <0x00000000>;
#interrupt-cells = <0x00000004>;
reg = <0x00040000 0x00040000>;
compatible = "fsl,mpic";
device_type = "open-pic";
linux,phandle = <0x00000001>;
};
timer@41100 {
compatible = "fsl,mpic-global-timer";
reg = <0x00041100 0x00000100 0x00041300 0x00000004>;
interrupts = <0x00000000 0x00000000 0x00000003 0x00000000 0x00000001 0x00000000 0x00000003 0x00000000 0x00000002 0x00000000 0x00000003 0x00000000 0x00000003 0x00000000 0x00000003 0x00000000>;
};
msi@41600 {
compatible = "fsl,mpic-msi";
reg = <0x00041600 0x00000080>;
msi-available-ranges = <0x00000000 0x00000100>;
interrupts = <0x000000e0 0x00000000 0x00000000 0x00000000 0x000000e1 0x00000000 0x00000000 0x00000000 0x000000e2 0x00000000 0x00000000 0x00000000 0x000000e3 0x00000000 0x00000000 0x00000000 0x000000e4 0x00000000 0x00000000 0x00000000 0x000000e5 0x00000000 0x00000000 0x00000000 0x000000e6 0x00000000 0x00000000 0x00000000 0x000000e7 0x00000000 0x00000000 0x00000000>;
};
qman@88000 {
compatible = "fsl,qman";
reg = <0x00088000 0x00001000>;
interrupts = <0x00000010 0x00000002 0x00000000 0x00000000>;
};
bman@8a000 {
compatible = "fsl,bman";
reg = <0x0008a000 0x00001000>;
interrupts = <0x00000010 0x00000002 0x00000000 0x00000000>;
};
global-utilities@e0000 {
compatible = "fsl,p1023-guts";
reg = <0x000e0000 0x00001000>;
fsl,has-rstcr;
};
fman@100000 {
#address-cells = <0x00000001>;
#size-cells = <0x00000001>;
cell-index = <0x00000000>;
compatible = "fsl,fman", "simple-bus";
ranges = <0x00000000 0x00100000 0x00100000>;
reg = <0x00100000 0x00100000>;
clock-frequency = <0x0fe4f840>;
interrupts = <0x00000018 0x00000002 0x00000000 0x00000000 0x00000010 0x00000002 0x00000000 0x00000000>;
cc@0 {
compatible = "fsl,fman-cc";
};
muram@0 {
compatible = "fsl,fman-muram";
reg = <0x00000000 0x00010000>;
};
bmi@80000 {
compatible = "fsl,fman-bmi";
reg = <0x00080000 0x00000400>;
};
qmi@80400 {
compatible = "fsl,fman-qmi";
reg = <0x00080400 0x00000400>;
};
policer@c0000 {
compatible = "fsl,fman-policer";
reg = <0x000c0000 0x00001000>;
};
keygen@c1000 {
compatible = "fsl,fman-keygen";
reg = <0x000c1000 0x00001000>;
};
dma@c2000 {
compatible = "fsl,fman-dma";
reg = <0x000c2000 0x00001000>;
};
fpm@c3000 {
compatible = "fsl,fman-fpm";
reg = <0x000c3000 0x00001000>;
};
parser@c7000 {
compatible = "fsl,fman-parser";
reg = <0x000c7000 0x00001000>;
};
port@88000 {
cell-index = <0x00000000>;
compatible = "fsl,fman-port-1g-rx";
reg = <0x00088000 0x00001000>;
linux,phandle = <0x00000004>;
};
port@89000 {
cell-index = <0x00000001>;
compatible = "fsl,fman-port-1g-rx";
reg = <0x00089000 0x00001000>;
linux,phandle = <0x00000008>;
};
port@a8000 {
cell-index = <0x00000000>;
compatible = "fsl,fman-port-1g-tx";
reg = <0x000a8000 0x00001000>;
fsl,qman-channel-id = <0x00000040>;
linux,phandle = <0x00000005>;
};
port@a9000 {
cell-index = <0x00000001>;
compatible = "fsl,fman-port-1g-tx";
reg = <0x000a9000 0x00001000>;
fsl,qman-channel-id = <0x00000041>;
linux,phandle = <0x00000009>;
};
port@82000 {
cell-index = <0x00000001>;
compatible = "fsl,fman-port-oh";
reg = <0x00082000 0x00001000>;
fsl,qman-channel-id = <0x00000043>;
};
port@83000 {
cell-index = <0x00000002>;
compatible = "fsl,fman-port-oh";
reg = <0x00083000 0x00001000>;
fsl,qman-channel-id = <0x00000044>;
};
port@84000 {
cell-index = <0x00000003>;
compatible = "fsl,fman-port-oh";
reg = <0x00084000 0x00001000>;
fsl,qman-channel-id = <0x00000045>;
};
port@85000 {
cell-index = <0x00000004>;
compatible = "fsl,fman-port-oh";
reg = <0x00085000 0x00001000>;
fsl,qman-channel-id = <0x00000046>;
};
ethernet@e0000 {
phy-handle = <0x00000003>;
phy-connection-type = "rgmii";
cell-index = <0x00000000>;
compatible = "fsl,fman-1g-mac";
reg = <0x000e0000 0x00001000>;
fsl,port-handles = <0x00000004 0x00000005>;
ptimer-handle = <0x00000006>;
mac-address = [4c 5e 0c 6e ffffff9b 14];
linux,phandle = <0x0000000b>;
};
ethernet@e2000 {
phy-handle = <0x00000007>;
phy-connection-type = "rgmii";
cell-index = <0x00000001>;
compatible = "fsl,fman-1g-mac";
reg = <0x000e2000 0x00001000>;
fsl,port-handles = <0x00000008 0x00000009>;
ptimer-handle = <0x00000006>;
mac-address = [4c 5e 0c 6e ffffff9b 14];
linux,phandle = <0x0000000a>;
};
mdio@e1120 {
#address-cells = <0x00000001>;
#size-cells = <0x00000000>;
compatible = "fsl,fman-mdio";
reg = <0x000e1120 0x00000ee0>;
interrupts = <0x0000001a 0x00000001 0x00000000 0x00000000>;
ethernet-phy@0 {
reg = <0x00000000>;
linux,phandle = <0x00000003>;
};
ethernet-phy@4 {
reg = <0x00000004>;
linux,phandle = <0x00000007>;
};
};
rtc@fe000 {
compatible = "fsl,fman-rtc";
reg = <0x000fe000 0x00001000>;
linux,phandle = <0x00000006>;
};
};
};
nnand {
reg = <0xf0000000 0x00001000>;
};
nand_fcm {
device_type = "rb,nand";
reg = <0xf8000000 0x00040000>;
};
beeper {
beep1 = <0x00000000>;
gpio = <0x00000384>;
interrupts = <0x00000050 0x00000002 0x00000000 0x00000000>;
interrupt-parent = <0x00000001>;
};
spi {
linux,phandle = <0x00000258>;
device_type = "spi";
reg = <0xff607000 0x00001000>;
slave_select = <0x00000600 0x00000000 0x00000000>;
microsd_cs = <0x00000001>;
};
microsd {
bus = <0x00000600 0x00000000>;
card_detect = <0x00000900 0x0000000a 0x00000000>;
power_disable = <0x00000900 0x0000000b 0x00000000>;
};
flash {
reg = <0xfffe0000 0x00020000>;
primary_offset = <0x00015000>;
};
chosen {
bootargs = "ubifs_support console=ttyS0,115200 parts=1 boot_part_size=8388608 board=mpc85xx ver=3.18 boot=1 mlc=6";
linux,stdout-path = "/soc@ff600000/serial@4600";
linux,initrd = <0x00493000 0x00000000>;
linux,platform = <0x00008062>;
};
fsl,dpaa {
compatible = "fsl,p1023-dpaa", "fsl,dpaa";
ethernet@1 {
compatible = "fsl,p1023-dpa-ethernet", "fsl,dpa-ethernet";
fsl,fman-mac = <0x0000000a>;
};
ethernet@0 {
compatible = "fsl,p1023-dpa-ethernet", "fsl,dpa-ethernet";
fsl,fman-mac = <0x0000000b>;
};
};
};