linux-mips.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* linux 2.6.33 on movidis x16
@ 2010-03-05 14:11 Peter 'p2' De Schrijver
  2010-03-15 22:27 ` Jan Rovins
  0 siblings, 1 reply; 11+ messages in thread
From: Peter 'p2' De Schrijver @ 2010-03-05 14:11 UTC (permalink / raw)
  To: linux-mips

Hi,

We are trying to get linux 2.6.33 to work on the movidis x16 board. Main thing
missing is the addresses of the PHYs. Does anyone know those ?
Unfortunately I don't have physical access to the board so I can't just look
for the PHY components being used.

Thanks,

Peter.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux 2.6.33 on movidis x16
  2010-03-05 14:11 linux 2.6.33 on movidis x16 Peter 'p2' De Schrijver
@ 2010-03-15 22:27 ` Jan Rovins
  2010-03-18 18:17   ` Peter 'p2' De Schrijver
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Rovins @ 2010-03-15 22:27 UTC (permalink / raw)
  To: Peter 'p2' De Schrijver; +Cc: linux-mips

Peter 'p2' De Schrijver wrote:
> Hi,
>
> We are trying to get linux 2.6.33 to work on the movidis x16 board. Main thing
> missing is the addresses of the PHYs. Does anyone know those ?
> Unfortunately I don't have physical access to the board so I can't just look
> for the PHY components being used.
>
> Thanks,
>
> Peter.
>
>   
Do you mean the Movidis x19 ?
We have 2 of these in our lab. They are running the old 2.6.21.7  from 
the CnUsers 1.8.1  tool chain.
They are currently being used by other developers for some application 
testing, but I can grab the serial console boot-up messages and send 
them to you, if the PHY info is in there.

Jan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux 2.6.33 on movidis x16
  2010-03-15 22:27 ` Jan Rovins
@ 2010-03-18 18:17   ` Peter 'p2' De Schrijver
  2010-03-18 18:26     ` David Daney
  0 siblings, 1 reply; 11+ messages in thread
From: Peter 'p2' De Schrijver @ 2010-03-18 18:17 UTC (permalink / raw)
  To: Jan Rovins; +Cc: linux-mips

On 2010-03-15 18:27:41 (-0400), Jan Rovins <janr@adax.com> wrote:
> Peter 'p2' De Schrijver wrote:
>> Hi,
>>
>> We are trying to get linux 2.6.33 to work on the movidis x16 board. Main thing
>> missing is the addresses of the PHYs. Does anyone know those ?
>> Unfortunately I don't have physical access to the board so I can't just look
>> for the PHY components being used.
>>
>> Thanks,
>>
>> Peter.
>>
>>   
> Do you mean the Movidis x19 ?

Maybe. AFAIK ours is called x16, and uses a cavium octeon CN3860 chip.

> We have 2 of these in our lab. They are running the old 2.6.21.7  from  
> the CnUsers 1.8.1  tool chain.
> They are currently being used by other developers for some application  
> testing, but I can grab the serial console boot-up messages and send  
> them to you, if the PHY info is in there.

That would be helpful. Otherwise you could also try running ethtool on all the
interfaces. That should give you the PHY address as well.

Thanks !

Peter.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux 2.6.33 on movidis x16
  2010-03-18 18:17   ` Peter 'p2' De Schrijver
@ 2010-03-18 18:26     ` David Daney
  2010-03-18 18:59       ` Jan Rovins
  2010-03-19 23:00       ` David Daney
  0 siblings, 2 replies; 11+ messages in thread
From: David Daney @ 2010-03-18 18:26 UTC (permalink / raw)
  To: Peter 'p2' De Schrijver; +Cc: Jan Rovins, linux-mips

On 03/18/2010 11:17 AM, Peter 'p2' De Schrijver wrote:
> On 2010-03-15 18:27:41 (-0400), Jan Rovins<janr@adax.com>  wrote:
>> Peter 'p2' De Schrijver wrote:
>>> Hi,
>>>
>>> We are trying to get linux 2.6.33 to work on the movidis x16 board. Main thing
>>> missing is the addresses of the PHYs. Does anyone know those ?
>>> Unfortunately I don't have physical access to the board so I can't just look
>>> for the PHY components being used.
>>>
>>> Thanks,
>>>
>>> Peter.
>>>
>>>
>> Do you mean the Movidis x19 ?
>
> Maybe. AFAIK ours is called x16, and uses a cavium octeon CN3860 chip.
>
>> We have 2 of these in our lab. They are running the old 2.6.21.7  from
>> the CnUsers 1.8.1  tool chain.
>> They are currently being used by other developers for some application
>> testing, but I can grab the serial console boot-up messages and send
>> them to you, if the PHY info is in there.
>
> That would be helpful. Otherwise you could also try running ethtool on all the
> interfaces. That should give you the PHY address as well.
>

