linux 2.6.33 on movidis x16
Subsystems (4)
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.
Quoted 12 lines · 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
Quoted 8 lines · Jan Rovins
Quoted 7 lines · 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.
Quoted 6 lines
Quoted 5 lines
Thanks,
Peter.
Do you mean the Movidis x19 ?
Maybe. AFAIK ours is called x16, and uses a cavium octeon CN3860 chip.
Quoted 5 lines
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.
Quoted 18 lines · On 03/18/2010 11:17 AM, Peter 'p2' De Schrijver wrote:
Quoted 8 lines · Jan Rovins
Quoted 7 lines · 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.
Quoted 6 lines
Quoted 5 lines
Thanks,
Peter.
Do you mean the Movidis x19 ?
Maybe. AFAIK ours is called x16, and uses a cavium octeon CN3860 chip.
Quoted 9 lines
Quoted 5 lines
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
Quoted 29 lines · David Daney
Quoted 18 lines · On 03/18/2010 11:17 AM, Peter 'p2' De Schrijver wrote:
Quoted 8 lines · Jan Rovins
Quoted 7 lines · 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.
Quoted 6 lines
Quoted 5 lines
Thanks,
Peter.
Do you mean the Movidis x19 ?
Maybe. AFAIK ours is called x16, and uses a cavium octeon CN3860 chip.
Quoted 9 lines
Quoted 5 lines
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.
Quoted 5 lines
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
Hi,
Quoted 3 lines
You are right, it is called an x16. My memory is failing me, I should have looked at the machine first.
Ok :)
Quoted 133 lines
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.00alpha2looks 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
Quoted 9 lines
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.
Quoted 4 lines
----------------------------------------------------------
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.
Quoted 154 lines · Peter 'p2' De Schrijver wrote:
Hi,
Quoted 3 lines
You are right, it is called an x16. My memory is failing me, I should have looked at the machine first.
Ok :)
Quoted 133 lines
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.00alpha2looks 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/FullQuoted 10 lines
Advertised auto-negotiation: Yes
Speed: 100Mb/s
Duplex: Full
Port: MII
PHYAD: 0
Transceiver: internal
Auto-negotiation: on
Link detected: yes
Quoted 6 lines
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 intcvmx_helper_board_get_mii_address(int ipd_port)incvmx-helper-board.c? It contains a large switch statement. caseCVMX_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.
Quoted 9 lines
Quoted 4 lines
----------------------------------------------------------
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.
/**
* 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;
}Quoted 8 lines · Jan Rovins
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
Quoted 13 lines · David Daney
Quoted 9 lines · Jan Rovins
case
CVMX_BOARD_TYPE_KBP: /* JLR first Movidis X16 */
caseCVMX_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;
Quoted 6 lines
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
Quoted 3 lines
David Daney
Quoted 25 lines · David Daney
Quoted 24 lines · On 03/18/2010 11:17 AM, Peter 'p2' De Schrijver wrote:
Quoted 8 lines · Jan Rovins
Quoted 7 lines · 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.
Quoted 6 lines
Quoted 5 lines
Thanks,
Peter.
Do you mean the Movidis x19 ?
Maybe. AFAIK ours is called x16, and uses a cavium octeon CN3860 chip.
Quoted 5 lines
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.
Quoted 7 lines
Quoted 3 lines
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
drivers/net/phy/mdio-octeon.c +10 -0
@@ -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 ; }
drivers/staging/octeon/cvmx-helper-board.c +7 -0
@@ -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... */
Quoted 12 lines
Can you try the attached patch?
from the back of the box we have:
---------------------------------------
| eth5 | eth7 | | eth1 | eth3 |
---------------------------------------
| eth4 | eth6 | | eth0 | eth2 |
---------------------------------------
Quoted 4 lines
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.