mt7621_dlink_dir_nand_128m.dtsi 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. #include "mt7621.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include <dt-bindings/leds/common.h>
  6. / {
  7. aliases {
  8. label-mac-device = &gmac0;
  9. led-boot = &led_power_orange;
  10. led-failsafe = &led_power_white;
  11. led-running = &led_power_white;
  12. led-upgrade = &led_net_orange;
  13. };
  14. keys {
  15. compatible = "gpio-keys";
  16. reset {
  17. label = "reset";
  18. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  19. linux,code = <KEY_RESTART>;
  20. };
  21. wps: wps {
  22. label = "wps";
  23. gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
  24. linux,code = <KEY_WPS_BUTTON>;
  25. };
  26. };
  27. leds: leds {
  28. compatible = "gpio-leds";
  29. led_power_orange: power_orange {
  30. function = LED_FUNCTION_POWER;
  31. color = <LED_COLOR_ID_ORANGE>;
  32. gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
  33. };
  34. led_power_white: power_white {
  35. function = LED_FUNCTION_POWER;
  36. color = <LED_COLOR_ID_WHITE>;
  37. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  38. };
  39. led_net_orange: net_orange {
  40. label = "orange:net";
  41. gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
  42. };
  43. net_white {
  44. label = "white:net";
  45. gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
  46. };
  47. };
  48. };
  49. &nand {
  50. status = "okay";
  51. partitions {
  52. compatible = "fixed-partitions";
  53. #address-cells = <1>;
  54. #size-cells = <1>;
  55. partition@0 {
  56. label = "Bootloader";
  57. reg = <0x0 0x80000>;
  58. read-only;
  59. };
  60. partition@80000 {
  61. label = "config";
  62. reg = <0x80000 0x80000>;
  63. read-only;
  64. };
  65. partition@100000 {
  66. label = "factory";
  67. reg = <0x100000 0x40000>;
  68. read-only;
  69. nvmem-layout {
  70. compatible = "fixed-layout";
  71. #address-cells = <1>;
  72. #size-cells = <1>;
  73. eeprom_factory_0: eeprom@0 {
  74. reg = <0x0 0x4da8>;
  75. };
  76. eeprom_factory_8000: eeprom@8000 {
  77. reg = <0x8000 0x4da8>;
  78. };
  79. macaddr_factory_e000: macaddr@e000 {
  80. compatible = "mac-base";
  81. reg = <0xe000 0x6>;
  82. #nvmem-cell-cells = <1>;
  83. };
  84. };
  85. };
  86. partition@140000 {
  87. label = "config2";
  88. reg = <0x140000 0x40000>;
  89. read-only;
  90. };
  91. partition@180000 {
  92. label = "firmware";
  93. compatible = "openwrt,uimage", "denx,uimage";
  94. openwrt,padding = <96>;
  95. reg = <0x180000 0x2800000>;
  96. };
  97. partition@2980000 {
  98. label = "private";
  99. reg = <0x2980000 0x2000000>;
  100. read-only;
  101. };
  102. partition@4980000 {
  103. label = "firmware2";
  104. reg = <0x4980000 0x2800000>;
  105. };
  106. partition@7180000 {
  107. label = "mydlink";
  108. reg = <0x7180000 0x600000>;
  109. read-only;
  110. };
  111. partition@7780000 {
  112. label = "reserved";
  113. reg = <0x7780000 0x880000>;
  114. read-only;
  115. };
  116. };
  117. };
  118. &pcie {
  119. status = "okay";
  120. };
  121. &pcie0 {
  122. wifi0: wifi@0,0 {
  123. compatible = "mediatek,mt76";
  124. reg = <0x0000 0 0 0 0>;
  125. nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 1>;
  126. nvmem-cell-names = "eeprom", "mac-address";
  127. ieee80211-freq-limit = <2400000 2500000>;
  128. led {
  129. led-active-low;
  130. };
  131. };
  132. };
  133. &pcie1 {
  134. wifi1: wifi@0,0 {
  135. compatible = "mediatek,mt76";
  136. reg = <0x0000 0 0 0 0>;
  137. nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 2>;
  138. nvmem-cell-names = "eeprom", "mac-address";
  139. ieee80211-freq-limit = <5000000 6000000>;
  140. led {
  141. led-active-low;
  142. };
  143. };
  144. };
  145. &gmac0 {
  146. nvmem-cells = <&macaddr_factory_e000 0>;
  147. nvmem-cell-names = "mac-address";
  148. };
  149. &gmac1 {
  150. status = "okay";
  151. label = "wan";
  152. phy-handle = <&ethphy4>;
  153. nvmem-cells = <&macaddr_factory_e000 3>;
  154. nvmem-cell-names = "mac-address";
  155. };
  156. &ethphy4 {
  157. /delete-property/ interrupts;
  158. };
  159. &switch0 {
  160. ports {
  161. port@0 {
  162. status = "okay";
  163. label = "lan4";
  164. };
  165. port@1 {
  166. status = "okay";
  167. label = "lan3";
  168. };
  169. port@2 {
  170. status = "okay";
  171. label = "lan2";
  172. };
  173. port@3 {
  174. status = "okay";
  175. label = "lan1";
  176. };
  177. };
  178. };
  179. &state_default {
  180. gpio {
  181. groups = "i2c", "uart3", "jtag", "wdt";
  182. function = "gpio";
  183. };
  184. };