Marvell CN913X / Marvell Armada 375, 7K, 8K Ethernet Controller

Schema identifier ($id): "http://devicetree.org/schemas/net/marvell,pp2.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Maintainers (maintainers): "Marcin Wojtas <mw@semihalf.com>", "Russell King <linux@armlinux.org>"

Marvell Armada 375 Ethernet Controller (PPv2.1) Marvell Armada 7K/8K Ethernet Controller (PPv2.2) Marvell CN913X Ethernet Controller (PPv2.3)

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "marvell,armada-375-pp2", "marvell,armada-7k-pp22"

reg — required here #

Minimum number of items (minItems): 3

Maximum number of items (maxItems): 4

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

clocks — required here #

Minimum number of items (minItems): 2

Array item rules (items) #

Item 1

main controller clock

Item 2

GOP clock

Item 3

MG clock

Item 4

MG Core clock

Item 5

AXI clock

clock-names — required here #

Minimum number of items (minItems): 2

Array item rules (items) #

Item 1

Exact value (const): "pp_clk"

Item 2

Exact value (const): "gop_clk"

Item 3

Exact value (const): "mg_clk"

Item 4

Exact value (const): "mg_core_clk"

Item 5

Exact value (const): "axi_clk"

dma-coherent — not listed as required here #

true — No constraints added by this property rule.

marvell,system-controller — not listed as required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle

a phandle to the system controller.

Properties matching a name pattern (patternProperties) #

^(ethernet-)?port@[0-2]$ — name matches this regular expression #

Value type (type): "object"

subnode for each ethernet port.

Shared schema rule ($ref): ethernet-controller.yaml#

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Properties and child nodes (properties) #

reg — required here

ID of the port from the MAC point of view.

Maximum value (maximum): 2

interrupts — required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 10

interrupt(s) for the port

interrupt-names — not listed as required here

Minimum number of items (minItems): 1

Array item rules (items)

Item 1

Exact value (const): "hif0"

Item 2

Exact value (const): "hif1"

Item 3

Exact value (const): "hif2"

Item 4

Exact value (const): "hif3"

Item 5

Exact value (const): "hif4"

Item 6

Exact value (const): "hif5"

Item 7

Exact value (const): "hif6"

Item 8

Exact value (const): "hif7"

Item 9

Exact value (const): "hif8"

Item 10

Exact value (const): "link"

if more than a single interrupt for is given, must be the name associated to the interrupts listed. Valid names are: "hifX", with X in [0..8], and "link". The names "tx-cpu0", "tx-cpu1", "tx-cpu2", "tx-cpu3" and "rx-shared" are supported for backward compatibility but shouldn't be used for new additions.

phys — not listed as required here

Minimum number of items (minItems): 1

Maximum number of items (maxItems): 2

Generic PHY, providing SerDes connectivity. For most modes, one lane is sufficient, but some (e.g. RXAUI) may require two.

phy-mode — required here

Allowed values (enum): "gmii", "sgmii", "rgmii-id", "1000base-x", "2500base-x", "5gbase-r", "rxaui", "10gbase-r"

port-id — required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Deprecated (deprecated): true

ID of the port from the MAC point of view. Legacy binding for backward compatibility.

marvell,loopback — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/flag

port is loopback mode.

gop-port-id — not listed as required here

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

only for marvell,armada-7k-pp22, ID of the port from the GOP (Group Of Ports) point of view. This ID is used to index the per-port registers in the second register area.

Required in this object (required): "reg", "interrupts", "phy-mode", "port-id"

Required in this object (required): "compatible", "reg", "clocks", "clock-names"

All of these rules must match (allOf) #

Rule 1 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Exact value (const): "marvell,armada-7k-pp22"

When the condition matches (then) #

Properties and child nodes (properties)

reg — not listed as required here

Array item rules (items)

Item 1

Packet Processor registers

Item 2

Networking interfaces registers

Item 3

CM3 address space used for TX Flow Control

clocks — not listed as required here

Minimum number of items (minItems): 5

clock-names — not listed as required here

Minimum number of items (minItems): 5

Properties matching a name pattern (patternProperties)

^(ethernet-)?port@[0-2]$ — name matches this regular expression

Required in this object (required): "gop-port-id"

