| /linux/drivers/net/ethernet/stmicro/stmmac/ |
| H A D | dwmac-stm32.c | 108 int (*suspend)(struct stm32_dwmac *dwmac); 109 void (*resume)(struct stm32_dwmac *dwmac); 110 int (*parse_data)(struct stm32_dwmac *dwmac, 117 static int stm32_dwmac_clk_enable(struct stm32_dwmac *dwmac) in stm32_dwmac_clk_enable() argument 121 ret = clk_prepare_enable(dwmac->clk_tx); in stm32_dwmac_clk_enable() 125 ret = clk_prepare_enable(dwmac->clk_rx); in stm32_dwmac_clk_enable() 129 ret = clk_prepare_enable(dwmac->syscfg_clk); in stm32_dwmac_clk_enable() 133 if (dwmac->enable_eth_ck) { in stm32_dwmac_clk_enable() 134 ret = clk_prepare_enable(dwmac->clk_eth_ck); in stm32_dwmac_clk_enable() 142 clk_disable_unprepare(dwmac->syscfg_clk); in stm32_dwmac_clk_enable() [all …]
|
| H A D | dwmac-meson8b.c | 82 int (*set_phy_mode)(struct meson8b_dwmac *dwmac); 105 static void meson8b_dwmac_mask_bits(struct meson8b_dwmac *dwmac, u32 reg, in meson8b_dwmac_mask_bits() argument 110 data = readl(dwmac->regs + reg); in meson8b_dwmac_mask_bits() 114 writel(data, dwmac->regs + reg); in meson8b_dwmac_mask_bits() 117 static struct clk *meson8b_dwmac_register_clk(struct meson8b_dwmac *dwmac, in meson8b_dwmac_register_clk() argument 127 snprintf(clk_name, sizeof(clk_name), "%s#%s", dev_name(dwmac->dev), in meson8b_dwmac_register_clk() 138 return devm_clk_register(dwmac->dev, hw); in meson8b_dwmac_register_clk() 141 static int meson8b_init_rgmii_tx_clk(struct meson8b_dwmac *dwmac) in meson8b_init_rgmii_tx_clk() argument 144 struct device *dev = dwmac->dev; in meson8b_init_rgmii_tx_clk() 165 clk_configs->m250_mux.reg = dwmac->regs + PRG_ETH0; in meson8b_init_rgmii_tx_clk() [all …]
|
| H A D | dwmac-imx.c | 50 int (*set_intf_mode)(struct imx_priv_data *dwmac, u8 phy_intf_sel); 67 static int imx8mp_set_intf_mode(struct imx_priv_data *dwmac, u8 phy_intf_sel) in imx8mp_set_intf_mode() argument 74 if (phy_intf_sel == PHY_INTF_SEL_RMII && !dwmac->rmii_refclk_ext) in imx8mp_set_intf_mode() 79 return regmap_update_bits(dwmac->intf_regmap, dwmac->intf_reg_off, in imx8mp_set_intf_mode() 84 imx8dxl_set_intf_mode(struct imx_priv_data *dwmac, u8 phy_intf_sel) in imx8dxl_set_intf_mode() argument 90 static int imx93_set_intf_mode(struct imx_priv_data *dwmac, u8 phy_intf_sel) in imx93_set_intf_mode() argument 95 if (phy_intf_sel == PHY_INTF_SEL_RMII && dwmac->rmii_refclk_ext) { in imx93_set_intf_mode() 96 ret = regmap_clear_bits(dwmac->intf_regmap, in imx93_set_intf_mode() 97 dwmac->intf_reg_off + in imx93_set_intf_mode() 107 return regmap_update_bits(dwmac->intf_regmap, dwmac->intf_reg_off, in imx93_set_intf_mode() [all …]
|
| H A D | dwmac-sti.c | 119 struct sti_dwmac *dwmac = priv; in stih4xx_fix_retime_src() local 120 u32 src = dwmac->tx_retime_src; in stih4xx_fix_retime_src() 121 u32 reg = dwmac->ctrl_reg; in stih4xx_fix_retime_src() 124 if (dwmac->interface == PHY_INTERFACE_MODE_MII) { in stih4xx_fix_retime_src() 126 } else if (dwmac->interface == PHY_INTERFACE_MODE_RMII) { in stih4xx_fix_retime_src() 127 if (dwmac->ext_phyclk) { in stih4xx_fix_retime_src() 133 } else if (phy_interface_mode_is_rgmii(dwmac->interface)) { in stih4xx_fix_retime_src() 143 clk_set_rate(dwmac->clk, freq); in stih4xx_fix_retime_src() 145 regmap_update_bits(dwmac->regmap, reg, STIH4XX_RETIME_SRC_MASK, in stih4xx_fix_retime_src() 151 struct sti_dwmac *dwmac = bsp_priv; in sti_set_phy_intf_sel() local [all …]
|
| H A D | Makefile | 16 obj-$(CONFIG_DWMAC_ANARION) += dwmac-anarion.o 17 obj-$(CONFIG_DWMAC_EIC7700) += dwmac-eic7700.o 18 obj-$(CONFIG_DWMAC_INGENIC) += dwmac-ingenic.o 19 obj-$(CONFIG_DWMAC_IPQ806X) += dwmac-ipq806x.o 20 obj-$(CONFIG_DWMAC_LPC18XX) += dwmac-lpc18xx.o 21 obj-$(CONFIG_DWMAC_MEDIATEK) += dwmac-mediatek.o 22 obj-$(CONFIG_DWMAC_MESON) += dwmac-meson.o dwmac-meson8b.o 23 obj-$(CONFIG_DWMAC_QCOM_ETHQOS) += dwmac-qcom-ethqos.o 24 obj-$(CONFIG_DWMAC_RENESAS_GBETH) += dwmac-renesas-gbeth.o 25 obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac-rk.o [all …]
|
| H A D | dwmac-socfpga.c | 78 struct socfpga_dwmac *dwmac = (struct socfpga_dwmac *)bsp_priv; in socfpga_dwmac_fix_mac_speed() local 79 struct stmmac_priv *priv = netdev_priv(dev_get_drvdata(dwmac->dev)); in socfpga_dwmac_fix_mac_speed() 80 void __iomem *splitter_base = dwmac->splitter_base; in socfpga_dwmac_fix_mac_speed() 81 void __iomem *sgmii_adapter_base = dwmac->sgmii_adapter_base; in socfpga_dwmac_fix_mac_speed() 115 static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *dev) in socfpga_dwmac_parse_data() argument 146 dwmac->f2h_ptp_ref_clk = of_property_read_bool(np, "altr,f2h_ptp_ref_clk"); in socfpga_dwmac_parse_data() 157 dwmac->splitter_base = devm_ioremap_resource(dev, &res_splitter); in socfpga_dwmac_parse_data() 158 if (IS_ERR(dwmac->splitter_base)) { in socfpga_dwmac_parse_data() 160 return PTR_ERR(dwmac->splitter_base); in socfpga_dwmac_parse_data() 180 dwmac->splitter_base = in socfpga_dwmac_parse_data() [all …]
|
| H A D | dwmac-intel-plat.c | 46 struct intel_dwmac *dwmac; in intel_eth_plat_probe() local 60 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); in intel_eth_plat_probe() 61 if (!dwmac) in intel_eth_plat_probe() 64 dwmac->dev = &pdev->dev; in intel_eth_plat_probe() 65 dwmac->tx_clk = NULL; in intel_eth_plat_probe() 72 dwmac->data = device_get_match_data(&pdev->dev); in intel_eth_plat_probe() 75 if (dwmac->data->tx_clk_en) { in intel_eth_plat_probe() 76 dwmac->tx_clk = devm_clk_get(&pdev->dev, "tx_clk"); in intel_eth_plat_probe() 77 if (IS_ERR(dwmac->tx_clk)) in intel_eth_plat_probe() 78 return PTR_ERR(dwmac->tx_clk); in intel_eth_plat_probe() [all …]
|
| H A D | dwmac-visconti.c | 54 struct visconti_eth *dwmac = bsp_priv; in visconti_eth_set_clk_tx_rate() local 76 val = readl(dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 80 writel(val, 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() 87 writel(val, dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 90 writel(val, dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 106 val = readl(dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 110 writel(val, dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 117 writel(val, dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() 120 writel(val, dwmac->reg + REG_ETHER_CLOCK_SEL); in visconti_eth_set_clk_tx_rate() [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 %s\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 %s\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-starfive.c | 33 struct starfive_dwmac *dwmac = plat_dat->bsp_priv; in starfive_dwmac_set_mode() local 42 dev_err(dwmac->dev, "unsupported interface %s\n", in starfive_dwmac_set_mode() 47 regmap = syscon_regmap_lookup_by_phandle_args(dwmac->dev->of_node, in starfive_dwmac_set_mode() 51 return dev_err_probe(dwmac->dev, PTR_ERR(regmap), "getting the regmap failed\n"); in starfive_dwmac_set_mode() 58 return dev_err_probe(dwmac->dev, err, "error setting phy mode\n"); in starfive_dwmac_set_mode() 60 if (dwmac->data) { in starfive_dwmac_set_mode() 62 dwmac->data->gtxclk_dlychain); in starfive_dwmac_set_mode() 64 return dev_err_probe(dwmac->dev, err, in starfive_dwmac_set_mode() 75 struct starfive_dwmac *dwmac; in starfive_dwmac_probe() local 89 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); in starfive_dwmac_probe() [all …]
|
| H A D | dwmac-loongson1.c | 57 struct ls1x_dwmac *dwmac = plat_dat->bsp_priv; in ls1b_dwmac_setup() local 70 dwmac->id = 0; in ls1b_dwmac_setup() 72 dwmac->id = 1; in ls1b_dwmac_setup() 84 struct ls1x_dwmac *dwmac = priv; in ls1b_dwmac_syscon_init() local 85 struct plat_stmmacenet_data *plat = dwmac->plat_dat; in ls1b_dwmac_syscon_init() 86 struct regmap *regmap = dwmac->regmap; in ls1b_dwmac_syscon_init() 88 if (dwmac->id == 0) { in ls1b_dwmac_syscon_init() 107 } else if (dwmac->id == 1) { in ls1b_dwmac_syscon_init() 138 struct ls1x_dwmac *dwmac = priv; in ls1c_dwmac_syscon_init() local 139 struct plat_stmmacenet_data *plat = dwmac->plat_dat; in ls1c_dwmac_syscon_init() [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->reg); in meson6_dwmac_probe() 70 plat_dat->bsp_priv = dwmac; in meson6_dwmac_probe()
|
| H A D | Kconfig | 105 Select the QCOM_SOCINFO config flag to enable specific dwmac 125 tristate "Amlogic Meson dwmac support" 159 tristate "Rockchip dwmac support" 170 tristate "Renesas RZ/N1 dwmac support" 194 tristate "SOCFPGA dwmac support" 209 tristate "Sophgo dwmac support" 220 tristate "StarFive dwmac support" 291 tristate "T-HEAD dwmac support" 313 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 | 92 compatible = "snps,dwmac-mdio"; 107 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/mips/boot/dts/loongson/ |
| H A D | lsgz_1b_dev.dts | 90 compatible = "snps,dwmac-mdio"; 104 compatible = "snps,dwmac-mdio";
|
| /linux/arch/arm/boot/dts/amlogic/ |
| H A D | meson8m2.dtsi | 28 compatible = "amlogic,meson8m2-dwmac", "snps,dwmac";
|
| /linux/arch/arm/boot/dts/st/ |
| H A D | stm32mp133.dtsi | 75 compatible = "st,stm32mp13-dwmac", "snps,dwmac-4.20a";
|
| /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";
|