mt7981a-edgecore-eap111.dts 3.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /dts-v1/;
  3. #include <dt-bindings/leds/common.h>
  4. #include "mt7981.dtsi"
  5. / {
  6. model = "Edgecore EAP111";
  7. compatible = "edgecore,eap111", "mediatek,mt7981";
  8. aliases {
  9. serial0 = &uart0;
  10. led-boot = &led_green;
  11. led-failsafe = &led_green;
  12. led-running = &led_green;
  13. led-upgrade = &led_green;
  14. };
  15. chosen {
  16. bootargs-override = "console=ttyS0,115200n8";
  17. stdout-path = "serial0:115200n8";
  18. };
  19. gpio-keys {
  20. compatible = "gpio-keys";
  21. reset {
  22. label = "reset";
  23. linux,code = <KEY_RESTART>;
  24. gpios = <&pio 1 GPIO_ACTIVE_LOW>;
  25. };
  26. };
  27. leds {
  28. compatible = "gpio-leds";
  29. led_green: led-green {
  30. gpios = <&pio 9 GPIO_ACTIVE_HIGH>;
  31. color = <LED_COLOR_ID_GREEN>;
  32. function = LED_FUNCTION_INDICATOR;
  33. };
  34. led_orange: led-orange {
  35. gpios = <&pio 34 GPIO_ACTIVE_HIGH>;
  36. color = <LED_COLOR_ID_ORANGE>;
  37. function = LED_FUNCTION_INDICATOR;
  38. };
  39. led_blue: led-blue {
  40. gpios = <&pio 35 GPIO_ACTIVE_HIGH>;
  41. color = <LED_COLOR_ID_BLUE>;
  42. function = LED_FUNCTION_INDICATOR;
  43. };
  44. };
  45. };
  46. &uart0 {
  47. status = "okay";
  48. };
  49. &watchdog {
  50. status = "okay";
  51. };
  52. &pio {
  53. spi0_flash_pins: spi0-pins {
  54. mux {
  55. function = "spi";
  56. groups = "spi0", "spi0_wp_hold";
  57. };
  58. };
  59. };
  60. &spi0 {
  61. pinctrl-names = "default";
  62. pinctrl-0 = <&spi0_flash_pins>;
  63. cs-gpios = <0>, <0>;
  64. #address-cells = <1>;
  65. #size-cells = <0>;
  66. status = "okay";
  67. #address-cells = <1>;
  68. #size-cells = <0>;
  69. flash@0 {
  70. #address-cells = <1>;
  71. #size-cells = <1>;
  72. compatible = "spi-nand";
  73. reg = <0>;
  74. spi-max-frequency = <52000000>;
  75. spi-cal-enable;
  76. spi-cal-mode = "read-data";
  77. spi-cal-datalen = <7>;
  78. spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
  79. spi-cal-addrlen = <5>;
  80. spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
  81. spi-tx-bus-width = <4>;
  82. spi-rx-bus-width = <4>;
  83. mediatek,nmbm;
  84. mediatek,bmt-max-ratio = <1>;
  85. mediatek,bmt-max-reserved-blocks = <64>;
  86. partitions {
  87. compatible = "fixed-partitions";
  88. #address-cells = <1>;
  89. #size-cells = <1>;
  90. partition@0 {
  91. label = "BL2";
  92. reg = <0x00000 0x100000>;
  93. read-only;
  94. };
  95. partition@100000 {
  96. label = "u-boot-env";
  97. reg = <0x100000 0x80000>;
  98. };
  99. partition@180000 {
  100. label = "Factory";
  101. reg = <0x180000 0x200000>;
  102. read-only;
  103. nvmem-layout {
  104. compatible = "fixed-layout";
  105. #address-cells = <1>;
  106. #size-cells = <1>;
  107. eeprom_factory: eeprom@0 {
  108. reg = <0x0 0x1000>;
  109. };
  110. macaddr_wan: macaddr@2a {
  111. reg = <0x2a 0x6>;
  112. };
  113. macaddr_lan: macaddr@24 {
  114. reg = <0x24 0x6>;
  115. };
  116. };
  117. };
  118. partition@380000 {
  119. label = "FIP";
  120. reg = <0x380000 0x200000>;
  121. read-only;
  122. };
  123. partition@580000 {
  124. label = "ubi";
  125. reg = <0x580000 0x4000000>;
  126. compatible = "linux,ubi";
  127. };
  128. };
  129. };
  130. };
  131. &mdio_bus {
  132. reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
  133. reset-delay-us = <10000>;
  134. reset-post-delay-us = <10000>;
  135. en8801sc: ethernet-phy@24 {
  136. reg = <24>;
  137. compatible = "ethernet-phy-id03a2.9471";
  138. phy-mode = "sgmii";
  139. };
  140. };
  141. &eth {
  142. pinctrl-names = "default";
  143. pinctrl-0 = <&mdio_pins>;
  144. status = "okay";
  145. gmac0: mac@0 {
  146. compatible = "mediatek,eth-mac";
  147. reg = <0>;
  148. phy-mode = "sgmii";
  149. phy-handle = <&en8801sc>;
  150. managed = "in-band-status";
  151. nvmem-cells = <&macaddr_lan>;
  152. nvmem-cell-names = "mac-address";
  153. };
  154. gmac1: mac@1 {
  155. compatible = "mediatek,eth-mac";
  156. reg = <1>;
  157. phy-mode = "gmii";
  158. phy-handle = <&int_gbe_phy>;
  159. nvmem-cells = <&macaddr_wan>;
  160. nvmem-cell-names = "mac-address";
  161. };
  162. };
  163. &wifi {
  164. nvmem-cells = <&eeprom_factory>;
  165. nvmem-cell-names = "eeprom";
  166. status = "okay";
  167. };