Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
From: Yijie Yang <quic_yijiyang@quicinc.com>
To: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Cc: Vinod Koul <vkoul@kernel.org>,
	Andrew Lunn <andrew+netdev@lunn.ch>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bhupesh Sharma <bhupesh.sharma@linaro.org>,
	Alexandre Torgue <alexandre.torgue@foss.st.com>,
	Giuseppe Cavallaro <peppe.cavallaro@st.com>,
	Jose Abreu <joabreu@synopsys.com>,
	Maxime Coquelin <mcoquelin.stm32@gmail.com>,
	Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>,
	<netdev@vger.kernel.org>, <linux-arm-msm@vger.kernel.org>,
	<devicetree@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<linux-stm32@st-md-mailman.stormreply.com>,
	<linux-arm-kernel@lists.infradead.org>
Subject: Re: [PATCH v2 3/3] net: stmmac: dwmac-qcom-ethqos: add support for EMAC on qcs615 platforms
Date: Tue, 24 Dec 2024 12:36:29 +0800	[thread overview]
Message-ID: <bc143292-24e0-4887-bc56-ecaceebf3d82@quicinc.com> (raw)
In-Reply-To: <62wm4samob5bzsk2br75fmllkrgptxxj2pgo7hztnhkhvwt54v@zz7edyq6ys77>



On 2024-12-24 12:18, Dmitry Baryshkov wrote:
> On Tue, Dec 24, 2024 at 11:07:03AM +0800, Yijie Yang wrote:
>> qcs615 uses EMAC version 2.3.1, add the relevant defines and add the new
>> compatible.
>>
>> Signed-off-by: Yijie Yang <quic_yijiyang@quicinc.com>
>> ---
>>   drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 17 +++++++++++++++++
>>   1 file changed, 17 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
>> index 901a3c1959fa57efb078da795ad4f92a8b6f71e1..8c76beaee48821eb2853f4e3f8bfd37db8cadf78 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c
>> @@ -249,6 +249,22 @@ static const struct ethqos_emac_driver_data emac_v2_1_0_data = {
>>   	.has_emac_ge_3 = false,
>>   };
>>   
>> +static const struct ethqos_emac_por emac_v2_3_1_por[] = {
>> +	{ .offset = RGMII_IO_MACRO_CONFIG,	.value = 0x00C01343 },
>> +	{ .offset = SDCC_HC_REG_DLL_CONFIG,	.value = 0x2004642C },
> 
> lowercase the hex, please.

I will take care of it.

> 
>> +	{ .offset = SDCC_HC_REG_DDR_CONFIG,	.value = 0x00000000 },
>> +	{ .offset = SDCC_HC_REG_DLL_CONFIG2,	.value = 0x00200000 },
>> +	{ .offset = SDCC_USR_CTL,		.value = 0x00010800 },
>> +	{ .offset = RGMII_IO_MACRO_CONFIG2,	.value = 0x00002060 },
>> +};
>> +
>> +static const struct ethqos_emac_driver_data emac_v2_3_1_data = {
>> +	.por = emac_v2_3_1_por,
>> +	.num_por = ARRAY_SIZE(emac_v2_3_1_por),
>> +	.rgmii_config_loopback_en = true,
>> +	.has_emac_ge_3 = false,
>> +};
> 
> Modulo emac_v2_3_1_por vs emac_v2_3_0_por, this is the same as
> emac_v2_3_0_data. Which means that bindings for qcs615-ethqos should be
> corrected to use qcom,qcs404-ethqos as as fallback entry, making this
> patch unused. Please correct the bindings instead.

Although they currently share the same data, they are actually two 
different versions. Their differences are not apparent now but will 
become evident once new features are uploaded. If I revert to 
qcom,qcs404-ethqos now, it will be challenging to distinguish between 
them in the future.

> 
>> +
>>   static const struct ethqos_emac_por emac_v3_0_0_por[] = {
>>   	{ .offset = RGMII_IO_MACRO_CONFIG,	.value = 0x40c01343 },
>>   	{ .offset = SDCC_HC_REG_DLL_CONFIG,	.value = 0x2004642c },
>> @@ -898,6 +914,7 @@ static int qcom_ethqos_probe(struct platform_device *pdev)
>>   
>>   static const struct of_device_id qcom_ethqos_match[] = {
>>   	{ .compatible = "qcom,qcs404-ethqos", .data = &emac_v2_3_0_data},
>> +	{ .compatible = "qcom,qcs615-ethqos", .data = &emac_v2_3_1_data},
>>   	{ .compatible = "qcom,sa8775p-ethqos", .data = &emac_v4_0_0_data},
>>   	{ .compatible = "qcom,sc8280xp-ethqos", .data = &emac_v3_0_0_data},
>>   	{ .compatible = "qcom,sm8150-ethqos", .data = &emac_v2_1_0_data},
>>
>> -- 
>> 2.34.1
>>
> 

-- 
Best Regards,
Yijie


  reply	other threads:[~2024-12-24  4:37 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-12-24  3:07 [PATCH v2 0/3] Add standalone ethernet MAC entries for qcs615 Yijie Yang
2024-12-24  3:07 ` [PATCH v2 1/3] dt-bindings: net: qcom,ethqos: Drop fallback compatible for qcom,qcs615-ethqos Yijie Yang
2024-12-24  9:02   ` Krzysztof Kozlowski
2024-12-25  8:58     ` Yijie Yang
2024-12-25 16:17       ` Andrew Lunn
2024-12-26  1:13         ` Yijie Yang
2024-12-27  7:14       ` Krzysztof Kozlowski
2024-12-24  3:07 ` [PATCH v2 2/3] dt-bindings: net: snps,dwmac: add description for qcs615 Yijie Yang
2024-12-24  9:03   ` Krzysztof Kozlowski
2024-12-24  3:07 ` [PATCH v2 3/3] net: stmmac: dwmac-qcom-ethqos: add support for EMAC on qcs615 platforms Yijie Yang
2024-12-24  4:18   ` Dmitry Baryshkov
2024-12-24  4:36     ` Yijie Yang [this message]
2024-12-24  5:05       ` Dmitry Baryshkov
2024-12-25  8:47         ` Yijie Yang
2024-12-24  4:16 ` [PATCH v2 0/3] Add standalone ethernet MAC entries for qcs615 Dmitry Baryshkov
2024-12-24  5:47   ` Yijie Yang
2024-12-24  5:53     ` Dmitry Baryshkov
2024-12-24  6:02       ` Yijie Yang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bc143292-24e0-4887-bc56-ecaceebf3d82@quicinc.com \
    --to=quic_yijiyang@quicinc.com \
    --cc=alexandre.torgue@foss.st.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=bhupesh.sharma@linaro.org \
    --cc=conor+dt@kernel.org \
    --cc=davem@davemloft.net \
    --cc=devicetree@vger.kernel.org \
    --cc=dmitry.baryshkov@linaro.org \
    --cc=edumazet@google.com \
    --cc=joabreu@synopsys.com \
    --cc=krzk+dt@kernel.org \
    --cc=krzysztof.kozlowski@linaro.org \
    --cc=kuba@kernel.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-stm32@st-md-mailman.stormreply.com \
    --cc=mcoquelin.stm32@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=peppe.cavallaro@st.com \
    --cc=robh@kernel.org \
    --cc=vkoul@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox