Skip to content

gmac1 of RK3588 does not work at 100Mbps #91

@Novchord

Description

@Novchord

gmac1(i.e., ethernet@fe1c0000) of RK3588 does not work at 100Mbps. Due to a bug in rk3588_set_rgmii_speed() function.

···

if (pdata->bus_id == 1) {
	div <<= 5;
	div_mask = RK3588_GMAC_CLK_RGMII_DIV_MASK << 5;
}

div <<= pdata->bus_id ? RK3588_GMAC1_ID_SHIFT : 0;

···

Will do one more left shift 5 bits when gmac1 work at 100Mbps. Just comment either of these two statement will fix it.
Like below,


#if 0
	if (pdata->bus_id == 1) {
		div <<= 5;
		div_mask = RK3588_GMAC_CLK_RGMII_DIV_MASK << 5;
	}
#endif
	div <<= pdata->bus_id ? RK3588_GMAC1_ID_SHIFT : 0;

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions