This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/66AK2E05: K2E + Broadcom Phy adaption BCM54616S

Part Number: 66AK2E05

Tool/software: Linux

Hi Champs:

 Our customer needs to adapt this Broadcom Phy on the K2E, ==>  BCM54616S.

 May you help to guide us what's the Needed procedure to port it?

  Here is our thinking:

      Q1: we need to let the u-boot to test this broadcom Phy, do we need to modify the DTS for the "GBE" mac setting?

                 Or we just need to modify the board.c on the  u-boot?

      Q2: We try to find the related information for this Phy, so, this is a patch for Kernel, right? ==> https://patchwork.ozlabs.org/patch/418059/

      Q3. Do we have the related document to let us know how to adapt the Phy on the u-boot?

      Q4. The customer modified DTS is attached, please review it's correctness.

 Thanks.

BR Rio

  

     

BR Rio

From_IAC.7z

  • Hi.

       More information added.

       #1. Customer is using this SW version: ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04

       #2. The  HW connection is as the picture posted here.

    BR Rio

  • We're looking into this. Feedback will be posted here.

    Best Regards,
    Yordan
  • Hi, Rio,

    u-boot uses dts files. Hence, the dts file need to be modified to reflect different PHY. Customer should contact BCM to see if the patch is for that PHY. We don't use that part and don't have information for it. U-boot development is an open source effort. To implement a BCM PHY, it should be generic. BCM should have its driver upstreamed and should be part of the open source code. We don't have hardware to test and can't verify if the DTS changes are correct. We also can't support customization.

    For schematics review, please follow TI schematics review process.

    Rex
  • Hi Rex:

    Thanks for the feedback.

    Do we need to modify the MAC stuffs if the customer change the PHY HW?

    If yes, any document to let us follow?

    BR Rio

  • Hi, Rio,

    DTS related documentation are in linux/Documentation/devicetree/bindings. The net/phy.txt may be the one related, but customer will need to find out what value to use. There may be other vendor specific documents customer may want to refer to in the same folder.

    I am not sure what you mean the MAC stuffs. Do you mean the kernel code for MAC? That will be the driver provided by the vendor (BCM) in my opinion. If you mean the NetCP configuration, then it is configured and should be able to use as is.

    Rex
  • Hi Rex:

       I thought this section is the MAC stuffs.

       My questions are:

        A. So, as you said, the NetCP in the below section is not needed to be modified?

        B. Do we need to modify the Mac stuffs in the kernel?

    BR Rio

    /*IEC modify*/
    ti,navigator-dmas = <&dma_gbe 0>,
    <&dma_gbe 8>,
    <&dma_gbe 16>,
    <&dma_gbe 24>,
    <&dma_gbe 32>,
    <&dma_gbe 40>,
    <&dma_gbe 48>,
    <&dma_gbe 56>,
    <&dma_gbe 0>;
    ti,navigator-dma-names = "netrx0", "netrx1", "netrx2", "netrx3", "netrx4", "netrx5", "netrx6", "netrx7", "nettx";

    netcp-devices {
    #address-cells = <1>;
    #size-cells = <1>;
    ranges;
    gbe@200000 { /* ETHSS */
    label = "netcp-gbe";
    compatible = "ti,netcp-gbe-9";
    reg = <0x200000 0x900>, <0x220000 0x20000>;
    /* enable-ale; */
    tx-queue = <896>;
    tx-channel = "nettx";
    /*IEC modify*/

  • Hi Rex,

     as Rio mentioned,

    IEC.diff
    diff --git a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/IEC.diff b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/IEC.diff
    new file mode 100644
    index 0000000..a14da4d
    --- /dev/null
    +++ b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/IEC.diff
    @@ -0,0 +1,134 @@
    +diff --git a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board.c b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board.c
    +index b70825e..d6f0c44 100644
    +--- a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board.c
    ++++ b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board.c
    +@@ -129,8 +129,9 @@ int board_eth_init(bd_t *bis)
    + 	for (j = 0; j < port_num; j++) {
    + 		sprintf(link_type_name, "sgmii%d_link_type", j);
    + 		res = get_eth_env_param(link_type_name);
    +-		if (res >= 0)
    +-			eth_priv_cfg[j].sgmii_link_type = res;
    ++		//if (res >= 0){
    ++		//	eth_priv_cfg[j].sgmii_link_type = res;
    ++		//}
    + 
    + 		keystone2_emac_initialize(&eth_priv_cfg[j]);
    + 	}
    +diff --git a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board_k2e.c b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board_k2e.c
    +index cbb3077..1f6f4e4 100644
    +--- a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board_k2e.c
    ++++ b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board_k2e.c
    +@@ -79,7 +79,7 @@ struct eth_priv_t eth_priv_cfg[] = {
    + 	{
    + 		.int_name        = "K2E_EMAC0",
    + 		.rx_flow         = 0,
    +-		.phy_addr        = 0,
    ++		.phy_addr        = 1,
    + 		.slave_port      = 1,
    + 		.sgmii_link_type = SGMII_LINK_MAC_PHY,
    + 		.phy_if          = PHY_INTERFACE_MODE_SGMII,
    +@@ -87,7 +87,7 @@ struct eth_priv_t eth_priv_cfg[] = {
    + 	{
    + 		.int_name        = "K2E_EMAC1",
    + 		.rx_flow         = 8,
    +-		.phy_addr        = 1,
    ++		.phy_addr        = 2,
    + 		.slave_port      = 2,
    + 		.sgmii_link_type = SGMII_LINK_MAC_PHY,
    + 		.phy_if          = PHY_INTERFACE_MODE_SGMII,
    +@@ -95,49 +95,49 @@ struct eth_priv_t eth_priv_cfg[] = {
    + 	{
    + 		.int_name        = "K2E_EMAC2",
    + 		.rx_flow         = 16,
    +-		.phy_addr        = 2,
    ++		.phy_addr        = 3,
    + 		.slave_port      = 3,
    +-		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    ++		.sgmii_link_type = SGMII_LINK_MAC_PHY,
    + 		.phy_if          = PHY_INTERFACE_MODE_SGMII,
    + 	},
    + 	{
    + 		.int_name        = "K2E_EMAC3",
    + 		.rx_flow         = 24,
    +-		.phy_addr        = 3,
    ++		.phy_addr        = 0,
    + 		.slave_port      = 4,
    +-		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    ++		.sgmii_link_type = SGMII_LINK_MAC_MAC_AUTONEG,
    + 		.phy_if          = PHY_INTERFACE_MODE_SGMII,
    + 	},
    + 	{
    + 		.int_name        = "K2E_EMAC4",
    + 		.rx_flow         = 32,
    +-		.phy_addr        = 4,
    ++		.phy_addr        = 0,
    + 		.slave_port      = 5,
    +-		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    ++		.sgmii_link_type = SGMII_LINK_MAC_MAC_AUTONEG,
    + 		.phy_if          = PHY_INTERFACE_MODE_SGMII,
    + 	},
    + 	{
    + 		.int_name        = "K2E_EMAC5",
    + 		.rx_flow         = 40,
    +-		.phy_addr        = 5,
    ++		.phy_addr        = 4,
    + 		.slave_port      = 6,
    +-		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    ++		.sgmii_link_type = SGMII_LINK_MAC_PHY,
    + 		.phy_if          = PHY_INTERFACE_MODE_SGMII,
    + 	},
    + 	{
    + 		.int_name        = "K2E_EMAC6",
    + 		.rx_flow         = 48,
    +-		.phy_addr        = 6,
    ++		.phy_addr        = 0,
    + 		.slave_port      = 7,
    +-		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    ++		.sgmii_link_type = SGMII_LINK_MAC_MAC_AUTONEG,
    + 		.phy_if          = PHY_INTERFACE_MODE_SGMII,
    + 	},
    + 	{
    + 		.int_name        = "K2E_EMAC7",
    + 		.rx_flow         = 56,
    +-		.phy_addr        = 7,
    ++		.phy_addr        = 0,
    + 		.slave_port      = 8,
    +-		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    ++		.sgmii_link_type = SGMII_LINK_MAC_MAC_AUTONEG,
    + 		.phy_if          = PHY_INTERFACE_MODE_SGMII,
    + 	},
    + };
    +diff --git a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/drivers/net/keystone_net.c b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/drivers/net/keystone_net.c
    +index b6389c3..2ce6f96 100644
    +--- a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/drivers/net/keystone_net.c
    ++++ b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/drivers/net/keystone_net.c
    +@@ -957,6 +957,7 @@ int keystone2_emac_initialize(struct eth_priv_t *eth_priv)
    + 
    + 	/* Register MDIO bus if it's not registered yet */
    + 	if (!mdio_bus) {
    ++		printf("enter mdio bus setup!!\n");
    + 		mdio_bus	= mdio_alloc();
    + 		mdio_bus->read	= keystone2_mdio_read;
    + 		mdio_bus->write	= keystone2_mdio_write;
    +@@ -1530,6 +1531,7 @@ static int ks2_eth_parse_slave_interface(int netcp, int slave,
    + 		priv->phy_if = PHY_INTERFACE_MODE_SGMII;
    + 		pdata->phy_interface = priv->phy_if;
    + 		priv->sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED;
    ++		priv->has_mdio = false;
    + 	} else if (priv->link_type == LINK_TYPE_RGMII_LINK_MAC_PHY) {
    + 		phy_mode = fdt_getprop(fdt, slave, "phy-mode", NULL);
    + 		if (phy_mode) {
    +@@ -1550,7 +1552,12 @@ static int ks2_eth_parse_slave_interface(int netcp, int slave,
    + 		priv->phy_if = PHY_INTERFACE_MODE_XGMII,
    + 		pdata->phy_interface = priv->phy_if;
    + 		priv->has_mdio = false;
    +-	}
    ++	}else if (priv->link_type == LINK_TYPE_SGMII_MAC_TO_MAC_AUTO) {
    ++                priv->phy_if = PHY_INTERFACE_MODE_SGMII;
    ++                pdata->phy_interface = priv->phy_if;
    ++                priv->sgmii_link_type = SGMII_LINK_MAC_MAC_AUTONEG;
    ++                priv->has_mdio = false;
    ++        }
    + 
    + 	return 0;
    + }
    diff --git a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/arch/arm/dts/k2e-evm.dts b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/arch/arm/dts/k2e-evm.dts
    index e2c3fb4..701fb64 100644
    --- a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/arch/arm/dts/k2e-evm.dts
    +++ b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/arch/arm/dts/k2e-evm.dts
    @@ -144,12 +144,23 @@
     &mdio {
     	status = "ok";
     	ethphy0: ethernet-phy@0 {
    -		compatible = "marvell,88E1514", "marvell,88E1510", "ethernet-phy-ieee802.3-c22";
    -		reg = <0>;
    +		status = "ok";
    +		compatible = "broadcom,BCM54616S","ethernet-phy-ieee802.3-c22";
    +		reg = <1>;
     	};
    -
     	ethphy1: ethernet-phy@1 {
    -		compatible = "marvell,88E1514", "marvell,88E1510", "ethernet-phy-ieee802.3-c22";
    -		reg = <1>;
    +		status = "ok";
    +		compatible = "broadcom,BCM54616S","ethernet-phy-ieee802.3-c22";
    +		reg = <2>;
    +	};
    +	ethphy2: ethernet-phy@2 {
    +		status = "ok";
    +		compatible = "broadcom,BCM54616S","ethernet-phy-ieee802.3-c22";
    +		reg = <3>;
    +	};
    +	ethphy3: ethernet-phy@3 {
    +		status = "ok";
    +		compatible = "broadcom,BCM54616S","ethernet-phy-ieee802.3-c22";
    +		reg = <4>;
     	};
     };
    diff --git a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/arch/arm/dts/k2e-netcp.dtsi b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/arch/arm/dts/k2e-netcp.dtsi
    index a518945..d871b9c 100644
    --- a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/arch/arm/dts/k2e-netcp.dtsi
    +++ b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/arch/arm/dts/k2e-netcp.dtsi
    @@ -130,8 +130,10 @@ netcp: netcp@24000000 {
     
     	ti,navigator-dmas = <&dma_gbe 0>,
     			<&dma_gbe 8>,
    +			<&dma_gbe 16>,
    +			<&dma_gbe 24>,
     			<&dma_gbe 0>;
    -	ti,navigator-dma-names = "netrx0", "netrx1", "nettx";
    +	ti,navigator-dma-names = "netrx0", "netrx1", "netrx2", "netrx5", "nettx";
     
     	netcp-devices {
     		#address-cells = <1>;
    @@ -156,32 +158,33 @@ netcp: netcp@24000000 {
     					link-interface	= <1>;
     					phy-handle	= <&ethphy1>;
     				};
    -			};
    -
    -			secondary-slave-ports {
    -				port-2 {
    +				gbe2: interface-2 {
     					slave-port = <2>;
    -					link-interface	= <2>;
    +					link-interface	= <1>;
    +					phy-handle	= <&ethphy2>;
    +				};
    +				gbe5: interface-5 {
    +					slave-port = <5>;
    +					link-interface	= <1>;
    +					phy-handle	= <&ethphy3>;
     				};
    -				port-3 {
    +			};
    +			secondary-slave-ports {
    +				gbe3: interface-3 {
     					slave-port = <3>;
    -					link-interface	= <2>;
    +					link-interface  = <0>;
     				};
    -				port-4 {
    +				gbe4: interface-4 {
     					slave-port = <4>;
    -					link-interface	= <2>;
    -				};
    -				port-5 {
    -					slave-port = <5>;
    -					link-interface	= <2>;
    +					link-interface  = <0>;
     				};
    -				port-6 {
    +				gbe6: interface-6 {
     					slave-port = <6>;
    -					link-interface	= <2>;
    +					link-interface  = <0>;
     				};
    -				port-7 {
    +				gbe7: interface-7 {
     					slave-port = <7>;
    -					link-interface	= <2>;
    +					link-interface  = <0>;
     				};
     			};
     		};
    @@ -195,7 +198,7 @@ netcp: netcp@24000000 {
     			rx-queue-depth = <128 128 0 0>;
     			rx-buffer-size = <1518 4096 0 0>;
     			rx-queue = <528>;
    -			tx-completion-queue = <530>;
    +			tx-completion-queue = <536>;
     			efuse-mac = <1>;
     			netcp-gbe = <&gbe0>;
     
    @@ -207,16 +210,39 @@ netcp: netcp@24000000 {
     			rx-queue-depth = <128 128 0 0>;
     			rx-buffer-size = <1518 4096 0 0>;
     			rx-queue = <529>;
    -			tx-completion-queue = <531>;
    -			efuse-mac = <0>;
    -			local-mac-address = [02 18 31 7e 3e 00];
    +			tx-completion-queue = <537>;
    +			efuse-mac = <1>;
     			netcp-gbe = <&gbe1>;
     		};
    +		interface-2 {
    +			rx-channel = "netrx2";
    +			rx-pool = <1024 12>;
    +			tx-pool = <1024 12>;
    +			rx-queue-depth = <128 128 0 0>;
    +			rx-buffer-size = <1518 4096 0 0>;
    +			rx-queue = <530>;
    +			tx-completion-queue = <538>;
    +			efuse-mac = <1>;
    +			netcp-gbe = <&gbe2>;
    +		};
    +		interface-5 {
    +			rx-channel = "netrx5";
    +			rx-pool = <1024 12>;
    +			tx-pool = <1024 12>;
    +			rx-queue-depth = <128 128 0 0>;
    +			rx-buffer-size = <1518 4096 0 0>;
    +			rx-queue = <533>;
    +			tx-completion-queue = <541>;
    +			efuse-mac = <1>;
    +			netcp-gbe = <&gbe5>;
    +		};
    +
     	};
    +
     };
     
     netcpx: netcp@2f00000 {
    -	status		= "okay";
    +	status = "disabled";
     	reg		= <0x02f00000 0x100>;
     	compatible	= "ti,netcpx-1.0";
     	#address-cells	= <1>;
    diff --git a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board.c b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board.c
    index b70825e..d6f0c44 100644
    --- a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board.c
    +++ b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board.c
    @@ -129,8 +129,9 @@ int board_eth_init(bd_t *bis)
     	for (j = 0; j < port_num; j++) {
     		sprintf(link_type_name, "sgmii%d_link_type", j);
     		res = get_eth_env_param(link_type_name);
    -		if (res >= 0)
    -			eth_priv_cfg[j].sgmii_link_type = res;
    +		//if (res >= 0){
    +		//	eth_priv_cfg[j].sgmii_link_type = res;
    +		//}
     
     		keystone2_emac_initialize(&eth_priv_cfg[j]);
     	}
    diff --git a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board_k2e.c b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board_k2e.c
    index cbb3077..1f6f4e4 100644
    --- a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board_k2e.c
    +++ b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/board/ti/ks2_evm/board_k2e.c
    @@ -79,7 +79,7 @@ struct eth_priv_t eth_priv_cfg[] = {
     	{
     		.int_name        = "K2E_EMAC0",
     		.rx_flow         = 0,
    -		.phy_addr        = 0,
    +		.phy_addr        = 1,
     		.slave_port      = 1,
     		.sgmii_link_type = SGMII_LINK_MAC_PHY,
     		.phy_if          = PHY_INTERFACE_MODE_SGMII,
    @@ -87,7 +87,7 @@ struct eth_priv_t eth_priv_cfg[] = {
     	{
     		.int_name        = "K2E_EMAC1",
     		.rx_flow         = 8,
    -		.phy_addr        = 1,
    +		.phy_addr        = 2,
     		.slave_port      = 2,
     		.sgmii_link_type = SGMII_LINK_MAC_PHY,
     		.phy_if          = PHY_INTERFACE_MODE_SGMII,
    @@ -95,49 +95,49 @@ struct eth_priv_t eth_priv_cfg[] = {
     	{
     		.int_name        = "K2E_EMAC2",
     		.rx_flow         = 16,
    -		.phy_addr        = 2,
    +		.phy_addr        = 3,
     		.slave_port      = 3,
    -		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    +		.sgmii_link_type = SGMII_LINK_MAC_PHY,
     		.phy_if          = PHY_INTERFACE_MODE_SGMII,
     	},
     	{
     		.int_name        = "K2E_EMAC3",
     		.rx_flow         = 24,
    -		.phy_addr        = 3,
    +		.phy_addr        = 0,
     		.slave_port      = 4,
    -		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    +		.sgmii_link_type = SGMII_LINK_MAC_MAC_AUTONEG,
     		.phy_if          = PHY_INTERFACE_MODE_SGMII,
     	},
     	{
     		.int_name        = "K2E_EMAC4",
     		.rx_flow         = 32,
    -		.phy_addr        = 4,
    +		.phy_addr        = 0,
     		.slave_port      = 5,
    -		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    +		.sgmii_link_type = SGMII_LINK_MAC_MAC_AUTONEG,
     		.phy_if          = PHY_INTERFACE_MODE_SGMII,
     	},
     	{
     		.int_name        = "K2E_EMAC5",
     		.rx_flow         = 40,
    -		.phy_addr        = 5,
    +		.phy_addr        = 4,
     		.slave_port      = 6,
    -		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    +		.sgmii_link_type = SGMII_LINK_MAC_PHY,
     		.phy_if          = PHY_INTERFACE_MODE_SGMII,
     	},
     	{
     		.int_name        = "K2E_EMAC6",
     		.rx_flow         = 48,
    -		.phy_addr        = 6,
    +		.phy_addr        = 0,
     		.slave_port      = 7,
    -		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    +		.sgmii_link_type = SGMII_LINK_MAC_MAC_AUTONEG,
     		.phy_if          = PHY_INTERFACE_MODE_SGMII,
     	},
     	{
     		.int_name        = "K2E_EMAC7",
     		.rx_flow         = 56,
    -		.phy_addr        = 7,
    +		.phy_addr        = 0,
     		.slave_port      = 8,
    -		.sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED,
    +		.sgmii_link_type = SGMII_LINK_MAC_MAC_AUTONEG,
     		.phy_if          = PHY_INTERFACE_MODE_SGMII,
     	},
     };
    diff --git a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/drivers/net/keystone_net.c b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/drivers/net/keystone_net.c
    index b6389c3..2ce6f96 100644
    --- a/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/drivers/net/keystone_net.c
    +++ b/ti-processor-sdk-linux-rt-k2e-evm-03.03.00.04/board-support/u-boot-2016.05+gitAUTOINC+4db46a6bbd-g4db46a6bbd/drivers/net/keystone_net.c
    @@ -957,6 +957,7 @@ int keystone2_emac_initialize(struct eth_priv_t *eth_priv)
     
     	/* Register MDIO bus if it's not registered yet */
     	if (!mdio_bus) {
    +		printf("enter mdio bus setup!!\n");
     		mdio_bus	= mdio_alloc();
     		mdio_bus->read	= keystone2_mdio_read;
     		mdio_bus->write	= keystone2_mdio_write;
    @@ -1530,6 +1531,7 @@ static int ks2_eth_parse_slave_interface(int netcp, int slave,
     		priv->phy_if = PHY_INTERFACE_MODE_SGMII;
     		pdata->phy_interface = priv->phy_if;
     		priv->sgmii_link_type = SGMII_LINK_MAC_MAC_FORCED;
    +		priv->has_mdio = false;
     	} else if (priv->link_type == LINK_TYPE_RGMII_LINK_MAC_PHY) {
     		phy_mode = fdt_getprop(fdt, slave, "phy-mode", NULL);
     		if (phy_mode) {
    @@ -1550,7 +1552,12 @@ static int ks2_eth_parse_slave_interface(int netcp, int slave,
     		priv->phy_if = PHY_INTERFACE_MODE_XGMII,
     		pdata->phy_interface = priv->phy_if;
     		priv->has_mdio = false;
    -	}
    +	}else if (priv->link_type == LINK_TYPE_SGMII_MAC_TO_MAC_AUTO) {
    +                priv->phy_if = PHY_INTERFACE_MODE_SGMII;
    +                pdata->phy_interface = priv->phy_if;
    +                priv->sgmii_link_type = SGMII_LINK_MAC_MAC_AUTONEG;
    +                priv->has_mdio = false;
    +        }
     
     	return 0;
     }
    
    what IEC modify include config/kernel part, and the diff is as the attached file shows :

    could you help us review on it ?

    Thanks a lot

    Kobe

  • Dear Rex,

    now we changed to run linux instead of u-boot,

    could you kindly help us review on our modify on keystone-k2e-netcp.dtsi and keystone-k2e-evm.dts ?

    i attached original ones( named with origin- in head ) and our modified ones and their diff for your reference

    IECModifyOnLinuxDts.zip

    Thanks a lot and Best regards,

    Bryant Wu

  • Dear Rex,

    otherwise, in original keystone-k2e-netcp.dtsi, it mention "qos":

    qos@0 {
    label = "netcp-qos";
    compatible = "ti,netcp-qos";
    tx-channel = "pa-cl6";

    interfaces {
    qos0: interface-0 {
    tx-queues = <910 8072 8073 8074
    8075 8076 8077>;
    };
    qos1: interface-1 {
    tx-queues = <910 6472 6473 6474
    6475 6476 6477>;
    };
    };
    };

    if we want to add "qos2:interface-2{ }" , what value we should set in tx-queues ??

    Thanks a lot and Best regards,

    Bryant Wu
  • Rio,

    That's correct. The nodes you pointed out configure dma and netcp which are not related to PHY. Once packets received, TI Multicore Navigator will deliver the packets to the destination according to the QMSS configuration. The default is to the ARM NetCP.

    Rex

  • Bryant,

    By the way, there is an issue with KS2 QoS in current Linux ProcSDK 4.x release. That's probably why you see QoS definition in dts file in 3.x release, but not in 4.x releases .

    Rex
  • Rex

    if we had eight eth interfaces, i think we should set eight qos for each eth interface, do you know how to set it ?

    ps:
    in default keystone-k2e-netcp.dtsi:
    it only setup two qos for interface-0 and interface-1 :
    qos@0 {
    label = "netcp-qos";
    compatible = "ti,netcp-qos";
    tx-channel = "pa-cl6";

    interfaces {
    qos0: interface-0 {
    tx-queues = <910 8072 8073 8074
    8075 8076 8077>;
    };
    qos1: interface-1 {
    tx-queues = <910 6472 6473 6474
    6475 6476 6477>;
    };
    };
  • Bryant,

    You should be able to follow how those 2 qos interfaces are defined, and replicate the other 6. You do need to define the queues for the other 6 interfaces and assign them in the qos interface nodes. Please take a look at the queue mapping I mentioned in earlier post and avoid those have been assigned/used.

    Rex
  • Rex

    Thanks, and we still have two questions :

    1 should we modify keystone-qostree.dtsi at the same time ?

    2 in keystone-k2e-netcp.dtsi qos node :

       qos0: interface-0 -> tx queue is from 8072 to 8077

       qos1: interface-1 -> tx queue is from 6472 to 6477

       qos2: interface-2 -> tx queue is from ? to ?

       qos3: interface-3 -> tx queue is from ? to ?

       qos4: interface-4 -> tx queue is from ? to ?

       qos5: interface-5 -> tx queue is from ? to ?

       qos6: interface-6 -> tx queue is from ? to ?

       qos7: interface-7 -> tx queue is from ? to ?

    we have no idea about the tx queue number, they should be fix number, could you tell us directly what number they are for qos2~qos7's tx queue ?

  • Bryant,

    There aren't fixed numbers to use, but you define your own. As I mentioned in earlier posts, you need to check the queue mapping and use those haven't been used/assigned/reserved. Though they are not fixed to certain numbers, but preferred to be consecutive for better performance. You will need to modify keystone-qostree.dtsi. TI provided example code for the EVM as a reference.  Please take a look at how qostree0 is defined and those queue numbers (8072-8077) association in the qostree0 node. Also, correlate those queue numbers in the queue mapping in the Multicore Navigator User's Guide to understand why they are picked from that range of the queues. 

    I believe these info should be enough as the guidance to start your project. This thread meant to discuss the PHY issue. If you don't have any PHY issue. I'd like to close this thread. For any other NETCP or QoS questions/issues, please submit a new thread. Thanks!

    Rex

  • Rex

    we cannot see your earlier posts, could you share it again ? otherwise, what is "Multicore Navigator User's Guide" ? we don't see that

    Robert

  • Hi, Bryant,

    Please check the User Guide section of the Technical Documents in 66AK2E05 device wiki page, www.ti.com/.../66AK2E05. For your convenience, the Multicore Navigator User's Guide link is
    www.ti.com/.../sprugr9h.pdf

    Rex