hisilicon-hns-nic.txt 2.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. Hisilicon Network Subsystem NIC controller
  2. Required properties:
  3. - compatible: "hisilicon,hns-nic-v1" or "hisilicon,hns-nic-v2".
  4. "hisilicon,hns-nic-v1" is for hip05.
  5. "hisilicon,hns-nic-v2" is for Hi1610 and Hi1612.
  6. - ae-handle: accelerator engine handle for hns,
  7. specifies a reference to the associating hardware driver node.
  8. see Documentation/devicetree/bindings/net/hisilicon-hns-dsaf.txt
  9. - port-id: is the index of port provided by DSAF (the accelerator). DSAF can
  10. connect to 8 PHYs. Port 0 to 1 are both used for administration purpose. They
  11. are called debug ports.
  12. The remaining 6 PHYs are taken according to the mode of DSAF.
  13. In NIC mode of DSAF, all 6 PHYs are taken as ethernet ports to the CPU. The
  14. port-id can be 2 to 7. Here is the diagram:
  15. +-----+---------------+
  16. | CPU |
  17. +-+-+-+---+-+-+-+-+-+-+
  18. | | | | | | | |
  19. debug service
  20. port port
  21. (0,1) (2-7)
  22. In Switch mode of DSAF, all 6 PHYs are taken as physical ports connect to a
  23. LAN Switch while the CPU side assume itself have one single NIC connect to
  24. this switch. In this case, the port-id will be 2 only.
  25. +-----+---------------+
  26. | CPU |
  27. +-+-+-+---+-+-+-+-+-+-+
  28. | | service| port(2)
  29. debug +------------+
  30. port | switch |
  31. (0,1) +-+-+-+-+-+-++
  32. | | | | | |
  33. external port
  34. This attribute is remained for compatible purpose. It is not recommended to
  35. use it in new code.
  36. - port-idx-in-ae: is the index of port provided by AE.
  37. In NIC mode of DSAF, all 6 PHYs of service DSAF are taken as ethernet ports
  38. to the CPU. The port-idx-in-ae can be 0 to 5. Here is the diagram:
  39. +-----+---------------+
  40. | CPU |
  41. +-+-+-+---+-+-+-+-+-+-+
  42. | | | | | | | |
  43. debug debug service
  44. port port port
  45. (0) (0) (0-5)
  46. In Switch mode of DSAF, all 6 PHYs of service DSAF are taken as physical
  47. ports connected to a LAN Switch while the CPU side assume itself have one
  48. single NIC connected to this switch. In this case, the port-idx-in-ae
  49. will be 0 only.
  50. +-----+-----+------+------+
  51. | CPU |
  52. +-+-+-+-+-+-+-+-+-+-+-+-+-+
  53. | | service| port(0)
  54. debug debug +------------+
  55. port port | switch |
  56. (0) (0) +-+-+-+-+-+-++
  57. | | | | | |
  58. external port
  59. - local-mac-address: mac addr of the ethernet interface
  60. Example:
  61. ethernet@0{
  62. compatible = "hisilicon,hns-nic-v1";
  63. ae-handle = <&dsaf0>;
  64. port-idx-in-ae = <0>;
  65. local-mac-address = [a2 14 e4 4b 56 76];
  66. };