Skip to content

Commit

Permalink
dt-bindings: net: mscc,vsc7514-switch: add dsa binding for the vsc7512
Browse files Browse the repository at this point in the history
The VSC7511, VSC7512, VSC7513 and VSC7514 all have the ability to be
controlled either internally by a memory-mapped CPU, or externally via
interfaces like SPI and PCIe. The internal CPU of the VSC7511 and 7512
don't have the resources to run Linux, so must be controlled via these
external interfaces in a DSA configuration.

Add mscc,vsc7512-switch compatible string to indicate that the chips are
being controlled externally in a DSA configuration.

Signed-off-by: Colin Foster <colin.foster@in-advantage.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
Tested-by: Vladimir Oltean <vladimir.oltean@nxp.com> # regression
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
  • Loading branch information
Colin Foster authored and Jakub Kicinski committed Jan 31, 2023
1 parent fde0b6c commit dd43f5e
Showing 1 changed file with 90 additions and 23 deletions.
113 changes: 90 additions & 23 deletions Documentation/devicetree/bindings/net/mscc,vsc7514-switch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,52 @@ description: |
packets using CPU. Additionally, PTP is supported as well as FDMA for faster
packet extraction/injection.
$ref: ethernet-switch.yaml#
allOf:
- if:
properties:
compatible:
const: mscc,vsc7514-switch
then:
$ref: ethernet-switch.yaml#
required:
- interrupts
- interrupt-names
properties:
reg:
minItems: 21
reg-names:
minItems: 21
ethernet-ports:
patternProperties:
"^port@[0-9a-f]+$":
$ref: ethernet-switch-port.yaml#
unevaluatedProperties: false

- if:
properties:
compatible:
const: mscc,vsc7512-switch
then:
$ref: /schemas/net/dsa/dsa.yaml#
properties:
reg:
maxItems: 20
reg-names:
maxItems: 20
ethernet-ports:
patternProperties:
"^port@[0-9a-f]+$":
$ref: /schemas/net/dsa/dsa-port.yaml#
unevaluatedProperties: false

properties:
compatible:
const: mscc,vsc7514-switch
enum:
- mscc,vsc7512-switch
- mscc,vsc7514-switch

reg:
minItems: 20
items:
- description: system target
- description: rewriter target
Expand All @@ -49,6 +88,7 @@ properties:
- description: fdma target

reg-names:
minItems: 20
items:
- const: sys
- const: rew
Expand Down Expand Up @@ -86,35 +126,16 @@ properties:
- const: xtr
- const: fdma

ethernet-ports:
type: object

properties:
'#address-cells':
const: 1
'#size-cells':
const: 0

additionalProperties: false

patternProperties:
"^port@[0-9a-f]+$":

$ref: ethernet-switch-port.yaml#

unevaluatedProperties: false

required:
- compatible
- reg
- reg-names
- interrupts
- interrupt-names
- ethernet-ports

additionalProperties: false
unevaluatedProperties: false

examples:
# VSC7514 (Switchdev)
- |
switch@1010000 {
compatible = "mscc,vsc7514-switch";
Expand Down Expand Up @@ -162,5 +183,51 @@ examples:
};
};
};
# VSC7512 (DSA)
- |
ethernet-switch@1{
compatible = "mscc,vsc7512-switch";
reg = <0x71010000 0x10000>,
<0x71030000 0x10000>,
<0x71080000 0x100>,
<0x710e0000 0x10000>,
<0x711e0000 0x100>,
<0x711f0000 0x100>,
<0x71200000 0x100>,
<0x71210000 0x100>,
<0x71220000 0x100>,
<0x71230000 0x100>,
<0x71240000 0x100>,
<0x71250000 0x100>,
<0x71260000 0x100>,
<0x71270000 0x100>,
<0x71280000 0x100>,
<0x71800000 0x80000>,
<0x71880000 0x10000>,
<0x71040000 0x10000>,
<0x71050000 0x10000>,
<0x71060000 0x10000>;
reg-names = "sys", "rew", "qs", "ptp", "port0", "port1",
"port2", "port3", "port4", "port5", "port6",
"port7", "port8", "port9", "port10", "qsys",
"ana", "s0", "s1", "s2";
ethernet-ports {
#address-cells = <1>;
#size-cells = <0>;
port@0 {
reg = <0>;
ethernet = <&mac_sw>;
phy-handle = <&phy0>;
phy-mode = "internal";
};
port@1 {
reg = <1>;
phy-handle = <&phy1>;
phy-mode = "internal";
};
};
};
...

0 comments on commit dd43f5e

Please sign in to comment.