I just found one of these.  Current theory is that the PHY addresses are 0-7

I don't think the PHY numbers are printed anywhere.

David Daney

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux 2.6.33 on movidis x16
  2010-03-18 18:26     ` David Daney
@ 2010-03-18 18:59       ` Jan Rovins
  2010-03-19 17:52         ` Peter 'p2' De Schrijver
  2010-03-19 23:00       ` David Daney
  1 sibling, 1 reply; 11+ messages in thread
From: Jan Rovins @ 2010-03-18 18:59 UTC (permalink / raw)
  To: David Daney; +Cc: Peter 'p2' De Schrijver, linux-mips

David Daney wrote:
> On 03/18/2010 11:17 AM, Peter 'p2' De Schrijver wrote:
>> On 2010-03-15 18:27:41 (-0400), Jan Rovins<janr@adax.com>  wrote:
>>> Peter 'p2' De Schrijver wrote:
>>>> Hi,
>>>>
>>>> We are trying to get linux 2.6.33 to work on the movidis x16 board. 
>>>> Main thing
>>>> missing is the addresses of the PHYs. Does anyone know those ?
>>>> Unfortunately I don't have physical access to the board so I can't 
>>>> just look
>>>> for the PHY components being used.
>>>>
>>>> Thanks,
>>>>
>>>> Peter.
>>>>
>>>>
>>> Do you mean the Movidis x19 ?
>>
>> Maybe. AFAIK ours is called x16, and uses a cavium octeon CN3860 chip.
>>
>>> We have 2 of these in our lab. They are running the old 2.6.21.7  from
>>> the CnUsers 1.8.1  tool chain.
>>> They are currently being used by other developers for some application
>>> testing, but I can grab the serial console boot-up messages and send
>>> them to you, if the PHY info is in there.
>>
>> That would be helpful. Otherwise you could also try running ethtool 
>> on all the
>> interfaces. That should give you the PHY address as well.
>>
>
> I just found one of these.  Current theory is that the PHY addresses 
> are 0-7
>
> I don't think the PHY numbers are printed anywhere.
>
> David Daney
You are right, it is called an x16.  My memory is failing me, I should 
have looked at the machine first.

from dmesg:

cavium-ethernet: Cavium Networks Octeon SDK version 1.8.1, build 294
Interface 0 has 4 ports (RGMII)
Interface 1 has 4 ports (RGMII)
Interface 2 has 4 ports (NPI)
Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2


looks like the PHYAD field has what you are loohing for,
ethtool output: ---------------------------

for i in 0 1 2 3 4 5 6 7; do ethtool eth$i; done
Settings for eth0:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 1
        Transceiver: internal
        Auto-negotiation: on
        Link detected: no
Settings for eth1:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 2
        Transceiver: internal
        Auto-negotiation: on
        Link detected: no
Settings for eth2:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 3
        Transceiver: internal
        Auto-negotiation: on
        Link detected: no
Settings for eth3:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
                                1000baseT/Half 1000baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 10Mb/s
        Duplex: Half
        Port: MII
        PHYAD: 4
        Transceiver: internal
        Auto-negotiation: on
        Link detected: no
Settings for eth4:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Link detected: yes
Settings for eth5:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Link detected: yes
Settings for eth6:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Link detected: yes
Settings for eth7:
        Supported ports: [ TP MII ]
        Supported link modes:   10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Supports auto-negotiation: Yes
        Advertised link modes:  10baseT/Half 10baseT/Full
                                100baseT/Half 100baseT/Full
        Advertised auto-negotiation: Yes
        Speed: 100Mb/s
        Duplex: Full
        Port: MII
        PHYAD: 0
        Transceiver: internal
        Auto-negotiation: on
        Link detected: yes

----------------------------------------------------------
You may want to re-map the interfaces so that they show up in a sane 
order, there is a cluster of 8 ethernet ports, 4 per row.  Right now on 
our boxes , eth0 shows up on the bottom row, second  from the right.

