From: Bo Gan <ganboing@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>, lizhi2@eswincomputing.com
Cc: devicetree@vger.kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com,
mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com,
rmk+kernel@armlinux.org.uk, wens@kernel.org, pjw@kernel.org,
palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr,
linux-riscv@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, ningyu@eswincomputing.com,
linmin@eswincomputing.com, pinkesh.vaghela@einfochips.com,
pritesh.patel@einfochips.com, weishangjuan@eswincomputing.com
Subject: Re: [PATCH net-next v3 1/3] dt-bindings: ethernet: eswin: add clock sampling control
Date: Wed, 4 Mar 2026 00:22:00 -0800 [thread overview]
Message-ID: <3aba626d-7b5b-4d5b-9c91-07f6a2d7c244@gmail.com> (raw)
In-Reply-To: <20260304-hot-sponge-of-emphasis-6864db@quoll>
Hi Krzysztof,
On 3/3/26 23:44, Krzysztof Kozlowski wrote:
> On Tue, Mar 03, 2026 at 02:16:37PM +0800, lizhi2@eswincomputing.com wrote:
>> From: Zhi Li <lizhi2@eswincomputing.com>
>>
>> The second Ethernet controller (eth1) on the EIC7700 SoC may experience
>> RX data sampling issues at high speed due to EIC7700-specific receive
>> clock to data skew at the MAC input.
>>
>> On the EIC7700 SoC, the second Ethernet controller (eth1) requires
>> inversion of the internal RGMII receive clock in order to meet RX data
>> sampling timing at high speed.
>>
>> Describe this SoC-specific difference by introducing a distinct compatible
>> string for MAC instances that require internal clock inversion, allowing the
>> driver to select the appropriate configuration without relying on per-board
>> vendor-specific properties.
>
> Pointless description/paragrapgh. Your explanation why adding a
> compatible is "because I need compatible". That's completely redundant.
>
> Explain what is special about this MAC instance, what's different in its
> programming model or other characteristics that you claim it is a
> different device.
>
I think ESWIN should improve the description/paragraph and properly doc
the timing issues discussed here:
https://lore.kernel.org/lkml/32a1f814.2c79.19bfe173225.Coremail.linmin@eswincomputing.com/
I do feel the need of using a different compatible, though. I think we
discussed in depth in that thread (link above), and advice from Andrew
https://lore.kernel.org/lkml/59cec617-0189-4dc3-bc3f-6346155a62ae@lunn.ch/
https://lore.kernel.org/lkml/bd202cfa-d6eb-4d0e-982d-b49795dd25f7@lunn.ch/
is to basically apply different parameters to MAC based on eth0/eth1. The
compatible string approach is a clean solution to achieve that. The reason
being that for eth1, there's no way to meet the standard without clock
inversion, given the vast internal clock skew. I don't think claiming it
as a different device than eth0 is that far-fetched. Hence, no need for an
additional property and the driver code to check for that.
>>
>> The rx-internal-delay-ps and tx-internal-delay-ps properties now use
>> minimum and maximum constraints to reflect the actual hardware delay
>> range (0-2540 ps) applied in 20 ps steps. This relaxes the binding
>> validation compared to the previous enum-based definition and avoids
>> regressions for existing DTBs while keeping the same hardware limits.
>>
>> Treat the RX/TX internal delay properties as optional, board-specific
>> tuning knobs and remove them from the example to avoid encouraging
>> their use.
>>
>> In addition, the binding now includes additional background information
>> about the HSP CSR registers accessed by the MAC. The TXD and RXD delay
>> control registers are included so the driver can explicitly clear any
>> residual configuration left by the bootloader. Background reference for
>> the High-Speed Subsystem and HSP CSR block is available in Chapter 10
>> ("High-Speed Interface") of the EIC7700X SoC Technical Reference Manual,
>> Part 4 (EIC7700X_SoC_Technical_Reference_Manual_Part4.pdf):
>> https://github.com/eswincomputing/EIC7700X-SoC-Technical-Reference-Manual/releases
>>
>> There are currently no in-tree users of the EIC7700 Ethernet driver, so
>> these changes are safe.
>>
>> Fixes: 888bd0eca93c ("dt-bindings: ethernet: eswin: Document for EIC7700 SoC")
>> Signed-off-by: Zhi Li <lizhi2@eswincomputing.com>
>> ---
>> .../bindings/net/eswin,eic7700-eth.yaml | 75 +++++++++++++++----
>> 1 file changed, 59 insertions(+), 16 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml b/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml
>> index 91e8cd1db67b..22d1cecea07e 100644
>> --- a/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml
>> +++ b/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml
>> @@ -20,6 +20,7 @@ select:
>> contains:
>> enum:
>> - eswin,eic7700-qos-eth
>> + - eswin,eic7700-qos-eth-clk-inversion
>> required:
>> - compatible
>>
>> @@ -28,9 +29,13 @@ allOf:
>>
>> properties:
>> compatible:
>> - items:
>> - - const: eswin,eic7700-qos-eth
>> - - const: snps,dwmac-5.20
>> + oneOf:
>> + - items:
>> + - const: eswin,eic7700-qos-eth
>> + - const: snps,dwmac-5.20
>> + - items:
>> + - const: eswin,eic7700-qos-eth-clk-inversion
>
> So just enum for both entries?
>
> Anyway, that's the same device, so you do not get two compatibles. This
> should be a property. Which property not sure, maybe all this was
> discussed already.
>
>
>> + - const: snps,dwmac-5.20
>>
>> reg:
>> maxItems: 1
>> @@ -63,16 +68,29 @@ properties:
>> - const: stmmaceth
>>
>> rx-internal-delay-ps:
>> - enum: [0, 200, 600, 1200, 1600, 1800, 2000, 2200, 2400]
>> + minimum: 0
>> + maximum: 2540
>> + multipleOf: 20
>>
>> tx-internal-delay-ps:
>> - enum: [0, 200, 600, 1200, 1600, 1800, 2000, 2200, 2400]
>> + minimum: 0
>> + maximum: 2540
>> + multipleOf: 20
>>
>> eswin,hsp-sp-csr:
>> description:
>> HSP CSR is to control and get status of different high-speed peripherals
>> (such as Ethernet, USB, SATA, etc.) via register, which can tune
>> board-level's parameters of PHY, etc.
>> +
>> + Additional background information about the High-Speed Subsystem
>> + and the HSP CSR block is available in Chapter 10 ("High-Speed Interface")
>> + of the EIC7700X SoC Technical Reference Manual, Part 4
>> + (EIC7700X_SoC_Technical_Reference_Manual_Part4.pdf). The manual is
>> + publicly available at
>> + https://github.com/eswincomputing/EIC7700X-SoC-Technical-Reference-Manual/releases
>> +
>> + This reference is provided for background information only.
>> $ref: /schemas/types.yaml#/definitions/phandle-array
>> items:
>> - items:
>> @@ -81,7 +99,9 @@ properties:
>> or external clock selection
>> - description: Offset of AXI clock controller Low-Power request
>> register
>> + - description: Offset of register controlling TXD delay
>> - description: Offset of register controlling TX/RX clock delay
>> + - description: Offset of register controlling RXD delay
>
> As pointed out, you cannot change the order and there is no reason for
> doing this explained in commit msg.
>
> Best regards,
> Krzysztof
>
Bo
WARNING: multiple messages have this Message-ID (diff)
From: Bo Gan <ganboing@gmail.com>
To: Krzysztof Kozlowski <krzk@kernel.org>, lizhi2@eswincomputing.com
Cc: devicetree@vger.kernel.org, andrew+netdev@lunn.ch,
davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
netdev@vger.kernel.org, pabeni@redhat.com,
mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com,
rmk+kernel@armlinux.org.uk, wens@kernel.org, pjw@kernel.org,
palmer@dabbelt.com, aou@eecs.berkeley.edu, alex@ghiti.fr,
linux-riscv@lists.infradead.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org, ningyu@eswincomputing.com,
linmin@eswincomputing.com, pinkesh.vaghela@einfochips.com,
pritesh.patel@einfochips.com, weishangjuan@eswincomputing.com
Subject: Re: [PATCH net-next v3 1/3] dt-bindings: ethernet: eswin: add clock sampling control
Date: Wed, 4 Mar 2026 00:22:00 -0800 [thread overview]
Message-ID: <3aba626d-7b5b-4d5b-9c91-07f6a2d7c244@gmail.com> (raw)
In-Reply-To: <20260304-hot-sponge-of-emphasis-6864db@quoll>
Hi Krzysztof,
On 3/3/26 23:44, Krzysztof Kozlowski wrote:
> On Tue, Mar 03, 2026 at 02:16:37PM +0800, lizhi2@eswincomputing.com wrote:
>> From: Zhi Li <lizhi2@eswincomputing.com>
>>
>> The second Ethernet controller (eth1) on the EIC7700 SoC may experience
>> RX data sampling issues at high speed due to EIC7700-specific receive
>> clock to data skew at the MAC input.
>>
>> On the EIC7700 SoC, the second Ethernet controller (eth1) requires
>> inversion of the internal RGMII receive clock in order to meet RX data
>> sampling timing at high speed.
>>
>> Describe this SoC-specific difference by introducing a distinct compatible
>> string for MAC instances that require internal clock inversion, allowing the
>> driver to select the appropriate configuration without relying on per-board
>> vendor-specific properties.
>
> Pointless description/paragrapgh. Your explanation why adding a
> compatible is "because I need compatible". That's completely redundant.
>
> Explain what is special about this MAC instance, what's different in its
> programming model or other characteristics that you claim it is a
> different device.
>
I think ESWIN should improve the description/paragraph and properly doc
the timing issues discussed here:
https://lore.kernel.org/lkml/32a1f814.2c79.19bfe173225.Coremail.linmin@eswincomputing.com/
I do feel the need of using a different compatible, though. I think we
discussed in depth in that thread (link above), and advice from Andrew
https://lore.kernel.org/lkml/59cec617-0189-4dc3-bc3f-6346155a62ae@lunn.ch/
https://lore.kernel.org/lkml/bd202cfa-d6eb-4d0e-982d-b49795dd25f7@lunn.ch/
is to basically apply different parameters to MAC based on eth0/eth1. The
compatible string approach is a clean solution to achieve that. The reason
being that for eth1, there's no way to meet the standard without clock
inversion, given the vast internal clock skew. I don't think claiming it
as a different device than eth0 is that far-fetched. Hence, no need for an
additional property and the driver code to check for that.
>>
>> The rx-internal-delay-ps and tx-internal-delay-ps properties now use
>> minimum and maximum constraints to reflect the actual hardware delay
>> range (0-2540 ps) applied in 20 ps steps. This relaxes the binding
>> validation compared to the previous enum-based definition and avoids
>> regressions for existing DTBs while keeping the same hardware limits.
>>
>> Treat the RX/TX internal delay properties as optional, board-specific
>> tuning knobs and remove them from the example to avoid encouraging
>> their use.
>>
>> In addition, the binding now includes additional background information
>> about the HSP CSR registers accessed by the MAC. The TXD and RXD delay
>> control registers are included so the driver can explicitly clear any
>> residual configuration left by the bootloader. Background reference for
>> the High-Speed Subsystem and HSP CSR block is available in Chapter 10
>> ("High-Speed Interface") of the EIC7700X SoC Technical Reference Manual,
>> Part 4 (EIC7700X_SoC_Technical_Reference_Manual_Part4.pdf):
>> https://github.com/eswincomputing/EIC7700X-SoC-Technical-Reference-Manual/releases
>>
>> There are currently no in-tree users of the EIC7700 Ethernet driver, so
>> these changes are safe.
>>
>> Fixes: 888bd0eca93c ("dt-bindings: ethernet: eswin: Document for EIC7700 SoC")
>> Signed-off-by: Zhi Li <lizhi2@eswincomputing.com>
>> ---
>> .../bindings/net/eswin,eic7700-eth.yaml | 75 +++++++++++++++----
>> 1 file changed, 59 insertions(+), 16 deletions(-)
>>
>> diff --git a/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml b/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml
>> index 91e8cd1db67b..22d1cecea07e 100644
>> --- a/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml
>> +++ b/Documentation/devicetree/bindings/net/eswin,eic7700-eth.yaml
>> @@ -20,6 +20,7 @@ select:
>> contains:
>> enum:
>> - eswin,eic7700-qos-eth
>> + - eswin,eic7700-qos-eth-clk-inversion
>> required:
>> - compatible
>>
>> @@ -28,9 +29,13 @@ allOf:
>>
>> properties:
>> compatible:
>> - items:
>> - - const: eswin,eic7700-qos-eth
>> - - const: snps,dwmac-5.20
>> + oneOf:
>> + - items:
>> + - const: eswin,eic7700-qos-eth
>> + - const: snps,dwmac-5.20
>> + - items:
>> + - const: eswin,eic7700-qos-eth-clk-inversion
>
> So just enum for both entries?
>
> Anyway, that's the same device, so you do not get two compatibles. This
> should be a property. Which property not sure, maybe all this was
> discussed already.
>
>
>> + - const: snps,dwmac-5.20
>>
>> reg:
>> maxItems: 1
>> @@ -63,16 +68,29 @@ properties:
>> - const: stmmaceth
>>
>> rx-internal-delay-ps:
>> - enum: [0, 200, 600, 1200, 1600, 1800, 2000, 2200, 2400]
>> + minimum: 0
>> + maximum: 2540
>> + multipleOf: 20
>>
>> tx-internal-delay-ps:
>> - enum: [0, 200, 600, 1200, 1600, 1800, 2000, 2200, 2400]
>> + minimum: 0
>> + maximum: 2540
>> + multipleOf: 20
>>
>> eswin,hsp-sp-csr:
>> description:
>> HSP CSR is to control and get status of different high-speed peripherals
>> (such as Ethernet, USB, SATA, etc.) via register, which can tune
>> board-level's parameters of PHY, etc.
>> +
>> + Additional background information about the High-Speed Subsystem
>> + and the HSP CSR block is available in Chapter 10 ("High-Speed Interface")
>> + of the EIC7700X SoC Technical Reference Manual, Part 4
>> + (EIC7700X_SoC_Technical_Reference_Manual_Part4.pdf). The manual is
>> + publicly available at
>> + https://github.com/eswincomputing/EIC7700X-SoC-Technical-Reference-Manual/releases
>> +
>> + This reference is provided for background information only.
>> $ref: /schemas/types.yaml#/definitions/phandle-array
>> items:
>> - items:
>> @@ -81,7 +99,9 @@ properties:
>> or external clock selection
>> - description: Offset of AXI clock controller Low-Power request
>> register
>> + - description: Offset of register controlling TXD delay
>> - description: Offset of register controlling TX/RX clock delay
>> + - description: Offset of register controlling RXD delay
>
> As pointed out, you cannot change the order and there is no reason for
> doing this explained in commit msg.
>
> Best regards,
> Krzysztof
>
Bo
_______________________________________________
linux-riscv mailing list
linux-riscv@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-riscv
next prev parent reply other threads:[~2026-03-04 8:24 UTC|newest]
Thread overview: 36+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-03 6:15 [PATCH net-next v3 0/3] net: stmmac: eic7700: fix EIC7700 eth1 RX sampling timing lizhi2
2026-03-03 6:15 ` lizhi2
2026-03-03 6:16 ` [PATCH net-next v3 1/3] dt-bindings: ethernet: eswin: add clock sampling control lizhi2
2026-03-03 6:16 ` lizhi2
2026-03-04 0:38 ` Jakub Kicinski
2026-03-04 0:38 ` Jakub Kicinski
2026-03-04 0:47 ` Conor Dooley
2026-03-04 0:47 ` Conor Dooley
2026-03-04 1:23 ` Bo Gan
2026-03-04 1:23 ` Bo Gan
2026-03-04 7:39 ` Krzysztof Kozlowski
2026-03-04 7:39 ` Krzysztof Kozlowski
2026-03-04 9:30 ` Conor Dooley
2026-03-04 9:30 ` Conor Dooley
2026-03-05 2:52 ` 李志
2026-03-05 2:52 ` 李志
2026-03-05 18:42 ` Conor Dooley
2026-03-05 18:42 ` Conor Dooley
2026-03-04 7:44 ` Krzysztof Kozlowski
2026-03-04 7:44 ` Krzysztof Kozlowski
2026-03-04 8:22 ` Bo Gan [this message]
2026-03-04 8:22 ` Bo Gan
2026-03-03 6:17 ` [PATCH net-next v3 2/3] net: stmmac: eic7700: enable clocks before syscon access and correct RX sampling timing lizhi2
2026-03-03 6:17 ` lizhi2
2026-03-04 0:39 ` Jakub Kicinski
2026-03-04 0:39 ` Jakub Kicinski
2026-03-05 7:11 ` kernel test robot
2026-03-05 7:11 ` kernel test robot
2026-03-05 8:10 ` kernel test robot
2026-03-05 8:10 ` kernel test robot
2026-03-03 6:17 ` [PATCH net-next v3 3/3] riscv: dts: eswin: eic7700-hifive-premier-p550: enable Ethernet controller lizhi2
2026-03-03 6:17 ` lizhi2
2026-03-03 10:32 ` Yao Zi
2026-03-03 10:32 ` Yao Zi
2026-03-10 7:15 ` 李志
2026-03-10 7:15 ` 李志
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=3aba626d-7b5b-4d5b-9c91-07f6a2d7c244@gmail.com \
--to=ganboing@gmail.com \
--cc=alex@ghiti.fr \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=aou@eecs.berkeley.edu \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=kuba@kernel.org \
--cc=linmin@eswincomputing.com \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=lizhi2@eswincomputing.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=ningyu@eswincomputing.com \
--cc=pabeni@redhat.com \
--cc=palmer@dabbelt.com \
--cc=pinkesh.vaghela@einfochips.com \
--cc=pjw@kernel.org \
--cc=pritesh.patel@einfochips.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh@kernel.org \
--cc=weishangjuan@eswincomputing.com \
--cc=wens@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.