qcom,qca807x.yaml 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/qcom,qca807x.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Qualcomm QCA807x Ethernet PHY
  7. maintainers:
  8. - Christian Marangi <ansuelsmth@gmail.com>
  9. - Robert Marko <robert.marko@sartura.hr>
  10. description: |
  11. Qualcomm QCA8072/5 Ethernet PHY is PHY package of 2 or 5
  12. IEEE 802.3 clause 22 compliant 10BASE-Te, 100BASE-TX and
  13. 1000BASE-T PHY-s.
  14. They feature 2 SerDes, one for PSGMII or QSGMII connection with
  15. MAC, while second one is SGMII for connection to MAC or fiber.
  16. Both models have a combo port that supports 1000BASE-X and
  17. 100BASE-FX fiber.
  18. Each PHY inside of QCA807x series has 4 digitally controlled
  19. output only pins that natively drive LED-s for up to 2 attached
  20. LEDs. Some vendor also use these 4 output for GPIO usage without
  21. attaching LEDs.
  22. Note that output pins can be set to drive LEDs OR GPIO, mixed
  23. definition are not accepted.
  24. $ref: ethernet-phy-package.yaml#
  25. properties:
  26. compatible:
  27. enum:
  28. - qcom,qca8072-package
  29. - qcom,qca8075-package
  30. qcom,package-mode:
  31. description: |
  32. PHY package can be configured in 3 mode following this table:
  33. First Serdes mode Second Serdes mode
  34. Option 1 PSGMII for copper Disabled
  35. ports 0-4
  36. Option 2 PSGMII for copper 1000BASE-X / 100BASE-FX
  37. ports 0-4
  38. Option 3 QSGMII for copper SGMII for
  39. ports 0-3 copper port 4
  40. PSGMII mode (option 1 or 2) is configured dynamically based on
  41. the presence of a connected SFP device.
  42. $ref: /schemas/types.yaml#/definitions/string
  43. enum:
  44. - qsgmii
  45. - psgmii
  46. default: psgmii
  47. qcom,tx-drive-strength-milliwatt:
  48. description: set the TX Amplifier value in mv.
  49. $ref: /schemas/types.yaml#/definitions/uint32
  50. enum: [140, 160, 180, 200, 220,
  51. 240, 260, 280, 300, 320,
  52. 400, 500, 600]
  53. default: 600
  54. patternProperties:
  55. ^ethernet-phy@[a-f0-9]+$:
  56. $ref: ethernet-phy.yaml#
  57. properties:
  58. qcom,dac-full-amplitude:
  59. description:
  60. Set Analog MDI driver amplitude to FULL.
  61. With this not defined, amplitude is set to DSP.
  62. (amplitude is adjusted based on cable length)
  63. With this enabled and qcom,dac-full-bias-current
  64. and qcom,dac-disable-bias-current-tweak disabled,
  65. bias current is half.
  66. type: boolean
  67. qcom,dac-full-bias-current:
  68. description:
  69. Set Analog MDI driver bias current to FULL.
  70. With this not defined, bias current is set to DSP.
  71. (bias current is adjusted based on cable length)
  72. Actual bias current might be different with
  73. qcom,dac-disable-bias-current-tweak disabled.
  74. type: boolean
  75. qcom,dac-disable-bias-current-tweak:
  76. description: |
  77. Set Analog MDI driver bias current to disable tweak
  78. to bias current.
  79. With this not defined, bias current tweak are enabled
  80. by default.
  81. With this enabled the following tweak are NOT applied:
  82. - With both FULL amplitude and FULL bias current: bias current
  83. is set to half.
  84. - With only DSP amplitude: bias current is set to half and
  85. is set to 1/4 with cable < 10m.
  86. - With DSP bias current (included both DSP amplitude and
  87. DSP bias current): bias current is half the detected current
  88. with cable < 10m.
  89. type: boolean
  90. gpio-controller: true
  91. '#gpio-cells':
  92. const: 2
  93. if:
  94. required:
  95. - gpio-controller
  96. then:
  97. properties:
  98. leds: false
  99. unevaluatedProperties: false
  100. required:
  101. - compatible
  102. unevaluatedProperties: false
  103. examples:
  104. - |
  105. #include <dt-bindings/leds/common.h>
  106. mdio {
  107. #address-cells = <1>;
  108. #size-cells = <0>;
  109. ethernet-phy-package@0 {
  110. #address-cells = <1>;
  111. #size-cells = <0>;
  112. compatible = "qcom,qca8075-package";
  113. reg = <0>;
  114. qcom,package-mode = "qsgmii";
  115. ethernet-phy@0 {
  116. reg = <0>;
  117. leds {
  118. #address-cells = <1>;
  119. #size-cells = <0>;
  120. led@0 {
  121. reg = <0>;
  122. color = <LED_COLOR_ID_GREEN>;
  123. function = LED_FUNCTION_LAN;
  124. default-state = "keep";
  125. };
  126. };
  127. };
  128. ethernet-phy@1 {
  129. reg = <1>;
  130. };
  131. ethernet-phy@2 {
  132. reg = <2>;
  133. gpio-controller;
  134. #gpio-cells = <2>;
  135. };
  136. ethernet-phy@3 {
  137. reg = <3>;
  138. };
  139. ethernet-phy@4 {
  140. reg = <4>;
  141. };
  142. };
  143. };