Skip to content

Commit 39d1038

Browse files
miquelraynalPaolo Abeni
authored andcommitted
dt-bindings: net: marvell,prestera: Describe PCI devices of the prestera family
Even though the devices have very little in common beside the name and the main "switch" feature, Marvell Prestera switch family is also composed of PCI-only devices which can receive additional static properties, like nvmem cells to point at MAC addresses, for instance. Let's describe them. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Paolo Abeni <pabeni@redhat.com>
1 parent a429ab0 commit 39d1038

File tree

1 file changed

+54
-8
lines changed

1 file changed

+54
-8
lines changed

Documentation/devicetree/bindings/net/marvell,prestera.yaml

Lines changed: 54 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -4,19 +4,24 @@
44
$id: http://devicetree.org/schemas/net/marvell,prestera.yaml#
55
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

7-
title: Marvell Prestera AlleyCat3 switch
7+
title: Marvell Prestera switch family
88

99
maintainers:
1010
- Miquel Raynal <miquel.raynal@bootlin.com>
1111

1212
properties:
1313
compatible:
14-
items:
14+
oneOf:
15+
- items:
16+
- enum:
17+
- marvell,prestera-98dx3236
18+
- marvell,prestera-98dx3336
19+
- marvell,prestera-98dx4251
20+
- const: marvell,prestera
1521
- enum:
16-
- marvell,prestera-98dx3236
17-
- marvell,prestera-98dx3336
18-
- marvell,prestera-98dx4251
19-
- const: marvell,prestera
22+
- pci11ab,c804
23+
- pci11ab,c80c
24+
- pci11ab,cc1e
2025

2126
reg:
2227
maxItems: 1
@@ -28,12 +33,37 @@ properties:
2833
description: Reference to the DFX Server bus node.
2934
$ref: /schemas/types.yaml#/definitions/phandle
3035

36+
nvmem-cells: true
37+
38+
nvmem-cell-names: true
39+
40+
if:
41+
properties:
42+
compatible:
43+
contains:
44+
const: marvell,prestera
45+
46+
# Memory mapped AlleyCat3 family
47+
then:
48+
properties:
49+
nvmem-cells: false
50+
nvmem-cell-names: false
51+
required:
52+
- interrupts
53+
54+
# PCI Aldrin family
55+
else:
56+
properties:
57+
interrupts: false
58+
dfx: false
59+
3160
required:
3261
- compatible
3362
- reg
34-
- interrupts
3563

36-
additionalProperties: false
64+
# Ports can also be described
65+
additionalProperties:
66+
type: object
3767

3868
examples:
3969
- |
@@ -43,3 +73,19 @@ examples:
4373
interrupts = <33>, <34>, <35>;
4474
dfx = <&dfx>;
4575
};
76+
77+
- |
78+
pcie@0 {
79+
#address-cells = <3>;
80+
#size-cells = <2>;
81+
ranges = <0x0 0x0 0x0 0x0 0x0 0x0>;
82+
reg = <0x0 0x0 0x0 0x0 0x0 0x0>;
83+
device_type = "pci";
84+
85+
switch@0,0 {
86+
reg = <0x0 0x0 0x0 0x0 0x0>;
87+
compatible = "pci11ab,c80c";
88+
nvmem-cells = <&mac_address 0>;
89+
nvmem-cell-names = "mac-address";
90+
};
91+
};

0 commit comments

Comments
 (0)