Re: [OpenWrt-Devel] ZyXEL NBG4615

2015-09-23 Thread Nerijus Baliunas
On Sat, 19 Sep 2015 12:11:06 +0200 John Crispin  wrote:

> rt305x has a rgmii that the switch connects to. however we dont have
> support in the driver for that rgmii port. you will need to first atch
> the driver to support the rgmii interface and then hook up the switch
> driver.

As I don't know how to hook the switch driver, I tried to copy ar8216.c and .h
to drivers/net/ethernet/ralink, added ar8216.o to Makefile, but when compiling
I get an error:
  CC  drivers/net/ethernet/ralink/ar8216.o
drivers/net/ethernet/ralink/ar8216.c: In function 'ar8216_mangle_tx':
drivers/net/ethernet/ralink/ar8216.c:482:32: error: 'struct net_device' has no 
member named 'phy_ptr'
  struct ar8xxx_priv *priv = dev->phy_ptr;

Then I plan to add ar8xxx_init(); to ralink_soc_eth.c, but it probably is a bad 
idea.
Could anyone guide me?

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


Re: [OpenWrt-Devel] ZyXEL NBG4615

2015-09-20 Thread Nerijus Baliūnas

2015-09-19 23:48, Nerijus Baliunas rašė:

rt305x has a rgmii that the switch connects to. however we dont have
support in the driver for that rgmii port. you will need to first atch
the driver to support the rgmii interface and then hook up the switch
driver.


drivers/net/phy/ar8216.c already has
if (priv->phy->interface == PHY_INTERFACE_MODE_RGMII)
Is it something similar? How can I add support for rt305x rgmii?


I found zyxel keenetic (which is almost the same as NBG4615) source code 
-

http://fami.codefreak.ru/mirrors/zyxel-keenetic/kernel/
I put drivers/net/raeth directory from the source here -
http://sat.lt/drivers_net_raeth/
It has support for Giga switch Atheros AR8316 inside.

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


Re: [OpenWrt-Devel] ZyXEL NBG4615

2015-09-19 Thread Nerijus Baliunas
On Sat, 19 Sep 2015 12:11:06 +0200 John Crispin  wrote:

> > it is similar to NBG-419N but has Atheros AR8316 4+1 GbE switch. I enabled
> > CONFIG_AR8216_PHY=y in target/linux/ramips/rt305x/config-3.18, rebuilt and
> > loaded openwrt-ramips-rt305x-nbg-419n-initramfs-uImage.bin to SDRAM via 
> > TFTP. 
> > 
> > Now /sys/bus/mdio_bus/drivers/Atheros AR8216!AR8236!AR8/ exists, but
> > # swconfig list
> > Found: switch0 - rt305x
> > 
> > How can I make switch work?
> > 
> > I found similar problem https://forum.openwrt.org/viewtopic.php?id=49276
> 
> rt305x has a rgmii that the switch connects to. however we dont have
> support in the driver for that rgmii port. you will need to first atch
> the driver to support the rgmii interface and then hook up the switch
> driver.

drivers/net/phy/ar8216.c already has
if (priv->phy->interface == PHY_INTERFACE_MODE_RGMII)
Is it something similar? How can I add support for rt305x rgmii?

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


Re: [OpenWrt-Devel] ZyXEL NBG4615

2015-09-19 Thread John Crispin


On 19/09/2015 11:27, Nerijus Baliunas wrote:
> Hello,
> 
> it is similar to NBG-419N but has Atheros AR8316 4+1 GbE switch. I enabled
> CONFIG_AR8216_PHY=y in target/linux/ramips/rt305x/config-3.18, rebuilt and
> loaded openwrt-ramips-rt305x-nbg-419n-initramfs-uImage.bin to SDRAM via TFTP. 
> 
> Now /sys/bus/mdio_bus/drivers/Atheros AR8216!AR8236!AR8/ exists, but
> # swconfig list
> Found: switch0 - rt305x
> 
> How can I make switch work?
> 
> I found similar problem https://forum.openwrt.org/viewtopic.php?id=49276
> 
> Regards,
> Nerijus

Hi

rt305x has a rgmii that the switch connects to. however we dont have
support in the driver for that rgmii port. you will need to first atch
the driver to support the rgmii interface and then hook up the switch
driver.

John


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