[OpenWrt-Devel] Need help understanding Ralink's dts config file and how it works

Md Mahbubur Rasheed mmrasheed at gmail.com
Sun Nov 23 11:05:01 EST 2014


I spent the whole, exhausting day to understand how dts config file works.
I used MT7620A programming guide, and a MT7620A based router to try and
test different configurations. Although I understood few parts, such as
enabling registers to enable features like usb ohci, or sdhci. I also
understood memory and gpio configuration. But configurations, such as-
ethernet at 10100000 , pinctrl etc remain as foggy as it was 12 hours ago. My
problems are-

1. Why a single SoC has so many built in ethernet controllers/ drivers
(MT7530, RT2880, MT7620)? If a doesn't have any external ethernet
controller, then which one should we use?
2. How (and where) is the WAN port (i.e. phy4) mapped to gigabit bus rgmii?
Is it possible to map WAN port as a gigabit port? Or it always remains
100Mbps port?
3. In the following code, when should we use gmac and when ephy?
         gsw at 10110000 {
ralink,port4 = "gmac";
};
4. what does the following code do?
pinctrl {
state_default: pinctrl0 {
gpio {
ralink,group = "i2c", "uartf";
ralink,function = "gpio";
};
};
};
5. where are all the registers such as- rgmii1_pins, mdio_pins, phy4 etc
defined? Which code reads the dts file for config?

Finally, the MT7620A programming guide describes the registers, but it
doesn't explain the configurations or provides examples. I tried to use dts
files for other routers to understand, but it was not much fruitful either.
Is there any resource explaining the structure and programming model?

I very much appreciate your helping hand in advance. :)

Best regards,
M
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20141123/c12ca6f4/attachment.htm>
-------------- next part --------------
_______________________________________________
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


More information about the openwrt-devel mailing list