lan966x_pci.dtso 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2022 Microchip UNG
  4. */
  5. #include <dt-bindings/clock/microchip,lan966x.h>
  6. #include <dt-bindings/gpio/gpio.h>
  7. #include <dt-bindings/interrupt-controller/irq.h>
  8. #include <dt-bindings/mfd/atmel-flexcom.h>
  9. #include <dt-bindings/phy/phy-lan966x-serdes.h>
  10. /dts-v1/;
  11. /plugin/;
  12. / {
  13. fragment@0 {
  14. target-path = "";
  15. /*
  16. * These properties allow to avoid a dtc warnings.
  17. * The real interrupt controller is the PCI device itself. It
  18. * is the node on which the device tree overlay will be applied.
  19. * This node has those properties.
  20. */
  21. #interrupt-cells = <1>;
  22. interrupt-controller;
  23. __overlay__ {
  24. #address-cells = <3>;
  25. #size-cells = <2>;
  26. cpu_clk: clock-600000000 {
  27. compatible = "fixed-clock";
  28. #clock-cells = <0>;
  29. clock-frequency = <600000000>; /* CPU clock = 600MHz */
  30. };
  31. ddr_clk: clock-30000000 {
  32. compatible = "fixed-clock";
  33. #clock-cells = <0>;
  34. clock-frequency = <30000000>; /* Fabric clock = 30MHz */
  35. };
  36. sys_clk: clock-15625000 {
  37. compatible = "fixed-clock";
  38. #clock-cells = <0>;
  39. clock-frequency = <15625000>; /* System clock = 15.625MHz */
  40. };
  41. pci-ep-bus@0 {
  42. compatible = "simple-bus";
  43. #address-cells = <1>;
  44. #size-cells = <1>;
  45. /*
  46. * map @0xe2000000 (32MB) to BAR0 (CPU)
  47. * map @0xe0000000 (16MB) to BAR1 (AMBA)
  48. */
  49. ranges = <0xe2000000 0x00 0x00 0x00 0x2000000
  50. 0xe0000000 0x01 0x00 0x00 0x1000000>;
  51. oic: oic@e00c0120 {
  52. compatible = "microchip,lan966x-oic";
  53. #interrupt-cells = <2>;
  54. interrupt-controller;
  55. interrupts = <0>; /* PCI INTx assigned interrupt */
  56. reg = <0xe00c0120 0x190>;
  57. };
  58. cpu_ctrl: syscon@e00c0000 {
  59. compatible = "microchip,lan966x-cpu-syscon", "syscon";
  60. reg = <0xe00c0000 0xa8>;
  61. };
  62. reset: reset@e200400c {
  63. compatible = "microchip,lan966x-switch-reset";
  64. reg = <0xe200400c 0x4>, <0xe00c0000 0xa8>;
  65. reg-names = "gcb","cpu";
  66. #reset-cells = <1>;
  67. cpu-syscon = <&cpu_ctrl>;
  68. };
  69. gpio: pinctrl@e2004064 {
  70. compatible = "microchip,lan966x-pinctrl";
  71. reg = <0xe2004064 0xb4>,
  72. <0xe2010024 0x138>;
  73. resets = <&reset 0>;
  74. reset-names = "switch";
  75. gpio-controller;
  76. #gpio-cells = <2>;
  77. gpio-ranges = <&gpio 0 0 78>;
  78. interrupt-parent = <&oic>;
  79. interrupt-controller;
  80. interrupts = <17 IRQ_TYPE_LEVEL_HIGH>;
  81. #interrupt-cells = <2>;
  82. tod_pins: tod_pins {
  83. pins = "GPIO_36";
  84. function = "ptpsync_1";
  85. };
  86. fc0_a_pins: fcb4-i2c-pins {
  87. /* RXD, TXD */
  88. pins = "GPIO_9", "GPIO_10";
  89. function = "fc0_a";
  90. };
  91. };
  92. serdes: serdes@e202c000 {
  93. compatible = "microchip,lan966x-serdes";
  94. reg = <0xe202c000 0x9c>,
  95. <0xe2004010 0x4>;
  96. #phy-cells = <2>;
  97. };
  98. mdio1: mdio@e200413c {
  99. #address-cells = <1>;
  100. #size-cells = <0>;
  101. compatible = "microchip,lan966x-miim";
  102. reg = <0xe200413c 0x24>,
  103. <0xe2010020 0x4>;
  104. resets = <&reset 0>;
  105. reset-names = "switch";
  106. lan966x_phy0: ethernet-lan966x_phy@1 {
  107. reg = <1>;
  108. };
  109. lan966x_phy1: ethernet-lan966x_phy@2 {
  110. reg = <2>;
  111. };
  112. };
  113. switch: switch@e0000000 {
  114. compatible = "microchip,lan966x-switch";
  115. reg = <0xe0000000 0x0100000>,
  116. <0xe2000000 0x0800000>;
  117. reg-names = "cpu", "gcb";
  118. interrupt-parent = <&oic>;
  119. interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,
  120. <9 IRQ_TYPE_LEVEL_HIGH>;
  121. interrupt-names = "xtr", "ana";
  122. resets = <&reset 0>;
  123. reset-names = "switch";
  124. pinctrl-names = "default";
  125. pinctrl-0 = <&tod_pins>;
  126. ethernet-ports {
  127. #address-cells = <1>;
  128. #size-cells = <0>;
  129. port0: port@0 {
  130. phy-handle = <&lan966x_phy0>;
  131. reg = <0>;
  132. phy-mode = "gmii";
  133. phys = <&serdes 0 CU(0)>;
  134. };
  135. port1: port@1 {
  136. phy-handle = <&lan966x_phy1>;
  137. reg = <1>;
  138. phy-mode = "gmii";
  139. phys = <&serdes 1 CU(1)>;
  140. };
  141. };
  142. };
  143. };
  144. };
  145. };
  146. };