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

Documentation: Bindings: Update DT binding for separating dsaf dev support

Because debug dsaf port was separated from service dsaf port, this patch
updates the related information of DT binding.

Signed-off-by: Yisen Zhuang <yisen.zhuang@huawei.com>
Signed-off-by: David S. Miller <davem@davemloft.net>

authored by

Yisen.Zhuang\(Zhuangyuzeng\) and committed by
David S. Miller
2fc695a1 0d768fc6

+49 -10
+49 -10
Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt
··· 7 7 - mode: dsa fabric mode string. only support one of dsaf modes like these: 8 8 "2port-64vf", 9 9 "6port-16rss", 10 - "6port-16vf". 10 + "6port-16vf", 11 + "single-port". 11 12 - interrupt-parent: the interrupt parent of this device. 12 13 - interrupts: should contain the DSA Fabric and rcb interrupt. 13 14 - reg: specifies base physical address(es) and size of the device registers. 14 - The first region is external interface control register base and size. 15 - The second region is SerDes base register and size. 15 + The first region is external interface control register base and size(optional, 16 + only be used when subctrl-syscon is not exists). It is recommended using 17 + subctrl-syscon rather than this address. 18 + The second region is SerDes base register and size(optional, only be used when 19 + serdes-syscon in port node is not exists. It is recommended using 20 + serdes-syscon rather than this address. 16 21 The third region is the PPE register base and size. 17 - The fourth region is dsa fabric base register and size. 18 - The fifth region is cpld base register and size, it is not required if do not use cpld. 19 - - phy-handle: phy handle of physicl port, 0 if not any phy device. see ethernet.txt [1]. 22 + The fourth region is dsa fabric base register and size. It is not required for 23 + single-port mode. 24 + - reg-names: may be ppe-base and(or) dsaf-base. It is used to find the 25 + corresponding reg's index. 26 + 27 + - phy-handle: phy handle of physicl port, 0 if not any phy device. It is optional 28 + attribute. If port node is exists, phy-handle in each port node will be used. 29 + see ethernet.txt [1]. 30 + - subctrl-syscon: is syscon handle for external interface control register. 31 + - reset-field-offset: is offset of reset field. Its value depends on the hardware 32 + user manual. 20 33 - buf-size: rx buffer size, should be 16-1024. 21 34 - desc-num: number of description in TX and RX queue, should be 512, 1024, 2048 or 4096. 35 + 36 + - port: subnodes of dsaf. A dsaf node may contain several port nodes(Depending 37 + on mode of dsaf). Port node contain some attributes listed below: 38 + - port-id: is physical port index in one dsaf. 39 + - phy-handle: phy handle of physicl port. It is not required if there isn't 40 + phy device. see ethernet.txt [1]. 41 + - serdes-syscon: is syscon handle for SerDes register. 42 + - cpld-syscon: is syscon handle for cpld register. It is not required if there 43 + isn't cpld device. 44 + - cpld-ctrl-reg: is cpld register offset. It is not required if there isn't 45 + cpld-syscon. 46 + - port-rst-offset: is offset of reset field for each port in dsaf. Its value 47 + depends on the hardware user manual. 48 + - port-mode-offset: is offset of port mode field for each port in dsaf. Its 49 + value depends on the hardware user manual. 22 50 23 51 [1] Documentation/devicetree/bindings/net/phy.txt 24 52 ··· 56 28 compatible = "hisilicon,hns-dsaf-v1"; 57 29 mode = "6port-16rss"; 58 30 interrupt-parent = <&mbigen_dsa>; 59 - reg = <0x0 0xC0000000 0x0 0x420000 60 - 0x0 0xC2000000 0x0 0x300000 61 - 0x0 0xc5000000 0x0 0x890000 31 + reg = <0x0 0xc5000000 0x0 0x890000 62 32 0x0 0xc7000000 0x0 0x60000>; 63 - phy-handle = <0 0 0 0 &soc0_phy4 &soc0_phy5 0 0>; 33 + reg-names = "ppe-base", "dsaf-base"; 34 + subctrl-syscon = <&subctrl>; 35 + reset-field-offset = 0; 64 36 interrupts = <131 4>,<132 4>, <133 4>,<134 4>, 65 37 <135 4>,<136 4>, <137 4>,<138 4>, 66 38 <139 4>,<140 4>, <141 4>,<142 4>, ··· 71 43 buf-size = <4096>; 72 44 desc-num = <1024>; 73 45 dma-coherent; 46 + 47 + prot@0 { 48 + port-id = 0; 49 + phy-handle = <&phy0>; 50 + serdes-syscon = <&serdes>; 51 + }; 52 + 53 + prot@1 { 54 + port-id = 1; 55 + serdes-syscon = <&serdes>; 56 + }; 74 57 };