----- Original Message ----- From: "Felix Kaechele" <[email protected]>
To: <[email protected]>
Sent: Sunday, September 22, 2013 2:30 PM
Subject: [Spam] Re: [OpenWrt-Devel] Few questions about Ralink support


Flávio Silveira wrote:
 1- Wireless LED is defined as rt2800pci-phy0::radio, but in this router
it lights up when it detects phy0, when wireless is up it turns off, is
there a way to change LED polarity? Maybe in dts file?!

Add ralink,led-polarity = <1>; to the wmac section in your DTS.

Ok.

 2- My dts file doesn't have wmac@10180000 section, although wireless
works regardless. I've talked to John Crispin on IRC and he said it is
not mandatory, can someone explain when it is needed or what it does?
I've seen it being used with "status = okay", but it seems to have
another options.

For the WSoCs the wmac is now automatically enabled, I guess just
because every WSoC has a wmac. That means that you only need this
section in your DTS file when you need to change the defaults.

Understood.

     Also I was worried about "rt2800_wmac 10180000.wmac: failed to load
eeprom property", which I thought was caused by lack of
"ralink,mtd-eeprom" definition in wmac@10180000 section, just for
testing purposes, what's the correct why to define it? I can ignore it
as John advised, but I'm curious :-)

     Syntax seems to be "ralink,mtd-eeprom = <&<partition containing
eeprom> <size>>;"

Almost: ralink,mtd-eeprom = <&<name of partition containing eeprom>
<offset>>;

Think of the & in front of the partition name as a pointer (like in C)
that corresponds to the name of the partition given earlier in the DTS.
That's why some partitions have a descriptor in front of them (i.e.
"factory:")

The eeprom size itself is defined in the rt2x00 driver.

     I'm using devdata in 10-rt2x00-eeprom for my device, I just don't
know what to put in <size>, I've seen mostly 0, so "ralink,mtd-eeprom =
<&devdata 0>;" should work, right?

If your partition containing the eeprom is named devdata and the eeprom
data starts at byte offset 0 then yes.

The offset defined in 10-rt2x00-eeprom is 16384, so I've put: "ralink,mtd-eeprom = <&devdata 16384>;"

10-rt2x00-eeprom should become obsolete for most boards as they move
towards defining this information in the DTS. The script is still useful
if more sophisticated means of extracting the firmware is needed.

Good to know, so it's good to update my dts file already, right?

 3- I've seen not all Ralink routers are defined in 02_network, because
I assume default configuration works for most of them. I've defined
mine, but my question is: How do I know I have to define it? It seems to
work regardless.

Mostly you can tell by either looking how the network interfaces on the
original firmware are organized or how the ports are arranged on the
device. Mostly you need this when the LAN and WAN port are on the same
switch and are only seperated by VLANs.

Ok, I'm gonna try with it defined and without define, if it works, I'm gonna remove it.

 4- How do I discover "magic" of this router, to setup it properly in
platform_check_image() in platform.sh?

The magic you need depends on the bootloader. Most Ralink based boards
use u-boot so 0x27051956 would be the correct magic.

Sometimes vendors feel they need to change this. Then you can usually
look at the vendor's original firmware image header.

Do you mean for me to check the first 32 bytes of original
firmware and it should contain 27051956? Is there an offset to look at?
Here is stock firmware boot log, if it helps: http://codepad.org/stXQWQSQ

Regards,
Felix
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Thanks for your quick answers!

Regards,
Flavio _______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to