Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Miquel Raynal and committed by
Paolo Abeni
39d10386 a429ab01

+54 -8
+54 -8
Documentation/devicetree/bindings/net/marvell,prestera.yaml
··· 4 4 $id: http://devicetree.org/schemas/net/marvell,prestera.yaml# 5 5 $schema: http://devicetree.org/meta-schemas/core.yaml# 6 6 7 - title: Marvell Prestera AlleyCat3 switch 7 + title: Marvell Prestera switch family 8 8 9 9 maintainers: 10 10 - Miquel Raynal <miquel.raynal@bootlin.com> 11 11 12 12 properties: 13 13 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 15 21 - 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 20 25 21 26 reg: 22 27 maxItems: 1 ··· 33 28 description: Reference to the DFX Server bus node. 34 29 $ref: /schemas/types.yaml#/definitions/phandle 35 30 31 + nvmem-cells: true 32 + 33 + nvmem-cell-names: true 34 + 35 + if: 36 + properties: 37 + compatible: 38 + contains: 39 + const: marvell,prestera 40 + 41 + # Memory mapped AlleyCat3 family 42 + then: 43 + properties: 44 + nvmem-cells: false 45 + nvmem-cell-names: false 46 + required: 47 + - interrupts 48 + 49 + # PCI Aldrin family 50 + else: 51 + properties: 52 + interrupts: false 53 + dfx: false 54 + 36 55 required: 37 56 - compatible 38 57 - reg 39 - - interrupts 40 58 41 - additionalProperties: false 59 + # Ports can also be described 60 + additionalProperties: 61 + type: object 42 62 43 63 examples: 44 64 - | ··· 72 42 reg = <0 0x4000000>; 73 43 interrupts = <33>, <34>, <35>; 74 44 dfx = <&dfx>; 45 + }; 46 + 47 + - | 48 + pcie@0 { 49 + #address-cells = <3>; 50 + #size-cells = <2>; 51 + ranges = <0x0 0x0 0x0 0x0 0x0 0x0>; 52 + reg = <0x0 0x0 0x0 0x0 0x0 0x0>; 53 + device_type = "pci"; 54 + 55 + switch@0,0 { 56 + reg = <0x0 0x0 0x0 0x0 0x0>; 57 + compatible = "pci11ab,c80c"; 58 + nvmem-cells = <&mac_address 0>; 59 + nvmem-cell-names = "mac-address"; 60 + }; 75 61 };