diff mbox

[OpenWrt-Devel] AR8334 switch support

Message ID 553639D5.6090508@m3hlis.de
State RFC
Headers show

Commit Message

Christian Mehlis April 21, 2015, 11:51 a.m. UTC
I was involved in making upstream support for the compex wpj344 and came 
across the AR8334 embedded switch used on this board.

Unfortunately it seems that this switch is not jet supported by the
ar8327/ar8216 driver in openwrt.

The vendor just did this to their openwrt based sdk:

Comments

Heiner Kallweit April 21, 2015, 3:19 p.m. UTC | #1
All I found regarding AR8334/QCA8334 is that it supposedly has four ports.
(There was even an AR8335 with five ports mentioned).
Considering the port / phy layout of AR8337 and the existing boards
with AR8334 I'd assume that AR8334 has just two phy's.
The 8327/8337 code of the driver at least would have to be extended to
not assume a fixed 7 port / 5 phy layout.

Apart from the fact that the driver treats AR8334 as a 7 port / 5 phy
chip it also applies the fixups for AR8327 rev. 2, what is at least
questionnable.

Is the AR8334 fully functional with this slightly modified driver or
are certain thing not working?

Rgds, Heiner


On Tue, Apr 21, 2015 at 1:51 PM, Christian Mehlis <christian@m3hlis.de> wrote:
> I was involved in making upstream support for the compex wpj344 and came
> across the AR8334 embedded switch used on this board.
>
> Unfortunately it seems that this switch is not jet supported by the
> ar8327/ar8216 driver in openwrt.
>
> The vendor just did this to their openwrt based sdk:
>
> --- a/target/linux/generic/files/drivers/net/phy/ar8327.c
> +++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
> @@ -508,8 +508,10 @@ ar8327_hw_config_pdata(struct ar8xxx_priv *priv,
>         data->port6_status = ar8327_get_port_init_status(&pdata->port6_cfg);
>
>         t = ar8327_get_pad_cfg(pdata->pad0_cfg);
> +#if 0
>         if (chip_is_ar8337(priv))
>                 t |= AR8337_PAD_MAC06_EXCHANGE_EN;
> +#endif
>
>         ar8xxx_write(priv, AR8327_REG_PAD0_MODE, t);
>         t = ar8327_get_pad_cfg(pdata->pad5_cfg);
> --
>
> I tied to find a more generic solution but it seems that my ar8334 is
> identifying itself as "Atheros AR8337 rev. 2 switch". The identification
> read from the device is ver:0x13 rev:0x02.
>
> If you have more information on that chip or some source code, feel free to
> reply (or send me a mail).
>
> The board support went upstream in the mean time:
>
>         https://dev.openwrt.org/changeset/45527
>
> Best
> Christian
> _______________________________________________
> openwrt-devel mailing list
> openwrt-devel@lists.openwrt.org
> https://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel
Christian Mehlis April 21, 2015, 5:06 p.m. UTC | #2
Am 21.04.2015 um 17:19 schrieb Heiner Kallweit:
> All I found regarding AR8334/QCA8334 is that it supposedly has four ports.
> (There was even an AR8335 with five ports mentioned).
> Considering the port / phy layout of AR8337 and the existing boards
> with AR8334 I'd assume that AR8334 has just two phy's.
> The 8327/8337 code of the driver at least would have to be extended to
> not assume a fixed 7 port / 5 phy layout.

I see.

> Apart from the fact that the driver treats AR8334 as a 7 port / 5 phy
> chip it also applies the fixups for AR8327 rev. 2, what is at least
> questionnable.
>
> Is the AR8334 fully functional with this slightly modified driver or
> are certain thing not working?

With the vendor patch, Linux is able to talk to the switch, and 
send/receive data.

Strange things I discovered:

1) on "plug out"

	Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is down

is printed, but linux keeps the interface as UP.

2) # swconfig list (on this board) shows multiple switches?!
Found: switch0 - ag71xx-mdio.0
Found: switch1 - eth1

3) swconfig dev switch0 show
	works as expected.

