From: "Álvaro Fernández Rojas" <noltari@gmail.com>
To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, robh+dt@kernel.org,
krzysztof.kozlowski+dt@linaro.org, f.fainelli@gmail.com,
jonas.gorski@gmail.com, andrew@lunn.ch, olteanv@gmail.com,
hkallweit1@gmail.com, linux@armlinux.org.uk,
netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org
Cc: "Álvaro Fernández Rojas" <noltari@gmail.com>
Subject: [PATCH 1/3] dt-bindings: net: move bcm6368-mdio-mux bindings to b53
Date: Fri, 17 Mar 2023 12:34:25 +0100 [thread overview]
Message-ID: <20230317113427.302162-2-noltari@gmail.com> (raw)
In-Reply-To: <20230317113427.302162-1-noltari@gmail.com>
b53 MMAP devices have a MDIO Mux bus controller that must be registered after
properly initializing the switch. If the MDIO Mux controller is registered
from a separate driver and the device has an external switch present, it will
cause a race condition which will hang the device.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
---
.../bindings/net/brcm,bcm6368-mdio-mux.yaml | 52 -------
.../devicetree/bindings/net/dsa/brcm,b53.yaml | 131 ++++++++++++++++++
2 files changed, 131 insertions(+), 52 deletions(-)
delete mode 100644 Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml
diff --git a/Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml b/Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml
deleted file mode 100644
index 9ef28c2a0afc..000000000000
--- a/Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml
+++ /dev/null
@@ -1,52 +0,0 @@
-# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
-%YAML 1.2
----
-$id: http://devicetree.org/schemas/net/brcm,bcm6368-mdio-mux.yaml#
-$schema: http://devicetree.org/meta-schemas/core.yaml#
-
-title: Broadcom BCM6368 MDIO bus multiplexer
-
-maintainers:
- - Álvaro Fernández Rojas <noltari@gmail.com>
-
-description:
- This MDIO bus multiplexer defines buses that could be internal as well as
- external to SoCs. When child bus is selected, one needs to select these two
- properties as well to generate desired MDIO transaction on appropriate bus.
-
-allOf:
- - $ref: mdio-mux.yaml#
-
-properties:
- compatible:
- const: brcm,bcm6368-mdio-mux
-
- reg:
- maxItems: 1
-
-required:
- - compatible
- - reg
-
-unevaluatedProperties: false
-
-examples:
- - |
- mdio0: mdio@10e000b0 {
- #address-cells = <1>;
- #size-cells = <0>;
- compatible = "brcm,bcm6368-mdio-mux";
- reg = <0x10e000b0 0x6>;
-
- mdio_int: mdio@0 {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <0>;
- };
-
- mdio_ext: mdio@1 {
- #address-cells = <1>;
- #size-cells = <0>;
- reg = <1>;
- };
- };
diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
index 5bef4128d175..b1a894899306 100644
--- a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
+++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml
@@ -61,6 +61,17 @@ properties:
- brcm,bcm6368-switch
- const: brcm,bcm63xx-switch
+ big-endian:
+ $ref: /schemas/types.yaml#/definitions/flag
+ description:
+ Set this flag for switches with big endian registers.
+
+ mdio-mux:
+ $ref: /schemas/net/mdio-mux.yaml
+ description:
+ MDIO bus multiplexer defines buses that could be internal as well as
+ external to SoCs.
+
required:
- compatible
- reg
@@ -131,6 +142,22 @@ allOf:
reg:
maxItems: 1
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - brcm,bcm3384-switch
+ - brcm,bcm6328-switch
+ - brcm,bcm6368-switch
+ then:
+ properties:
+ reg:
+ minItems: 1
+ maxItems: 1
+ required:
+ - mdio-mux
+
unevaluatedProperties: false
examples:
@@ -262,3 +289,107 @@ examples:
};
};
};
+ - |
+ switch0: switch@10f00000 {
+ compatible = "brcm,bcm6368-switch", "brcm,bcm63xx-switch";
+ reg = <0x10f00000 0x8000>;
+ big-endian;
+
+ dsa,member = <0 0>;
+
+ mdio-mux {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ mdio@0 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0>;
+ };
+
+ mdio@1 {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <1>;
+
+ switch@1e {
+ compatible = "brcm,bcm53125";
+ reg = <30>;
+
+ dsa,member = <1 0>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port@0 {
+ reg = <0>;
+ label = "lan1";
+ };
+
+ port@1 {
+ reg = <1>;
+ label = "lan2";
+ };
+
+ port@2 {
+ reg = <2>;
+ label = "lan3";
+ };
+
+ port@3 {
+ reg = <3>;
+ label = "lan4";
+ };
+
+ port@4 {
+ reg = <4>;
+ label = "wan";
+ };
+
+ port@8 {
+ reg = <8>;
+ label = "cpu";
+
+ phy-mode = "rgmii";
+ ethernet = <&switch0port4>;
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
+ };
+ };
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ switch0port4: port@4 {
+ reg = <4>;
+ label = "extsw";
+
+ phy-mode = "rgmii";
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+
+ port@8 {
+ reg = <8>;
+
+ phy-mode = "internal";
+ ethernet = <ðernet>;
+
+ fixed-link {
+ speed = <1000>;
+ full-duplex;
+ };
+ };
+ };
+ };
--
2.30.2
next prev parent reply other threads:[~2023-03-17 11:36 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-17 11:34 [PATCH 0/3] net: dsa: b53: mmap: add MDIO Mux bus controller Álvaro Fernández Rojas
2023-03-17 11:34 ` Álvaro Fernández Rojas [this message]
2023-03-19 11:35 ` [PATCH 1/3] dt-bindings: net: move bcm6368-mdio-mux bindings to b53 Krzysztof Kozlowski
2023-03-17 11:34 ` [PATCH 2/3] net: dsa: b53: mmap: register MDIO Mux bus controller Álvaro Fernández Rojas
2023-03-17 11:51 ` Vladimir Oltean
2023-03-17 12:06 ` Álvaro Fernández Rojas
2023-03-17 13:04 ` Vladimir Oltean
2023-03-17 14:17 ` Álvaro Fernández Rojas
2023-03-17 14:29 ` Vladimir Oltean
2023-03-17 16:23 ` Álvaro Fernández Rojas
2023-03-17 16:41 ` Florian Fainelli
2023-03-17 16:44 ` Álvaro Fernández Rojas
2023-03-19 9:45 ` Álvaro Fernández Rojas
2023-03-20 10:27 ` Jonas Gorski
2023-03-20 15:21 ` Álvaro Fernández Rojas
2023-03-17 16:26 ` Andrew Lunn
2023-03-17 16:30 ` Álvaro Fernández Rojas
2023-03-17 16:37 ` Andrew Lunn
2023-03-17 11:34 ` [PATCH 3/3] net: mdio: remove BCM6368 MDIO mux bus driver Álvaro Fernández Rojas
2023-03-19 11:36 ` Krzysztof Kozlowski
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=20230317113427.302162-2-noltari@gmail.com \
--to=noltari@gmail.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=f.fainelli@gmail.com \
--cc=hkallweit1@gmail.com \
--cc=jonas.gorski@gmail.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=olteanv@gmail.com \
--cc=pabeni@redhat.com \
--cc=robh+dt@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