2015-09-17 09:51:46 +03:00
Hisilicon DSA Fabric device controller
Required properties:
- compatible: should be "hisilicon,hns-dsaf-v1" or "hisilicon,hns-dsaf-v2".
"hisilicon,hns-dsaf-v1" is for hip05.
"hisilicon,hns-dsaf-v2" is for Hi1610 and Hi1612.
- mode: dsa fabric mode string. only support one of dsaf modes like these:
"2port-64vf",
"6port-16rss",
2016-04-23 12:05:15 +03:00
"6port-16vf",
"single-port".
2015-09-17 09:51:46 +03:00
- interrupt-parent: the interrupt parent of this device.
- interrupts: should contain the DSA Fabric and rcb interrupt.
- reg: specifies base physical address(es) and size of the device registers.
2016-04-23 12:05:15 +03:00
The first region is external interface control register base and size(optional,
2016-04-28 10:09:03 +03:00
only used when subctrl-syscon does not exist). It is recommended using
2016-04-23 12:05:15 +03:00
subctrl-syscon rather than this address.
2016-04-28 10:09:03 +03:00
The second region is SerDes base register and size(optional, only used when
serdes-syscon in port node does not exist). It is recommended using
2016-04-23 12:05:15 +03:00
serdes-syscon rather than this address.
2015-09-17 09:51:46 +03:00
The third region is the PPE register base and size.
2016-04-23 12:05:15 +03:00
The fourth region is dsa fabric base register and size. It is not required for
single-port mode.
- reg-names: may be ppe-base and(or) dsaf-base. It is used to find the
corresponding reg's index.
2016-04-28 10:09:03 +03:00
- phy-handle: phy handle of physical port, 0 if not any phy device. It is optional
attribute. If port node exists, phy-handle in each port node will be used.
2016-04-23 12:05:15 +03:00
see ethernet.txt [1].
- subctrl-syscon: is syscon handle for external interface control register.
- reset-field-offset: is offset of reset field. Its value depends on the hardware
user manual.
2015-09-17 09:51:46 +03:00
- buf-size: rx buffer size, should be 16-1024.
- desc-num: number of description in TX and RX queue, should be 512, 1024, 2048 or 4096.
2016-04-23 12:05:15 +03:00
- port: subnodes of dsaf. A dsaf node may contain several port nodes(Depending
on mode of dsaf). Port node contain some attributes listed below:
2016-04-28 10:09:03 +03:00
- reg: is physical port index in one dsaf.
- phy-handle: phy handle of physical port. It is not required if there isn't
2016-04-23 12:05:15 +03:00
phy device. see ethernet.txt [1].
- serdes-syscon: is syscon handle for SerDes register.
2016-04-28 10:09:03 +03:00
- cpld-syscon: is syscon handle + register offset pair for cpld register. It is
not required if there isn't cpld device.
2016-04-23 12:05:15 +03:00
- port-rst-offset: is offset of reset field for each port in dsaf. Its value
depends on the hardware user manual.
- port-mode-offset: is offset of port mode field for each port in dsaf. Its
value depends on the hardware user manual.
2016-11-09 21:13:45 +03:00
- mc-mac-mask: mask of multicast address, determines bit in multicast address
to set:
1 stands for this bit will be precisely matched, TCAM will check this bit of
MAC address.
0 stands for this bit will be fuzzy matched, TCAM won't care about this bit
of MAC address.
2016-04-23 12:05:15 +03:00
2015-09-17 09:51:46 +03:00
[1] Documentation/devicetree/bindings/net/phy.txt
Example:
2016-01-20 11:00:19 +03:00
dsaf0: dsa@c7000000 {
2015-09-17 09:51:46 +03:00
compatible = "hisilicon,hns-dsaf-v1";
mode = "6port-16rss";
interrupt-parent = <&mbigen_dsa>;
2016-04-23 12:05:15 +03:00
reg = <0x0 0xc5000000 0x0 0x890000
2015-09-17 09:51:46 +03:00
0x0 0xc7000000 0x0 0x60000>;
2016-04-23 12:05:15 +03:00
reg-names = "ppe-base", "dsaf-base";
subctrl-syscon = <&subctrl>;
reset-field-offset = 0;
2015-09-17 09:51:46 +03:00
interrupts = <131 4>,<132 4>, <133 4>,<134 4>,
<135 4>,<136 4>, <137 4>,<138 4>,
<139 4>,<140 4>, <141 4>,<142 4>,
<143 4>,<144 4>, <145 4>,<146 4>,
<147 4>,<148 4>, <384 1>,<385 1>,
<386 1>,<387 1>, <388 1>,<389 1>,
<390 1>,<391 1>,
buf-size = <4096>;
desc-num = <1024>;
dma-coherent;
2016-04-23 12:05:15 +03:00
2016-04-28 10:09:03 +03:00
port@0 {
reg = 0;
2016-04-23 12:05:15 +03:00
phy-handle = <&phy0>;
serdes-syscon = <&serdes>;
2016-11-09 21:13:45 +03:00
mc-mac-mask = [ff f0 00 00 00 00];
2016-04-23 12:05:15 +03:00
};
2016-04-28 10:09:03 +03:00
port@1 {
reg = 1;
2016-04-23 12:05:15 +03:00
serdes-syscon = <&serdes>;
2016-11-09 21:13:45 +03:00
mc-mac-mask = [ff f0 00 00 00 00];
2016-04-23 12:05:15 +03:00
};
2015-09-17 09:51:46 +03:00
};