mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Jens Emil Schulz Østergaard" <jensemil.schulzostergaard@microchip.com>
To: Colin Foster <colin.foster@in-advantage.com>,
	Lee Jones <lee@kernel.org>, <UNGLinuxDriver@microchip.com>,
	Rob Herring <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	"Richard Cochran" <richardcochran@gmail.com>
Cc: mfd@lists.linux.dev, linux-kernel@vger.kernel.org,
	netdev@vger.kernel.org, devicetree@vger.kernel.org,
	"Jens Emil Schulz Østergaard"
	<jensemil.schulzostergaard@microchip.com>
Subject: [PATCH 2/4] dt-bindings: mfd: Add the Microchip LAN9645x switch family
Date: Mon, 23 Nov 2026 14:25:06 +0100	[thread overview]
Message-ID: <20261123-mfd-ocelot-add-lan9645x-support-v1-2-567d811fe1de@microchip.com> (raw)
In-Reply-To: <20261123-mfd-ocelot-add-lan9645x-support-v1-0-567d811fe1de@microchip.com>

The LAN9645x switch is controlled externally over SPI the same way as
the VSC7512 described by mscc,ocelot.yaml, but the two families share
no child devices. Add a schema of its own for the LAN9645x.

The microchip,lan96455s compatible, the smallest SKU of the family, is
the fallback of the compatibles of the other SKUs, as in the switch
binding. The children are the microchip,lan96455f-pinctrl pin
controller, microchip,lan966x-miim MDIO buses and the switch.

Signed-off-by: Jens Emil Schulz Østergaard <jensemil.schulzostergaard@microchip.com>
---
The $ref in this binding is to net/dsa/microchip,lan96455s-switch.yaml,
and the MAINTAINERS entry extended here is MICROCHIP LAN9645X ETHERNET
SWITCH DRIVER, both added by the LAN9645x DSA series in net-next and
expected in v7.5-rc1.
---
 .../bindings/mfd/microchip,lan96455s.yaml          | 132 +++++++++++++++++++++
 MAINTAINERS                                        |   1 +
 2 files changed, 133 insertions(+)

