T1040 integrated Ethernet switch and SERDES

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

T1040 integrated Ethernet switch and SERDES

1,071 Views
elszymono
Contributor I

Hi

 

I'm currently working on the QorIQ T1040 integrated Ethernet switch. Our desing differs significantly from the T1040RDB board (this one is using QSGMII). We want to connect switch ports with other CPUs and switches directly (i.e. without PHYs) over SGMII. I'm having problems making it work though.

 

As I understand the uio_seville.ko kernel driver is responsible for allowing userspace communication with the VSC9953 switch core. It is also responsible for initializing the SERDES part using vsc9953_mdio_write function calls. If I understand correctly vsc9953_mdio_write and vsc9953_mdio_read functions accesss the SGMII register space as described in 31.5 MDIO register spaces. If so, the driver is writing to MDIO_SGMII_IF_MODE, MDIO_SGMII_DEV_ABIL_SGMII, MDIO_SGMII_LINK_TMR_H, MDIO_SGMII_LINK_TMR_L and MDIO_SGMII_CR registers.

 

I wanted to double check if those registers are configured correctly. After running vsc9953_lynx_init I dumped all SGMII registers and it turned out that only the one at PHY address 0x4 gets configured. All other PHY and register addresses return 0x0. I am 100% sure that vsc9953_lynx_init performs vsc9953_mdio_write for all 8 ports.

 

I dumped the RCW to see if it is configured as I want:
Reset Configuration Word (RCW):
00000000: 080d000e 05000000 00000000 00000000
00000010: 89000002 00000812 fc027000 41000000
00000020: 00000000 00000000 00000000 0002a780
00000030: 00000000 80160a05 00000000 00000000

The bold value (0x89) corresponds to what we want ot use (see Figure 31-1. Supported SerDes Options).

 

Do you have any idea why the SERDES part is not configured properly? What is the connection between tbi-phy reg number and SERDES port?

I attached my l2switch device tree node and MDIO_SGMII* register dump for all ports.

 

We are using Vitesse/Microsemi switches in our other products so the question of modifying l2sw_bin is another matter. Right now I would like to know how the physical layer to the switch operates.

 

Kind regards

Szymon Kukliński

Original Attachment has been moved to: uio_seville.txt.zip

Labels (1)
0 Kudos
1 Reply

486 Views
elszymono
Contributor I

Unfortunately I was unable to attach my l2switch devicetree node. Here it is:

l2switch@800000 {
   #address-cells = <0x1>;
   #size-cells = <0x0>;
   clock-frequency = <0x0>;
   compatible = "vitesse-9953";
   interrupts = <0x1a 0x2 0x0 0x0>;
   reg = <0x800000 0x290000>;
   mac-address = [00 0a 35 00 00 01];
   mdio@700ac {
      #address-cells = <0x1>;
      #size-cells = <0x0>;
      compatible = "vitesse-9953-mdio";

      tbi-phy@4 {
            device_type = "tbi-phy";
            linux,phandle = <0x22>;
            phandle = <0x22>;
            reg = <0x4>;
      };

      tbi-phy@5 {
            device_type = "tbi-phy";
            linux,phandle = <0x23>;
            phandle = <0x23>;
            reg = <0x5>;
      };

      tbi-phy@6 {
            device_type = "tbi-phy";
            linux,phandle = <0x24>;
            phandle = <0x24>;
            reg = <0x6>;
      };

      tbi-phy@7 {
            device_type = "tbi-phy";
            linux,phandle = <0x25>;
            phandle = <0x25>;
            reg = <0x7>;
      };

      tbi-phy@8 {
            device_type = "tbi-phy";
            linux,phandle = <0x26>;
            phandle = <0x26>;
            reg = <0x8>;
      };

      tbi-phy@9 {
            device_type = "tbi-phy";
            linux,phandle = <0x27>;
            phandle = <0x27>;
            reg = <0x9>;
      };

      tbi-phy@a {
            device_type = "tbi-phy";
            linux,phandle = <0x28>;
            phandle = <0x28>;
            reg = <0xa>;
      };

      tbi-phy@b {
            device_type = "tbi-phy";
           linux,phandle = <0x29>;
            phandle = <0x29>;
            reg = <0xb>;
      };
   };

      port@100000 {

            compatible = "vitesse-9953-port";
            port-index = <0x0>;
            tbi-handle = <0x22>;
      };

      port@110000 {
            compatible = "vitesse-9953-port";
            port-index = <0x1>;
            tbi-handle = <0x23>;
      };

      port@120000 {
            compatible = "vitesse-9953-port";
            port-index = <0x2>;
            tbi-handle = <0x24>;
      };

      port@130000 {
            compatible = "vitesse-9953-port";
            port-index = <0x3>;
            tbi-handle = <0x25>;
      };

      port@140000 {
            compatible = "vitesse-9953-port";
            port-index = <0x4>;
            tbi-handle = <0x26>;
      };

      port@150000 {
            compatible = "vitesse-9953-port";
            port-index = <0x5>;
            tbi-handle = <0x27>;
      };

      port@160000 {
            compatible = "vitesse-9953-port";
            port-index = <0x6>;
            tbi-handle = <0x28>;
      };

      port@170000 {
            compatible = "vitesse-9953-port";
            port-index = <0x7>;
            tbi-handle = <0x29>;
      };

      port@180000 {
            compatible = "vitesse-9953-port";
            fixed-link = <0x2 0x1 0x9c4 0x0 0x0>;
            phy-connection-type = "sgmii";
            port-index = <0x8>;
      };

      port@190000 {
            compatible = "vitesse-9953-port";
            fixed-link = <0x3 0x1 0x9c4 0x0 0x0>;
            phy-connection-type = "sgmii";
            port-index = <0x9>;
      };

};

 

Regards

Szymon Kukliński

0 Kudos