]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/blame - Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt
Merge tag 'x86_urgent_for_v5.13_rc3' of git://git.kernel.org/pub/scm/linux/kernel...
[mirror_ubuntu-jammy-kernel.git] / Documentation / devicetree / bindings / net / hisilicon-hns-dsaf.txt
CommitLineData
fc7e37c6 1Hisilicon DSA Fabric device controller
2
3Required properties:
4- compatible: should be "hisilicon,hns-dsaf-v1" or "hisilicon,hns-dsaf-v2".
5 "hisilicon,hns-dsaf-v1" is for hip05.
6 "hisilicon,hns-dsaf-v2" is for Hi1610 and Hi1612.
fc7e37c6 7- mode: dsa fabric mode string. only support one of dsaf modes like these:
8 "2port-64vf",
9 "6port-16rss",
2fc695a1
YZZ
10 "6port-16vf",
11 "single-port".
fc7e37c6 12- interrupts: should contain the DSA Fabric and rcb interrupt.
13- reg: specifies base physical address(es) and size of the device registers.
2fc695a1 14 The first region is external interface control register base and size(optional,
a1ecde2c 15 only used when subctrl-syscon does not exist). It is recommended using
2fc695a1 16 subctrl-syscon rather than this address.
a1ecde2c
YZZ
17 The second region is SerDes base register and size(optional, only used when
18 serdes-syscon in port node does not exist). It is recommended using
2fc695a1 19 serdes-syscon rather than this address.
fc7e37c6 20 The third region is the PPE register base and size.
2fc695a1
YZZ
21 The fourth region is dsa fabric base register and size. It is not required for
22 single-port mode.
23- reg-names: may be ppe-base and(or) dsaf-base. It is used to find the
24 corresponding reg's index.
25
a1ecde2c
YZZ
26- phy-handle: phy handle of physical port, 0 if not any phy device. It is optional
27 attribute. If port node exists, phy-handle in each port node will be used.
2fc695a1
YZZ
28 see ethernet.txt [1].
29- subctrl-syscon: is syscon handle for external interface control register.
30- reset-field-offset: is offset of reset field. Its value depends on the hardware
31 user manual.
fc7e37c6 32- buf-size: rx buffer size, should be 16-1024.
33- desc-num: number of description in TX and RX queue, should be 512, 1024, 2048 or 4096.
34
2fc695a1
YZZ
35- port: subnodes of dsaf. A dsaf node may contain several port nodes(Depending
36 on mode of dsaf). Port node contain some attributes listed below:
a1ecde2c
YZZ
37- reg: is physical port index in one dsaf.
38- phy-handle: phy handle of physical port. It is not required if there isn't
2fc695a1
YZZ
39 phy device. see ethernet.txt [1].
40- serdes-syscon: is syscon handle for SerDes register.
a1ecde2c
YZZ
41- cpld-syscon: is syscon handle + register offset pair for cpld register. It is
42 not required if there isn't cpld device.
2fc695a1
YZZ
43- port-rst-offset: is offset of reset field for each port in dsaf. Its value
44 depends on the hardware user manual.
45- port-mode-offset: is offset of port mode field for each port in dsaf. Its
46 value depends on the hardware user manual.
edd9a298
KY
47- mc-mac-mask: mask of multicast address, determines bit in multicast address
48 to set:
49 1 stands for this bit will be precisely matched, TCAM will check this bit of
50 MAC address.
51 0 stands for this bit will be fuzzy matched, TCAM won't care about this bit
52 of MAC address.
2fc695a1 53
fc7e37c6 54[1] Documentation/devicetree/bindings/net/phy.txt
55
56Example:
57
48189d6a 58dsaf0: dsa@c7000000 {
fc7e37c6 59 compatible = "hisilicon,hns-dsaf-v1";
fc7e37c6 60 mode = "6port-16rss";
61 interrupt-parent = <&mbigen_dsa>;
2fc695a1 62 reg = <0x0 0xc5000000 0x0 0x890000
fc7e37c6 63 0x0 0xc7000000 0x0 0x60000>;
2fc695a1
YZZ
64 reg-names = "ppe-base", "dsaf-base";
65 subctrl-syscon = <&subctrl>;
66 reset-field-offset = 0;
fc7e37c6 67 interrupts = <131 4>,<132 4>, <133 4>,<134 4>,
68 <135 4>,<136 4>, <137 4>,<138 4>,
69 <139 4>,<140 4>, <141 4>,<142 4>,
70 <143 4>,<144 4>, <145 4>,<146 4>,
71 <147 4>,<148 4>, <384 1>,<385 1>,
72 <386 1>,<387 1>, <388 1>,<389 1>,
73 <390 1>,<391 1>,
74 buf-size = <4096>;
75 desc-num = <1024>;
76 dma-coherent;
2fc695a1 77
a1ecde2c
YZZ
78 port@0 {
79 reg = 0;
2fc695a1
YZZ
80 phy-handle = <&phy0>;
81 serdes-syscon = <&serdes>;
edd9a298 82 mc-mac-mask = [ff f0 00 00 00 00];
2fc695a1
YZZ
83 };
84
a1ecde2c
YZZ
85 port@1 {
86 reg = 1;
2fc695a1 87 serdes-syscon = <&serdes>;
edd9a298 88 mc-mac-mask = [ff f0 00 00 00 00];
2fc695a1 89 };
fc7e37c6 90};