diff mbox series

[net-next] dt-bindings: net: renesas,ethertsn: Create child-node for MDIO bus

Message ID 20240311143507.3239566-1-niklas.soderlund+renesas@ragnatech.se (mailing list archive)
State Deferred
Delegated to: Netdev Maintainers
Headers show
Series [net-next] dt-bindings: net: renesas,ethertsn: Create child-node for MDIO bus | expand

Checks

Context Check Description
netdev/series_format success Single patches do not need cover letters
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 8 this patch: 8
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers warning 3 maintainers not CCed: robh+dt@kernel.org magnus.damm@gmail.com niklas.soderlund@ragnatech.se
netdev/build_clang success Errors and warnings before: 8 this patch: 8
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 8 this patch: 8
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 52 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0
netdev/contest warning net-next-2024-03-11--21-00 (tests: 883)

Commit Message

Niklas Söderlund March 11, 2024, 2:35 p.m. UTC
The design for this driver followed that of other Renesas Ethernet
drivers and thus did not force a child-node for the MDIO bus. As there
are no upstream drivers or users of this binding yet take the
opportunity to correct this and force the usage of a child-node for the
MDIO bus.

Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
---
Hello,

Learn from the mistake made with the Renesas AVB bindings being worked
on in [1] where no mdio node was used to describe the MDIO bus and the
PHY was added directly as a child node to the AVB node.

The Ethernet TSN driver is still in review and have not been merged and
no usage of the bindings merged either. So while this breaks the binding
it effects no one so we can correct this mistake without breaking any
use-cases before we need to support any backward compatibility.

1. https://patchwork.kernel.org/project/netdevbpf/list/?series=834331
---
 .../bindings/net/renesas,ethertsn.yaml        | 33 ++++++++-----------
 1 file changed, 14 insertions(+), 19 deletions(-)

Comments

Jakub Kicinski March 12, 2024, 4:29 a.m. UTC | #1
On Mon, 11 Mar 2024 15:35:07 +0100 Niklas Söderlund wrote:
> The design for this driver followed that of other Renesas Ethernet
> drivers and thus did not force a child-node for the MDIO bus. As there
> are no upstream drivers or users of this binding yet take the
> opportunity to correct this and force the usage of a child-node for the
> MDIO bus.

## Form letter - net-next-closed

The merge window for v6.9 has begun and we have already posted our pull
request. Therefore net-next is closed for new drivers, features, code
refactoring and optimizations. We are currently accepting bug fixes only.

Please repost when net-next reopens after March 25th.

RFC patches sent for review only are obviously welcome at any time.

See: https://www.kernel.org/doc/html/next/process/maintainer-netdev.html#development-cycle
Rob Herring (Arm) March 12, 2024, 2:27 p.m. UTC | #2
On Mon, 11 Mar 2024 15:35:07 +0100, Niklas Söderlund wrote:
> The design for this driver followed that of other Renesas Ethernet
> drivers and thus did not force a child-node for the MDIO bus. As there
> are no upstream drivers or users of this binding yet take the
> opportunity to correct this and force the usage of a child-node for the
> MDIO bus.
> 
> Signed-off-by: Niklas Söderlund <niklas.soderlund+renesas@ragnatech.se>
> ---
> Hello,
> 
> Learn from the mistake made with the Renesas AVB bindings being worked
> on in [1] where no mdio node was used to describe the MDIO bus and the
> PHY was added directly as a child node to the AVB node.
> 
> The Ethernet TSN driver is still in review and have not been merged and
> no usage of the bindings merged either. So while this breaks the binding
> it effects no one so we can correct this mistake without breaking any
> use-cases before we need to support any backward compatibility.
> 
> 1. https://patchwork.kernel.org/project/netdevbpf/list/?series=834331
> ---
>  .../bindings/net/renesas,ethertsn.yaml        | 33 ++++++++-----------
>  1 file changed, 14 insertions(+), 19 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
Andrew Lunn March 12, 2024, 10:09 p.m. UTC | #3
On Mon, Mar 11, 2024 at 03:35:07PM +0100, Niklas Söderlund wrote:
> The design for this driver followed that of other Renesas Ethernet
> drivers and thus did not force a child-node for the MDIO bus. As there
> are no upstream drivers or users of this binding yet take the
> opportunity to correct this and force the usage of a child-node for the
> MDIO bus.

Could you expand on the history. When was renesas,ethertsn.yaml added
and via which tree? Is this currently only in net-next and just sent
to Linus as part of this merge window? Or has it been around longer?

   Andrew
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/net/renesas,ethertsn.yaml b/Documentation/devicetree/bindings/net/renesas,ethertsn.yaml
index ea35d19be829..0a88f4acc3f6 100644
--- a/Documentation/devicetree/bindings/net/renesas,ethertsn.yaml
+++ b/Documentation/devicetree/bindings/net/renesas,ethertsn.yaml
@@ -71,16 +71,8 @@  properties:
     enum: [0, 2000]
     default: 0
 
-  '#address-cells':
-    const: 1
-
-  '#size-cells':
-    const: 0
-
-patternProperties:
-  "^ethernet-phy@[0-9a-f]$":
-    type: object
-    $ref: ethernet-phy.yaml#
+  mdio:
+    $ref: /schemas/net/mdio.yaml#
     unevaluatedProperties: false
 
 required:
@@ -94,8 +86,7 @@  required:
   - resets
   - phy-mode
   - phy-handle
-  - '#address-cells'
-  - '#size-cells'
+  - mdio
 
 additionalProperties: false
 
@@ -122,14 +113,18 @@  examples:
         tx-internal-delay-ps = <2000>;
         phy-handle = <&phy3>;
 
-        #address-cells = <1>;
-        #size-cells = <0>;
+        mdio {
+            #address-cells = <1>;
+            #size-cells = <0>;
 
-        phy3: ethernet-phy@3 {
-            compatible = "ethernet-phy-ieee802.3-c45";
-            reg = <0>;
-            interrupt-parent = <&gpio4>;
-            interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
             reset-gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
+            reset-post-delay-us = <4000>;
+
+            phy3: ethernet-phy@3 {
+                compatible = "ethernet-phy-ieee802.3-c45";
+                reg = <0>;
+                interrupt-parent = <&gpio4>;
+                interrupts = <3 IRQ_TYPE_LEVEL_LOW>;
+            };
         };
     };