Skip to content

Commit

Permalink
Merge branch 'brcm-asp-2.0-support'
Browse files Browse the repository at this point in the history
Justin Chen says:

====================
Brcm ASP 2.0 Ethernet Controller

Add support for the Broadcom ASP 2.0 Ethernet controller which is first
introduced with 72165.
====================

Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
David S. Miller committed Jul 17, 2023
2 parents f08469d + 3abf3d1 commit 89e970e
Show file tree
Hide file tree
Showing 14 changed files with 4,382 additions and 0 deletions.
155 changes: 155 additions & 0 deletions Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,155 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/net/brcm,asp-v2.0.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Broadcom ASP 2.0 Ethernet controller

maintainers:
- Justin Chen <justin.chen@broadcom.com>
- Florian Fainelli <florian.fainelli@broadcom.com>

description: Broadcom Ethernet controller first introduced with 72165

properties:
compatible:
oneOf:
- items:
- enum:
- brcm,bcm74165-asp
- const: brcm,asp-v2.1
- items:
- enum:
- brcm,bcm72165-asp
- const: brcm,asp-v2.0

"#address-cells":
const: 1
"#size-cells":
const: 1

reg:
maxItems: 1

ranges: true

interrupts:
minItems: 1
items:
- description: RX/TX interrupt
- description: Port 0 Wake-on-LAN
- description: Port 1 Wake-on-LAN

clocks:
maxItems: 1

ethernet-ports:
type: object
properties:
"#address-cells":
const: 1
"#size-cells":
const: 0

patternProperties:
"^port@[0-9]+$":
type: object

$ref: ethernet-controller.yaml#

unevaluatedProperties: false

properties:
reg:
maxItems: 1
description: Port number

brcm,channel:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
ASP Channel Number
The depacketizer channel that consumes packets from
the unimac/port.
required:
- reg
- brcm,channel

additionalProperties: false

patternProperties:
"^mdio@[0-9a-f]+$":
type: object
$ref: brcm,unimac-mdio.yaml

description:
ASP internal UniMAC MDIO bus

required:
- compatible
- reg
- interrupts
- clocks
- ranges

additionalProperties: false

examples:
- |
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
ethernet@9c00000 {
compatible = "brcm,bcm72165-asp", "brcm,asp-v2.0";
reg = <0x9c00000 0x1fff14>;
interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>;
ranges = <0x0 0x9c00000 0x1fff14>;
clocks = <&scmi 14>;
#address-cells = <1>;
#size-cells = <1>;
mdio@c614 {
compatible = "brcm,asp-v2.0-mdio";
reg = <0xc614 0x8>;
reg-names = "mdio";
#address-cells = <1>;
#size-cells = <0>;
phy0: ethernet-phy@1 {
reg = <1>;
};
};
mdio@ce14 {
compatible = "brcm,asp-v2.0-mdio";
reg = <0xce14 0x8>;
reg-names = "mdio";
#address-cells = <1>;
#size-cells = <0>;
phy1: ethernet-phy@1 {
reg = <1>;
};
};
ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
brcm,channel = <8>;
phy-mode = "rgmii";
phy-handle = <&phy0>;
};
port@1 {
reg = <1>;
brcm,channel = <9>;
phy-mode = "rgmii";
phy-handle = <&phy1>;
};
};
};
2 changes: 2 additions & 0 deletions Documentation/devicetree/bindings/net/brcm,unimac-mdio.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ properties:
- brcm,genet-mdio-v3
- brcm,genet-mdio-v4
- brcm,genet-mdio-v5
- brcm,asp-v2.0-mdio
- brcm,asp-v2.1-mdio
- brcm,unimac-mdio

reg:
Expand Down
9 changes: 9 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -4145,6 +4145,15 @@ F: drivers/net/mdio/mdio-bcm-unimac.c
F: include/linux/platform_data/bcmgenet.h
F: include/linux/platform_data/mdio-bcm-unimac.h

BROADCOM ASP 2.0 ETHERNET DRIVER
M: Justin Chen <justin.chen@broadcom.com>
M: Florian Fainelli <florian.fainelli@broadcom.com>
L: bcm-kernel-feedback-list@broadcom.com
L: netdev@vger.kernel.org
S: Supported
F: Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
F: drivers/net/ethernet/broadcom/asp2/

BROADCOM IPROC ARM ARCHITECTURE
M: Ray Jui <rjui@broadcom.com>
M: Scott Branden <sbranden@broadcom.com>
Expand Down
11 changes: 11 additions & 0 deletions drivers/net/ethernet/broadcom/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -255,4 +255,15 @@ config BNXT_HWMON
Say Y if you want to expose the thermal sensor data on NetXtreme-C/E
devices, via the hwmon sysfs interface.

config BCMASP
tristate "Broadcom ASP 2.0 Ethernet support"
default ARCH_BRCMSTB
depends on OF
select MII
select PHYLIB
select MDIO_BCM_UNIMAC
help
This configuration enables the Broadcom ASP 2.0 Ethernet controller
driver which is present in Broadcom STB SoCs such as 72165.

endif # NET_VENDOR_BROADCOM
1 change: 1 addition & 0 deletions drivers/net/ethernet/broadcom/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ obj-$(CONFIG_BGMAC_BCMA) += bgmac-bcma.o bgmac-bcma-mdio.o
obj-$(CONFIG_BGMAC_PLATFORM) += bgmac-platform.o
obj-$(CONFIG_SYSTEMPORT) += bcmsysport.o
obj-$(CONFIG_BNXT) += bnxt/
obj-$(CONFIG_BCMASP) += asp2/
2 changes: 2 additions & 0 deletions drivers/net/ethernet/broadcom/asp2/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
obj-$(CONFIG_BCMASP) += bcm-asp.o
bcm-asp-objs := bcmasp.o bcmasp_intf.o bcmasp_ethtool.o
Loading

0 comments on commit 89e970e

Please sign in to comment.