aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/bmips
diff options
context:
space:
mode:
authorÁlvaro Fernández Rojas <noltari@gmail.com>2021-03-16 20:06:00 +0100
committerÁlvaro Fernández Rojas <noltari@gmail.com>2021-03-16 20:06:00 +0100
commit34f898ec29fa1e5254347b8a3dc41c9fecd87fd1 (patch)
tree0bc08a47f6c1756d51e436666c53cb6d8d397cc5 /target/linux/bmips
parent7ec9d955672e0f6e1e6ba45a44181e24365a4219 (diff)
downloadupstream-34f898ec29fa1e5254347b8a3dc41c9fecd87fd1.tar.gz
upstream-34f898ec29fa1e5254347b8a3dc41c9fecd87fd1.tar.bz2
upstream-34f898ec29fa1e5254347b8a3dc41c9fecd87fd1.zip
bmips: backport bcm6368-mdio-mux support
This patch has been accepted for linux v5.13. Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
Diffstat (limited to 'target/linux/bmips')
-rw-r--r--target/linux/bmips/patches-5.10/046-v5.13-dt-bindings-net-Add-bcm6368-mdio-mux-bindings.patch96
-rw-r--r--target/linux/bmips/patches-5.10/047-v5.13-net-mdio-Add-BCM6368-MDIO-mux-bus-controller.patch (renamed from target/linux/bmips/patches-5.10/504-net-mdio-Add-BCM6368-MDIO-mux-bus-controller.patch)20
2 files changed, 109 insertions, 7 deletions
diff --git a/target/linux/bmips/patches-5.10/046-v5.13-dt-bindings-net-Add-bcm6368-mdio-mux-bindings.patch b/target/linux/bmips/patches-5.10/046-v5.13-dt-bindings-net-Add-bcm6368-mdio-mux-bindings.patch
new file mode 100644
index 0000000000..05d688fe03
--- /dev/null
+++ b/target/linux/bmips/patches-5.10/046-v5.13-dt-bindings-net-Add-bcm6368-mdio-mux-bindings.patch
@@ -0,0 +1,96 @@
+From da6557edb9f3f4513b01d9a20a36c2fbc31810a1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
+Date: Mon, 15 Mar 2021 16:45:27 +0100
+Subject: [PATCH 1/2] dt-bindings: net: Add bcm6368-mdio-mux bindings
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Add documentations for bcm6368 mdio mux driver.
+
+Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+---
+ .../bindings/net/brcm,bcm6368-mdio-mux.yaml | 76 +++++++++++++++++++
+ 1 file changed, 76 insertions(+)
+ create mode 100644 Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml
+
+--- /dev/null
++++ b/Documentation/devicetree/bindings/net/brcm,bcm6368-mdio-mux.yaml
+@@ -0,0 +1,76 @@
++# 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.yaml#"
++
++properties:
++ compatible:
++ const: brcm,bcm6368-mdio-mux
++
++ "#address-cells":
++ const: 1
++
++ "#size-cells":
++ const: 0
++
++ reg:
++ maxItems: 1
++
++required:
++ - compatible
++ - reg
++
++patternProperties:
++ '^mdio@[0-1]$':
++ type: object
++ properties:
++ reg:
++ maxItems: 1
++
++ "#address-cells":
++ const: 1
++
++ "#size-cells":
++ const: 0
++
++ required:
++ - reg
++ - "#address-cells"
++ - "#size-cells"
++
++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/target/linux/bmips/patches-5.10/504-net-mdio-Add-BCM6368-MDIO-mux-bus-controller.patch b/target/linux/bmips/patches-5.10/047-v5.13-net-mdio-Add-BCM6368-MDIO-mux-bus-controller.patch
index a869681312..0f1a2cd9ca 100644
--- a/target/linux/bmips/patches-5.10/504-net-mdio-Add-BCM6368-MDIO-mux-bus-controller.patch
+++ b/target/linux/bmips/patches-5.10/047-v5.13-net-mdio-Add-BCM6368-MDIO-mux-bus-controller.patch
@@ -1,7 +1,7 @@
-From b6ecb2bca2b8ff80ae4b1b15f09dcf071f4ceaf4 Mon Sep 17 00:00:00 2001
+From e239756717b5c866958823a1609e2ccf268435be Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C3=81lvaro=20Fern=C3=A1ndez=20Rojas?= <noltari@gmail.com>
-Date: Mon, 1 Mar 2021 16:42:12 +0100
-Subject: [PATCH] net: mdio: Add BCM6368 MDIO mux bus controller
+Date: Mon, 15 Mar 2021 16:45:28 +0100
+Subject: [PATCH 2/2] net: mdio: Add BCM6368 MDIO mux bus controller
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
@@ -10,11 +10,12 @@ This controller is present on BCM6318, BCM6328, BCM6362, BCM6368 and BCM63268
SoCs.
Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+Signed-off-by: David S. Miller <davem@davemloft.net>
---
drivers/net/mdio/Kconfig | 11 ++
drivers/net/mdio/Makefile | 1 +
- drivers/net/mdio/mdio-mux-bcm6368.c | 179 ++++++++++++++++++++++++++++
- 3 files changed, 191 insertions(+)
+ drivers/net/mdio/mdio-mux-bcm6368.c | 184 ++++++++++++++++++++++++++++
+ 3 files changed, 196 insertions(+)
create mode 100644 drivers/net/mdio/mdio-mux-bcm6368.c
--- a/drivers/net/mdio/Kconfig
@@ -49,7 +50,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
obj-$(CONFIG_MDIO_BUS_MUX_MESON_G12A) += mdio-mux-meson-g12a.o
--- /dev/null
+++ b/drivers/net/mdio/mdio-mux-bcm6368.c
-@@ -0,0 +1,179 @@
+@@ -0,0 +1,184 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * Broadcom BCM6368 mdiomux bus controller driver
@@ -154,7 +155,8 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+ if (!res)
+ return -EINVAL;
+
-+ /* Just ioremap, as this MDIO block is usually integrated into an
++ /*
++ * Just ioremap, as this MDIO block is usually integrated into an
+ * Ethernet MAC controller register range
+ */
+ md->base = devm_ioremap(&pdev->dev, res->start, resource_size(res));
@@ -229,3 +231,7 @@ Signed-off-by: Álvaro Fernández Rojas <noltari@gmail.com>
+ .remove = bcm6368_mdiomux_remove,
+};
+module_platform_driver(bcm6368_mdiomux_driver);
++
++MODULE_AUTHOR("Álvaro Fernández Rojas <noltari@gmail.com>");
++MODULE_DESCRIPTION("BCM6368 mdiomux bus controller driver");
++MODULE_LICENSE("GPL v2");