diff --git a/Documentation/devicetree/bindings/mfd/microchip,lan96455s.yaml b/Documentation/devicetree/bindings/mfd/microchip,lan96455s.yaml
new file mode 100644
index 000000000000..82f7c6290004
--- /dev/null
+++ b/Documentation/devicetree/bindings/mfd/microchip,lan96455s.yaml
@@ -0,0 +1,132 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/microchip,lan96455s.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Microchip LAN9645x Externally-Controlled Ethernet Switch
+
+maintainers:
+  - Jens Emil Schulz Østergaard <jensemil.schulzostergaard@microchip.com>
+
+description: |
+  The LAN9645x is a family of ethernet switch chips without an internal CPU.
+  The chips are controlled externally over SPI. Besides the switch, they
+  contain a pin controller and MDIO controllers.
+
+properties:
+  compatible:
+    oneOf:
+      - const: microchip,lan96455s
+      - items:
+          - enum:
+              - microchip,lan96455f
+              - microchip,lan96457f
+              - microchip,lan96459f
+              - microchip,lan96457s
+              - microchip,lan96459s
+          - const: microchip,lan96455s
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+patternProperties:
+  "^pinctrl@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/pinctrl/mscc,ocelot-pinctrl.yaml
+    properties:
+      compatible:
+        contains:
+          const: microchip,lan96455f-pinctrl
+
+  "^mdio@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/net/mscc,miim.yaml
+    properties:
+      compatible:
+        const: microchip,lan966x-miim
+
+  "^ethernet-switch@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/net/dsa/microchip,lan96455s-switch.yaml
+    unevaluatedProperties: false
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+
+allOf:
+  - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    spi {
+        #address-cells = <1>;
+        #size-cells = <0>;
+
+        soc@0 {
+            compatible = "microchip,lan96455s";
+            reg = <0>;
+            #address-cells = <1>;
+            #size-cells = <1>;
+            spi-max-frequency = <28000000>;
+
+            ethernet-switch@4000 {
+                compatible = "microchip,lan96455s-switch";
+                reg = <0x4000 0x244>, <0x8000 0x4c>, <0xc000 0x1f0>,
+                      <0x10000 0x134>, <0x14000 0x2c8>, <0x18000 0x1910>,
+                      <0x1c000 0x468>, <0x20000 0x1480>, <0x24000 0x468>,
+                      <0x28000 0x468>, <0x2c000 0x12d4>, <0x30000 0xe4>,
+                      <0x38000 0xb8>, <0x3c000 0xb8>, <0x40000 0xb8>,
+                      <0x44000 0xb8>, <0x48000 0xb8>, <0x4c000 0xb8>,
+                      <0x50000 0xb8>, <0x54000 0xb8>, <0x58000 0xb8>,
+                      <0x100000 0xa000>, <0x120000 0x1998>, <0x140000 0x7468>;
+                reg-names = "gcb", "qs", "ptp", "chip_top", "tas", "rew", "vcap0",
+                            "mep", "vcap1", "vcap2", "sys", "hsio", "dev0", "dev1",
+                            "dev2", "dev3", "dev4", "dev5", "dev6", "dev7", "dev8",
+                            "qsys", "afi", "ana";
+
+                ethernet-ports {
+                    #address-cells = <1>;
+                    #size-cells = <0>;
+
+                    ethernet-port@0 {
+                        reg = <0>;
+                        phy-handle = <&cuphy0>;
+                        phy-mode = "gmii";
+                    };
+                };
+            };
+
+            gpio_lan9645x: pinctrl@4028 {
+                compatible = "microchip,lan96455f-pinctrl";
+                reg = <0x4028 0x68>;
+                #gpio-cells = <2>;
+                gpio-controller;
+                gpio-ranges = <&gpio_lan9645x 0 0 51>;
+            };
+
+            mdio@40bc {
+                compatible = "microchip,lan966x-miim";
+                reg = <0x40bc 0x24>;
+                #address-cells = <1>;
+                #size-cells = <0>;
+
+                cuphy0: ethernet-phy@1 {
+                    reg = <1>;
+                };
+            };
+        };
+    };
+
+...
diff --git a/MAINTAINERS b/MAINTAINERS
index 97308edec53d..b254f8c92b0d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -18331,6 +18331,7 @@ M:	Jens Emil Schulz Østergaard <jensemil.schulzostergaard@microchip.com>
 M:	UNGLinuxDriver@microchip.com
 L:	netdev@vger.kernel.org
 S:	Maintained
+F:	Documentation/devicetree/bindings/mfd/microchip,lan96455s.yaml
 F:	Documentation/devicetree/bindings/net/dsa/microchip,lan96455s-switch.yaml
 F:	drivers/net/dsa/microchip/lan9645x/*
 F:	include/linux/dsa/lan9645x.h

-- 
2.52.0


  parent reply	other threads:[~2026-11-23 13:25 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-23 13:25 [PATCH 0/4] mfd: ocelot: Support the " Jens Emil Schulz Østergaard
2026-11-23 13:25 ` [PATCH 1/4] mfd: ocelot: Select the chip through match data Jens Emil Schulz Østergaard
2026-12-02 12:34   ` Lee Jones
2026-11-23 13:25 ` Jens Emil Schulz Østergaard [this message]
2026-11-23 13:25 ` [PATCH 3/4] mfd: ocelot: Add support for the LAN9645x switch family Jens Emil Schulz Østergaard
2026-12-02 13:28   ` Lee Jones
2026-11-23 13:25 ` [PATCH 4/4] mfd: ocelot: Read LAN9645x registers in a single SPI transfer Jens Emil Schulz Østergaard
2026-12-02 13:35   ` Lee Jones

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=20261123-mfd-ocelot-add-lan9645x-support-v1-2-567d811fe1de@microchip.com \
    --to=jensemil.schulzostergaard@microchip.com \
    --cc=UNGLinuxDriver@microchip.com \
    --cc=colin.foster@in-advantage.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=lee@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mfd@lists.linux.dev \
    --cc=netdev@vger.kernel.org \
    --cc=richardcochran@gmail.com \
    --cc=robh@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

all inboxes | Powered by JetHome®