mt7981a-edgecore-eap111.dts 3.6 KB

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