xref: /freebsd/sys/contrib/device-tree/Bindings/net/marvell,prestera.txt (revision 6be3386466ab79a84b48429ae66244f21526d3df)
1c66ec88fSEmmanuel VadotMarvell Prestera Switch Chip bindings
2c66ec88fSEmmanuel Vadot-------------------------------------
3c66ec88fSEmmanuel Vadot
4c66ec88fSEmmanuel VadotRequired properties:
5c66ec88fSEmmanuel Vadot- compatible: must be "marvell,prestera" and one of the following
6c66ec88fSEmmanuel Vadot	"marvell,prestera-98dx3236",
7c66ec88fSEmmanuel Vadot	"marvell,prestera-98dx3336",
8c66ec88fSEmmanuel Vadot	"marvell,prestera-98dx4251",
9c66ec88fSEmmanuel Vadot- reg: address and length of the register set for the device.
10c66ec88fSEmmanuel Vadot- interrupts: interrupt for the device
11c66ec88fSEmmanuel Vadot
12c66ec88fSEmmanuel VadotOptional properties:
13c66ec88fSEmmanuel Vadot- dfx: phandle reference to the "DFX Server" node
14c66ec88fSEmmanuel Vadot
15c66ec88fSEmmanuel VadotExample:
16c66ec88fSEmmanuel Vadot
17c66ec88fSEmmanuel Vadotswitch {
18c66ec88fSEmmanuel Vadot	compatible = "simple-bus";
19c66ec88fSEmmanuel Vadot	#address-cells = <1>;
20c66ec88fSEmmanuel Vadot	#size-cells = <1>;
21c66ec88fSEmmanuel Vadot	ranges = <0 MBUS_ID(0x03, 0x00) 0 0x100000>;
22c66ec88fSEmmanuel Vadot
23c66ec88fSEmmanuel Vadot	packet-processor@0 {
24c66ec88fSEmmanuel Vadot		compatible = "marvell,prestera-98dx3236", "marvell,prestera";
25c66ec88fSEmmanuel Vadot		reg = <0 0x4000000>;
26c66ec88fSEmmanuel Vadot		interrupts = <33>, <34>, <35>;
27c66ec88fSEmmanuel Vadot		dfx = <&dfx>;
28c66ec88fSEmmanuel Vadot	};
29c66ec88fSEmmanuel Vadot};
30c66ec88fSEmmanuel Vadot
31c66ec88fSEmmanuel VadotDFX Server bindings
32c66ec88fSEmmanuel Vadot-------------------
33c66ec88fSEmmanuel Vadot
34c66ec88fSEmmanuel VadotRequired properties:
35c66ec88fSEmmanuel Vadot- compatible: must be "marvell,dfx-server", "simple-bus"
36c66ec88fSEmmanuel Vadot- ranges: describes the address mapping of a memory-mapped bus.
37c66ec88fSEmmanuel Vadot- reg: address and length of the register set for the device.
38c66ec88fSEmmanuel Vadot
39c66ec88fSEmmanuel VadotExample:
40c66ec88fSEmmanuel Vadot
41c66ec88fSEmmanuel Vadotdfx-server {
42c66ec88fSEmmanuel Vadot	compatible = "marvell,dfx-server", "simple-bus";
43c66ec88fSEmmanuel Vadot	#address-cells = <1>;
44c66ec88fSEmmanuel Vadot	#size-cells = <1>;
45c66ec88fSEmmanuel Vadot	ranges = <0 MBUS_ID(0x08, 0x00) 0 0x100000>;
46c66ec88fSEmmanuel Vadot	reg = <MBUS_ID(0x08, 0x00) 0 0x100000>;
47c66ec88fSEmmanuel Vadot};
48*6be33864SEmmanuel Vadot
49*6be33864SEmmanuel VadotMarvell Prestera SwitchDev bindings
50*6be33864SEmmanuel Vadot-----------------------------------
51*6be33864SEmmanuel VadotOptional properties:
52*6be33864SEmmanuel Vadot- compatible: must be "marvell,prestera"
53*6be33864SEmmanuel Vadot- base-mac-provider: describes handle to node which provides base mac address,
54*6be33864SEmmanuel Vadot	might be a static base mac address or nvme cell provider.
55*6be33864SEmmanuel Vadot
56*6be33864SEmmanuel VadotExample:
57*6be33864SEmmanuel Vadot
58*6be33864SEmmanuel Vadoteeprom_mac_addr: eeprom-mac-addr {
59*6be33864SEmmanuel Vadot       compatible = "eeprom,mac-addr-cell";
60*6be33864SEmmanuel Vadot       status = "okay";
61*6be33864SEmmanuel Vadot
62*6be33864SEmmanuel Vadot       nvmem = <&eeprom_at24>;
63*6be33864SEmmanuel Vadot};
64*6be33864SEmmanuel Vadot
65*6be33864SEmmanuel Vadotprestera {
66*6be33864SEmmanuel Vadot       compatible = "marvell,prestera";
67*6be33864SEmmanuel Vadot       status = "okay";
68*6be33864SEmmanuel Vadot
69*6be33864SEmmanuel Vadot       base-mac-provider = <&eeprom_mac_addr>;
70*6be33864SEmmanuel Vadot};
71*6be33864SEmmanuel Vadot
72*6be33864SEmmanuel VadotThe current implementation of Prestera Switchdev PCI interface driver requires
73*6be33864SEmmanuel Vadotthat BAR2 is assigned to 0xf6000000 as base address from the PCI IO range:
74*6be33864SEmmanuel Vadot
75*6be33864SEmmanuel Vadot&cp0_pcie0 {
76*6be33864SEmmanuel Vadot	ranges = <0x81000000 0x0 0xfb000000 0x0 0xfb000000 0x0 0xf0000
77*6be33864SEmmanuel Vadot		0x82000000 0x0 0xf6000000 0x0 0xf6000000 0x0 0x2000000
78*6be33864SEmmanuel Vadot		0x82000000 0x0 0xf9000000 0x0 0xf9000000 0x0 0x100000>;
79*6be33864SEmmanuel Vadot	phys = <&cp0_comphy0 0>;
80*6be33864SEmmanuel Vadot	status = "okay";
81*6be33864SEmmanuel Vadot};
82