devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net] dt-bindings: net: xlnx,axi-ethernet: Add missing reg minItems
@ 2024-09-30 19:13 Radhey Shyam Pandey
  2024-10-01 17:10 ` Conor Dooley
  2024-10-03 10:20 ` patchwork-bot+netdevbpf
  0 siblings, 2 replies; 3+ messages in thread
From: Radhey Shyam Pandey @ 2024-09-30 19:13 UTC (permalink / raw)
  To: radhey.shyam.pandey, davem, edumazet, kuba, pabeni, robh, krzk+dt,
	conor+dt
  Cc: netdev, devicetree, linux-kernel, git, Ravikanth Tuniki

From: Ravikanth Tuniki <ravikanth.tuniki@amd.com>

Add missing reg minItems as based on current binding document
only ethernet MAC IO space is a supported configuration.

There is a bug in schema, current examples contain 64-bit
addressing as well as 32-bit addressing. The schema validation
does pass incidentally considering one 64-bit reg address as
two 32-bit reg address entries. If we change axi_ethernet_eth1
example node reg addressing to 32-bit schema validation reports:

Documentation/devicetree/bindings/net/xlnx,axi-ethernet.example.dtb:
ethernet@40000000: reg: [[1073741824, 262144]] is too short

To fix it add missing reg minItems constraints and to make things clearer
stick to 32-bit addressing in examples.

Fixes: cbb1ca6d5f9a ("dt-bindings: net: xlnx,axi-ethernet: convert bindings document to yaml")
Signed-off-by: Ravikanth Tuniki <ravikanth.tuniki@amd.com>
Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>
---
 Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml b/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml
index bbe89ea9590c..e95c21628281 100644
--- a/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml
+++ b/Documentation/devicetree/bindings/net/xlnx,axi-ethernet.yaml
@@ -34,6 +34,7 @@ properties:
       and length of the AXI DMA controller IO space, unless
       axistream-connected is specified, in which case the reg
       attribute of the node referenced by it is used.
+    minItems: 1
     maxItems: 2
 
   interrupts:
@@ -181,7 +182,7 @@ examples:
         clock-names = "s_axi_lite_clk", "axis_clk", "ref_clk", "mgt_clk";
         clocks = <&axi_clk>, <&axi_clk>, <&pl_enet_ref_clk>, <&mgt_clk>;
         phy-mode = "mii";
-        reg = <0x00 0x40000000 0x00 0x40000>;
+        reg = <0x40000000 0x40000>;
         xlnx,rxcsum = <0x2>;
         xlnx,rxmem = <0x800>;
         xlnx,txcsum = <0x2>;

base-commit: d505d3593b52b6c43507f119572409087416ba28
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH net] dt-bindings: net: xlnx,axi-ethernet: Add missing reg minItems
  2024-09-30 19:13 [PATCH net] dt-bindings: net: xlnx,axi-ethernet: Add missing reg minItems Radhey Shyam Pandey
@ 2024-10-01 17:10 ` Conor Dooley
  2024-10-03 10:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: Conor Dooley @ 2024-10-01 17:10 UTC (permalink / raw)
  To: Radhey Shyam Pandey
  Cc: davem, edumazet, kuba, pabeni, robh, krzk+dt, conor+dt, netdev,
	devicetree, linux-kernel, git, Ravikanth Tuniki

[-- Attachment #1: Type: text/plain, Size: 1131 bytes --]

On Tue, Oct 01, 2024 at 12:43:35AM +0530, Radhey Shyam Pandey wrote:
> From: Ravikanth Tuniki <ravikanth.tuniki@amd.com>
> 
> Add missing reg minItems as based on current binding document
> only ethernet MAC IO space is a supported configuration.
> 
> There is a bug in schema, current examples contain 64-bit
> addressing as well as 32-bit addressing. The schema validation
> does pass incidentally considering one 64-bit reg address as
> two 32-bit reg address entries. If we change axi_ethernet_eth1
> example node reg addressing to 32-bit schema validation reports:
> 
> Documentation/devicetree/bindings/net/xlnx,axi-ethernet.example.dtb:
> ethernet@40000000: reg: [[1073741824, 262144]] is too short
> 
> To fix it add missing reg minItems constraints and to make things clearer
> stick to 32-bit addressing in examples.
> 
> Fixes: cbb1ca6d5f9a ("dt-bindings: net: xlnx,axi-ethernet: convert bindings document to yaml")
> Signed-off-by: Ravikanth Tuniki <ravikanth.tuniki@amd.com>
> Signed-off-by: Radhey Shyam Pandey <radhey.shyam.pandey@amd.com>

Acked-by: Conor Dooley <conor.dooley@microchip.com>

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH net] dt-bindings: net: xlnx,axi-ethernet: Add missing reg minItems
  2024-09-30 19:13 [PATCH net] dt-bindings: net: xlnx,axi-ethernet: Add missing reg minItems Radhey Shyam Pandey
  2024-10-01 17:10 ` Conor Dooley
@ 2024-10-03 10:20 ` patchwork-bot+netdevbpf
  1 sibling, 0 replies; 3+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-10-03 10:20 UTC (permalink / raw)
  To: Pandey, Radhey Shyam
  Cc: davem, edumazet, kuba, pabeni, robh, krzk+dt, conor+dt, netdev,
	devicetree, linux-kernel, git, ravikanth.tuniki

Hello:

This patch was applied to netdev/net.git (main)
by Paolo Abeni <pabeni@redhat.com>:

On Tue, 1 Oct 2024 00:43:35 +0530 you wrote:
> From: Ravikanth Tuniki <ravikanth.tuniki@amd.com>
> 
> Add missing reg minItems as based on current binding document
> only ethernet MAC IO space is a supported configuration.
> 
> There is a bug in schema, current examples contain 64-bit
> addressing as well as 32-bit addressing. The schema validation
> does pass incidentally considering one 64-bit reg address as
> two 32-bit reg address entries. If we change axi_ethernet_eth1
> example node reg addressing to 32-bit schema validation reports:
> 
> [...]

Here is the summary with links:
  - [net] dt-bindings: net: xlnx,axi-ethernet: Add missing reg minItems
    https://git.kernel.org/netdev/net/c/c6929644c1e0

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-10-03 10:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-30 19:13 [PATCH net] dt-bindings: net: xlnx,axi-ethernet: Add missing reg minItems Radhey Shyam Pandey
2024-10-01 17:10 ` Conor Dooley
2024-10-03 10:20 ` patchwork-bot+netdevbpf

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).