本文主要是介绍rv1126-rv1109-以太网功能-eth-(修改gmac),希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
新版回来,由于demo板是8211的芯片,考虑成本更换成了8201芯片,
于是主要考虑的是硬件引脚的差异,因为软件demo的8201已经跑通;
然后主要是修改dts即可
diff --git a/kernel/arch/arm/boot/dts/rv1109-38-v10-spi-nand.dts b/kernel/arch/arm/boot/dts/rv1109-38-v10-spi-nand.dts
index 87a4994c0..858b79c0e 100755
--- a/kernel/arch/arm/boot/dts/rv1109-38-v10-spi-nand.dts
+++ b/kernel/arch/arm/boot/dts/rv1109-38-v10-spi-nand.dts
@@ -162,21 +162,28 @@phy-mode = "rmii";clock_in_out = "output";- snps,reset-gpio = <&gpio3 RK_PC5 GPIO_ACTIVE_LOW>;
+ snps,reset-gpio = <&gpio2 RK_PB2 GPIO_ACTIVE_LOW>;snps,reset-active-low;snps,reset-delays-us = <0 50000 50000>;- assigned-clocks = <&cru CLK_GMAC_SRC>, <&cru CLK_GMAC_TX_RX>;
- assigned-clock-parents = <&cru CLK_GMAC_SRC_M0>, <&cru RMII_MODE_CLK>;
+ assigned-clocks = <&cru CLK_GMAC_SRC_M1>, <&cru CLK_GMAC_SRC>, <&cru CLK_GMAC_TX_RX>;
+ assigned-clock-parents = <&cru CLK_GMAC_RGMII_M1>, <&cru CLK_GMAC_SRC_M1>, <&cru RMII_MODE_CLK>;assigned-clock-rates = <50000000>;pinctrl-names = "default";
- pinctrl-0 = <&rmiim0_miim &rgmiim0_rxer &rmiim0_bus2 &rgmiim0_mclkinout_level0>;
+ pinctrl-0 = <&rmiim1_miim &rgmiim1_rxer &rmiim1_bus2 &rgmiim1_mclkinout_level0>;phy-handle = <&phy>;status = "okay";};&mdio {
- phy: phy@0 {
+ phy: phy@1 {compatible = "ethernet-phy-ieee802.3-c22";
- reg = <0x0>;
+ reg = <0x1>;};
};
就是重m0口更换到m1口,然后一直不行,询问才知道是没有验证过的硬件;
于是硬件在原厂支持做了以下修改
总结就是:
1.给CRS_DV加了个下拉
2.把主控给出的芯片频率从XTAL_IN改成XTAL_OUT
===========================================================================
原理图
这篇关于rv1126-rv1109-以太网功能-eth-(修改gmac)的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!