| /kernel/linux/linux-6.6/drivers/net/ethernet/stmicro/stmmac/ |
| D | dwmac-stm32.c | 3 * dwmac-stm32.c - DWMAC Specific Glue layer for STM32 MCU 101 int (*clk_prepare)(struct stm32_dwmac *dwmac, bool prepare); 102 int (*suspend)(struct stm32_dwmac *dwmac); 103 void (*resume)(struct stm32_dwmac *dwmac); 104 int (*parse_data)(struct stm32_dwmac *dwmac, 112 struct stm32_dwmac *dwmac = plat_dat->bsp_priv; in stm32_dwmac_init() local 115 if (dwmac->ops->set_mode) { in stm32_dwmac_init() 116 ret = dwmac->ops->set_mode(plat_dat); in stm32_dwmac_init() 121 ret = clk_prepare_enable(dwmac->clk_tx); in stm32_dwmac_init() 125 if (!dwmac->ops->clk_rx_enable_in_suspend || in stm32_dwmac_init() [all …]
|
| D | dwmac-meson8b.c | 3 * Amlogic Meson8b, Meson8m2 and GXBB DWMAC glue layer 84 int (*set_phy_mode)(struct meson8b_dwmac *dwmac); 107 static void meson8b_dwmac_mask_bits(struct meson8b_dwmac *dwmac, u32 reg, in meson8b_dwmac_mask_bits() argument 112 data = readl(dwmac->regs + reg); in meson8b_dwmac_mask_bits() 116 writel(data, dwmac->regs + reg); in meson8b_dwmac_mask_bits() 119 static struct clk *meson8b_dwmac_register_clk(struct meson8b_dwmac *dwmac, in meson8b_dwmac_register_clk() argument 129 snprintf(clk_name, sizeof(clk_name), "%s#%s", dev_name(dwmac->dev), in meson8b_dwmac_register_clk() 140 return devm_clk_register(dwmac->dev, hw); in meson8b_dwmac_register_clk() 143 static int meson8b_init_rgmii_tx_clk(struct meson8b_dwmac *dwmac) in meson8b_init_rgmii_tx_clk() argument 146 struct device *dev = dwmac->dev; in meson8b_init_rgmii_tx_clk() [all …]
|
| D | dwmac-imx.c | 3 * dwmac-imx.c - DWMAC Specific Glue layer for NXP imx8 70 struct imx_priv_data *dwmac = plat_dat->bsp_priv; in imx8mp_set_intf_mode() local 79 val |= (dwmac->rmii_refclk_ext ? 0 : GPR_ENET_QOS_CLK_TX_CLK_SEL); in imx8mp_set_intf_mode() 89 pr_debug("imx dwmac doesn't support %d interface\n", in imx8mp_set_intf_mode() 95 return regmap_update_bits(dwmac->intf_regmap, dwmac->intf_reg_off, in imx8mp_set_intf_mode() 110 struct imx_priv_data *dwmac = plat_dat->bsp_priv; in imx93_set_intf_mode() local 127 dev_dbg(dwmac->dev, "imx dwmac doesn't support %d interface\n", in imx93_set_intf_mode() 133 return regmap_update_bits(dwmac->intf_regmap, dwmac->intf_reg_off, in imx93_set_intf_mode() 139 struct imx_priv_data *dwmac = priv; in imx_dwmac_clks_config() local 143 ret = clk_prepare_enable(dwmac->clk_mem); in imx_dwmac_clks_config() [all …]
|
| D | dwmac-visconti.c | 59 struct visconti_eth *dwmac = priv; in visconti_eth_fix_mac_speed() local 60 struct net_device *netdev = dev_get_drvdata(dwmac->dev); in visconti_eth_fix_mac_speed() 64 spin_lock_irqsave(&dwmac->lock, flags); in visconti_eth_fix_mac_speed() 67 val = readl(dwmac->reg + MAC_CTRL_REG); in visconti_eth_fix_mac_speed() 72 if (dwmac->phy_intf_sel == ETHER_CONFIG_INTF_RGMII) in visconti_eth_fix_mac_speed() 76 if (dwmac->phy_intf_sel == ETHER_CONFIG_INTF_RGMII) in visconti_eth_fix_mac_speed() 78 if (dwmac->phy_intf_sel == ETHER_CONFIG_INTF_RMII) in visconti_eth_fix_mac_speed() 83 if (dwmac->phy_intf_sel == ETHER_CONFIG_INTF_RGMII) in visconti_eth_fix_mac_speed() 85 if (dwmac->phy_intf_sel == ETHER_CONFIG_INTF_RMII) in visconti_eth_fix_mac_speed() 92 spin_unlock_irqrestore(&dwmac->lock, flags); in visconti_eth_fix_mac_speed() [all …]
|
| D | dwmac-intel-plat.c | 2 /* Intel DWMAC platform driver 33 struct intel_dwmac *dwmac = priv; in kmb_eth_fix_mac_speed() local 37 rate = clk_get_rate(dwmac->tx_clk); in kmb_eth_fix_mac_speed() 53 dev_err(dwmac->dev, "Invalid speed\n"); in kmb_eth_fix_mac_speed() 57 ret = clk_set_rate(dwmac->tx_clk, rate); in kmb_eth_fix_mac_speed() 59 dev_err(dwmac->dev, "Failed to configure tx clock rate\n"); in kmb_eth_fix_mac_speed() 70 { .compatible = "intel,keembay-dwmac", .data = &kmb_data }, 80 struct intel_dwmac *dwmac; in intel_eth_plat_probe() local 94 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); in intel_eth_plat_probe() 95 if (!dwmac) in intel_eth_plat_probe() [all …]
|
| 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_ROCKCHIP) += dwmac-rk.o 24 obj-$(CONFIG_DWMAC_SOCFPGA) += dwmac-altr-socfpga.o 25 obj-$(CONFIG_DWMAC_STARFIVE) += dwmac-starfive.o [all …]
|
| D | dwmac-sti.c | 3 * dwmac-sti.c - STMicroelectronics DWMAC Specific Glue layer 140 struct sti_dwmac *dwmac = priv; in stih4xx_fix_retime_src() local 141 u32 src = dwmac->tx_retime_src; in stih4xx_fix_retime_src() 142 u32 reg = dwmac->ctrl_reg; in stih4xx_fix_retime_src() 145 if (dwmac->interface == PHY_INTERFACE_MODE_MII) { in stih4xx_fix_retime_src() 147 } else if (dwmac->interface == PHY_INTERFACE_MODE_RMII) { in stih4xx_fix_retime_src() 148 if (dwmac->ext_phyclk) { in stih4xx_fix_retime_src() 154 } else if (IS_PHY_IF_MODE_RGMII(dwmac->interface)) { in stih4xx_fix_retime_src() 169 clk_set_rate(dwmac->clk, freq); in stih4xx_fix_retime_src() 171 regmap_update_bits(dwmac->regmap, reg, STIH4XX_RETIME_SRC_MASK, in stih4xx_fix_retime_src() [all …]
|
| D | dwmac-socfpga.c | 4 * Adopted from dwmac-sti.c 66 struct socfpga_dwmac *dwmac = (struct socfpga_dwmac *)priv; in socfpga_dwmac_fix_mac_speed() local 67 void __iomem *splitter_base = dwmac->splitter_base; in socfpga_dwmac_fix_mac_speed() 68 void __iomem *sgmii_adapter_base = dwmac->sgmii_adapter_base; in socfpga_dwmac_fix_mac_speed() 69 struct device *dev = dwmac->dev; in socfpga_dwmac_fix_mac_speed() 103 static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *dev) in socfpga_dwmac_parse_data() argument 134 dwmac->f2h_ptp_ref_clk = of_property_read_bool(np, "altr,f2h_ptp_ref_clk"); in socfpga_dwmac_parse_data() 145 dwmac->splitter_base = devm_ioremap_resource(dev, &res_splitter); in socfpga_dwmac_parse_data() 146 if (IS_ERR(dwmac->splitter_base)) { in socfpga_dwmac_parse_data() 148 return PTR_ERR(dwmac->splitter_base); in socfpga_dwmac_parse_data() [all …]
|
| D | dwmac-starfive.c | 3 * StarFive DWMAC platform driver 36 struct starfive_dwmac *dwmac = priv; in starfive_dwmac_fix_mac_speed() local 40 rate = clk_get_rate(dwmac->clk_tx); in starfive_dwmac_fix_mac_speed() 53 dev_err(dwmac->dev, "invalid speed %u\n", speed); in starfive_dwmac_fix_mac_speed() 57 err = clk_set_rate(dwmac->clk_tx, rate); in starfive_dwmac_fix_mac_speed() 59 dev_err(dwmac->dev, "failed to set tx rate %lu\n", rate); in starfive_dwmac_fix_mac_speed() 64 struct starfive_dwmac *dwmac = plat_dat->bsp_priv; in starfive_dwmac_set_mode() local 83 dev_err(dwmac->dev, "unsupported interface %d\n", in starfive_dwmac_set_mode() 88 regmap = syscon_regmap_lookup_by_phandle_args(dwmac->dev->of_node, in starfive_dwmac_set_mode() 92 return dev_err_probe(dwmac->dev, PTR_ERR(regmap), "getting the regmap failed\n"); in starfive_dwmac_set_mode() [all …]
|
| D | dwmac-meson.c | 3 * Amlogic Meson6 and Meson8 DWMAC glue layer 27 struct meson_dwmac *dwmac = priv; in meson6_dwmac_fix_mac_speed() local 30 val = readl(dwmac->reg); in meson6_dwmac_fix_mac_speed() 41 writel(val, dwmac->reg); in meson6_dwmac_fix_mac_speed() 48 struct meson_dwmac *dwmac; in meson6_dwmac_probe() local 59 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); in meson6_dwmac_probe() 60 if (!dwmac) { in meson6_dwmac_probe() 65 dwmac->reg = devm_platform_ioremap_resource(pdev, 1); in meson6_dwmac_probe() 66 if (IS_ERR(dwmac->reg)) { in meson6_dwmac_probe() 67 ret = PTR_ERR(dwmac->reg); in meson6_dwmac_probe() [all …]
|
| /kernel/linux/linux-5.10/drivers/net/ethernet/stmicro/stmmac/ |
| D | dwmac-stm32.c | 3 * dwmac-stm32.c - DWMAC Specific Glue layer for STM32 MCU 102 int (*clk_prepare)(struct stm32_dwmac *dwmac, bool prepare); 103 int (*suspend)(struct stm32_dwmac *dwmac); 104 void (*resume)(struct stm32_dwmac *dwmac); 105 int (*parse_data)(struct stm32_dwmac *dwmac, 113 struct stm32_dwmac *dwmac = plat_dat->bsp_priv; in stm32_dwmac_init() local 116 if (dwmac->ops->set_mode) { in stm32_dwmac_init() 117 ret = dwmac->ops->set_mode(plat_dat); in stm32_dwmac_init() 122 ret = clk_prepare_enable(dwmac->clk_tx); in stm32_dwmac_init() 126 if (!dwmac->ops->clk_rx_enable_in_suspend || in stm32_dwmac_init() [all …]
|
| D | dwmac-meson8b.c | 3 * Amlogic Meson8b, Meson8m2 and GXBB DWMAC glue layer 74 int (*set_phy_mode)(struct meson8b_dwmac *dwmac); 96 static void meson8b_dwmac_mask_bits(struct meson8b_dwmac *dwmac, u32 reg, in meson8b_dwmac_mask_bits() argument 101 data = readl(dwmac->regs + reg); in meson8b_dwmac_mask_bits() 105 writel(data, dwmac->regs + reg); in meson8b_dwmac_mask_bits() 108 static struct clk *meson8b_dwmac_register_clk(struct meson8b_dwmac *dwmac, in meson8b_dwmac_register_clk() argument 118 snprintf(clk_name, sizeof(clk_name), "%s#%s", dev_name(dwmac->dev), in meson8b_dwmac_register_clk() 129 return devm_clk_register(dwmac->dev, hw); in meson8b_dwmac_register_clk() 132 static int meson8b_init_rgmii_tx_clk(struct meson8b_dwmac *dwmac) in meson8b_init_rgmii_tx_clk() argument 135 struct device *dev = dwmac->dev; in meson8b_init_rgmii_tx_clk() [all …]
|
| D | dwmac-imx.c | 3 * dwmac-imx.c - DWMAC Specific Glue layer for NXP imx8 55 struct imx_priv_data *dwmac = plat_dat->bsp_priv; in imx8mp_set_intf_mode() local 64 val |= (dwmac->rmii_refclk_ext ? 0 : GPR_ENET_QOS_CLK_TX_CLK_SEL); in imx8mp_set_intf_mode() 74 pr_debug("imx dwmac doesn't support %d interface\n", in imx8mp_set_intf_mode() 80 return regmap_update_bits(dwmac->intf_regmap, dwmac->intf_reg_off, in imx8mp_set_intf_mode() 96 struct imx_priv_data *dwmac = priv; in imx_dwmac_init() local 99 plat_dat = dwmac->plat_dat; in imx_dwmac_init() 101 ret = clk_prepare_enable(dwmac->clk_mem); in imx_dwmac_init() 107 ret = clk_prepare_enable(dwmac->clk_tx); in imx_dwmac_init() 113 if (dwmac->ops->set_intf_mode) { in imx_dwmac_init() [all …]
|
| D | dwmac-socfpga.c | 4 * Adopted from dwmac-sti.c 60 struct socfpga_dwmac *dwmac = (struct socfpga_dwmac *)priv; in socfpga_dwmac_fix_mac_speed() local 61 void __iomem *splitter_base = dwmac->splitter_base; in socfpga_dwmac_fix_mac_speed() 62 void __iomem *sgmii_adapter_base = dwmac->pcs.sgmii_adapter_base; in socfpga_dwmac_fix_mac_speed() 63 struct device *dev = dwmac->dev; in socfpga_dwmac_fix_mac_speed() 95 tse_pcs_fix_mac_speed(&dwmac->pcs, phy_dev, speed); in socfpga_dwmac_fix_mac_speed() 99 static int socfpga_dwmac_parse_data(struct socfpga_dwmac *dwmac, struct device *dev) in socfpga_dwmac_parse_data() argument 130 dwmac->f2h_ptp_ref_clk = of_property_read_bool(np, "altr,f2h_ptp_ref_clk"); in socfpga_dwmac_parse_data() 141 dwmac->splitter_base = devm_ioremap_resource(dev, &res_splitter); in socfpga_dwmac_parse_data() 142 if (IS_ERR(dwmac->splitter_base)) { in socfpga_dwmac_parse_data() [all …]
|
| D | dwmac-sti.c | 3 * dwmac-sti.c - STMicroelectronics DWMAC Specific Glue layer 162 struct sti_dwmac *dwmac = priv; in stih4xx_fix_retime_src() local 163 u32 src = dwmac->tx_retime_src; in stih4xx_fix_retime_src() 164 u32 reg = dwmac->ctrl_reg; in stih4xx_fix_retime_src() 167 if (dwmac->interface == PHY_INTERFACE_MODE_MII) { in stih4xx_fix_retime_src() 169 } else if (dwmac->interface == PHY_INTERFACE_MODE_RMII) { in stih4xx_fix_retime_src() 170 if (dwmac->ext_phyclk) { in stih4xx_fix_retime_src() 176 } else if (IS_PHY_IF_MODE_RGMII(dwmac->interface)) { in stih4xx_fix_retime_src() 191 clk_set_rate(dwmac->clk, freq); in stih4xx_fix_retime_src() 193 regmap_update_bits(dwmac->regmap, reg, STIH4XX_RETIME_SRC_MASK, in stih4xx_fix_retime_src() [all …]
|
| D | dwmac-intel-plat.c | 2 /* Intel DWMAC platform driver 33 struct intel_dwmac *dwmac = priv; in kmb_eth_fix_mac_speed() local 37 rate = clk_get_rate(dwmac->tx_clk); in kmb_eth_fix_mac_speed() 53 dev_err(dwmac->dev, "Invalid speed\n"); in kmb_eth_fix_mac_speed() 57 ret = clk_set_rate(dwmac->tx_clk, rate); in kmb_eth_fix_mac_speed() 59 dev_err(dwmac->dev, "Failed to configure tx clock rate\n"); in kmb_eth_fix_mac_speed() 70 { .compatible = "intel,keembay-dwmac", .data = &kmb_data }, 82 struct intel_dwmac *dwmac; in intel_eth_plat_probe() local 97 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); in intel_eth_plat_probe() 98 if (!dwmac) { in intel_eth_plat_probe() [all …]
|
| D | Makefile | 15 obj-$(CONFIG_DWMAC_ANARION) += dwmac-anarion.o 16 obj-$(CONFIG_DWMAC_IPQ806X) += dwmac-ipq806x.o 17 obj-$(CONFIG_DWMAC_LPC18XX) += dwmac-lpc18xx.o 18 obj-$(CONFIG_DWMAC_MEDIATEK) += dwmac-mediatek.o 19 obj-$(CONFIG_DWMAC_MESON) += dwmac-meson.o dwmac-meson8b.o 20 obj-$(CONFIG_DWMAC_OXNAS) += dwmac-oxnas.o 21 obj-$(CONFIG_DWMAC_QCOM_ETHQOS) += dwmac-qcom-ethqos.o 22 obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac-rk.o 23 obj-$(CONFIG_DWMAC_SOCFPGA) += dwmac-altr-socfpga.o 24 obj-$(CONFIG_DWMAC_STI) += dwmac-sti.o [all …]
|
| D | dwmac-oxnas.c | 3 * Oxford Semiconductor OXNAS DWMAC glue layer 59 struct oxnas_dwmac *dwmac = priv; in oxnas_dwmac_init() local 64 ret = device_reset(dwmac->dev); in oxnas_dwmac_init() 68 ret = clk_prepare_enable(dwmac->clk); in oxnas_dwmac_init() 72 ret = regmap_read(dwmac->regmap, OXNAS_DWMAC_CTRL_REGOFFSET, &value); in oxnas_dwmac_init() 74 clk_disable_unprepare(dwmac->clk); in oxnas_dwmac_init() 91 regmap_write(dwmac->regmap, OXNAS_DWMAC_CTRL_REGOFFSET, value); in oxnas_dwmac_init() 98 regmap_write(dwmac->regmap, OXNAS_DWMAC_DELAY_REGOFFSET, value); in oxnas_dwmac_init() 105 struct oxnas_dwmac *dwmac = priv; in oxnas_dwmac_exit() local 107 clk_disable_unprepare(dwmac->clk); in oxnas_dwmac_exit() [all …]
|
| D | dwmac-meson.c | 3 * Amlogic Meson6 and Meson8 DWMAC glue layer 27 struct meson_dwmac *dwmac = priv; in meson6_dwmac_fix_mac_speed() local 30 val = readl(dwmac->reg); in meson6_dwmac_fix_mac_speed() 41 writel(val, dwmac->reg); in meson6_dwmac_fix_mac_speed() 48 struct meson_dwmac *dwmac; in meson6_dwmac_probe() local 59 dwmac = devm_kzalloc(&pdev->dev, sizeof(*dwmac), GFP_KERNEL); in meson6_dwmac_probe() 60 if (!dwmac) { in meson6_dwmac_probe() 65 dwmac->reg = devm_platform_ioremap_resource(pdev, 1); in meson6_dwmac_probe() 66 if (IS_ERR(dwmac->reg)) { in meson6_dwmac_probe() 67 ret = PTR_ERR(dwmac->reg); in meson6_dwmac_probe() [all …]
|
| /kernel/linux/linux-6.6/Documentation/devicetree/bindings/net/ |
| D | amlogic,meson-dwmac.yaml | 5 $id: http://devicetree.org/schemas/net/amlogic,meson-dwmac.yaml# 8 title: Amlogic Meson DWMAC Ethernet controller 14 # We need a select here so we don't match all nodes with 'snps,dwmac' 20 - amlogic,meson6-dwmac 21 - amlogic,meson8b-dwmac 22 - amlogic,meson8m2-dwmac 23 - amlogic,meson-gxbb-dwmac 24 - amlogic,meson-axg-dwmac 25 - amlogic,meson-g12a-dwmac 30 - $ref: snps,dwmac.yaml# [all …]
|
| D | stm32-dwmac.yaml | 5 $id: http://devicetree.org/schemas/net/stm32-dwmac.yaml# 8 title: STMicroelectronics STM32 / MCU DWMAC glue layer controller 17 # We need a select here so we don't match all nodes with 'snps,dwmac' 23 - st,stm32-dwmac 24 - st,stm32mp1-dwmac 29 - $ref: snps,dwmac.yaml# 36 - st,stm32mp1-dwmac 37 - const: snps,dwmac-4.20a 40 - st,stm32-dwmac 41 - const: snps,dwmac-4.10a [all …]
|
| D | nxp,dwmac-imx.yaml | 4 $id: http://devicetree.org/schemas/net/nxp,dwmac-imx.yaml# 7 title: NXP i.MX8/9 DWMAC glue layer 14 # We need a select here so we don't match all nodes with 'snps,dwmac' 20 - nxp,imx8mp-dwmac-eqos 21 - nxp,imx8dxl-dwmac-eqos 22 - nxp,imx93-dwmac-eqos 27 - $ref: snps,dwmac.yaml# 34 - nxp,imx8mp-dwmac-eqos 35 - nxp,imx8dxl-dwmac-eqos 36 - nxp,imx93-dwmac-eqos [all …]
|
| D | snps,dwmac.yaml | 4 $id: http://devicetree.org/schemas/net/snps,dwmac.yaml# 23 - snps,dwmac 24 - snps,dwmac-3.40a 25 - snps,dwmac-3.50a 26 - snps,dwmac-3.610 27 - snps,dwmac-3.70a 28 - snps,dwmac-3.710 29 - snps,dwmac-4.00 30 - snps,dwmac-4.10a 31 - snps,dwmac-4.20a [all …]
|
| /kernel/linux/linux-5.10/Documentation/devicetree/bindings/net/ |
| D | amlogic,meson-dwmac.yaml | 5 $id: "http://devicetree.org/schemas/net/amlogic,meson-dwmac.yaml#" 8 title: Amlogic Meson DWMAC Ethernet controller 14 # We need a select here so we don't match all nodes with 'snps,dwmac' 20 - amlogic,meson6-dwmac 21 - amlogic,meson8b-dwmac 22 - amlogic,meson8m2-dwmac 23 - amlogic,meson-gxbb-dwmac 24 - amlogic,meson-axg-dwmac 25 - amlogic,meson-g12a-dwmac 30 - $ref: "snps,dwmac.yaml#" [all …]
|
| D | stm32-dwmac.yaml | 5 $id: "http://devicetree.org/schemas/net/stm32-dwmac.yaml#" 8 title: STMicroelectronics STM32 / MCU DWMAC glue layer controller 17 # We need a select here so we don't match all nodes with 'snps,dwmac' 23 - st,stm32-dwmac 24 - st,stm32mp1-dwmac 29 - $ref: "snps,dwmac.yaml#" 36 - st,stm32mp1-dwmac 37 - const: snps,dwmac-4.20a 40 - st,stm32-dwmac 41 - const: snps,dwmac-4.10a [all …]
|