/linux/drivers/net/ethernet/stmicro/stmmac/ |
H A D | dwmac-stm32.c | 3 * dwmac-stm32.c - DWMAC Specific Glue layer for STM32 MCU 113 int (*suspend)(struct stm32_dwmac *dwmac); 114 void (*resume)(struct stm32_dwmac *dwmac); 115 int (*parse_data)(struct stm32_dwmac *dwmac, 122 static int stm32_dwmac_clk_enable(struct stm32_dwmac *dwmac) in stm32_dwmac_clk_enable() argument 126 ret = clk_prepare_enable(dwmac->clk_tx); in stm32_dwmac_clk_enable() 130 ret = clk_prepare_enable(dwmac->clk_rx); in stm32_dwmac_clk_enable() 134 ret = clk_prepare_enable(dwmac->syscfg_clk); in stm32_dwmac_clk_enable() 138 if (dwmac->enable_eth_ck) { in stm32_dwmac_clk_enable() 139 ret = clk_prepare_enable(dwmac in stm32_dwmac_clk_enable() 158 struct stm32_dwmac *dwmac = plat_dat->bsp_priv; stm32_dwmac_init() local 172 struct stm32_dwmac *dwmac = plat_dat->bsp_priv; stm32mp1_select_ethck_external() local 203 struct stm32_dwmac *dwmac = plat_dat->bsp_priv; stm32mp1_validate_ethck_rate() local 237 struct stm32_dwmac *dwmac = plat_dat->bsp_priv; stm32mp1_configure_pmcr() local 293 struct stm32_dwmac *dwmac = plat_dat->bsp_priv; stm32mp2_configure_syscfg() local 339 struct stm32_dwmac *dwmac = plat_dat->bsp_priv; stm32mp1_set_mode() local 358 struct stm32_dwmac *dwmac = plat_dat->bsp_priv; stm32mcu_set_mode() local 382 stm32_dwmac_clk_disable(struct stm32_dwmac * dwmac) stm32_dwmac_clk_disable() argument 391 stm32_dwmac_parse_data(struct stm32_dwmac * dwmac,struct device * dev) stm32_dwmac_parse_data() argument 439 stm32mp1_parse_data(struct stm32_dwmac * dwmac,struct device * dev) stm32mp1_parse_data() argument 505 struct stm32_dwmac *dwmac; stm32_dwmac_probe() local 573 struct stm32_dwmac *dwmac = priv->plat->bsp_priv; stm32_dwmac_remove() local 593 stm32mp1_suspend(struct stm32_dwmac * dwmac) stm32mp1_suspend() argument 598 stm32mp1_resume(struct stm32_dwmac * dwmac) stm32mp1_resume() argument 608 struct stm32_dwmac *dwmac = priv->plat->bsp_priv; stm32_dwmac_suspend() local 628 struct stm32_dwmac *dwmac = priv->plat->bsp_priv; stm32_dwmac_resume() local [all...] |
H A D | dwmac-imx.c | 3 * dwmac-imx.c - DWMAC Specific Glue layer for NXP imx8 72 struct imx_priv_data *dwmac = plat_dat->bsp_priv; in imx8mp_set_intf_mode() local 81 val |= (dwmac->rmii_refclk_ext ? 0 : GPR_ENET_QOS_CLK_TX_CLK_SEL); in imx8mp_set_intf_mode() 91 pr_debug("imx dwmac doesn't support %d interface\n", in imx8mp_set_intf_mode() 97 return regmap_update_bits(dwmac->intf_regmap, dwmac->intf_reg_off, in imx8mp_set_intf_mode() 112 struct imx_priv_data *dwmac = plat_dat->bsp_priv; in imx93_set_intf_mode() local 120 if (dwmac->rmii_refclk_ext) { in imx93_set_intf_mode() 121 ret = regmap_clear_bits(dwmac->intf_regmap, in imx93_set_intf_mode() 122 dwmac in imx93_set_intf_mode() 149 struct imx_priv_data *dwmac = priv; imx_dwmac_clks_config() local 176 struct imx_priv_data *dwmac = priv; imx_dwmac_init() local 198 struct imx_priv_data *dwmac = bsp_priv; imx_dwmac_set_clk_tx_rate() local 211 struct imx_priv_data *dwmac = priv; imx_dwmac_fix_speed() local 235 struct imx_priv_data *dwmac = priv; imx93_dwmac_fix_speed() local 288 imx_dwmac_parse_dt(struct imx_priv_data * dwmac,struct device * dev) imx_dwmac_parse_dt() argument 332 struct imx_priv_data *dwmac; imx_dwmac_probe() local [all...] |
H A D | dwmac-sti.c | 3 * dwmac-sti.c - STMicroelectronics DWMAC Specific Glue layer 132 struct sti_dwmac *dwmac = priv; in stih4xx_fix_retime_src() local 133 u32 src = dwmac->tx_retime_src; in stih4xx_fix_retime_src() 134 u32 reg = dwmac->ctrl_reg; in stih4xx_fix_retime_src() 137 if (dwmac->interface == PHY_INTERFACE_MODE_MII) { in stih4xx_fix_retime_src() 139 } else if (dwmac->interface == PHY_INTERFACE_MODE_RMII) { in stih4xx_fix_retime_src() 140 if (dwmac->ext_phyclk) { in stih4xx_fix_retime_src() 146 } else if (phy_interface_mode_is_rgmii(dwmac->interface)) { in stih4xx_fix_retime_src() 156 clk_set_rate(dwmac->clk, freq); in stih4xx_fix_retime_src() 158 regmap_update_bits(dwmac in stih4xx_fix_retime_src() 162 sti_dwmac_set_mode(struct sti_dwmac * dwmac) sti_dwmac_set_mode() argument 182 sti_dwmac_parse_data(struct sti_dwmac * dwmac,struct platform_device * pdev,struct plat_stmmacenet_data * plat_dat) sti_dwmac_parse_data() argument 238 struct sti_dwmac *dwmac = bsp_priv; sti_dwmac_init() local 254 struct sti_dwmac *dwmac = bsp_priv; sti_dwmac_exit() local 264 struct sti_dwmac *dwmac; sti_dwmac_probe() local [all...] |
H A D | dwmac-socfpga.c | 4 * Adopted from dwmac-sti.c 67 struct socfpga_dwmac *dwmac = (struct socfpga_dwmac *)bsp_priv; in socfpga_dwmac_fix_mac_speed() local 68 struct stmmac_priv *priv = netdev_priv(dev_get_drvdata(dwmac->dev)); in socfpga_dwmac_fix_mac_speed() 69 void __iomem *splitter_base = dwmac->splitter_base; in socfpga_dwmac_fix_mac_speed() 70 void __iomem *sgmii_adapter_base = dwmac->sgmii_adapter_base; in socfpga_dwmac_fix_mac_speed() 104 static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *dev) in socfpga_dwmac_parse_data() argument 135 dwmac->f2h_ptp_ref_clk = of_property_read_bool(np, "altr,f2h_ptp_ref_clk"); in socfpga_dwmac_parse_data() 146 dwmac->splitter_base = devm_ioremap_resource(dev, &res_splitter); in socfpga_dwmac_parse_data() 147 if (IS_ERR(dwmac->splitter_base)) { in socfpga_dwmac_parse_data() 149 return PTR_ERR(dwmac in socfpga_dwmac_parse_data() 235 socfpga_get_plat_phymode(struct socfpga_dwmac * dwmac) socfpga_get_plat_phymode() argument 240 socfpga_sgmii_config(struct socfpga_dwmac * dwmac,bool enable) socfpga_sgmii_config() argument 271 socfpga_gen5_set_phy_mode(struct socfpga_dwmac * dwmac) socfpga_gen5_set_phy_mode() argument 329 socfpga_gen10_set_phy_mode(struct socfpga_dwmac * dwmac) socfpga_gen10_set_phy_mode() argument 383 struct socfpga_dwmac *dwmac = priv->plat->bsp_priv; socfpga_dwmac_pcs_init() local 439 struct socfpga_dwmac *dwmac = bsp_priv; socfpga_dwmac_init() local 450 struct socfpga_dwmac *dwmac; socfpga_dwmac_probe() local [all...] |
H A D | Makefile | 16 obj-$(CONFIG_DWMAC_ANARION) += dwmac-anarion.o 17 obj-$(CONFIG_DWMAC_INGENIC) += dwmac-ingenic.o 18 obj-$(CONFIG_DWMAC_IPQ806X) += dwmac-ipq806x.o 19 obj-$(CONFIG_DWMAC_LPC18XX) += dwmac-lpc18xx.o 20 obj-$(CONFIG_DWMAC_MEDIATEK) += dwmac-mediatek.o 21 obj-$(CONFIG_DWMAC_MESON) += dwmac-meson.o dwmac-meson8b.o 22 obj-$(CONFIG_DWMAC_QCOM_ETHQOS) += dwmac-qcom-ethqos.o 23 obj-$(CONFIG_DWMAC_RENESAS_GBETH) += dwmac-renesas-gbeth.o 24 obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac [all...] |
H A D | dwmac-thead.c | 56 struct thead_dwmac *dwmac = plat->bsp_priv; in thead_dwmac_set_phy_if() local 70 dev_err(dwmac->dev, "unsupported phy interface %d\n", in thead_dwmac_set_phy_if() 75 writel(phyif, dwmac->apb_base + GMAC_INTF_CTRL); in thead_dwmac_set_phy_if() 81 struct thead_dwmac *dwmac = plat->bsp_priv; in thead_dwmac_set_txclk_dir() local 95 dev_err(dwmac->dev, "unsupported phy interface %d\n", in thead_dwmac_set_txclk_dir() 100 writel(txclk_dir, dwmac->apb_base + GMAC_TXCLK_OEN); in thead_dwmac_set_txclk_dir() 107 struct thead_dwmac *dwmac = bsp_priv; in thead_set_clk_tx_rate() local 113 plat = dwmac->plat; in thead_set_clk_tx_rate() 126 writel(0, dwmac->apb_base + GMAC_PLLCLK_DIV); in thead_set_clk_tx_rate() 130 dev_err(dwmac->dev, "invalid speed %d\n", speed); in thead_set_clk_tx_rate() [all …]
|
H A D | dwmac-visconti.c | 58 struct visconti_eth *dwmac = bsp_priv; in visconti_eth_set_clk_tx_rate() local 80 val = readl(dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 84 writel(val, dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 88 writel(val, dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 91 writel(val, dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 94 writel(val, dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 110 val = readl(dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 114 writel(val, dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 121 writel(val, dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 124 writel(val, dwmac in visconti_eth_set_clk_tx_rate() 151 struct visconti_eth *dwmac = plat_dat->bsp_priv; visconti_eth_init_hw() local 192 struct visconti_eth *dwmac = plat_dat->bsp_priv; visconti_eth_clock_probe() local 211 struct visconti_eth *dwmac = get_stmmac_bsp_priv(&pdev->dev); visconti_eth_clock_remove() local 223 struct visconti_eth *dwmac; visconti_eth_dwmac_probe() local [all...] |
H A D | dwmac-starfive.c | 35 struct starfive_dwmac *dwmac = plat_dat->bsp_priv; in starfive_dwmac_set_mode() local 54 dev_err(dwmac->dev, "unsupported interface %d\n", in starfive_dwmac_set_mode() 59 regmap = syscon_regmap_lookup_by_phandle_args(dwmac->dev->of_node, in starfive_dwmac_set_mode() 63 return dev_err_probe(dwmac->dev, PTR_ERR(regmap), "getting the regmap failed\n"); in starfive_dwmac_set_mode() 70 return dev_err_probe(dwmac->dev, err, "error setting phy mode\n"); in starfive_dwmac_set_mode() 72 if (dwmac->data) { in starfive_dwmac_set_mode() 74 dwmac->data->gtxclk_dlychain); in starfive_dwmac_set_mode() 76 return dev_err_probe(dwmac->dev, err, in starfive_dwmac_set_mode() 87 struct starfive_dwmac *dwmac; in starfive_dwmac_probe() local 101 dwmac in starfive_dwmac_probe() [all...] |
H A D | dwmac-loongson1.c | 59 struct ls1x_dwmac *dwmac = plat_dat->bsp_priv; in ls1b_dwmac_setup() local 72 dwmac->id = 0; in ls1b_dwmac_setup() 74 dwmac->id = 1; in ls1b_dwmac_setup() 86 struct ls1x_dwmac *dwmac = priv; in ls1b_dwmac_syscon_init() local 87 struct plat_stmmacenet_data *plat = dwmac->plat_dat; in ls1b_dwmac_syscon_init() 88 struct regmap *regmap = dwmac->regmap; in ls1b_dwmac_syscon_init() 90 if (dwmac->id == 0) { in ls1b_dwmac_syscon_init() 109 } else if (dwmac->id == 1) { in ls1b_dwmac_syscon_init() 140 struct ls1x_dwmac *dwmac = priv; in ls1c_dwmac_syscon_init() local 141 struct plat_stmmacenet_data *plat = dwmac in ls1c_dwmac_syscon_init() 170 struct ls1x_dwmac *dwmac; ls1x_dwmac_probe() local [all...] |
H A D | dwmac-meson.c | 28 struct meson_dwmac *dwmac = bsp_priv; in meson6_dwmac_set_clk_tx_rate() local 31 val = readl(dwmac->reg); in meson6_dwmac_set_clk_tx_rate() 42 writel(val, dwmac->reg); in meson6_dwmac_set_clk_tx_rate() 51 struct meson_dwmac *dwmac; in meson6_dwmac_probe() local 62 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); in meson6_dwmac_probe() 63 if (!dwmac) in meson6_dwmac_probe() 66 dwmac->reg = devm_platform_ioremap_resource(pdev, 1); in meson6_dwmac_probe() 67 if (IS_ERR(dwmac->reg)) in meson6_dwmac_probe() 68 return PTR_ERR(dwmac in meson6_dwmac_probe() [all...] |
H A D | Kconfig | 95 Select the QCOM_SOCINFO config flag to enable specific dwmac 115 tristate "Amlogic Meson dwmac support" 147 tristate "Rockchip dwmac support" 158 tristate "Renesas RZ/N1 dwmac support" 182 tristate "SOCFPGA dwmac support" 197 tristate "Sophgo dwmac support" 208 tristate "StarFive dwmac support" 267 tristate "T-HEAD dwmac support" 289 tristate "Intel dwmac support"
|
/linux/Documentation/devicetree/bindings/net/ |
H A D | sti-dwmac.txt | 10 - compatible : "st,stih407-dwmac" 34 ethernet0: dwmac@9630000 { 36 compatible = "st,stih407-dwmac", "snps,dwmac", "snps,dwmac-3.710";
|
H A D | anarion-gmac.txt | 7 - compatible: Should be "adaptrum,anarion-gmac", "snps,dwmac" 14 compatible = "adaptrum,anarion-gmac", "snps,dwmac";
|
H A D | ipq806x-dwmac.txt | 3 The device inherits all the properties of the dwmac/stmmac devices 8 - compatible: should be "qcom,ipq806x-gmac" along with "snps,dwmac"
|
H A D | stmmac.txt | 1 This file has moved to snps,dwmac.yaml.
|
/linux/arch/loongarch/boot/dts/ |
H A D | loongson-2k2000-ref.dts | 78 compatible = "snps,dwmac-mdio"; 93 compatible = "snps,dwmac-mdio"; 108 compatible = "snps,dwmac-mdio";
|
H A D | loongson-2k1000-ref.dts | 70 compatible = "snps,dwmac-mdio"; 85 compatible = "snps,dwmac-mdio";
|
/linux/arch/arm64/boot/dts/st/ |
H A D | stm32mp233.dtsi | 47 compatible = "st,stm32mp25-dwmac", "snps,dwmac-5.20";
|
H A D | stm32mp253.dtsi | 47 compatible = "st,stm32mp25-dwmac", "snps,dwmac-5.20";
|
/linux/arch/arm/boot/dts/amlogic/ |
H A D | meson8m2.dtsi | 28 compatible = "amlogic,meson8m2-dwmac", "snps,dwmac";
|
/linux/arch/arm64/boot/dts/altera/ |
H A D | socfpga_stratix10.dtsi | 175 compatible = "altr,socfpga-stmmac-a10-s10", "snps,dwmac-3.74a", "snps,dwmac"; 193 compatible = "altr,socfpga-stmmac-a10-s10", "snps,dwmac-3.74a", "snps,dwmac"; 211 compatible = "altr,socfpga-stmmac-a10-s10", "snps,dwmac-3.74a", "snps,dwmac";
|
/linux/arch/arm64/boot/dts/intel/ |
H A D | socfpga_agilex.dtsi | 173 compatible = "altr,socfpga-stmmac-a10-s10", "snps,dwmac-3.74a", "snps,dwmac"; 191 compatible = "altr,socfpga-stmmac-a10-s10", "snps,dwmac-3.74a", "snps,dwmac"; 209 compatible = "altr,socfpga-stmmac-a10-s10", "snps,dwmac-3.74a", "snps,dwmac";
|
/linux/arch/riscv/boot/dts/starfive/ |
H A D | jh7110-starfive-visionfive-2.dtsi | 28 compatible = "snps,dwmac-mdio";
|
/linux/arch/arm/boot/dts/axis/ |
H A D | artpec6-devboard.dts | 57 compatible = "snps,dwmac-mdio";
|
/linux/arch/arm64/boot/dts/qcom/ |
H A D | sa8775p-ride.dts | 24 compatible = "snps,dwmac-mdio";
|