Commit 89e970ea authored by David S. Miller's avatar David S. Miller
Browse files

Merge branch 'brcm-asp-2.0-support'



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: default avatarDavid S. Miller <davem@davemloft.net>
parents f08469d0 3abf3d15
Loading
Loading
Loading
Loading
+155 −0
Original line number Diff line number Diff line
# 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 −0
Original line number Diff line number Diff line
@@ -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:
+9 −0
Original line number Diff line number Diff line
@@ -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>
+11 −0
Original line number Diff line number Diff line
@@ -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 −0
Original line number Diff line number Diff line
@@ -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/
Loading