修改MT7620 DTS支持USB

    首先确定硬件有USB,这个得检查板子是否引出了usb口,一把来说mt7620的板子是引出了的。

    文件修改:在./openwrt/garget/linux/ramips/dts/目录下,确定MT7620a.dts文件是否有如下内容,status = “okay”很重要。

 ehci@101c0000 {
        status = "okay";
    };

    ohci@101c1000 {
        status = "okay";
    };

    接着,还是在./openwrt/garget/linux/ramips/dts/目录下,将文件 mt7620a.dtsi 如下内容:

ehci@101c0000 {
        compatible = "ralink,rt3xxx-ehci";
        reg = <0x101c0000 0x1000>;

        interrupt-parent = <&intc>;
        interrupts = <18>;

        status = "disabled";
    };

    ohci@101c1000 {
        compatible = "ralink,rt3xxx-ohci";
        reg = <0x101c1000 0x1000>;

        interrupt-parent = <&intc>;
        interrupts = <18>;

        status = "disabled";
    };

status = “disabled”注释掉,更改成这样:

    ehci@101c0000 {
        compatible = "ralink,rt3xxx-ehci";
        reg = <0x101c0000 0x1000>;

        interrupt-parent = <&intc>;
        interrupts = <18>;

        #status = "disabled";
    };

    ohci@101c1000 {
        compatible = "ralink,rt3xxx-ohci";
        reg = <0x101c1000 0x1000>;

        interrupt-parent = <&intc>;
        interrupts = <18>;

        #status = "disabled";
    };

执行make menuconfig ,添加USB相关支持

Kernel modules —> USB Support —> <*> kmod-usb-core.  
Kernel modules —> USB Support —> <*> kmod-usb-ohci.  
Kernel modules —> USB Support —> <*> kmod-usb-uhci.  
Kernel modules —> USB Support —> <*> kmod-usb-storage.
Kernel modules —> USB Support —> <*> kmod-usb-storage-extras.
Kernel modules —> USB Support —> <*> kmod-usb2. 

重新编译就行了。

本文章由作者:佐须之男 整理编辑,原文地址: 修改MT7620 DTS支持USB
本站的文章和资源来自互联网或者站长的原创,按照 CC BY -NC -SA 3.0 CN协议发布和共享,转载或引用本站文章应遵循相同协议。如果有侵犯版权的资 源请尽快联系站长,我们会在24h内删除有争议的资源。欢迎大家多多交流,期待共同学习进步。

相关推荐