mscc-phy-vsc8531.yaml 3.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/mscc-phy-vsc8531.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Microsemi VSC8531 Gigabit Ethernet PHY
  7. maintainers:
  8. - Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>
  9. description:
  10. The VSC8531 is a Gigabit Ethernet PHY with configurable MAC interface
  11. drive strength and LED modes.
  12. allOf:
  13. - $ref: ethernet-phy.yaml#
  14. select:
  15. properties:
  16. compatible:
  17. contains:
  18. enum:
  19. - ethernet-phy-id0007.0570 # VSC8531
  20. - ethernet-phy-id0007.0772 # VSC8541
  21. required:
  22. - compatible
  23. properties:
  24. compatible:
  25. items:
  26. - enum:
  27. - ethernet-phy-id0007.0570 # VSC8531
  28. - ethernet-phy-id0007.0772 # VSC8541
  29. - const: ethernet-phy-ieee802.3-c22
  30. vsc8531,vddmac:
  31. $ref: /schemas/types.yaml#/definitions/uint32
  32. description:
  33. The VDDMAC voltage in millivolts. This property is used in combination
  34. with the edge-slowdown property to control the drive strength of the
  35. MAC interface output signals.
  36. enum: [3300, 2500, 1800, 1500]
  37. default: 3300
  38. vsc8531,edge-slowdown:
  39. $ref: /schemas/types.yaml#/definitions/uint32
  40. description: >
  41. Percentage by which the edge rate should be slowed down relative to
  42. the fastest possible edge time. This setting helps reduce electromagnetic
  43. interference (EMI) by adjusting the drive strength of the MAC interface
  44. output signals. Valid values depend on the vddmac voltage setting
  45. according to the edge rate change table in the datasheet.
  46. - When vsc8531,vddmac = 3300 mV: allowed values are 0, 2, 4, 7, 10, 17, 29, and 53.
  47. (Recommended: 7)
  48. - When vsc8531,vddmac = 2500 mV: allowed values are 0, 3, 6, 10, 14, 23, 37, and 63.
  49. (Recommended: 10)
  50. - When vsc8531,vddmac = 1800 mV: allowed values are 0, 5, 9, 16, 23, 35, 52, and 76.
  51. (Recommended: 0)
  52. - When vsc8531,vddmac = 1500 mV: allowed values are 0, 6, 14, 21, 29, 42, 58, and 77.
  53. (Recommended: 0)
  54. enum: [0, 2, 3, 4, 5, 6, 7, 9, 10, 14, 16, 17, 21, 23, 29, 35, 37, 42, 52, 53, 58, 63, 76, 77]
  55. default: 0
  56. vsc8531,led-0-mode:
  57. $ref: /schemas/types.yaml#/definitions/uint32
  58. description: LED[0] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
  59. for available modes.
  60. minimum: 0
  61. maximum: 15
  62. default: 1
  63. vsc8531,led-1-mode:
  64. $ref: /schemas/types.yaml#/definitions/uint32
  65. description: LED[1] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
  66. for available modes.
  67. minimum: 0
  68. maximum: 15
  69. default: 2
  70. vsc8531,led-2-mode:
  71. $ref: /schemas/types.yaml#/definitions/uint32
  72. description: LED[2] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
  73. for available modes.
  74. minimum: 0
  75. maximum: 15
  76. default: 0
  77. vsc8531,led-3-mode:
  78. $ref: /schemas/types.yaml#/definitions/uint32
  79. description: LED[3] behavior mode. See include/dt-bindings/net/mscc-phy-vsc8531.h
  80. for available modes.
  81. minimum: 0
  82. maximum: 15
  83. default: 8
  84. load-save-gpios:
  85. description: GPIO phandle used for the load/save operation of the PTP hardware
  86. clock (PHC).
  87. maxItems: 1
  88. dependencies:
  89. vsc8531,edge-slowdown:
  90. - vsc8531,vddmac
  91. required:
  92. - compatible
  93. - reg
  94. unevaluatedProperties: false
  95. examples:
  96. - |
  97. #include <dt-bindings/gpio/gpio.h>
  98. #include <dt-bindings/net/mscc-phy-vsc8531.h>
  99. mdio {
  100. #address-cells = <1>;
  101. #size-cells = <0>;
  102. ethernet-phy@0 {
  103. compatible = "ethernet-phy-id0007.0772", "ethernet-phy-ieee802.3-c22";
  104. reg = <0>;
  105. vsc8531,vddmac = <3300>;
  106. vsc8531,edge-slowdown = <7>;
  107. vsc8531,led-0-mode = <VSC8531_LINK_1000_ACTIVITY>;
  108. vsc8531,led-1-mode = <VSC8531_LINK_100_ACTIVITY>;
  109. load-save-gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
  110. };
  111. };