[OpenWrt-Devel] [ramips] Help supporting Xiaomi MiWiFi Mini (.dts file)
郭传鈜
gch981213 at gmail.com
Wed Jan 28 18:47:16 EST 2015
Sorry I haven't read your mail correctly.I pointed to the ethernet MAC address.
2015-01-29 7:42 GMT+08:00, 郭传鈜 <gch981213 at gmail.com>:
> Someone have posted a good patch for that device:
> http://www.right.com.cn/forum/thread-157588-1-1.html
> The dts above works fine.
> After applying the patch above,you need to edit the following:
> reset {
> label = "reset";
> gpios = <&gpio1 6 0>;
> linux,code = <0x198>;
> };
> change 0x198 to 0x100
> and add the mt76 section in
> pcie at 10140000 {
> status = "okay";
> };
>
>
> BTW ,the mac address is defined here:
> ethernet at 10100000 {
> pinctrl-names = "default";
> pinctrl-0 = <&ephy_pins>;
> mtd-mac-address = <&factory 0x4>; <----------
> ralink,port-map = "llllw";
> };
>
> 2015-01-29 7:29 GMT+08:00, Roger Pueyo Centelles <openwrt at rogerpueyo.com>:
>> 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
>>
>
_______________________________________________
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