Required in this object (required): "marvell,system-controller"

When the condition does not match (else) #

Properties and child nodes (properties)

reg — not listed as required here

Array item rules (items)

Item 1

Packet Processor registers

Item 2

LMS registers

Item 3

Register area per eth0

Item 4

Register area per eth1

clocks — not listed as required here

Maximum number of items (maxItems): 2

clock-names — not listed as required here

Maximum number of items (maxItems): 2

Properties matching a name pattern (patternProperties)

^(ethernet-)?port@[0-1]$ — name matches this regular expression

Properties and child nodes (properties)

reg — not listed as required here

Maximum value (maximum): 1

gop-port-id — not listed as required here

false — Not permitted by this property rule.

Properties not matched by properties or patternProperties in this schema (additionalProperties) #

false

Not allowed by this rule.

Examples (examples) #

// For Armada 375 variant
#include <dt-bindings/interrupt-controller/mvebu-icu.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

ethernet@f0000 {
    #address-cells = <1>;
    #size-cells = <0>;
    compatible = "marvell,armada-375-pp2";
    reg = <0xf0000 0xa000>,
          <0xc0000 0x3060>,
          <0xc4000 0x100>,
          <0xc5000 0x100>;
    clocks = <&gateclk 3>, <&gateclk 19>;
    clock-names = "pp_clk", "gop_clk";

    ethernet-port@0 {
        interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
        reg = <0>;
        port-id = <0>; /* For backward compatibility. */
        phy = <&phy0>;
        phy-mode = "rgmii-id";
    };

    ethernet-port@1 {
        interrupts = <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
        reg = <1>;
        port-id = <1>; /* For backward compatibility. */
        phy = <&phy3>;
        phy-mode = "gmii";
    };
};
// For Armada 7k/8k and Cn913x variants
#include <dt-bindings/interrupt-controller/mvebu-icu.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>

ethernet@0 {
    #address-cells = <1>;
    #size-cells = <0>;
    compatible = "marvell,armada-7k-pp22";
    reg = <0x0 0x100000>, <0x129000 0xb000>, <0x220000 0x800>;
    clocks = <&cp0_clk 1 3>, <&cp0_clk 1 9>,
             <&cp0_clk 1 5>, <&cp0_clk 1 6>, <&cp0_clk 1 18>;
    clock-names = "pp_clk", "gop_clk", "mg_clk", "mg_core_clk", "axi_clk";
    marvell,system-controller = <&cp0_syscon0>;

    ethernet-port@0 {
        interrupts = <ICU_GRP_NSR 39 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 43 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 47 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 51 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 55 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 59 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 63 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 67 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 71 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 129 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "hif0", "hif1", "hif2", "hif3", "hif4",
                          "hif5", "hif6", "hif7", "hif8", "link";
        phy-mode = "10gbase-r";
        phys = <&cp0_comphy4 0>;
        reg = <0>;
        port-id = <0>; /* For backward compatibility. */
        gop-port-id = <0>;
    };

    ethernet-port@1 {
        interrupts = <ICU_GRP_NSR 40 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 44 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 48 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 52 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 56 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 60 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 64 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 68 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 72 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 128 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "hif0", "hif1", "hif2", "hif3", "hif4",
                          "hif5", "hif6", "hif7", "hif8", "link";
        phy-mode = "rgmii-id";
        reg = <1>;
        port-id = <1>; /* For backward compatibility. */
        gop-port-id = <2>;
    };

    ethernet-port@2 {
        interrupts = <ICU_GRP_NSR 41 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 45 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 49 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 53 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 57 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 61 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 65 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 69 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 73 IRQ_TYPE_LEVEL_HIGH>,
                     <ICU_GRP_NSR 127 IRQ_TYPE_LEVEL_HIGH>;
        interrupt-names = "hif0", "hif1", "hif2", "hif3", "hif4",
                          "hif5", "hif6", "hif7", "hif8", "link";
        phy-mode = "2500base-x";
        managed = "in-band-status";
        phys = <&cp0_comphy5 2>;
        sfp = <&sfp_eth3>;
        reg = <2>;
        port-id = <2>; /* For backward compatibility. */
        gop-port-id = <3>;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)

Edit this page