intel,dwmac-plat.yaml 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. %YAML 1.2
  3. ---
  4. $id: http://devicetree.org/schemas/net/intel,dwmac-plat.yaml#
  5. $schema: http://devicetree.org/meta-schemas/core.yaml#
  6. title: Intel DWMAC glue layer
  7. maintainers:
  8. - Vineetha G. Jaya Kumaran <vineetha.g.jaya.kumaran@intel.com>
  9. select:
  10. properties:
  11. compatible:
  12. contains:
  13. enum:
  14. - intel,keembay-dwmac
  15. required:
  16. - compatible
  17. allOf:
  18. - $ref: snps,dwmac.yaml#
  19. properties:
  20. compatible:
  21. oneOf:
  22. - items:
  23. - enum:
  24. - intel,keembay-dwmac
  25. - const: snps,dwmac-4.10a
  26. clocks:
  27. items:
  28. - description: GMAC main clock
  29. - description: PTP reference clock
  30. - description: Tx clock
  31. clock-names:
  32. items:
  33. - const: stmmaceth
  34. - const: ptp_ref
  35. - const: tx_clk
  36. interrupts:
  37. maxItems: 1
  38. interrupt-names:
  39. const: macirq
  40. required:
  41. - compatible
  42. - clocks
  43. - clock-names
  44. unevaluatedProperties: false
  45. examples:
  46. # FIXME: Remove defines and include the correct header file
  47. # once it is available in mainline.
  48. - |
  49. #include <dt-bindings/interrupt-controller/arm-gic.h>
  50. #include <dt-bindings/interrupt-controller/irq.h>
  51. #define MOVISOC_KMB_PSS_GBE
  52. #define MOVISOC_KMB_PSS_AUX_GBE_PTP
  53. #define MOVISOC_KMB_PSS_AUX_GBE_TX
  54. stmmac_axi_setup: stmmac-axi-config {
  55. snps,lpi_en;
  56. snps,wr_osr_lmt = <0x0>;
  57. snps,rd_osr_lmt = <0x2>;
  58. snps,blen = <0 0 0 0 16 8 4>;
  59. };
  60. mtl_rx_setup: rx-queues-config {
  61. snps,rx-queues-to-use = <2>;
  62. snps,rx-sched-sp;
  63. queue0 {
  64. snps,dcb-algorithm;
  65. snps,map-to-dma-channel = <0x0>;
  66. snps,priority = <0x0>;
  67. };
  68. queue1 {
  69. snps,dcb-algorithm;
  70. snps,map-to-dma-channel = <0x1>;
  71. snps,priority = <0x1>;
  72. };
  73. };
  74. mtl_tx_setup: tx-queues-config {
  75. snps,tx-queues-to-use = <2>;
  76. snps,tx-sched-wrr;
  77. queue0 {
  78. snps,weight = <0x10>;
  79. snps,dcb-algorithm;
  80. snps,priority = <0x0>;
  81. };
  82. queue1 {
  83. snps,weight = <0x10>;
  84. snps,dcb-algorithm;
  85. snps,priority = <0x1>;
  86. };
  87. };
  88. gmac0: ethernet@3a000000 {
  89. compatible = "intel,keembay-dwmac", "snps,dwmac-4.10a";
  90. interrupts = <GIC_SPI 119 IRQ_TYPE_LEVEL_HIGH>;
  91. interrupt-names = "macirq";
  92. reg = <0x3a000000 0x8000>;
  93. snps,perfect-filter-entries = <128>;
  94. phy-handle = <&eth_phy0>;
  95. phy-mode = "rgmii";
  96. rx-fifo-depth = <4096>;
  97. tx-fifo-depth = <4096>;
  98. clock-names = "stmmaceth", "ptp_ref", "tx_clk";
  99. clocks = <&scmi_clk MOVISOC_KMB_PSS_GBE>,
  100. <&scmi_clk MOVISOC_KMB_PSS_AUX_GBE_PTP>,
  101. <&scmi_clk MOVISOC_KMB_PSS_AUX_GBE_TX>;
  102. snps,pbl = <0x4>;
  103. snps,axi-config = <&stmmac_axi_setup>;
  104. snps,mtl-rx-config = <&mtl_rx_setup>;
  105. snps,mtl-tx-config = <&mtl_tx_setup>;
  106. snps,tso;
  107. mdio {
  108. #address-cells = <1>;
  109. #size-cells = <0>;
  110. compatible = "snps,dwmac-mdio";
  111. ethernet-phy@0 {
  112. reg = <0>;
  113. };
  114. };
  115. };
  116. ...