LS1012A pfe not working in LSDK 18.06

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

LS1012A pfe not working in LSDK 18.06

Jump to solution
2,159 Views
dolphin1
Contributor I

We have a custom board with a ls1012a cpu and TI DP83867 PHY in SGMII mode on mdio addr 3.

The dp83867 phy driver has been modified for SGMII as in  linux-xlnx/dp83867.c at master · Xilinx/linux-xlnx · GitHub 

The board is fully functional under LSDK 18.03.

After upgrading the flash firmware (u-boot, ppa, pfe) and SD-card image (rfs + /boot) to LSDK 18.06, Ethernet is not working anymore.

If we let the 18.06 firmware stay in flash, and swap the sd-card back to 18.03 rfs+boot, ethernet is working.

First we found that the pfe kernel driver is looking for elf files in the wrong location.

elf files are found in /lib/firmware, but the driver is looking in /lib/firmware/updates/4.14.47-dirty/

The folder was created, and elf files copied into that folder.

After rebooting, we see the following dmesg:

6.153182] pfe_hif_lib_init
[ 6.155265] pfe_hif_init
[ 6.155271] pfe_hif_alloc_descr
[ 6.159360] pfe_hif_init_buffers
[ 6.164890] pfe_firmware_init
[ 6.164905] firmware_class: __allocate_fw_buf: fw-ppfe_class_ls1012a.elf buf=ffff8000168cf280
[ 6.175412] pfe 4000000.pfe: direct-loading ppfe_class_ls1012a.elf
[ 6.175445] firmware_class: fw_set_page_data: fw-ppfe_class_ls1012a.elf buf=ffff8000168cf280 data=ffff00000b7b9000 size=53124
[ 6.175453] firmware_class: __allocate_fw_buf: fw-ppfe_tmu_ls1012a.elf buf=ffff8000168d9c80
[ 6.176736] pfe 4000000.pfe: direct-loading ppfe_tmu_ls1012a.elf
[ 6.176799] firmware_class: fw_set_page_data: fw-ppfe_tmu_ls1012a.elf buf=ffff8000168d9c80 data=ffff00000b711000 size=11592
[ 6.176804] pfe_load_elf
[ 6.176811] pe_load_ddr_section: load address(3fb0000) and elf file address(ffff00000b7c3000) rcvd
[ 6.621152] PFE binary version: pfe_ls1012a_slowpath_05
[ 6.621160] pfe_load_elf
[ 6.638364] firmware_class: __fw_free_buf: fw-ppfe_tmu_ls1012a.elf buf=ffff8000168d9c80 data=ffff00000b711000 size=11592
[ 6.638739] firmware_class: __fw_free_buf: fw-ppfe_class_ls1012a.elf buf=ffff8000168cf280 data=ffff00000b7b9000 size=53124
[ 6.638753] pfe_ctrl_init
[ 6.638756] pfe_ctrl_init finished
[ 6.638759] pfe_eth_init
[ 6.638801] pfe_eth_mdio_init
[ 6.639250] device: 'ls1012a-0': device_add
[ 6.639305] PM: Adding info for No Bus:ls1012a-0
[ 6.655887] device: 'ls1012a-0:03': device_add
[ 6.655933] bus: 'mdio_bus': add device ls1012a-0:03
[ 6.655985] PM: Adding info for mdio_bus:ls1012a-0:03
[ 6.656149] bus: 'mdio_bus': driver_probe_device: matched device ls1012a-0:03 with driver TI DP83867
[ 6.656157] bus: 'mdio_bus': really_probe: probing driver TI DP83867 with device ls1012a-0:03
[ 6.656168] devices_kset: Moving ls1012a-0:03 to end of list
[ 6.656173] driver: 'TI DP83867': driver_bound: bound to device 'ls1012a-0:03'
[ 6.656265] bus: 'mdio_bus': really_probe: bound device ls1012a-0:03 to driver TI DP83867
[ 6.656274] libphy: ls1012a MDIO Bus: probed
[ 6.656336] device: 'eth0': device_add
[ 6.656487] PM: Adding info for No Bus:eth0
[ 6.669409] pfe_phy_init interface 4
[ 6.672306] pfe 4000000.pfe eth0: phy_connect() failed
[ 6.718829] pfe 4000000.pfe eth0: pfe_eth_init_one: pfe_phy_init() failed
[ 6.804275] PM: Removing info for No Bus:eth0
[ 6.846002] bus: 'mdio_bus': remove device ls1012a-0:03
[ 6.846146] PM: Removing info for mdio_bus:ls1012a-0:03
[ 6.846237] PM: Removing info for No Bus:ls1012a-0
[ 6.927085] pfe_ctrl_exit
[ 6.927093] pfe_firmware_exit
[ 6.927104] pfe_hif_exit
[ 6.952267] pfe_hif_release_buffers
[ 6.952542] pfe_hif_free_descr
[ 6.952563] pfe_hif_lib_exit
[ 6.958228] pfe_hw_exit
[ 6.958798] firmware_class: fw_name_devm_release: fw_name-ppfe_tmu_ls1012a.elf devm-ffff80001790bfa8 released
[ 6.958803] firmware_class: fw_name_devm_release: fw_name-ppfe_class_ls1012a.elf devm-ffff80001864eba8 released

