TI SoC Ethernet Switch Controller (CPSW)
Schema identifier ($id): "http://devicetree.org/schemas/net/ti,cpsw-switch.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Siddharth Vadapalli <s-vadapalli@ti.com>", "Roger Quadros <rogerq@kernel.org>"
The 3-port switch gigabit ethernet subsystem provides ethernet packet communication and can be configured as an ethernet switch. It provides the gigabit media independent interface (GMII),reduced gigabit media independent interface (RGMII), reduced media independent interface (RMII), the management data input output (MDIO) for physical layer device (PHY) management.
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Exact value (
const):"ti,cpsw-switch"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"ti,am335x-cpsw-switch"Item 2
Exact value (
const):"ti,cpsw-switch"
Rule 3
Array item rules (
items)Item 1
Exact value (
const):"ti,am4372-cpsw-switch"Item 2
Exact value (
const):"ti,cpsw-switch"
Rule 4
Array item rules (
items)Item 1
Exact value (
const):"ti,dra7-cpsw-switch"Item 2
Exact value (
const):"ti,cpsw-switch"
reg — required here #
Maximum number of items (maxItems): 1
The physical base address and size of full the CPSW module IO range
#address-cells — required here #
Exact value (const): 1
#size-cells — required here #
Exact value (const): 1
ranges — required here #
true — No constraints added by this property rule.
clocks — required here #
Maximum number of items (maxItems): 1
CPSW functional clock
clock-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"fck"
interrupts — required here #
Array item rules (items) #
Item 1
RX_THRESH interrupt
Item 2
RX interrupt
Item 3
TX interrupt
Item 4
MISC interrupt
interrupt-names — required here #
Array item rules (items) #
Item 1
Exact value (
const):"rx_thresh"
Item 2
Exact value (
const):"rx"
Item 3
Exact value (
const):"tx"
Item 4
Exact value (
const):"misc"
pinctrl-names — not listed as required here #
true — No constraints added by this property rule.
syscon — not listed as required here #
Shared schema rule ($ref): /schemas/types.yaml#/definitions/phandle
Phandle to the system control device node which provides access to efuse IO range with MAC addresses
ethernet-ports — not listed as required here #
Value type (type): "object"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Properties and child nodes (properties) #
#address-cells — not listed as required here
Exact value (const): 1
#size-cells — not listed as required here
Exact value (const): 0
Properties matching a name pattern (patternProperties) #
^port@[12]$ — name matches this regular expression
Value type (type): "object"
CPSW external ports
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
Array item rules (items)
Item 1
CPSW port number
phys — required here
Maximum number of items (maxItems): 1
phandle on phy-gmii-sel PHY
label — not listed as required here
label associated with this port
ti,dual-emac-pvid — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Minimum value (minimum): 1
Maximum value (maximum): 1024
Specifies default PORT VID to be used to segregate ports. Default value - CPSW port number.
Required in this object (required): "reg", "phys"
cpts — not listed as required here #
Value type (type): "object"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
The Common Platform Time Sync (CPTS) module
Properties and child nodes (properties) #
clocks — required here
Maximum number of items (maxItems): 1
CPTS reference clock
clock-names — required here
Array item rules (items)
Item 1
Exact value (
const):"cpts"
cpts_clock_mult — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Numerator to convert input clock ticks into ns
cpts_clock_shift — not listed as required here
Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32
Denominator to convert input clock ticks into ns. Mult and shift will be calculated basing on CPTS rftclk frequency if both cpts_clock_shift and cpts_clock_mult properties are not provided.
Required in this object (required): "clocks", "clock-names"
Properties matching a name pattern (patternProperties) #
^mdio@ — name matches this regular expression #
Value type (type): "object"
CPSW MDIO bus.
Shared schema rule ($ref): ti,davinci-mdio.yaml#
Required in this object (required): "compatible", "reg", "ranges", "clocks", "clock-names", "interrupts", "interrupt-names", "#address-cells", "#size-cells"
Properties not matched by properties or patternProperties in this schema (additionalProperties) #
false
Not allowed by this rule.
Examples (examples) #
#include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
#include <dt-bindings/clock/dra7.h>
mac_sw: switch@0 {
compatible = "ti,dra7-cpsw-switch","ti,cpsw-switch";
reg = <0x0 0x4000>;
ranges = <0 0 0x4000>;
clocks = <&gmac_main_clk>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <1>;
syscon = <&scm_conf>;
interrupts = <GIC_SPI 334 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 335 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 336 IRQ_TYPE_LEVEL_HIGH>,
<GIC_SPI 337 IRQ_TYPE_LEVEL_HIGH>;
interrupt-names = "rx_thresh", "rx", "tx", "misc";
ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
cpsw_port1: port@1 {
reg = <1>;
label = "port1";
mac-address = [ 00 00 00 00 00 00 ];
phys = <&phy_gmii_sel 1>;
phy-handle = <ðphy0_sw>;
phy-mode = "rgmii";
ti,dual-emac-pvid = <1>;
};
cpsw_port2: port@2 {
reg = <2>;
label = "wan";
mac-address = [ 00 00 00 00 00 00 ];
phys = <&phy_gmii_sel 2>;
phy-handle = <ðphy1_sw>;
phy-mode = "rgmii";
ti,dual-emac-pvid = <2>;
};
};
davinci_mdio_sw: mdio@1000 {
compatible = "ti,cpsw-mdio","ti,davinci_mdio";
reg = <0x1000 0x100>;
clocks = <&gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 0>;
clock-names = "fck";
#address-cells = <1>;
#size-cells = <0>;
bus_freq = <1000000>;
ethphy0_sw: ethernet-phy@0 {
reg = <0>;
};
ethphy1_sw: ethernet-phy@1 {
reg = <1>;
};
};
cpts {
clocks = <&gmac_clkctrl DRA7_GMAC_GMAC_CLKCTRL 25>;
clock-names = "cpts";
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)