nxp,s32-dwmac.yaml 3.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118
  1. # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2. # Copyright 2021-2024 NXP
  3. %YAML 1.2
  4. ---
  5. $id: http://devicetree.org/schemas/net/nxp,s32-dwmac.yaml#
  6. $schema: http://devicetree.org/meta-schemas/core.yaml#
  7. title: NXP S32G2xx/S32G3xx/S32R45 GMAC ethernet controller
  8. maintainers:
  9. - Jan Petrous (OSS) <jan.petrous@oss.nxp.com>
  10. description:
  11. This device is a Synopsys DWC IP, integrated on NXP S32G/R SoCs.
  12. The SoC series S32G2xx and S32G3xx feature one DWMAC instance,
  13. the SoC S32R45 has two instances. The devices can use RGMII/RMII/MII
  14. interface over Pinctrl device or the output can be routed
  15. to the embedded SerDes for SGMII connectivity.
  16. properties:
  17. compatible:
  18. oneOf:
  19. - const: nxp,s32g2-dwmac
  20. - items:
  21. - enum:
  22. - nxp,s32g3-dwmac
  23. - nxp,s32r45-dwmac
  24. - const: nxp,s32g2-dwmac
  25. reg:
  26. items:
  27. - description: Main GMAC registers
  28. - description: GMAC PHY mode control register
  29. nxp,phy-sel:
  30. $ref: /schemas/types.yaml#/definitions/phandle-array
  31. items:
  32. - items:
  33. - description: phandle to the GPR syscon node
  34. - description: offset of PHY selection register
  35. description:
  36. This phandle points to the GMAC_0_CTRL_STS register which controls the
  37. GMAC_0 configuration options. The register lets you select the PHY
  38. interface and the PHY mode. It also controls if the FTM_0 or FTM_1
  39. FlexTimer Modules connect to GMAC_0.
  40. interrupts:
  41. maxItems: 1
  42. interrupt-names:
  43. const: macirq
  44. clocks:
  45. items:
  46. - description: Main GMAC clock
  47. - description: Transmit clock
  48. - description: Receive clock
  49. - description: PTP reference clock
  50. clock-names:
  51. items:
  52. - const: stmmaceth
  53. - const: tx
  54. - const: rx
  55. - const: ptp_ref
  56. required:
  57. - clocks
  58. - clock-names
  59. allOf:
  60. - $ref: snps,dwmac.yaml#
  61. unevaluatedProperties: false
  62. examples:
  63. - |
  64. #include <dt-bindings/interrupt-controller/arm-gic.h>
  65. #include <dt-bindings/interrupt-controller/irq.h>
  66. #include <dt-bindings/phy/phy.h>
  67. bus {
  68. #address-cells = <2>;
  69. #size-cells = <2>;
  70. ethernet@4033c000 {
  71. compatible = "nxp,s32g2-dwmac";
  72. reg = <0x0 0x4033c000 0x0 0x2000>, /* gmac IP */
  73. <0x0 0x4007c004 0x0 0x4>; /* GMAC_0_CTRL_STS */
  74. nxp,phy-sel = <&gpr 0x4>;
  75. interrupt-parent = <&gic>;
  76. interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
  77. interrupt-names = "macirq";
  78. snps,mtl-rx-config = <&mtl_rx_setup>;
  79. snps,mtl-tx-config = <&mtl_tx_setup>;
  80. clocks = <&clks 24>, <&clks 17>, <&clks 16>, <&clks 15>;
  81. clock-names = "stmmaceth", "tx", "rx", "ptp_ref";
  82. phy-mode = "rgmii-id";
  83. phy-handle = <&phy0>;
  84. mtl_rx_setup: rx-queues-config {
  85. snps,rx-queues-to-use = <5>;
  86. };
  87. mtl_tx_setup: tx-queues-config {
  88. snps,tx-queues-to-use = <5>;
  89. };
  90. mdio {
  91. #address-cells = <1>;
  92. #size-cells = <0>;
  93. compatible = "snps,dwmac-mdio";
  94. phy0: ethernet-phy@0 {
  95. reg = <0>;
  96. };
  97. };
  98. };
  99. };