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.

DRA74P: GMAC MDIO problem with kernel3.8

Part Number: DRA74P
Other Parts Discussed in Thread: DRA746

Goodmornig

We are usign DRA746P chip at 1.5GHz on a board with Android4.3 and kernel3.8 with 2GB of RAM (DDR3).

We have kernel crash when we add module related to Ethernet  (our phys are TJA1100 or TJA1101):

insmod /system/lib/modules/kernel/drivers/net/ethernet/ti/davinci_mdio.ko
insmod /system/lib/modules/kernel/drivers/net/ethernet/ti/davinci_cpdma.ko
insmod /system/lib/modules/kernel/drivers/net/ethernet/ti/cpsw.ko

We don't have same problem on board with DRA746 ( No-PLUS). All run well.

In u-boot we are able to use MDIO communiiation and verify the presence of chips.

Please , do you have any advice where could be the problem or differences (in kernel, we think) in managing PLUSchip against No-PlusChip?

Thanks in advance

Regards

Michele

  • Hi,

    Looking at this comparison the difference seems to be in clock.

    Can you check the clock configured in DT ?

    Regards

    Vineet

  • Hi Vineet,

    thanks for answer.

    As of our understanding the clocks to the MDIO module are the same:

    page 744 of TRM of J6P shows the clocks to the GMAC module
    GMAC_MAIN_CLK Interface
    GMAC_RFT_CLK Functional
    GMII_250MHZ_CLK Functional
    RGMII_5MHZ_CLK Functional
    RMII_50MHZ_CLK Functional

    These are the same as in 746 NO-plus.

    Could you point out the differences you are talking about?

    We have two boards, with same software (configuration), only difference is the chip DRA746 against DRA746P:

    • on board with DRA476 all run well, also ethernet;
    • on board with DRA746P, we are not able to insert ethernet modules ( we have kernel crash in davinci_mdio module);

    Thanks in advance for your help

    Regards

    Michele

  • Hi Vineet,

    I add an other behaviour which I hope could help to find solution:

    • On board with DRA746P:
      • without the ethernet modules, in case of warm reboot from kernel, at restart the u-boot crash and continue to reboot( crash when it try to check cpsw); 
      • without the ethernet modules, in case of cold reboot from kernel, at restart the u-boot execute well; 
    • On board with DRA746:
      • no problem;

    The behaviour explained above seem to be dependent from some configuration done by kernel ( which is good only for DRA746 and not for DRA746P).

    Thanks in advance

    Regards

    Michele

  • Hi TI Team,

    I add dump of main register about GMAC ( <address> <value>) which I hope could help to find solution:

    • Dump from u-boot on board with DRA746P:

    CS_DAP_DebugSS: GEL Output: 0x4A0052A8 0x00000007
    CS_DAP_DebugSS: GEL Output: 0x4A0052AC 0x0000001F
    CS_DAP_DebugSS: GEL Output: 0x4A0052B0 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x4A0052B4 0x0000FA04
    CS_DAP_DebugSS: GEL Output: 0x4A0052B8 0x00000204
    CS_DAP_DebugSS: GEL Output: 0x4A0052BC 0x0000000A
    CS_DAP_DebugSS: GEL Output: 0x4A0052C0 0x00000228
    CS_DAP_DebugSS: GEL Output: 0x4A0052C4 0x00000208
    CS_DAP_DebugSS: GEL Output: 0x4A0052C8 0x0000000A
    CS_DAP_DebugSS: GEL Output: 0x4A0093C0 0x00001F02
    CS_DAP_DebugSS: GEL Output: 0x4A0093C4 0x00000020
    CS_DAP_DebugSS: GEL Output: 0x4A0093C8 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x4A0093D0 0x08000002
    CS_DAP_DebugSS: GEL Output: 0x4AE0619C 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x4AE073D4 0x00000101
    CS_DAP_DebugSS: GEL Output: 0x44805600 0x00310001
    CS_DAP_DebugSS: GEL Output: 0x48488000 0x00206439
    CS_DAP_DebugSS: GEL Output: 0x4A0023FC 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x4A002558 0x00000001
    CS_DAP_DebugSS: GEL Output: 0x4A003C14 0x00000000

    • Dump from kernel on board with DRA746P:

    CS_DAP_DebugSS: GEL Output: 0x4A0052A8 0x00000007
    CS_DAP_DebugSS: GEL Output: 0x4A0052AC 0x0000001F
    CS_DAP_DebugSS: GEL Output: 0x4A0052B0 0x00000001
    CS_DAP_DebugSS: GEL Output: 0x4A0052B4 0x0000FA04
    CS_DAP_DebugSS: GEL Output: 0x4A0052B8 0x00000004
    CS_DAP_DebugSS: GEL Output: 0x4A0052BC 0x0000000A
    CS_DAP_DebugSS: GEL Output: 0x4A0052C0 0x00000228
    CS_DAP_DebugSS: GEL Output: 0x4A0052C4 0x00000008
    CS_DAP_DebugSS: GEL Output: 0x4A0052C8 0x0000000A
    CS_DAP_DebugSS: GEL Output: 0x4A0093C0 0x00000003
    CS_DAP_DebugSS: GEL Output: 0x4A0093C4 0x00000020
    CS_DAP_DebugSS: GEL Output: 0x4A0093C8 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x4A0093D0 0x08070000
    CS_DAP_DebugSS: GEL Output: 0x4AE0619C 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x4AE073D4 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x44805600 0x00310001
    CS_DAP_DebugSS: GEL Output: 0x48488000 0x00206439
    CS_DAP_DebugSS: GEL Output: 0x4A0023FC 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x4A002558 0x00000001
    CS_DAP_DebugSS: GEL Output: 0x4A003C14 0x00000000

    • Dump from kernel on board with DRA746 (No-PLUS):

    CS_DAP_DebugSS: GEL Output: 0x4A0052A8 0x00000007
    CS_DAP_DebugSS: GEL Output: 0x4A0052AC 0x00000012
    CS_DAP_DebugSS: GEL Output: 0x4A0052B0 0x00000001
    CS_DAP_DebugSS: GEL Output: 0x4A0052B4 0x0000FA04
    CS_DAP_DebugSS: GEL Output: 0x4A0052B8 0x00000004
    CS_DAP_DebugSS: GEL Output: 0x4A0052BC 0x0000000A
    CS_DAP_DebugSS: GEL Output: 0x4A0052C0 0x00000028
    CS_DAP_DebugSS: GEL Output: 0x4A0052C4 0x00000008
    CS_DAP_DebugSS: GEL Output: 0x4A0052C8 0x0000000A
    CS_DAP_DebugSS: GEL Output: 0x4A0093C0 0x00000003
    CS_DAP_DebugSS: GEL Output: 0x4A0093C4 0x00000020
    CS_DAP_DebugSS: GEL Output: 0x4A0093C8 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x4A0093D0 0x08070000
    CS_DAP_DebugSS: GEL Output: 0x4AE0619C 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x4AE073D4 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x44805600 0x00310001
    CS_DAP_DebugSS: GEL Output: 0x48488000 0x00206439
    CS_DAP_DebugSS: GEL Output: 0x4A0023FC 0x00000000
    CS_DAP_DebugSS: GEL Output: 0x4A002558 0x00000001
    CS_DAP_DebugSS: GEL Output: 0x4A003C14 0x00000000

    For our understanding there is something in kernel that is ok for DRA746, but no good for DRA746Plus . What could we miss? 

    Thanks in advance for your help

    regards

    Michele

  • Hi Michele,

    GMAC block is the same on DRA7xx vs DRA7xP so we expect it to work the same.

    Could you first clarify few things below?

    Was there any board design change between DRA7x vs DRA7xP project? for example, a different PMIC for higher performance requirement on DRA7xP.

    Are you using one of DRA7xP packages which is pin compatible with DRA7x?

    What changes have you made to support DRA7xP?

    Can you also double check if there is any code which might get skipped on DRA7xP?

    Regards,
    Stanley

  • Please double check your dts file and make sure mac is configured for no-idle as highlighted.

    mac: ethernet@48484000 {

    compatible = "ti,dra7-cpsw","ti,cpsw";

    ti,hwmods = "gmac";

    clocks = <&gmac_main_clk>, <&l3init_clkctrl DRA7_GMAC_CLKCTRL 25>;

    clock-names = "fck", "cpts";

    cpdma_channels = <8>;

    ale_entries = <1024>;

    bd_ram_size = <0x2000>;

    mac_control = <0x20>;

    slaves = <2>;

    active_slave = <0>;

    cpts_clock_mult = <0x784CFE14>;

    cpts_clock_shift = <29>;

    reg = <0x48484000 0x1000

           0x48485200 0x2E00>;

    #address-cells = <1>;

    #size-cells = <1>;

     

    /*

    * Do not allow gating of cpsw clock as workaround

    * for errata i877. Keeping internal clock disabled

    * causes the device switching characteristics

    * to degrade over time and eventually fail to meet

    * the data manual delay time/skew specs.

    */

    ti,no-idle;

     

    /*

    * rx_thresh_pend

    * rx_pend

    * tx_pend

    * misc_pend

    */

    interrupts = <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,

         <GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,

         <GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,

         <GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>;

    ranges;

    syscon = <&scm_conf>;

    status = "disabled";

     

    davinci_mdio: mdio@48485000 {

    compatible = "ti,cpsw-mdio","ti,davinci_mdio";

    #address-cells = <1>;

    #size-cells = <0>;

    ti,hwmods = "davinci_mdio";

    bus_freq = <1000000>;

    reg = <0x48485000 0x100>;

    };

     

    cpsw_emac0: slave@48480200 {

    /* Filled in by U-Boot */

    mac-address = [ 00 00 00 00 00 00 ];

    };

     

    cpsw_emac1: slave@48480300 {

    /* Filled in by U-Boot */

    mac-address = [ 00 00 00 00 00 00 ];

    };

     

    phy_sel: cpsw-phy-sel@4a002554 {

    compatible = "ti,dra7xx-cpsw-phy-sel";

    reg= <0x4a002554 0x4>;

    reg-names = "gmii-sel";

    };

    };