Commit ee2ae1ed authored by Alexandre TORGUE's avatar Alexandre TORGUE Committed by David S. Miller

stmmac: add new DT platform entries for GMAC4

This is to support the snps,dwmac-4.00 and snps,dwmac-4.10a
and related features on the platform driver.
See binding doc for further details.
Signed-off-by: default avatarGiuseppe Cavallaro <peppe.cavallaro@st.com>
Signed-off-by: default avatarAlexandre TORGUE <alexandre.torgue@st.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 36ff7c1e
...@@ -59,6 +59,8 @@ Optional properties: ...@@ -59,6 +59,8 @@ Optional properties:
- snps,fb: fixed-burst - snps,fb: fixed-burst
- snps,mb: mixed-burst - snps,mb: mixed-burst
- snps,rb: rebuild INCRx Burst - snps,rb: rebuild INCRx Burst
- snps,tso: this enables the TSO feature otherwise it will be managed by
MAC HW capability register.
- mdio: with compatible = "snps,dwmac-mdio", create and register mdio bus. - mdio: with compatible = "snps,dwmac-mdio", create and register mdio bus.
Examples: Examples:
......
...@@ -284,6 +284,13 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac) ...@@ -284,6 +284,13 @@ stmmac_probe_config_dt(struct platform_device *pdev, const char **mac)
plat->pmt = 1; plat->pmt = 1;
} }
if (of_device_is_compatible(np, "snps,dwmac-4.00") ||
of_device_is_compatible(np, "snps,dwmac-4.10a")) {
plat->has_gmac4 = 1;
plat->pmt = 1;
plat->tso_en = of_property_read_bool(np, "snps,tso");
}
if (of_device_is_compatible(np, "snps,dwmac-3.610") || if (of_device_is_compatible(np, "snps,dwmac-3.610") ||
of_device_is_compatible(np, "snps,dwmac-3.710")) { of_device_is_compatible(np, "snps,dwmac-3.710")) {
plat->enh_desc = 1; plat->enh_desc = 1;
......
...@@ -137,5 +137,7 @@ struct plat_stmmacenet_data { ...@@ -137,5 +137,7 @@ struct plat_stmmacenet_data {
void (*exit)(struct platform_device *pdev, void *priv); void (*exit)(struct platform_device *pdev, void *priv);
void *bsp_priv; void *bsp_priv;
struct stmmac_axi *axi; struct stmmac_axi *axi;
int has_gmac4;
bool tso_en;
}; };
#endif #endif
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment