So basically....if you look at the DTSI file
each block of
something {
...
...
}
is called a node and represents defining a subdevice that is part of the router
within all the nodes is information that the kernel needs to use it
for example the compatible values like
compatible = "gpio-keys";
this tells a driver for the kernel that the following items in the node are all buttons/switches, like the reset button
everything in the "keys" node is a button
the "gpios" value tells another driver which pin number is for the button
and whether it is activated when the input is a HIGH or LOW (3V or GND)
the "linux,code" value tells the driver which software event to map that button to
However, GPIO stuff should be done later
you need to make a DTS using the things you know about the board with less nodes
the important ones being:
the root node (with the model and SOC compatible)
spi0 (for flash)
switch0 (for ethernet)
pcie0 (for wifi)
pcie1 (for another wifi interface if you have it)
it's possible that one of the wifi interface is not through a PCI device
A lot of this information can be found through the kernel log
otherwise looking around /sys in the shell provided by UART
or just knowing what's on the board by tracing pinouts (or just looking at them on the board)
You can also look at the DTS for Archer A6 v2 for some information
but the names of many things will be different...I mean this for basic things like how many wifi interfaces, what kind of ethernet interface and how they are defined, but you cannot use the same information exactly.