<div dir="ltr"><div>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@10100000 , pinctrl etc remain as foggy as it was 12 hours ago. My problems are-</div><div><br></div><div>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? </div><div>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? </div><div>3. In the following code, when should we use gmac and when ephy? </div><div>         gsw@10110000 {</div><div><span class="" style="white-space:pre">         </span>ralink,port4 = "gmac";</div><div><span class="" style="white-space:pre">   </span>};</div><div>4. what does the following code do? </div><div><div><span class="" style="white-space:pre">  </span>pinctrl {</div><div><span class="" style="white-space:pre">          </span>state_default: pinctrl0 {</div><div><span class="" style="white-space:pre">                  </span>gpio {</div><div><span class="" style="white-space:pre">                             </span>ralink,group = "i2c", "uartf";</div><div><span class="" style="white-space:pre">                         </span>ralink,function = "gpio";</div><div><span class="" style="white-space:pre">                        </span>};</div><div><span class="" style="white-space:pre">         </span>};</div><div><span class="" style="white-space:pre"> </span>};</div></div><div>5. where are all the registers such as- rgmii1_pins, mdio_pins, phy4 etc defined? Which code reads the dts file for config?</div><div><br></div><div>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?</div><div><br></div><div>I very much appreciate your helping hand in advance. :)</div><div><br></div><div>Best regards,</div><div>M</div>
</div>