Re: [OpenWrt-Devel] Suggestions anyone - EasyBox 904 xDSL (Lantiq xrx200)

2015-05-29 Thread Martin Blumenstingl
On Sat, May 30, 2015 at 1:58 AM, Arnold Schulz  wrote:
> I don't know. According to console output PCI seems to be recognized, for
> PCIe there are error messages ("pcie_rc_initialize link up failed!").
> The lspci command shows nothing.
Can you see the physical wifi chip on your board? If you google the part
number then you'll probably know whether it's PCI or PCIe.
Looking at this config (I'm hoping that this is the correct device) suggests
that it's a PCIe is at least enabled: [0]
Please note that OpenWrt svn r45717 and r45718 contain bugfixes for PCIe!

> This leads to the assumption, that USB is connected via PCI. But lspci shows
> nothing, while USB seems to work. lsusb shows two busses and I could mount a
> vfat USB stick.
Sorry, I have no idea how USB is connected internally.

> Here I had made many tests and I think I tried all or allmost all
> combinations of
>reg = ; // X = 0, *1, *2, 3, 4, 5 used in
> other profiles
>phy-handle = <&phyY>;  // Y = *0, 1, 5, *11, 12, *13, 14 *=most use
> in other profiles
>
> Console msgs told about successfull attachment only for values &phy11 or
> &phy13,
> but then networking via ethernet did not work any longer.
I had the same behavior when I mixed up the assignment of a phy to the
ethernet-port or when I used an incorrect "reg" config at the ethernet-port.

> BTW: Which phy-mode (gmii, rgmii or even mii) to use in 'phy-mode = "..."'
> lines?
> Is this also a variable I should play with?
Yes, have a look at the network driver: [1]
If you have gbit ethernet then you should probably use gmii or rgmii (depending
on the port -> see the source-code).

As a general note:
You can find most pinmux/GPIO settings in the original source code: [2]
Sometimes you need to do some basic calulations (for example interrupts are
+8 in the OpenWrt kernel).
I also suggest to get a copy of Draytek's vigor 2760 GPL sources [3] as they
are shipping the most complete kernel source that I have seen so far.
Using both sources together with the original kernel config helps you
finding the
correct values.


Regards,
Martin


[0] 
https://github.com/uwehermann/easybox-904-xdsl-firmware/blob/master/target/linux/ltqcpe/platform_vr9/config-2.6.32#L134
[1] 
https://github.com/openwrt-mirror/openwrt/blob/master/target/linux/lantiq/patches-3.18/0025-NET-MIPS-lantiq-adds-xrx200-net.patch#L1532
[2] 
https://github.com/uwehermann/easybox-904-xdsl-firmware/tree/master/projects/904dsl/linux/linux-2.6.32.32/arch/mips
[3] http://gplsource.draytek.com/Vigor2760/v2760_v1212_GPL_release.tar.bz2
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Suggestions anyone - EasyBox 904 xDSL (Lantiq xrx200)

2015-05-29 Thread Arnold Schulz

Hi Martin,


On Fri, May 29, 2015 at 5:50 PM, Arnold Schulz  wrote:

My current questions center on the .dts settings:
1. How to access WLAN hardware

Do you know if wifi is connected via PCI or PCIe?
You then need to configure the corresponding pins in the pinmux section.
Of course you also need to set up the bus in the dts.


I don't know. According to console output PCI seems to be recognized, for
PCIe there are error messages ("pcie_rc_initialize link up failed!").
The lspci command shows nothing.

Console output from a dts trial is here:
  http://arny.tjps.eu/OpenWrt/EasyBox904xDSL/devel/v0.1-console.log

which corresponds to my dts file in
  http://arny.tjps.eu/OpenWrt/EasyBox904xDSL/devel/v0.1-EasyBox904xDSL.patch

BTW, console output from orig. firmware is here:
  http://arny.tjps.eu/OpenWrt/EasyBox904xDSL/oem-firmware-info/
(concatenate bootlog-part1-console.txt and bootlog-part2-netlog.txt)

There I find only the following PCI or PCIe related messages:

  [0.346000] === ifx_gpio_register (10,PCI) === kernel init
  [0.354000] === ifx_gpio_register (11,PCIE) === kernel init
  [  121.742000] setUsbPciInfo() cpu_to_usb_addr_shift[5]:0x, 
usb_to_cpu_addr_shift[5]:0x
  [  121.751000] usb_pci_probe() Found Synopsis OTG-1, baseAddr:0xbe101000, 
IRQ:54
  [  121.758000] setUsbPciInfo() cpu_to_usb_addr_shift[6]:0x, 
usb_to_cpu_addr_shift[6]:0x
  [  121.767000] usb_pci_probe() Found Synopsis OTG-2, baseAddr:0xbe106000, 
IRQ:48
  [  121.774000] usb_hcd_init() probe PCI function:2 !!

This leads to the assumption, that USB is connected via PCI. But lspci shows
nothing, while USB seems to work. lsusb shows two busses and I could mount a
vfat USB stick.

I played around with pinmux settings, inspired by looking at other dtsi
and dts files, but could not recognize any effects.

If you suggest changes of the dts file, I will try them and report the
results.




2. Recommended settings for this phy-thingy

There are no "recommended" settings.
Let's start at the top:
vr9_phy11g_a2x.bin -> used if you have 1gbit ports, otherwise you
need to load vr9_phy22f_a2x.bin.


I understand. The EasyBox 904 xDSL has 1Gb Ethernet, so vr9_phy11g_a2x.bin
is the right one.


Have you already figured out which phys are connected (your dts states
that you get a reply on 0x11 and 0x13 (those are *probably* LAN 3 and 4).
There should be two more, possible addresses are: 0x0, 0x1, 0x5 and 0x14.


Here I had made many tests and I think I tried all or allmost all combinations 
of
   reg = ; // X = 0, *1, *2, 3, 4, 5 used in other 
profiles
   phy-handle = <&phyY>;  // Y = *0, 1, 5, *11, 12, *13, 14 *=most use in 
other profiles

Console msgs told about successfull attachment only for values &phy11 or &phy13,
but then networking via ethernet did not work any longer.

BTW: Which phy-mode (gmii, rgmii or even mii) to use in 'phy-mode = "..."' 
lines?
Is this also a variable I should play with?


If the LEDs are directly connected (the other option is they are connected
via STP) then it's pretty easy to find their GPIOs by taking the script from [0]
and modifying it a bit.
Same for the buttons, only that you configure the GPIOs in "in" (input) mode
and read the value instead of writing it.



[0] http://wiki.openwrt.org/doc/hardware/port.gpio

I keep these good hints in mind for later.

Cheers,
Arnold
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


Re: [OpenWrt-Devel] Suggestions anyone - EasyBox 904 xDSL (Lantiq xrx200)

2015-05-29 Thread Martin Blumenstingl
Hi Arnold,

On Fri, May 29, 2015 at 5:50 PM, Arnold Schulz  wrote:
> My current questions center on the .dts settings:
> 1. How to access WLAN hardware
Do you know if wifi is connected via PCI or PCIe?
You then need to configure the corresponding pins in the pinmux section.
Of course you also need to set up the bus in the dts.

> 2. Recommended settings for this phy-thingy
There are no "recommended" settings.
Let's start at the top:
vr9_phy11g_a2x.bin -> used if you have 1gbit ports, otherwise you
need to load vr9_phy22f_a2x.bin.
Have you already figured out which phys are connected (your dts states
that you get a reply on 0x11 and 0x13 (those are *probably* LAN 3 and 4).
There should be two more, possible addresses are: 0x0, 0x1, 0x5 and 0x14.

If the LEDs are directly connected (the other option is they are connected
via STP) then it's pretty easy to find their GPIOs by taking the script from [0]
and modifying it a bit.
Same for the buttons, only that you configure the GPIOs in "in" (input) mode
and read the value instead of writing it.


Regards,
Martin


[0] http://wiki.openwrt.org/doc/hardware/port.gpio
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel


[OpenWrt-Devel] Suggestions anyone - EasyBox 904 xDSL (Lantiq xrx200)

2015-05-29 Thread Arnold Schulz

I am trying to port OpenWrt to the EasyBox 904xDSL.

As I got the impression that OpenWrt developers rely mainly on this
mailing list, I humbly dare to point to this location, where there are 
more infos and links to details like a patch for OpenWrt trunk:


  https://forum.openwrt.org/viewtopic.php?id=57649

My current questions center on the .dts settings:
1. How to access WLAN hardware
2. Recommended settings for this phy-thingy

Thanks in advance for feedback,
Arnold
___
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel