2
0

0048-dt-bindings-net-Add-Motorcomm-yt8xxx-ethernet-phy.patch 4.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. From 96edc2f71ea7ac6683011609f6d1f51ae9ea0b7a Mon Sep 17 00:00:00 2001
  2. From: Frank Sae <[email protected]>
  3. Date: Thu, 2 Feb 2023 11:00:33 +0800
  4. Subject: [PATCH 048/122] dt-bindings: net: Add Motorcomm yt8xxx ethernet phy
  5. Add a YAML binding document for the Motorcomm yt8xxx Ethernet phy.
  6. Signed-off-by: Frank Sae <[email protected]>
  7. Reviewed-by: Rob Herring <[email protected]>
  8. Signed-off-by: David S. Miller <[email protected]>
  9. ---
  10. .../bindings/net/motorcomm,yt8xxx.yaml | 117 ++++++++++++++++++
  11. .../devicetree/bindings/vendor-prefixes.yaml | 2 +
  12. 2 files changed, 119 insertions(+)
  13. create mode 100644 Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml
  14. --- /dev/null
  15. +++ b/Documentation/devicetree/bindings/net/motorcomm,yt8xxx.yaml
  16. @@ -0,0 +1,117 @@
  17. +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  18. +%YAML 1.2
  19. +---
  20. +$id: http://devicetree.org/schemas/net/motorcomm,yt8xxx.yaml#
  21. +$schema: http://devicetree.org/meta-schemas/core.yaml#
  22. +
  23. +title: MotorComm yt8xxx Ethernet PHY
  24. +
  25. +maintainers:
  26. + - Frank Sae <[email protected]>
  27. +
  28. +allOf:
  29. + - $ref: ethernet-phy.yaml#
  30. +
  31. +properties:
  32. + compatible:
  33. + enum:
  34. + - ethernet-phy-id4f51.e91a
  35. + - ethernet-phy-id4f51.e91b
  36. +
  37. + rx-internal-delay-ps:
  38. + description: |
  39. + RGMII RX Clock Delay used only when PHY operates in RGMII mode with
  40. + internal delay (phy-mode is 'rgmii-id' or 'rgmii-rxid') in pico-seconds.
  41. + enum: [ 0, 150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500, 1650,
  42. + 1800, 1900, 1950, 2050, 2100, 2200, 2250, 2350, 2500, 2650, 2800,
  43. + 2950, 3100, 3250, 3400, 3550, 3700, 3850, 4000, 4150 ]
  44. + default: 1950
  45. +
  46. + tx-internal-delay-ps:
  47. + description: |
  48. + RGMII TX Clock Delay used only when PHY operates in RGMII mode with
  49. + internal delay (phy-mode is 'rgmii-id' or 'rgmii-txid') in pico-seconds.
  50. + enum: [ 0, 150, 300, 450, 600, 750, 900, 1050, 1200, 1350, 1500, 1650, 1800,
  51. + 1950, 2100, 2250 ]
  52. + default: 1950
  53. +
  54. + motorcomm,clk-out-frequency-hz:
  55. + description: clock output on clock output pin.
  56. + enum: [0, 25000000, 125000000]
  57. + default: 0
  58. +
  59. + motorcomm,keep-pll-enabled:
  60. + description: |
  61. + If set, keep the PLL enabled even if there is no link. Useful if you
  62. + want to use the clock output without an ethernet link.
  63. + type: boolean
  64. +
  65. + motorcomm,auto-sleep-disabled:
  66. + description: |
  67. + If set, PHY will not enter sleep mode and close AFE after unplug cable
  68. + for a timer.
  69. + type: boolean
  70. +
  71. + motorcomm,tx-clk-adj-enabled:
  72. + description: |
  73. + This configuration is mainly to adapt to VF2 with JH7110 SoC.
  74. + Useful if you want to use tx-clk-xxxx-inverted to adj the delay of tx clk.
  75. + type: boolean
  76. +
  77. + motorcomm,tx-clk-10-inverted:
  78. + description: |
  79. + Use original or inverted RGMII Transmit PHY Clock to drive the RGMII
  80. + Transmit PHY Clock delay train configuration when speed is 10Mbps.
  81. + type: boolean
  82. +
  83. + motorcomm,tx-clk-100-inverted:
  84. + description: |
  85. + Use original or inverted RGMII Transmit PHY Clock to drive the RGMII
  86. + Transmit PHY Clock delay train configuration when speed is 100Mbps.
  87. + type: boolean
  88. +
  89. + motorcomm,tx-clk-1000-inverted:
  90. + description: |
  91. + Use original or inverted RGMII Transmit PHY Clock to drive the RGMII
  92. + Transmit PHY Clock delay train configuration when speed is 1000Mbps.
  93. + type: boolean
  94. +
  95. +unevaluatedProperties: false
  96. +
  97. +examples:
  98. + - |
  99. + mdio {
  100. + #address-cells = <1>;
  101. + #size-cells = <0>;
  102. + phy-mode = "rgmii-id";
  103. + ethernet-phy@4 {
  104. + /* Only needed to make DT lint tools work. Do not copy/paste
  105. + * into real DTS files.
  106. + */
  107. + compatible = "ethernet-phy-id4f51.e91a";
  108. +
  109. + reg = <4>;
  110. + rx-internal-delay-ps = <2100>;
  111. + tx-internal-delay-ps = <150>;
  112. + motorcomm,clk-out-frequency-hz = <0>;
  113. + motorcomm,keep-pll-enabled;
  114. + motorcomm,auto-sleep-disabled;
  115. + };
  116. + };
  117. + - |
  118. + mdio {
  119. + #address-cells = <1>;
  120. + #size-cells = <0>;
  121. + phy-mode = "rgmii";
  122. + ethernet-phy@5 {
  123. + /* Only needed to make DT lint tools work. Do not copy/paste
  124. + * into real DTS files.
  125. + */
  126. + compatible = "ethernet-phy-id4f51.e91a";
  127. +
  128. + reg = <5>;
  129. + motorcomm,clk-out-frequency-hz = <125000000>;
  130. + motorcomm,keep-pll-enabled;
  131. + motorcomm,auto-sleep-disabled;
  132. + };
  133. + };
  134. --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
  135. +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
  136. @@ -831,6 +831,8 @@ patternProperties:
  137. description: Moortec Semiconductor Ltd.
  138. "^mosaixtech,.*":
  139. description: Mosaix Technologies, Inc.
  140. + "^motorcomm,.*":
  141. + description: MotorComm, Inc.
  142. "^motorola,.*":
  143. description: Motorola, Inc.
  144. "^moxa,.*":