files attached:
	1. boot with ports connected
	2. disconnect plugs
	3. dump the files

If you can supply some sort of patch for the 4 port switch, I would be 
happy to test. -> I want to have upstream support for the switch (and 
the compex wpj344).

In case you really need the actual hardware (the compex wpj344) I can 
send you a board.

Best
Christian
Global attributes:
        enable_vlan: 1
        enable_mirror_rx: 0
        enable_mirror_tx: 0
        mirror_monitor_port: 0
        mirror_source_port: 0
        arl_table: address resolution table
Port 0: MAC 56:61:d1:e9:13:d6

Port 0:
        mib: Port 0 MIB counters
RxBroad     : 19
RxPause     : 0
RxMulti     : 56
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 18
Rx128Byte   : 69
Rx256Byte   : 584
Rx512Byte   : 10
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 127420
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 58
TxBroad     : 134
TxPause     : 0
TxMulti     : 1141
TxUnderRun  : 0
Tx64Byte    : 21
Tx128Byte   : 1194
Tx256Byte   : 95
Tx512Byte   : 4
Tx1024Byte  : 4
Tx1518Byte  : 4
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 121582
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: ???
        pvid: 0
        link: port:0 link:up speed:1000baseT full-duplex txflow rxflow 
Port 1:
        mib: Port 1 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 0
        link: port:1 link:down
Port 2:
        mib: Port 2 MIB counters
RxBroad     : 98
RxPause     : 0
RxMulti     : 326
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 135
Rx128Byte   : 295
Rx256Byte   : 31
Rx512Byte   : 2
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 40127
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 2
TxPause     : 0
TxMulti     : 5
TxUnderRun  : 0
Tx64Byte    : 3
Tx128Byte   : 37
Tx256Byte   : 5
Tx512Byte   : 2
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 5122
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 2
        link: port:2 link:down
Port 3:
        mib: Port 3 MIB counters
RxBroad     : 37
RxPause     : 0
RxMulti     : 815
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 54
Rx128Byte   : 732
Rx256Byte   : 64
Rx512Byte   : 2
Rx1024Byte  : 4
Rx1518Byte  : 4
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 76507
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 1
TxBroad     : 2
TxPause     : 0
TxMulti     : 15
TxUnderRun  : 0
Tx64Byte    : 1
Tx128Byte   : 12
Tx256Byte   : 561
Tx512Byte   : 2
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 111573
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 1
        link: port:3 link:down
Port 4:
        mib: Port 4 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 0
        link: port:4 link:down
Port 5:
        mib: Port 5 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: 0
        pvid: 0
        link: port:5 link:down
Port 6:
        mib: Port 6 MIB counters
RxBroad     : 0
RxPause     : 0
RxMulti     : 0
RxFcsErr    : 0
RxAlignErr  : 0
RxRunt      : 0
RxFragment  : 0
Rx64Byte    : 0
Rx128Byte   : 0
Rx256Byte   : 0
Rx512Byte   : 0
Rx1024Byte  : 0
Rx1518Byte  : 0
RxMaxByte   : 0
RxTooLong   : 0
RxGoodByte  : 0
RxBadByte   : 0
RxOverFlow  : 0
Filtered    : 0
TxBroad     : 0
TxPause     : 0
TxMulti     : 0
TxUnderRun  : 0
Tx64Byte    : 0
Tx128Byte   : 0
Tx256Byte   : 0
Tx512Byte   : 0
Tx1024Byte  : 0
Tx1518Byte  : 0
TxMaxByte   : 0
TxOverSize  : 0
TxByte      : 0
TxCollision : 0
TxAbortCol  : 0
TxMultiCol  : 0
TxSingleCol : 0
TxExcDefer  : 0
TxDefer     : 0
TxLateCol   : 0

        enable_eee: ???
        pvid: 0
        link: port:6 link:down
VLAN 1:
        vid: 1
        ports: 0t 3 
VLAN 2:
        vid: 2
        ports: 0t 2
br-lan    Link encap:Ethernet  HWaddr 56:61:D1:E9:13:D6  
          inet addr:192.168.1.1  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::5461:d1ff:fee9:13d6/64 Scope:Link
          inet6 addr: fda5:f102:d34e::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:680 errors:0 dropped:0 overruns:0 frame:0
          TX packets:621 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:41359 (40.3 KiB)  TX bytes:114061 (111.3 KiB)

eth0      Link encap:Ethernet  HWaddr 56:61:D1:E9:13:D6  
          inet6 addr: fe80::5461:d1ff:fee9:13d6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:1228 errors:0 dropped:2 overruns:0 frame:0
          TX packets:686 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:108319 (105.7 KiB)  TX bytes:124883 (121.9 KiB)
          Interrupt:4 

eth0.1    Link encap:Ethernet  HWaddr 56:61:D1:E9:13:D6  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:759 errors:0 dropped:0 overruns:0 frame:0
          TX packets:589 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:54118 (52.8 KiB)  TX bytes:111189 (108.5 KiB)

eth0.2    Link encap:Ethernet  HWaddr 56:61:D1:E9:13:D6  
          inet addr:10.0.19.104  Bcast:10.0.255.255  Mask:255.255.0.0
          inet6 addr: 2001:920:18ae:3:5461:d1ff:fee9:13d6/64 Scope:Global
          inet6 addr: fe80::5461:d1ff:fee9:13d6/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:463 errors:0 dropped:3 overruns:0 frame:0
          TX packets:89 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:31793 (31.0 KiB)  TX bytes:10094 (9.8 KiB)

lo        Link encap:Local Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:24 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0 
          RX bytes:2480 (2.4 KiB)  TX bytes:2480 (2.4 KiB)
config interface 'loopback'
        option ifname 'lo'
        option proto 'static'
        option ipaddr '127.0.0.1'
        option netmask '255.0.0.0'

config globals 'globals'
        option ula_prefix 'fda5:f102:d34e::/48'

config interface 'lan'
        option ifname 'eth0.1'
        option force_link '1'
        option type 'bridge'
        option proto 'static'
        option ipaddr '192.168.1.1'
        option netmask '255.255.255.0'
        option ip6assign '60'

config interface 'wan'
        option ifname 'eth0.2'
        option proto 'dhcp'

config interface 'wan6'
        option ifname 'eth0.2'
        option proto 'dhcpv6'

config switch
        option name 'switch0'
        option reset '1'
        option enable_vlan '1'

config switch_vlan
        option device 'switch0'
        option vlan '1'
        option ports '0t 3'

config switch_vlan
        option device 'switch0'
        option vlan '2'
        option ports '0t 2'
Heiner Kallweit April 22, 2015, 5:01 p.m. UTC | #3
Am 21.04.2015 um 19:06 schrieb Christian Mehlis:
> Am 21.04.2015 um 17:19 schrieb Heiner Kallweit:
>> All I found regarding AR8334/QCA8334 is that it supposedly has four ports.
>> (There was even an AR8335 with five ports mentioned).
>> Considering the port / phy layout of AR8337 and the existing boards
>> with AR8334 I'd assume that AR8334 has just two phy's.
>> The 8327/8337 code of the driver at least would have to be extended to
>> not assume a fixed 7 port / 5 phy layout.
> 
> I see.
> 
>> Apart from the fact that the driver treats AR8334 as a 7 port / 5 phy
>> chip it also applies the fixups for AR8327 rev. 2, what is at least
>> questionnable.
>>
>> Is the AR8334 fully functional with this slightly modified driver or
>> are certain thing not working?
> 
> With the vendor patch, Linux is able to talk to the switch, and send/receive data.
> 
> Strange things I discovered:
> 
> 1) on "plug out"
> 
>     Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is down
Can you provide a complete dmesg output?
 
> is printed, but linux keeps the interface as UP.
> 
> 2) # swconfig list (on this board) shows multiple switches?!
> Found: switch0 - ag71xx-mdio.0
> Found: switch1 - eth1
switch1 is the AR9344-internal (100MBit only) switch.

> 
> 3) swconfig dev switch0 show
>     works as expected.
> 
> files attached:
>     1. boot with ports connected
>     2. disconnect plugs
>     3. dump the files
> 
> If you can supply some sort of patch for the 4 port switch, I would be happy to test. -> I want to have upstream support for the switch (and the compex wpj344).
> 
> In case you really need the actual hardware (the compex wpj344) I can send you a board.
> 
> Best
> Christian
> 

W/o having seen the datasheets for AR8337/AR8334 I'm hesitant to propose a patch.
1. AR8334 identifies itself as AR8337/rev.2. There might be a real AR8337/rev.2 with 7 ports. How to tell between these two chips?
2. The AR8334 name seems to indicate that it's the same as AR8337 just with 4 ports. The required padding patch however shows
   that the difference is not only the number of ports. Having said that there might be more differences.

Rgds, Heiner
Christian Mehlis April 23, 2015, 12:43 p.m. UTC | #4
Am 22.04.2015 um 19:01 schrieb Heiner Kallweit:
> Can you provide a complete dmesg output?

Bootlog is available here:
http://wiki.openwrt.org/toh/compex/wpj344#openwrt_upstream_bootlog

Dmesg is attached.

> W/o having seen the datasheets for AR8337/AR8334 I'm hesitant to propose a patch.
> 1. AR8334 identifies itself as AR8337/rev.2. There might be a real AR8337/rev.2 with 7 ports. How to tell between these two chips?

Perhaps there are some other registers where the number of ports are 
available? But I don't have any datasheets to look into...

