mdio.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116
  1. # SPDX-License-Identifier: GPL-2.0
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/mdio.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: MDIO Bus Common Properties
  7. maintainers:
  8. - Andrew Lunn <andrew@lunn.ch>
  9. - Florian Fainelli <f.fainelli@gmail.com>
  10. - Heiner Kallweit <hkallweit1@gmail.com>
  11. description:
  12. These are generic properties that can apply to any MDIO bus. Any
  13. MDIO bus must have a list of child nodes, one per device on the
  14. bus. These should follow the generic ethernet-phy.yaml document, or
  15. a device specific binding document.
  16. properties:
  17. $nodename:
  18. pattern: '^mdio(-(bus|external))?(@.+|-([0-9]+))?$'
  19. "#address-cells":
  20. const: 1
  21. "#size-cells":
  22. const: 0
  23. reset-gpios:
  24. maxItems: 1
  25. description:
  26. The phandle and specifier for the GPIO that controls the RESET
  27. lines of all devices on that MDIO bus.
  28. reset-delay-us:
  29. description:
  30. RESET pulse width in microseconds. It applies to all MDIO devices
  31. and must therefore be appropriately determined based on all devices
  32. requirements (maximum value of all per-device RESET pulse widths).
  33. reset-post-delay-us:
  34. description:
  35. Delay after reset deassert in microseconds. It applies to all MDIO
  36. devices and it's determined by how fast all devices are ready for
  37. communication. This delay happens just before e.g. Ethernet PHY
  38. type ID auto detection.
  39. clock-frequency:
  40. description:
  41. Desired MDIO bus clock frequency in Hz. Values greater than IEEE 802.3
  42. defined 2.5MHz should only be used when all devices on the bus support
  43. the given clock speed.
  44. suppress-preamble:
  45. description:
  46. The 32 bit preamble should be suppressed. In order for this to
  47. work, all devices on the bus must support suppressed preamble.
  48. type: boolean
  49. patternProperties:
  50. '@[0-9a-f]+$':
  51. type: object
  52. properties:
  53. reg:
  54. minimum: 0
  55. maximum: 31
  56. description:
  57. The ID number for the device.
  58. broken-turn-around:
  59. $ref: /schemas/types.yaml#/definitions/flag
  60. description:
  61. If set, indicates the MDIO device does not correctly release
  62. the turn around line low at end of the control phase of the
  63. MDIO transaction.
  64. reset-gpios:
  65. maxItems: 1
  66. description:
  67. The GPIO phandle and specifier for the MDIO reset signal.
  68. reset-assert-us:
  69. description:
  70. Delay after the reset was asserted in microseconds. If this
  71. property is missing the delay will be skipped.
  72. reset-deassert-us:
  73. description:
  74. Delay after the reset was deasserted in microseconds. If
  75. this property is missing the delay will be skipped.
  76. required:
  77. - reg
  78. additionalProperties: true
  79. examples:
  80. - |
  81. davinci_mdio: mdio@5c030000 {
  82. reg = <0x5c030000 0x1000>;
  83. #address-cells = <1>;
  84. #size-cells = <0>;
  85. reset-gpios = <&gpio2 5 1>;
  86. reset-delay-us = <2>;
  87. ethphy0: ethernet-phy@1 {
  88. reg = <1>;
  89. };
  90. ethphy1: ethernet-phy@3 {
  91. reg = <3>;
  92. };
  93. };