lan966x-pcb8309.dts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230
  1. // SPDX-License-Identifier: (GPL-2.0+ OR MIT)
  2. /*
  3. * lan966x_pcb8309.dts - Device Tree file for PCB8309
  4. */
  5. /dts-v1/;
  6. #include "lan966x.dtsi"
  7. #include "dt-bindings/phy/phy-lan966x-serdes.h"
  8. / {
  9. model = "Microchip EVB - LAN9662";
  10. compatible = "microchip,lan9662-pcb8309", "microchip,lan9662", "microchip,lan966";
  11. aliases {
  12. serial0 = &usart3;
  13. i2c102 = &i2c102;
  14. i2c103 = &i2c103;
  15. };
  16. chosen {
  17. stdout-path = "serial0:115200n8";
  18. };
  19. gpio-restart {
  20. compatible = "gpio-restart";
  21. gpios = <&gpio 56 GPIO_ACTIVE_LOW>;
  22. priority = <200>;
  23. };
  24. i2c-mux {
  25. compatible = "i2c-mux";
  26. #address-cells = <1>;
  27. #size-cells = <0>;
  28. mux-controls = <&mux>;
  29. i2c-parent = <&i2c4>;
  30. i2c102: i2c-sfp@1 {
  31. reg = <1>;
  32. };
  33. i2c103: i2c-sfp@2 {
  34. reg = <2>;
  35. };
  36. };
  37. leds {
  38. compatible = "gpio-leds";
  39. led-s0-green {
  40. label = "s0:green";
  41. gpios = <&sgpio_out 2 0 GPIO_ACTIVE_LOW>;
  42. default-state = "off";
  43. };
  44. led-s0-red {
  45. label = "s0:red";
  46. gpios = <&sgpio_out 2 1 GPIO_ACTIVE_LOW>;
  47. default-state = "off";
  48. };
  49. led-s1-green {
  50. label = "s1:green";
  51. gpios = <&sgpio_out 3 0 GPIO_ACTIVE_LOW>;
  52. default-state = "off";
  53. };
  54. led-s1-red {
  55. label = "s1:red";
  56. gpios = <&sgpio_out 3 1 GPIO_ACTIVE_LOW>;
  57. default-state = "off";
  58. };
  59. };
  60. mux: mux-controller {
  61. compatible = "gpio-mux";
  62. #mux-control-cells = <0>;
  63. mux-gpios = <&sgpio_out 11 0 GPIO_ACTIVE_HIGH>, /* p11b0 */
  64. <&sgpio_out 11 1 GPIO_ACTIVE_HIGH>; /* p11b1 */
  65. };
  66. sfp2: sfp2 {
  67. compatible = "sff,sfp";
  68. i2c-bus = <&i2c102>;
  69. tx-disable-gpios = <&sgpio_out 10 0 GPIO_ACTIVE_LOW>;
  70. los-gpios = <&sgpio_in 2 0 GPIO_ACTIVE_HIGH>;
  71. mod-def0-gpios = <&sgpio_in 2 1 GPIO_ACTIVE_LOW>;
  72. tx-fault-gpios = <&sgpio_in 1 0 GPIO_ACTIVE_HIGH>;
  73. };
  74. sfp3: sfp3 {
  75. compatible = "sff,sfp";
  76. i2c-bus = <&i2c103>;
  77. tx-disable-gpios = <&sgpio_out 10 1 GPIO_ACTIVE_LOW>;
  78. los-gpios = <&sgpio_in 3 0 GPIO_ACTIVE_HIGH>;
  79. mod-def0-gpios = <&sgpio_in 3 1 GPIO_ACTIVE_LOW>;
  80. tx-fault-gpios = <&sgpio_in 1 1 GPIO_ACTIVE_HIGH>;
  81. };
  82. };
  83. &aes {
  84. status = "disabled"; /* Reserved by secure OS */
  85. };
  86. &flx3 {
  87. atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_USART>;
  88. status = "okay";
  89. usart3: serial@200 {
  90. pinctrl-0 = <&fc3_b_pins>;
  91. pinctrl-names = "default";
  92. status = "okay";
  93. };
  94. };
  95. &flx4 {
  96. atmel,flexcom-mode = <ATMEL_FLEXCOM_MODE_TWI>;
  97. status = "okay";
  98. i2c4: i2c@600 {
  99. compatible = "microchip,sam9x60-i2c";
  100. reg = <0x600 0x200>;
  101. interrupts = <GIC_SPI 52 IRQ_TYPE_LEVEL_HIGH>;
  102. clocks = <&nic_clk>;
  103. pinctrl-0 = <&fc4_b_pins>;
  104. pinctrl-names = "default";
  105. i2c-analog-filter;
  106. i2c-digital-filter;
  107. i2c-digital-filter-width-ns = <35>;
  108. i2c-sda-hold-time-ns = <1500>;
  109. status = "okay";
  110. };
  111. };
  112. &gpio {
  113. fc3_b_pins: fc3-b-pins {
  114. /* RXD, TXD */
  115. pins = "GPIO_52", "GPIO_53";
  116. function = "fc3_b";
  117. };
  118. fc4_b_pins: fc4-b-pins {
  119. /* SCL, SDA */
  120. pins = "GPIO_57", "GPIO_58";
  121. function = "fc4_b";
  122. };
  123. pps_out_pins: pps-out-pins {
  124. /* 1pps output */
  125. pins = "GPIO_38";
  126. function = "ptpsync_3";
  127. };
  128. ptp_ext_pins: ptp-ext-pins {
  129. /* 1pps input */
  130. pins = "GPIO_39";
  131. function = "ptpsync_4";
  132. };
  133. sgpio_a_pins: sgpio-a-pins {
  134. /* SCK, D0, D1, LD */
  135. pins = "GPIO_32", "GPIO_33", "GPIO_34", "GPIO_35";
  136. function = "sgpio_a";
  137. };
  138. };
  139. &mdio1 {
  140. status = "okay";
  141. };
  142. &phy0 {
  143. status = "okay";
  144. };
  145. &phy1 {
  146. status = "okay";
  147. };
  148. &port0 {
  149. phy-handle = <&phy0>;
  150. phy-mode = "gmii";
  151. phys = <&serdes 0 CU(0)>;
  152. status = "okay";
  153. };
  154. &port1 {
  155. phy-handle = <&phy1>;
  156. phy-mode = "gmii";
  157. phys = <&serdes 1 CU(1)>;
  158. status = "okay";
  159. };
  160. &port2 {
  161. sfp = <&sfp2>;
  162. managed = "in-band-status";
  163. phy-mode = "sgmii";
  164. phys = <&serdes 2 SERDES6G(0)>;
  165. status = "okay";
  166. };
  167. &port3 {
  168. sfp = <&sfp3>;
  169. managed = "in-band-status";
  170. phy-mode = "sgmii";
  171. phys = <&serdes 3 SERDES6G(1)>;
  172. status = "okay";
  173. };
  174. &serdes {
  175. status = "okay";
  176. };
  177. &sgpio {
  178. pinctrl-0 = <&sgpio_a_pins>;
  179. pinctrl-names = "default";
  180. microchip,sgpio-port-ranges = <0 3>, <8 11>;
  181. status = "okay";
  182. gpio@0 {
  183. ngpios = <64>;
  184. };
  185. gpio@1 {
  186. ngpios = <64>;
  187. };
  188. };
  189. &switch {
  190. pinctrl-0 = <&pps_out_pins>, <&ptp_ext_pins>;
  191. pinctrl-names = "default";
  192. status = "okay";
  193. };