<style class="ke-style">
[list-style-type] {padding-left:20px;list-style-position:inside}
[list-style-type] li {margin:0}
[list-style-type] li:before, span.ke-list-item-matter {font-family:"sans serif",tahoma,verdana,helvetica}
[list-style-type] li p,[list-style-type] li h1,[list-style-type] li h2,[list-style-type] li h3,[list-style-type] li h4,[list-style-type] li h5,[list-style-type] li div,[list-style-type] li blockquote{display:inline;word-break:break-all}
[list-style-type] li table {display:inline-block;vertical-align:top}
p{margin:0}
td {word-break: break-word}
.default-font-1752568893231{
}
</style><div class="default-font-1752568893231" dir="ltr"><p>Dear <span style="background-color:#FFFFFF;color:#000033;font-size:13px;">Krzysztof Kozlowski,</span></p><p>Thank you for your professional and valuable suggestions.</p><p>Our question is embedded below your comment.</p><p><br></p><p><br></p><p>Best regards,</p><p><br></p><p>Li Zhi</p><p>Eswin Computing</p><p><br></p><p><span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span></p><p><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> Subject: </span><a href="https://lore.kernel.org/lkml/f096afa1-260e-4f8c-8595-3b41425b2964@kernel.org/#r" id="t" style="font-size: 13px; font-family: monospace; background: rgb(255, 255, 255); color: rgb(0, 0, 255); white-space: pre-wrap;" title="原始URL: https://lore.kernel.org/lkml/f096afa1-260e-4f8c-8595-3b41425b2964@kernel.org/#r
按住Ctrl并单击可访问链接">Re: [PATCH v3 2/2] ethernet: eswin: Add eic7700 ethernet driver</a><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">
> Date: Thu, 3 Jul 2025 11:53:33 +0200       </span><a href="https://lore.kernel.org/lkml/f096afa1-260e-4f8c-8595-3b41425b2964@kernel.org/#r" style="font-size: 13px; font-family: monospace; background: rgb(255, 255, 255); color: rgb(0, 0, 255); white-space: pre-wrap;" title="原始URL: https://lore.kernel.org/lkml/f096afa1-260e-4f8c-8595-3b41425b2964@kernel.org/#r
按住Ctrl并单击可访问链接">[thread overview]</a><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">
> Message-ID: <<a href="mailto:f096afa1-260e-4f8c-8595-3b41425b2964@kernel.org" title="f096afa1-260e-4f8c-8595-3b41425b2964@kernel.org">f096afa1-260e-4f8c-8595-3b41425b2964@kernel.org</a>> (</span><a href="https://lore.kernel.org/lkml/f096afa1-260e-4f8c-8595-3b41425b2964@kernel.org/raw" style="font-size: 13px; font-family: monospace; background: rgb(255, 255, 255); color: rgb(0, 0, 255); white-space: pre-wrap;">raw</a><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">)
> In-Reply-To: <</span><a href="https://lore.kernel.org/lkml/20250703092015.1200-1-weishangjuan@eswincomputing.com/" style="font-size: 13px; font-family: monospace; background: rgb(255, 255, 255); color: rgb(0, 0, 255); white-space: pre-wrap;" title="原始URL: https://lore.kernel.org/lkml/20250703092015.1200-1-weishangjuan@eswincomputing.com/
按住Ctrl并单击可访问链接">20250703092015.1200-1-weishangjuan@eswincomputing.com</a><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">>
> On 03/07/2025 11:20, <a href="mailto:weishangjuan@eswincomputing.com" title="weishangjuan@eswincomputing.com">weishangjuan@eswincomputing.com</a> wrote:
</span><span class="q" style="font-size: 13px; font-family: monospace; background: rgb(255, 255, 255); color: rgb(0, 0, 102); white-space: pre-wrap;">> > +       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);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     hsp_aclk_ctrl_regset |= (EIC7700_HSP_ACLK_CLKEN | EIC7700_HSP_ACLK_DIVSOR);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     regmap_write(dwc_priv->crg_regmap, hsp_aclk_ctrl_offset, hsp_aclk_ctrl_regset);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> </span>> +        ret = of_property_read_u32_index(pdev->dev.of_node, "eswin,syscrg_csr", 2,
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +                                      &hsp_cfg_ctrl_offset);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     if (ret)
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +             return dev_err_probe(&pdev->dev, ret, "can't get hsp_cfg_ctrl_offset\n");
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     regmap_write(dwc_priv->crg_regmap, hsp_cfg_ctrl_offset, EIC7700_HSP_CFG_CTRL_REGSET);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     dwc_priv->hsp_regmap = syscon_regmap_lookup_by_phandle(pdev->dev.of_node,
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +                                                            "eswin,hsp_sp_csr");
</span><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>There is no such property. I already said at v2 you cannot have
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>undocumented ABI.</span></p><p><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span></span></p><p><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><br></span></p><p><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">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?<br></span></p><p><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">
</span><span class="q" style="font-size: 13px; font-family: monospace; background: rgb(255, 255, 255); color: rgb(0, 0, 102); white-space: pre-wrap;"><span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +       if (IS_ERR(dwc_priv->hsp_regmap))
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +             return dev_err_probe(&pdev->dev, PTR_ERR(dwc_priv->hsp_regmap),
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +                             "Failed to get hsp_sp_csr regmap\n");
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     ret = of_property_read_u32_index(pdev->dev.of_node, "eswin,hsp_sp_csr", 2,
</span><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>NAK</span></p><p><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>
</span><span class="q" style="font-size: 13px; font-family: monospace; background: rgb(255, 255, 255); color: rgb(0, 0, 102); white-space: pre-wrap;"><span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +                                        &eth_phy_ctrl_offset);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     if (ret)
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +             return dev_err_probe(&pdev->dev, ret, "can't get eth_phy_ctrl_offset\n");
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     regmap_read(dwc_priv->hsp_regmap, eth_phy_ctrl_offset, &eth_phy_ctrl_regset);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     eth_phy_ctrl_regset |= (EIC7700_ETH_TX_CLK_SEL | EIC7700_ETH_PHY_INTF_SELI);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     regmap_write(dwc_priv->hsp_regmap, eth_phy_ctrl_offset, eth_phy_ctrl_regset);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     ret = of_property_read_u32_index(pdev->dev.of_node, "eswin,hsp_sp_csr", 3,
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +                                      &eth_axi_lp_ctrl_offset);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     if (ret)
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +             return dev_err_probe(&pdev->dev, ret, "can't get eth_axi_lp_ctrl_offset\n");
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     regmap_write(dwc_priv->hsp_regmap, eth_axi_lp_ctrl_offset, EIC7700_ETH_CSYSREQ_VAL);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     plat_dat->clk_tx_i = devm_clk_get_enabled(&pdev->dev, "tx");
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     if (IS_ERR(plat_dat->clk_tx_i))
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +             return dev_err_probe(&pdev->dev, PTR_ERR(plat_dat->clk_tx_i),
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +                             "error getting tx clock\n");
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     plat_dat->fix_mac_speed = eic7700_qos_fix_speed;
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     plat_dat->set_clk_tx_rate = stmmac_set_clk_tx_rate;
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     plat_dat->bsp_priv = dwc_priv;
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     ret = stmmac_dvr_probe(&pdev->dev, plat_dat, &stmmac_res);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     if (ret)
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +             return dev_err_probe(&pdev->dev, ret, "Failed to driver probe\n");
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     return ret;
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +}
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +static const struct of_device_id eic7700_dwmac_match[] = {
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     { .compatible = "eswin,eic7700-qos-eth" },
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +     { }
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +};
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +MODULE_DEVICE_TABLE(of, eic7700_dwmac_match);
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>> +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");
</span><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>Drop, that's not a person.</span></p><p><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span></span></p><p><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>Best regards,
<span style="color: rgb(0, 0, 102); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);">> </span>Krzysztof
</span></p><div><span style="color: rgb(0, 0, 51); font-family: monospace; font-size: 13px; white-space: pre-wrap; background-color: rgb(255, 255, 255);"><br></span></div></div>