Jan

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux 2.6.33 on movidis x16
  2010-03-18 18:59       ` Jan Rovins
@ 2010-03-19 17:52         ` Peter 'p2' De Schrijver
  2010-03-19 20:27           ` Jan Rovins
  0 siblings, 1 reply; 11+ messages in thread
From: Peter 'p2' De Schrijver @ 2010-03-19 17:52 UTC (permalink / raw)
  To: Jan Rovins; +Cc: David Daney, linux-mips

Hi,

> You are right, it is called an x16.  My memory is failing me, I should  
> have looked at the machine first.
>

Ok :)

> from dmesg:
>
> cavium-ethernet: Cavium Networks Octeon SDK version 1.8.1, build 294
> Interface 0 has 4 ports (RGMII)
> Interface 1 has 4 ports (RGMII)
> Interface 2 has 4 ports (NPI)
> Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
>
>
> looks like the PHYAD field has what you are loohing for,
> ethtool output: ---------------------------
>
> for i in 0 1 2 3 4 5 6 7; do ethtool eth$i; done
> Settings for eth0:
>        Supported ports: [ TP MII ]
>        Supported link modes:   10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>                                1000baseT/Half 1000baseT/Full
>        Supports auto-negotiation: Yes
>        Advertised link modes:  10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>                                1000baseT/Half 1000baseT/Full
>        Advertised auto-negotiation: Yes
>        Speed: 10Mb/s
>        Duplex: Half
>        Port: MII
>        PHYAD: 1
>        Transceiver: internal
>        Auto-negotiation: on
>        Link detected: no
> Settings for eth1:
>        Supported ports: [ TP MII ]
>        Supported link modes:   10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>                                1000baseT/Half 1000baseT/Full
>        Supports auto-negotiation: Yes
>        Advertised link modes:  10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>                                1000baseT/Half 1000baseT/Full
>        Advertised auto-negotiation: Yes
>        Speed: 10Mb/s
>        Duplex: Half
>        Port: MII
>        PHYAD: 2
>        Transceiver: internal
>        Auto-negotiation: on
>        Link detected: no
> Settings for eth2:
>        Supported ports: [ TP MII ]
>        Supported link modes:   10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>                                1000baseT/Half 1000baseT/Full
>        Supports auto-negotiation: Yes
>        Advertised link modes:  10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>                                1000baseT/Half 1000baseT/Full
>        Advertised auto-negotiation: Yes
>        Speed: 10Mb/s
>        Duplex: Half
>        Port: MII
>        PHYAD: 3
>        Transceiver: internal
>        Auto-negotiation: on
>        Link detected: no
> Settings for eth3:
>        Supported ports: [ TP MII ]
>        Supported link modes:   10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>                                1000baseT/Half 1000baseT/Full
>        Supports auto-negotiation: Yes
>        Advertised link modes:  10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>                                1000baseT/Half 1000baseT/Full
>        Advertised auto-negotiation: Yes
>        Speed: 10Mb/s
>        Duplex: Half
>        Port: MII
>        PHYAD: 4
>        Transceiver: internal
>        Auto-negotiation: on
>        Link detected: no
> Settings for eth4:
>        Supported ports: [ TP MII ]
>        Supported link modes:   10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>        Supports auto-negotiation: Yes
>        Advertised link modes:  10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>        Advertised auto-negotiation: Yes
>        Speed: 100Mb/s
>        Duplex: Full
>        Port: MII
>        PHYAD: 0
>        Transceiver: internal
>        Auto-negotiation: on
>        Link detected: yes
> Settings for eth5:
>        Supported ports: [ TP MII ]
>        Supported link modes:   10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>        Supports auto-negotiation: Yes
>        Advertised link modes:  10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>        Advertised auto-negotiation: Yes
>        Speed: 100Mb/s
>        Duplex: Full
>        Port: MII
>        PHYAD: 0
>        Transceiver: internal
>        Auto-negotiation: on
>        Link detected: yes
> Settings for eth6:
>        Supported ports: [ TP MII ]
>        Supported link modes:   10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>        Supports auto-negotiation: Yes
>        Advertised link modes:  10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>        Advertised auto-negotiation: Yes
>        Speed: 100Mb/s
>        Duplex: Full
>        Port: MII
>        PHYAD: 0
>        Transceiver: internal
>        Auto-negotiation: on
>        Link detected: yes
> Settings for eth7:
>        Supported ports: [ TP MII ]
>        Supported link modes:   10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>        Supports auto-negotiation: Yes
>        Advertised link modes:  10baseT/Half 10baseT/Full
>                                100baseT/Half 100baseT/Full
>        Advertised auto-negotiation: Yes
>        Speed: 100Mb/s
>        Duplex: Full
>        Port: MII
>        PHYAD: 0
>        Transceiver: internal
>        Auto-negotiation: on
>        Link detected: yes
>

PHYAD 0 for ports 4 - 7 seems a bit strange to me. Do you have the sources of the
kernel you're running on those machines ? If so, could you look at 
int cvmx_helper_board_get_mii_address(int ipd_port) in cvmx-helper-board.c ?
It contains a large switch statement. case CVMX_BOARD_TYPE_CUST_WSX16: is what I'm
interested in.


> ----------------------------------------------------------
> You may want to re-map the interfaces so that they show up in a sane  
> order, there is a cluster of 8 ethernet ports, 4 per row.  Right now on  
> our boxes , eth0 shows up on the bottom row, second  from the right.

Thanks,

Peter.

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux 2.6.33 on movidis x16
  2010-03-19 17:52         ` Peter 'p2' De Schrijver
