[OpenWrt-Devel] [ramips] Help supporting Xiaomi MiWiFi Mini (.dts file)

Roger Pueyo Centelles openwrt at rogerpueyo.com
Wed Jan 28 18:29:45 EST 2015


Hi,

Some days ago I received a Xiaomi MiWiFi Mini and I've managed to run
OpenWrt on it [1] (i.e. trunk OpenWrt, not the very modified stuff the
vendor provides). I started with this initial patch [2] and I got the
firmware running, but a couple of things are missing. I need some help with
the .dts file (attached). The current status is:

Working: Ethernet, switch, SoC 802.11gbn radio, USB, TTL and sysupgrade

Partially working: MT7612E 802.11ac

Not working: LEDs and button

The problem with the 802.11ac radio is that I can not read the MAC from the
flash. I always get this message at boot time (with different MACs, of
course):

[   14.560000] mt76pci 0000:01:00.0: Invalid MAC address, using random
address 96:a3:a5:fa:a9:2b

So far I've tried this:

        pcie0 {
            mt76 at 0,0 {
                reg = <0x0000 0 0 0 0>;
                device_type = "pci";
                mediatek,mtd-eeprom = <&factory 0x8000>;
            };
        };

and also <&factory 0x0000> but the result is the same. I would say the
location is correct, because I see three consecutive MAC addresses in the
factory partition:

0x0004: 64:09:80:01:66:5D
0x0028: 64:09:80:01:66:5C
0x8004: 64:09:80:01:66:5E

that correspond respectively to SoC_radio, Ethernet and pcie_radio. The
question is, what is the way to make the mt76 driver use the MAC address
written in the flash?

Then, regarding the LEDs, I have tried enabling gpio chips 0, 1, 2 and 3,
exporting all the gpio numbers, setting the direction to "out" in all of
them and switching the values between 0, 1 and 255, but I can not control
any of the three leds (which are always on). The same problem for the reset
button, I can not find it anywhere. What else should I try?

Thank you very much!

Roger

[1] http://wiki.openwrt.org/toh/xiaomi/mini
[2]
https://github.com/rssnsj/openwrt-xiaomi-mini/blob/master/patches/01-xiaomi-mini.patch
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150129/c5c204a8/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: XIAOMI-MIWIFI-MINI.dts
Type: application/octet-stream
Size: 1511 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/openwrt-devel/attachments/20150129/c5c204a8/attachment.obj>
-------------- 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