[Linux-stm32] [PATCH v3 2/2] ethernet: eswin: Add eic7700 ethernet driver
李志
lizhi2 at eswincomputing.com
Tue Jul 15 09:28:39 UTC 2025
Dear Krzysztof Kozlowski,
Thank you for your professional and valuable suggestions.
Our question is embedded below your comment.
Best regards,
Li Zhi
Eswin Computing
>
> Subject: Re: [PATCH v3 2/2] ethernet: eswin: Add eic7700 ethernet driver > Date: Thu, 3 Jul 2025 11:53:33 +0200 [thread overview] > Message-ID: <f096afa1-260e-4f8c-8595-3b41425b2964 at kernel.org> (raw) > In-Reply-To: <20250703092015.1200-1-weishangjuan at eswincomputing.com> > On 03/07/2025 11:20, weishangjuan at eswincomputing.com wrote: > > + ret = of_property_read_u32_index(pdev->dev.of_node, "eswin,syscrg_csr", 1, > > + &hsp_aclk_ctrl_offset); > > + if (ret) > > + return dev_err_probe(&pdev->dev, ret, "can't get hsp_aclk_ctrl_offset\n"); > > + > > + regmap_read(dwc_priv->crg_regmap, hsp_aclk_ctrl_offset, &hsp_aclk_ctrl_regset); > > + hsp_aclk_ctrl_regset |= (EIC7700_HSP_ACLK_CLKEN | EIC7700_HSP_ACLK_DIVSOR); > > + regmap_write(dwc_priv->crg_regmap, hsp_aclk_ctrl_offset, hsp_aclk_ctrl_regset); > > + > > > + ret = of_property_read_u32_index(pdev->dev.of_node, "eswin,syscrg_csr", 2, > > + &hsp_cfg_ctrl_offset); > > + if (ret) > > + return dev_err_probe(&pdev->dev, ret, "can't get hsp_cfg_ctrl_offset\n"); > > + > > + regmap_write(dwc_priv->crg_regmap, hsp_cfg_ctrl_offset, EIC7700_HSP_CFG_CTRL_REGSET); > > + > > + dwc_priv->hsp_regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node, > > + "eswin,hsp_sp_csr"); > > There is no such property. I already said at v2 you cannot have > undocumented ABI.
>
The properties in the YAML file use dashes, while the driver uses underscores, resulting in an inconsistency. This will be corrected in the next patch. Is this correct?
> > + if (IS_ERR(dwc_priv->hsp_regmap)) > > + return dev_err_probe(&pdev->dev, PTR_ERR(dwc_priv->hsp_regmap), > > + "Failed to get hsp_sp_csr regmap\n"); > > + > > + ret = of_property_read_u32_index(pdev->dev.of_node, "eswin,hsp_sp_csr", 2, > > NAK
> > > + ð_phy_ctrl_offset); > > + if (ret) > > + return dev_err_probe(&pdev->dev, ret, "can't get eth_phy_ctrl_offset\n"); > > + > > + regmap_read(dwc_priv->hsp_regmap, eth_phy_ctrl_offset, ð_phy_ctrl_regset); > > + eth_phy_ctrl_regset |= (EIC7700_ETH_TX_CLK_SEL | EIC7700_ETH_PHY_INTF_SELI); > > + regmap_write(dwc_priv->hsp_regmap, eth_phy_ctrl_offset, eth_phy_ctrl_regset); > > + > > + ret = of_property_read_u32_index(pdev->dev.of_node, "eswin,hsp_sp_csr", 3, > > + ð_axi_lp_ctrl_offset); > > + if (ret) > > + return dev_err_probe(&pdev->dev, ret, "can't get eth_axi_lp_ctrl_offset\n"); > > + > > + regmap_write(dwc_priv->hsp_regmap, eth_axi_lp_ctrl_offset, EIC7700_ETH_CSYSREQ_VAL); > > + > > + plat_dat->clk_tx_i = devm_clk_get_enabled(&pdev->dev, "tx"); > > + if (IS_ERR(plat_dat->clk_tx_i)) > > + return dev_err_probe(&pdev->dev, PTR_ERR(plat_dat->clk_tx_i), > > + "error getting tx clock\n"); > > + > > + plat_dat->fix_mac_speed = eic7700_qos_fix_speed; > > + plat_dat->set_clk_tx_rate = stmmac_set_clk_tx_rate; > > + plat_dat->bsp_priv = dwc_priv; > > + > > + ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res); > > + if (ret) > > + return dev_err_probe(&pdev->dev, ret, "Failed to driver probe\n"); > > + > > + return ret; > > +} > > + > > +static const struct of_device_id eic7700_dwmac_match[] = { > > + { .compatible = "eswin,eic7700-qos-eth" }, > > + { } > > +}; > > +MODULE_DEVICE_TABLE(of, eic7700_dwmac_match); > > + > > +static struct platform_driver eic7700_dwmac_driver = { > + .probe = eic7700_dwmac_probe, > + .remove = stmmac_pltfr_remove, > + .driver = { > + .name = "eic7700-eth-dwmac", > + .pm = &stmmac_pltfr_pm_ops, > + .of_match_table = eic7700_dwmac_match, > + }, > +}; > +module_platform_driver(eic7700_dwmac_driver); > + > +MODULE_AUTHOR("Eswin"); > > Drop, that's not a person.
>
> > Best regards, > Krzysztof
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://st-md-mailman.stormreply.com/pipermail/linux-stm32/attachments/20250715/6bd70811/attachment.html>
More information about the Linux-stm32
mailing list