@ 2010-03-19 20:27           ` Jan Rovins
  2010-03-19 22:03             ` David Daney
  0 siblings, 1 reply; 11+ messages in thread
From: Jan Rovins @ 2010-03-19 20:27 UTC (permalink / raw)
  To: Peter 'p2' De Schrijver; +Cc: David Daney, linux-mips

[-- Attachment #1: Type: text/plain, Size: 7106 bytes --]

Peter 'p2' De Schrijver wrote:
> Hi,
>
>   
>> You are right, it is called an x16.  My memory is failing me, I should  
>> have looked at the machine first.
>>
>>     
>
> Ok :)
>
>   
>> from dmesg:
>>
>> cavium-ethernet: Cavium Networks Octeon SDK version 1.8.1, build 294
>> Interface 0 has 4 ports (RGMII)
>> Interface 1 has 4 ports (RGMII)
>> Interface 2 has 4 ports (NPI)
>> Uniform Multi-Platform E-IDE driver Revision: 7.00alpha2
>>
>>
>> looks like the PHYAD field has what you are loohing for,
>> ethtool output: ---------------------------
>>
>> for i in 0 1 2 3 4 5 6 7; do ethtool eth$i; done
>> Settings for eth0:
>>        Supported ports: [ TP MII ]
>>        Supported link modes:   10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>                                1000baseT/Half 1000baseT/Full
>>        Supports auto-negotiation: Yes
>>        Advertised link modes:  10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>                                1000baseT/Half 1000baseT/Full
>>        Advertised auto-negotiation: Yes
>>        Speed: 10Mb/s
>>        Duplex: Half
>>        Port: MII
>>        PHYAD: 1
>>        Transceiver: internal
>>        Auto-negotiation: on
>>        Link detected: no
>> Settings for eth1:
>>        Supported ports: [ TP MII ]
>>        Supported link modes:   10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>                                1000baseT/Half 1000baseT/Full
>>        Supports auto-negotiation: Yes
>>        Advertised link modes:  10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>                                1000baseT/Half 1000baseT/Full
>>        Advertised auto-negotiation: Yes
>>        Speed: 10Mb/s
>>        Duplex: Half
>>        Port: MII
>>        PHYAD: 2
>>        Transceiver: internal
>>        Auto-negotiation: on
>>        Link detected: no
>> Settings for eth2:
>>        Supported ports: [ TP MII ]
>>        Supported link modes:   10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>                                1000baseT/Half 1000baseT/Full
>>        Supports auto-negotiation: Yes
>>        Advertised link modes:  10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>                                1000baseT/Half 1000baseT/Full
>>        Advertised auto-negotiation: Yes
>>        Speed: 10Mb/s
>>        Duplex: Half
>>        Port: MII
>>        PHYAD: 3
>>        Transceiver: internal
>>        Auto-negotiation: on
>>        Link detected: no
>> Settings for eth3:
>>        Supported ports: [ TP MII ]
>>        Supported link modes:   10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>                                1000baseT/Half 1000baseT/Full
>>        Supports auto-negotiation: Yes
>>        Advertised link modes:  10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>                                1000baseT/Half 1000baseT/Full
>>        Advertised auto-negotiation: Yes
>>        Speed: 10Mb/s
>>        Duplex: Half
>>        Port: MII
>>        PHYAD: 4
>>        Transceiver: internal
>>        Auto-negotiation: on
>>        Link detected: no
>> Settings for eth4:
>>        Supported ports: [ TP MII ]
>>        Supported link modes:   10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>        Supports auto-negotiation: Yes
>>        Advertised link modes:  10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>        Advertised auto-negotiation: Yes
>>        Speed: 100Mb/s
>>        Duplex: Full
>>        Port: MII
>>        PHYAD: 0
>>        Transceiver: internal
>>        Auto-negotiation: on
>>        Link detected: yes
>> Settings for eth5:
>>        Supported ports: [ TP MII ]
>>        Supported link modes:   10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>        Supports auto-negotiation: Yes
>>        Advertised link modes:  10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>        Advertised auto-negotiation: Yes
>>        Speed: 100Mb/s
>>        Duplex: Full
>>        Port: MII
>>        PHYAD: 0
>>        Transceiver: internal
>>        Auto-negotiation: on
>>        Link detected: yes
>> Settings for eth6:
>>        Supported ports: [ TP MII ]
>>        Supported link modes:   10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>        Supports auto-negotiation: Yes
>>        Advertised link modes:  10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>        Advertised auto-negotiation: Yes
>>        Speed: 100Mb/s
>>        Duplex: Full
>>        Port: MII
>>        PHYAD: 0
>>        Transceiver: internal
>>        Auto-negotiation: on
>>        Link detected: yes
>> Settings for eth7:
>>        Supported ports: [ TP MII ]
>>        Supported link modes:   10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>        Supports auto-negotiation: Yes
>>        Advertised link modes:  10baseT/Half 10baseT/Full
>>                                100baseT/Half 100baseT/Full
>>        Advertised auto-negotiation: Yes
>>        Speed: 100Mb/s
>>        Duplex: Full
>>        Port: MII
>>        PHYAD: 0
>>        Transceiver: internal
>>        Auto-negotiation: on
>>        Link detected: yes
>>
>>     
>
> PHYAD 0 for ports 4 - 7 seems a bit strange to me. Do you have the sources of the
> kernel you're running on those machines ? If so, could you look at 
> int cvmx_helper_board_get_mii_address(int ipd_port) in cvmx-helper-board.c ?
> It contains a large switch statement. case CVMX_BOARD_TYPE_CUST_WSX16: is what I'm
> interested in.
>
>   
I have attached the source of  cvmx_helper_board_get_mii_address().

