lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250209234751.460404-3-chris.packham@alliedtelesis.co.nz>
Date: Mon, 10 Feb 2025 12:47:48 +1300
From: Chris Packham <chris.packham@...iedtelesis.co.nz>
To: lee@...nel.org,
	robh@...nel.org,
	krzk+dt@...nel.org,
	conor+dt@...nel.org,
	andrew+netdev@...n.ch,
	davem@...emloft.net,
	edumazet@...gle.com,
	kuba@...nel.org,
	pabeni@...hat.com,
	tsbogend@...ha.franken.de
Cc: linux-kernel@...r.kernel.org,
	netdev@...r.kernel.org,
	linux-mips@...r.kernel.org,
	devicetree@...r.kernel.org,
	Chris Packham <chris.packham@...iedtelesis.co.nz>
Subject: [PATCH net-next 2/5] dt-bindings: net: Add switch ports and interrupts to RTL9300

Add bindings for the ethernet-switch and interrupt properties for the
RTL9300.

Signed-off-by: Chris Packham <chris.packham@...iedtelesis.co.nz>
---

Notes:
    This is tecnically v7 of [1] changes from that are:
    - Use ethernet-switch.yaml#/$defs/ethernet-ports
    - Enforce "ethernet-ports" be used instead of just "ports"
    - Add interrupts for the switch block
    
    [1] - https://lore.kernel.org/lkml/20250204030249.1965444-2-chris.packham@alliedtelesis.co.nz/

 .../bindings/net/realtek,rtl9301-switch.yaml  | 30 +++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/Documentation/devicetree/bindings/net/realtek,rtl9301-switch.yaml b/Documentation/devicetree/bindings/net/realtek,rtl9301-switch.yaml
index d0a93d5f03aa..5d29647bea2d 100644
--- a/Documentation/devicetree/bindings/net/realtek,rtl9301-switch.yaml
+++ b/Documentation/devicetree/bindings/net/realtek,rtl9301-switch.yaml
@@ -14,6 +14,8 @@ description:
   number of different peripherals are accessed through a common register block,
   represented here as a syscon node.
 
+$ref: ethernet-switch.yaml#/$defs/ethernet-ports
+
 properties:
   compatible:
     items:
@@ -28,12 +30,23 @@ properties:
   reg:
     maxItems: 1
 
+  interrupts:
+    maxItems: 2
+
+  interrupt-names:
+    items:
+      - const: switch
+      - const: nic
+
   '#address-cells':
     const: 1
 
   '#size-cells':
     const: 1
 
+  ethernet-ports:
+    type: object
+
 patternProperties:
   'reboot@[0-9a-f]+$':
     $ref: /schemas/power/reset/syscon-reboot.yaml#
@@ -44,6 +57,8 @@ patternProperties:
 required:
   - compatible
   - reg
+  - interrupts
+  - interrupt-names
 
 additionalProperties: false
 
@@ -52,6 +67,9 @@ examples:
     ethernet-switch@...00000 {
       compatible = "realtek,rtl9301-switch", "syscon", "simple-mfd";
       reg = <0x1b000000 0x10000>;
+      interrupt-parent = <&intc>;
+      interrupts = <23>, <24>;
+      interrupt-names = "switch", "nic";
       #address-cells = <1>;
       #size-cells = <1>;
 
@@ -110,5 +128,17 @@ examples:
           };
         };
       };
+
+      ethernet-ports {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        port@0 {
+          reg = <0>;
+        };
+        port@1 {
+          reg = <1>;
+        };
+      };
     };
 
-- 
2.48.1


Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