Best
Christian
[    0.000000] Linux version 3.18.11 (c@black) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r45458) ) #1 Tue Apr 21 18:45:08 CEST 2015
[    0.000000] MyLoader: sysp=cc7dbb0c, boardp=e9f041c4, parts=cbc748d9
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 0001974c (MIPS 74Kc)
[    0.000000] SoC: Atheros AR9344 rev 2
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 08000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x00000000-0x07ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x00000000-0x07ffffff]
[    0.000000] Initmem setup node 0 [mem 0x00000000-0x07ffffff]
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat 803560f0, node_mem_map 81000000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32768 pages, LIFO batch:7
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line:  board=WPJ344 console=ttyS0,115200 mtdparts=spi0.0:192k(u-boot)ro,16128k(firmware),64k(art)ro rootfstype=squashfs,jffs2 noinitrd
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 125920K/131072K available (2470K kernel code, 124K rwdata, 528K rodata, 260K init, 188K bss, 5152K reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:560.000MHz, DDR:450.000MHz, AHB:225.000MHz, Ref:40.000MHz
[    0.000000] Calibrating delay loop... 278.93 BogoMIPS (lpj=1394688)
[    0.070000] pid_max: default: 32768 minimum: 301
[    0.070000] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.080000] NET: Registered protocol family 16
[    0.090000] MIPS: machine is Compex WPJ344
[    0.100000] ar724x-pci ar724x-pci: PCIe link is down
[    0.100000] registering PCI controller with io_map_base unset
[    0.110000] ar71xx: using random MAC address for eth0
[    0.330000] ar71xx: using random MAC address for eth1
[    0.550000] PCI host bridge to bus 0000:00
[    0.560000] pci_bus 0000:00: root bus resource [mem 0x10000000-0x13ffffff]
[    0.560000] pci_bus 0000:00: root bus resource [io  0x0000]
[    0.570000] pci_bus 0000:00: No busn resource found for root bus, will use [bus 00-ff]
[    0.570000] pci_bus 0000:00: busn_res: [bus 00-ff] end is updated to 00
[    0.570000] Switched to clocksource MIPS
[    0.580000] NET: Registered protocol family 2
[    0.580000] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.580000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.590000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.590000] TCP: reno registered
[    0.600000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.600000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.610000] NET: Registered protocol family 1
[    0.610000] PCI: CLS 0 bytes, default 32
[    0.610000] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.630000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.630000] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.640000] msgmni has been set to 245
[    0.660000] io scheduler noop registered
[    0.660000] io scheduler deadline registered (default)
[    0.670000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.670000] console [ttyS0] disabled
[    0.700000] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 2500000) is a 16550A
[    0.700000] console [ttyS0] enabled
[    0.710000] bootconsole [early0] disabled
[    0.720000] m25p80 spi0.0: found mx25l12805d, expected m25p80
[    0.730000] m25p80 spi0.0: mx25l12805d (16384 Kbytes)
[    0.730000] 3 cmdlinepart partitions found on MTD device spi0.0
[    0.740000] Creating 3 MTD partitions on "spi0.0":
[    0.740000] 0x000000000000-0x000000030000 : "u-boot"
[    0.750000] 0x000000030000-0x000000ff0000 : "firmware"
[    0.790000] 2 uimage-fw partitions found on MTD device firmware
[    0.790000] 0x000000030000-0x000000150000 : "kernel"
[    0.800000] 0x000000150000-0x000000ff0000 : "rootfs"
[    0.800000] mtd: device 3 (rootfs) set to be root filesystem
[    0.810000] 1 squashfs-split partitions found on MTD device rootfs
[    0.820000] 0x0000003c0000-0x000000ff0000 : "rootfs_data"
[    0.820000] 0x000000ff0000-0x000001000000 : "art"
[    0.840000] libphy: ag71xx_mdio: probed
[    0.850000] switch0: Atheros AR8337 rev. 2 switch registered on ag71xx-mdio.0
[    0.920000] libphy: ag71xx_mdio: probed
[    1.520000] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.0:00 [uid=004dd036, driver=Atheros AR8216/AR8236/AR8316]
[    1.530000] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:RGMII
[    2.120000] ag71xx-mdio.1: Found an AR934X built-in switch
[    2.160000] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    2.170000] TCP: cubic registered
[    2.170000] NET: Registered protocol family 17
[    2.170000] bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
[    2.190000] 8021q: 802.1Q VLAN Support v1.8
[    2.200000] VFS: Mounted root (squashfs filesystem) readonly on device 31:3.
[    2.210000] Freeing unused kernel memory: 260K (8036f000 - 803b0000)
[    3.230000] init: failed to symlink /tmp -> /var
[    3.230000] init: Console is alive
[    3.230000] init: - watchdog -
[    4.420000] usbcore: registered new interface driver usbfs
[    4.420000] usbcore: registered new interface driver hub
[    4.430000] usbcore: registered new device driver usb
[    4.440000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    4.450000] ehci-platform: EHCI generic platform driver
[    4.450000] ehci-platform ehci-platform: EHCI Host Controller
[    4.460000] ehci-platform ehci-platform: new USB bus registered, assigned bus number 1
[    4.470000] ehci-platform ehci-platform: irq 3, io mem 0x1b000000
[    4.490000] ehci-platform ehci-platform: USB 2.0 started, EHCI 1.00
[    4.490000] hub 1-0:1.0: USB hub found
[    4.500000] hub 1-0:1.0: 1 port detected
[    4.500000] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
[    4.510000] ohci-platform: OHCI generic platform driver
[    5.240000] init: - preinit -
[    5.990000] random: procd urandom read with 9 bits of entropy available
[    7.690000] eth0: link up (1000Mbps/Full duplex)
[    9.320000] jffs2: notice: (371) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (0 unchecked, 0 orphan) and 1 of xref (0 dead, 0 orphan) found.
[    9.340000] mount_root: switching to jffs2 overlay
[    9.380000] eth0: link down
[    9.390000] procd: - early -
[    9.390000] procd: - watchdog -
[   10.010000] procd: - ubus -
[   11.030000] procd: - init -
[   11.740000] NET: Registered protocol family 10
[   11.750000] ip6_tables: (C) 2000-2006 Netfilter Core Team
[   11.760000] Loading modules backported from Linux version master-2015-03-09-0-g141f155
[   11.770000] Backport generated by backports.git backports-20150129-0-gdd4a670
[   11.800000] cfg80211: Calling CRDA to update world regulatory domain
[   11.830000] cfg80211: World regulatory domain updated:
[   11.830000] cfg80211:  DFS Master region: unset
[   11.840000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   11.850000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   11.860000] cfg80211:   (2457000 KHz - 2482000 KHz @ 40000 KHz), (N/A, 2000 mBm), (N/A)
[   11.860000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (N/A, 2000 mBm), (N/A)
[   11.870000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   11.880000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2000 mBm), (0 s)
[   11.890000] cfg80211:   (5490000 KHz - 5730000 KHz @ 160000 KHz), (N/A, 2000 mBm), (0 s)
[   11.900000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 2000 mBm), (N/A)
[   11.910000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 0 mBm), (N/A)
[   12.000000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.010000] nf_conntrack version 0.5.0 (1971 buckets, 7884 max)
[   12.050000] xt_time: kernel timezone is -0000
[   12.070000] PPP generic driver version 2.4.2
[   12.080000] NET: Registered protocol family 24
[   12.100000] ath: EEPROM regdomain: 0x0
[   12.100000] ath: EEPROM indicates default country code should be used
[   12.100000] ath: doing EEPROM country->regdmn map search
[   12.100000] ath: country maps to regdmn code: 0x3a
[   12.100000] ath: Country alpha2 being used: US
[   12.100000] ath: Regpair used: 0x3a
[   12.110000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   12.110000] ieee80211 phy0: Atheros AR9340 Rev:2 mem=0xb8100000, irq=47
[   12.120000] cfg80211: Calling CRDA for country: US
[   12.130000] cfg80211: Regulatory domain changed to country: US
[   12.130000] cfg80211:  DFS Master region: FCC
[   12.140000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp), (dfs_cac_time)
[   12.150000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (N/A, 3000 mBm), (N/A)
[   12.150000] cfg80211:   (5170000 KHz - 5250000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 1700 mBm), (N/A)
[   12.160000] cfg80211:   (5250000 KHz - 5330000 KHz @ 80000 KHz, 160000 KHz AUTO), (N/A, 2300 mBm), (0 s)
[   12.170000] cfg80211:   (5735000 KHz - 5835000 KHz @ 80000 KHz), (N/A, 3000 mBm), (N/A)
[   12.180000] cfg80211:   (57240000 KHz - 63720000 KHz @ 2160000 KHz), (N/A, 4000 mBm), (N/A)
[   19.750000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   19.770000] device eth0.1 entered promiscuous mode
[   19.770000] device eth0 entered promiscuous mode
[   19.790000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   19.820000] IPv6: ADDRCONF(NETDEV_UP): eth0.2: link is not ready
[   20.820000] eth0: link up (1000Mbps/Full duplex)
[   20.820000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   20.850000] br-lan: port 1(eth0.1) entered forwarding state
[   20.850000] br-lan: port 1(eth0.1) entered forwarding state
[   20.860000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0.2: link becomes ready
[   20.870000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   22.820000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is up
[   22.850000] br-lan: port 1(eth0.1) entered forwarding state
[   48.850000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 3 is down
[   52.850000] Atheros AR8216/AR8236/AR8316 ag71xx-mdio.0:00: Port 2 is up
[   63.210000] random: nonblocking pool is initialized
diff mbox

Patch

--- a/target/linux/generic/files/drivers/net/phy/ar8327.c
+++ b/target/linux/generic/files/drivers/net/phy/ar8327.c
@@ -508,8 +508,10 @@  ar8327_hw_config_pdata(struct ar8xxx_priv *priv,
  	data->port6_status = ar8327_get_port_init_status(&pdata->port6_cfg);

  	t = ar8327_get_pad_cfg(pdata->pad0_cfg);
+#if 0
  	if (chip_is_ar8337(priv))
  		t |= AR8337_PAD_MAC06_EXCHANGE_EN;
+#endif

  	ar8xxx_write(priv, AR8327_REG_PAD0_MODE, t);
  	t = ar8327_get_pad_cfg(pdata->pad5_cfg);