In looking at it, it is all coming back to me now.  I had to modify that 
function to get the Ethernet to work. The Movidis folk had a working 
kernel based on the  CaviumNetworks 1.6.X or 1.7.X toolchain.  I ported 
it up to the 1.8.1 toolchain, and had to add the 
CVMX_BOARD_TYPE_CUST_WSX16 entry to get the ethernet working, so the 
strangeness is my fault, but it got the first 4 Ehernets working. I 
thought I patterned it after what they did in their earlier kernels, but 
perhaps I never saw the Movidis mods, and just did it by trial & error. 
(it was a few years ago).  If I have a chance I will dig around to see 
if I can find the source to the origonal 1.6.1 Movidis kernel that they 
provided. 
>   
>> ----------------------------------------------------------
>> You may want to re-map the interfaces so that they show up in a sane  
>> order, there is a cluster of 8 ethernet ports, 4 per row.  Right now on  
>> our boxes , eth0 shows up on the bottom row, second  from the right.
>>     
>
> Thanks,
>
> Peter.
>   


[-- Attachment #2: cvmx_helper_board_get_mii_address.txt --]
[-- Type: text/plain, Size: 3732 bytes --]


/**
 * Return the MII PHY address associated with the given IPD
 * port. A result of -1 means there isn't a MII capable PHY
 * connected to this port. On chips supporting multiple MII
 * busses the bus number is encoded in bits <15:8>.
 *
 * This function must be modified for every new Octeon board.
 * Internally it uses switch statements based on the cvmx_sysinfo
 * data to determine board types and revisions. It replies on the
 * fact that every Octeon board receives a unique board type
 * enumeration from the bootloader.
 *
 * @param ipd_port Octeon IPD port to get the MII address for.
 *
 * @return MII PHY address and bus number or -1.
 */
int cvmx_helper_board_get_mii_address(int ipd_port)
{
    switch (cvmx_sysinfo_get()->board_type)
    {
        case CVMX_BOARD_TYPE_SIM:
            /* Simulator doesn't have MII */
            return -1;
        case CVMX_BOARD_TYPE_EBT3000:
        case CVMX_BOARD_TYPE_EBT5800:
        case CVMX_BOARD_TYPE_THUNDER:
        case CVMX_BOARD_TYPE_NICPRO2:
            /* Interface 0 is SPI4, interface 1 is RGMII */
            if ((ipd_port >= 16) && (ipd_port < 20))
                return ipd_port - 16;
            else
                return -1;
        case CVMX_BOARD_TYPE_KODAMA:
        case CVMX_BOARD_TYPE_EBH3100:
        case CVMX_BOARD_TYPE_HIKARI:
        case CVMX_BOARD_TYPE_CN3010_EVB_HS5:
        case CVMX_BOARD_TYPE_CN3005_EVB_HS5:
        case CVMX_BOARD_TYPE_CN3020_EVB_HS5:
            /* Port 0 is WAN connected to a PHY, Port 1 is GMII connected to a
                switch */
            if (ipd_port == 0)
                return 4;
            else if (ipd_port == 1)
                return 9;
            else
                return -1;
        case CVMX_BOARD_TYPE_NAC38:
            /* Board has 8 RGMII ports PHYs are 0-7 */
            if ((ipd_port >= 0) && (ipd_port < 4))
                return ipd_port;
            else if ((ipd_port >= 16) && (ipd_port < 20))
                return ipd_port - 16 + 4;
            else
                return -1;
        case CVMX_BOARD_TYPE_EBH3000:
            /* Board has dual SPI4 and no PHYs */
            return -1;
        case CVMX_BOARD_TYPE_EBH5200:
        case CVMX_BOARD_TYPE_EBH5201:
        case CVMX_BOARD_TYPE_EBT5200:
            /* Board has 4 SGMII ports. The PHYs start right after the MII
                ports MII0 = 0, MII1 = 1, SGMII = 2-5 */
            if ((ipd_port >= 0) && (ipd_port < 4))
                return ipd_port+2;
            else
                return -1;
        case CVMX_BOARD_TYPE_EBH5600:
        case CVMX_BOARD_TYPE_EBH5601:
        case CVMX_BOARD_TYPE_KBP: /* JLR first Movidis X16 */
	case CVMX_BOARD_TYPE_CUST_WSX16: /* JLR second Movidis X16 */
            /* Board has 8 SGMII ports. 4 connect out, two connect to a switch,
                and 2 loop to each other */
            if ((ipd_port >= 0) && (ipd_port < 4))
                return ipd_port+1;
            else
                return -1;
        case CVMX_BOARD_TYPE_CUST_NB5:
            if (ipd_port == 2)
                return 4;
            else
                return -1;
        case CVMX_BOARD_TYPE_NIC_XLE_4G:
            /* Board has 4 SGMII ports. connected QLM3(interface 1) */
            if ((ipd_port >= 16) && (ipd_port < 20))
                return ipd_port - 16 + 1;
            else
                return -1;
        case CVMX_BOARD_TYPE_BBGW_REF:
            return -1;  /* No PHYs are connected to Octeon, everything is through switch */
    }

    /* Some unknown board. Somebody forgot to update this function... */
    cvmx_dprintf("cvmx_helper_board_get_mii_address: Unknown board type %d\n",
                 cvmx_sysinfo_get()->board_type);
    return -1;
}



^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux 2.6.33 on movidis x16
  2010-03-19 20:27           ` Jan Rovins
@ 2010-03-19 22:03             ` David Daney
  2010-03-19 22:38               ` Jan Rovins
  0 siblings, 1 reply; 11+ messages in thread
From: David Daney @ 2010-03-19 22:03 UTC (permalink / raw)
  To: Jan Rovins; +Cc: Peter 'p2' De Schrijver, linux-mips

On 03/19/2010 01:27 PM, Jan Rovins wrote:


>       case CVMX_BOARD_TYPE_KBP: /* JLR first Movidis X16 */
>	case CVMX_BOARD_TYPE_CUST_WSX16: /* JLR second Movidis X16 */
>            /* Board has 8 SGMII ports. 4 connect out, two connect to a switch,
>                and 2 loop to each other */
>            if ((ipd_port >= 0) && (ipd_port < 4))
>                return ipd_port+1;
>            else
>                return -1;

I don't think that is correct.  I just verified that that PHYs are on
addresses 0-7.  That code makes them start at 1.

The Octeon mdio bus driver also needs a small change.

I am working on a patch.

David Daney

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux 2.6.33 on movidis x16
  2010-03-19 22:03             ` David Daney
@ 2010-03-19 22:38               ` Jan Rovins
  0 siblings, 0 replies; 11+ messages in thread
From: Jan Rovins @ 2010-03-19 22:38 UTC (permalink / raw)
  To: David Daney; +Cc: Peter 'p2' De Schrijver, linux-mips

David Daney wrote:
> On 03/19/2010 01:27 PM, Jan Rovins wrote:
>
>
>>       case CVMX_BOARD_TYPE_KBP: /* JLR first Movidis X16 */
>>     case CVMX_BOARD_TYPE_CUST_WSX16: /* JLR second Movidis X16 */
>>            /* Board has 8 SGMII ports. 4 connect out, two connect to 
>> a switch,
>>                and 2 loop to each other */
>>            if ((ipd_port >= 0) && (ipd_port < 4))
>>                return ipd_port+1;
>>            else
>>                return -1;
>
> I don't think that is correct.  I just verified that that PHYs are on
> addresses 0-7.  That code makes them start at 1.
>
> The Octeon mdio bus driver also needs a small change.
>
> I am working on a patch.
You are most likely right.
using  ipd_port+1 is probably what made my eth0 show up on the 2nd RJ45 
port.
We were just using those boxes for early development, to verify basic 
Octeon functionality of some of our hardware drivers, so once an 
Ethernet port started working, I did not look into it any further, since 
it was a temporary setup just to get things going.

I looked for the original source from Movidis, and all I found in their 
kernel source were broken symlinks to a tool chain they that they did 
not give me :-(

Jan

>
> David Daney
>

^ permalink raw reply	[flat|nested] 11+ messages in thread

* Re: linux 2.6.33 on movidis x16
  2010-03-18 18:26     ` David Daney
  2010-03-18 18:59       ` Jan Rovins
@ 2010-03-19 23:00       ` David Daney
  2010-03-21 16:00         ` Peter 'p2' De Schrijver
  1 sibling, 1 reply; 11+ messages in thread
From: David Daney @ 2010-03-19 23:00 UTC (permalink / raw)
  To: David Daney; +Cc: Peter 'p2' De Schrijver, Jan Rovins, linux-mips

[-- Attachment #1: Type: text/plain, Size: 1642 bytes --]

On 03/18/2010 11:26 AM, David Daney wrote:
> On 03/18/2010 11:17 AM, Peter 'p2' De Schrijver wrote:
>> On 2010-03-15 18:27:41 (-0400), Jan Rovins<janr@adax.com>  wrote:
>>> Peter 'p2' De Schrijver wrote:
>>>> Hi,
>>>>
>>>> We are trying to get linux 2.6.33 to work on the movidis x16 board. 
>>>> Main thing
>>>> missing is the addresses of the PHYs. Does anyone know those ?
>>>> Unfortunately I don't have physical access to the board so I can't 
>>>> just look
>>>> for the PHY components being used.
>>>>
>>>> Thanks,
>>>>
>>>> Peter.
>>>>
>>>>
>>> Do you mean the Movidis x19 ?
>>
>> Maybe. AFAIK ours is called x16, and uses a cavium octeon CN3860 chip.
>>
>>> We have 2 of these in our lab. They are running the old 2.6.21.7  from
>>> the CnUsers 1.8.1  tool chain.
>>> They are currently being used by other developers for some application
>>> testing, but I can grab the serial console boot-up messages and send
>>> them to you, if the PHY info is in there.
>>
>> That would be helpful. Otherwise you could also try running ethtool 
>> on all the
>> interfaces. That should give you the PHY address as well.
>>
>
> I just found one of these.  Current theory is that the PHY addresses 
> are 0-7
>
> I don't think the PHY numbers are printed anywhere.

Can you try the attached patch?


from the back of the box we have:

---------------------------------------
| eth5 | eth7 |  | eth1 | eth3 |
---------------------------------------
| eth4 | eth6 |  | eth0 | eth2 |
---------------------------------------

I was able to boot 2.6.34-rc1 to a Debian root nfs mounted via eth1.

I didn't verify that eth4 - eth7 worked.

David Daney


[-- Attachment #2: movidis.diff --]
[-- Type: text/plain, Size: 1853 bytes --]

diff --git a/drivers/net/phy/mdio-octeon.c b/drivers/net/phy/mdio-octeon.c
index 61a4461..dfaaf30 100644
--- a/drivers/net/phy/mdio-octeon.c
+++ b/drivers/net/phy/mdio-octeon.c
@@ -87,6 +87,7 @@ static int octeon_mdiobus_write(struct mii_bus *bus, int phy_id,
 static int __init octeon_mdiobus_probe(struct platform_device *pdev)
 {
 	struct octeon_mdiobus *bus;
+	union cvmx_smix_en smi_en;
 	int i;
 	int err = -ENOENT;
 
@@ -102,6 +103,10 @@ static int __init octeon_mdiobus_probe(struct platform_device *pdev)
 	if (!bus->mii_bus)
 		goto err;
 
+	smi_en.u64 = 0;
+	smi_en.s.en = 1;
+	cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64);
+
 	/*
 	 * Standard Octeon evaluation boards don't support phy
 	 * interrupts, we need to poll.
@@ -132,17 +137,22 @@ err_register:
 
 err:
 	devm_kfree(&pdev->dev, bus);
+	smi_en.u64 = 0;
+	cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64);
 	return err;
 }
 
 static int __exit octeon_mdiobus_remove(struct platform_device *pdev)
 {
 	struct octeon_mdiobus *bus;
+	union cvmx_smix_en smi_en;
 
 	bus = dev_get_drvdata(&pdev->dev);
 
 	mdiobus_unregister(bus->mii_bus);
 	mdiobus_free(bus->mii_bus);
+	smi_en.u64 = 0;
+	cvmx_write_csr(CVMX_SMIX_EN(bus->unit), smi_en.u64);
 	return 0;
 }
 
diff --git a/drivers/staging/octeon/cvmx-helper-board.c b/drivers/staging/octeon/cvmx-helper-board.c
index 3085e38..fb8d3ee 100644
--- a/drivers/staging/octeon/cvmx-helper-board.c
+++ b/drivers/staging/octeon/cvmx-helper-board.c
@@ -153,6 +153,13 @@ int cvmx_helper_board_get_mii_address(int ipd_port)
 		 * through switch.
 		 */
 		return -1;
+	case CVMX_BOARD_TYPE_CUST_WSX16:
+		if (ipd_port >= 0 && ipd_port <= 3)
+			return ipd_port;
+		else if (ipd_port >= 16 && ipd_port <= 19)
+			return ipd_port - 16 + 4;
+		else
+			return -1;
 	}
 
 	/* Some unknown board. Somebody forgot to update this function... */

^ permalink raw reply related	[flat|nested] 11+ messages in thread

* Re: linux 2.6.33 on movidis x16
  2010-03-19 23:00       ` David Daney
@ 2010-03-21 16:00         ` Peter 'p2' De Schrijver
  0 siblings, 0 replies; 11+ messages in thread
From: Peter 'p2' De Schrijver @ 2010-03-21 16:00 UTC (permalink / raw)
  To: David Daney; +Cc: David Daney, Jan Rovins, linux-mips

>
> Can you try the attached patch?
>
>
> from the back of the box we have:
>
> ---------------------------------------
> | eth5 | eth7 |  | eth1 | eth3 |
> ---------------------------------------
> | eth4 | eth6 |  | eth0 | eth2 |
> ---------------------------------------
>
> I was able to boot 2.6.34-rc1 to a Debian root nfs mounted via eth1.
>
> I didn't verify that eth4 - eth7 worked.
>

Yes ! That seems to work. We intend to use the machine as buildd, so 1 working 
ethernet is fine :)

Thanks,

Peter.

^ permalink raw reply	[flat|nested] 11+ messages in thread

end of thread, other threads:[~2010-03-21 16:00 UTC | newest]

Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-03-05 14:11 linux 2.6.33 on movidis x16 Peter 'p2' De Schrijver
2010-03-15 22:27 ` Jan Rovins
2010-03-18 18:17   ` Peter 'p2' De Schrijver
2010-03-18 18:26     ` David Daney
2010-03-18 18:59       ` Jan Rovins
2010-03-19 17:52         ` Peter 'p2' De Schrijver
2010-03-19 20:27           ` Jan Rovins
2010-03-19 22:03             ` David Daney
2010-03-19 22:38               ` Jan Rovins
2010-03-19 23:00       ` David Daney
2010-03-21 16:00         ` Peter 'p2' De Schrijver

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).