Labels (1)
Tags (1)
0 Kudos
1 Solution
1,361 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Eivind Eriksen,

According to your Linux Kernel booting error, there is problem with phy connection and initialization.

For your custom board, you need to modify Kernel configuration and dts file according to your target board configuration.

Please define "CONFIG_DP83867_PHY=y" in your Kernel configuration file, please modify the following section in the dts file fsl-ls1012a-rdb.dts according to your custom board, then rebuild Kernel image.

&pfe {
        status = "okay";
        #address-cells = <1>;
        #size-cells = <0>;

        ethernet@0 {
                compatible = "fsl,pfe-gemac-port";
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x0>;    /* GEM_ID */
                fsl,gemac-bus-id = <0x0>;       /* BUS_ID */
                fsl,gemac-phy-id = <0x2>;       /* PHY_ID */
                fsl,mdio-mux-val = <0x0>;
                phy-mode = "sgmii";
                fsl,pfe-phy-if-flags = <0x0>;

                mdio@0 {
                        reg = <0x1>; /* enabled/disabled */
                };
        };

     

        ethernet@1 {
                compatible = "fsl,pfe-gemac-port";
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x1>;    /* GEM_ID */
                fsl,gemac-bus-id = < 0x1 >;     /* BUS_ID */
                fsl,gemac-phy-id = < 0x1 >;     /* PHY_ID */
                fsl,mdio-mux-val = <0x0>;
                phy-mode = "rgmii-txid";
                fsl,pfe-phy-if-flags = <0x0>;

                mdio@0 {
                        reg = <0x0>; /* enabled/disabled */
                };
        };
};


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

View solution in original post

0 Kudos
1 Reply
1,362 Views
yipingwang
NXP TechSupport
NXP TechSupport

Hello Eivind Eriksen,

According to your Linux Kernel booting error, there is problem with phy connection and initialization.

For your custom board, you need to modify Kernel configuration and dts file according to your target board configuration.

Please define "CONFIG_DP83867_PHY=y" in your Kernel configuration file, please modify the following section in the dts file fsl-ls1012a-rdb.dts according to your custom board, then rebuild Kernel image.

&pfe {
        status = "okay";
        #address-cells = <1>;
        #size-cells = <0>;

        ethernet@0 {
                compatible = "fsl,pfe-gemac-port";
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x0>;    /* GEM_ID */
                fsl,gemac-bus-id = <0x0>;       /* BUS_ID */
                fsl,gemac-phy-id = <0x2>;       /* PHY_ID */
                fsl,mdio-mux-val = <0x0>;
                phy-mode = "sgmii";
                fsl,pfe-phy-if-flags = <0x0>;

                mdio@0 {
                        reg = <0x1>; /* enabled/disabled */
                };
        };

     

        ethernet@1 {
                compatible = "fsl,pfe-gemac-port";
                #address-cells = <1>;
                #size-cells = <0>;
                reg = <0x1>;    /* GEM_ID */
                fsl,gemac-bus-id = < 0x1 >;     /* BUS_ID */
                fsl,gemac-phy-id = < 0x1 >;     /* PHY_ID */
                fsl,mdio-mux-val = <0x0>;
                phy-mode = "rgmii-txid";
                fsl,pfe-phy-if-flags = <0x0>;

                mdio@0 {
                        reg = <0x0>; /* enabled/disabled */
                };
        };
};


Have a great day,
TIC

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos