mt7621_iodata_wn-deax1800gr.dts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239
  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. compatible = "iodata,wn-deax1800gr", "mediatek,mt7621-soc";
  8. model = "I-O DATA WN-DEAX1800GR";
  9. aliases {
  10. led-boot = &led_status_green;
  11. led-failsafe = &led_status_red;
  12. led-upgrade = &led_status_green;
  13. label-mac-device = &gmac1;
  14. };
  15. chosen {
  16. bootargs = "console=ttyS0,115200";
  17. };
  18. leds {
  19. compatible = "gpio-leds";
  20. led_status_green: led-0 {
  21. label = "green:status";
  22. gpios = <&gpio 3 GPIO_ACTIVE_HIGH>;
  23. color = <LED_COLOR_ID_GREEN>;
  24. function = LED_FUNCTION_STATUS;
  25. };
  26. led_status_red: led-1 {
  27. label = "red:status";
  28. gpios = <&gpio 7 GPIO_ACTIVE_HIGH>;
  29. color = <LED_COLOR_ID_RED>;
  30. function = LED_FUNCTION_STATUS;
  31. };
  32. led-2 {
  33. label = "green:wps_wifi";
  34. gpios = <&gpio 13 GPIO_ACTIVE_HIGH>;
  35. color = <LED_COLOR_ID_GREEN>;
  36. function = LED_FUNCTION_WPS;
  37. };
  38. led-3 {
  39. label = "green:power";
  40. gpios = <&gpio 14 GPIO_ACTIVE_HIGH>;
  41. color = <LED_COLOR_ID_GREEN>;
  42. function = LED_FUNCTION_POWER;
  43. default-state = "on";
  44. };
  45. led-4 {
  46. label = "green:router";
  47. gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
  48. color = <LED_COLOR_ID_GREEN>;
  49. function = LED_FUNCTION_INDICATOR;
  50. };
  51. led-5 {
  52. label = "green:internet";
  53. gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
  54. color = <LED_COLOR_ID_GREEN>;
  55. function = LED_FUNCTION_WAN;
  56. };
  57. };
  58. keys {
  59. compatible = "gpio-keys";
  60. wps {
  61. label = "wps";
  62. gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
  63. linux,code = <KEY_WPS_BUTTON>;
  64. };
  65. reset {
  66. label = "reset";
  67. gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
  68. linux,code = <KEY_RESTART>;
  69. };
  70. led_on {
  71. label = "led_on";
  72. gpios = <&gpio 10 GPIO_ACTIVE_HIGH>;
  73. linux,code = <BTN_0>;
  74. linux,input-type = <EV_SW>;
  75. };
  76. };
  77. };
  78. &nand {
  79. status = "okay";
  80. mediatek,nmbm;
  81. mediatek,bmt-remap-range =
  82. <0x0000000 0x780000>, /* u-boot - kernel1(6 MiB) */
  83. <0x2f80000 0x600000>, /* kernel2 - kernel2(6 MiB) */
  84. <0x5d80000 0x780000>; /* storage - working */
  85. partitions {
  86. compatible = "fixed-partitions";
  87. #address-cells = <1>;
  88. #size-cells = <1>;
  89. partition@0 {
  90. label = "u-boot";
  91. reg = <0x0 0x80000>;
  92. read-only;
  93. };
  94. partition@80000 {
  95. label = "u-boot-env";
  96. reg = <0x80000 0x80000>;
  97. read-only;
  98. };
  99. partition@100000 {
  100. compatible = "nvmem-cells";
  101. label = "factory";
  102. reg = <0x100000 0x80000>;
  103. read-only;
  104. nvmem-layout {
  105. compatible = "fixed-layout";
  106. #address-cells = <1>;
  107. #size-cells = <1>;
  108. eeprom: eeprom@0 {
  109. reg = <0x0 0x1aa20>;
  110. };
  111. macaddr_factory_4: macaddr@4 {
  112. compatible = "mac-base";
  113. reg = <0x4 0x6>;
  114. #nvmem-cell-cells = <1>;
  115. };
  116. };
  117. };
  118. partition@180000 {
  119. label = "kernel";
  120. reg = <0x180000 0x600000>;
  121. };
  122. partition@580000 {
  123. label = "ubi";
  124. reg = <0x780000 0x2800000>;
  125. };
  126. partition@2f80000 {
  127. label = "firmware2";
  128. reg = <0x2f80000 0x2e00000>;
  129. };
  130. partition@5d80000 {
  131. label = "storage";
  132. reg = <0x5d80000 0x600000>;
  133. read-only;
  134. };
  135. partition@6380000 {
  136. label = "idmkey";
  137. reg = <0x6380000 0x100000>;
  138. read-only;
  139. };
  140. partition@6480000 {
  141. label = "working";
  142. reg = <0x6480000 0x80000>;
  143. };
  144. };
  145. };
  146. &gmac0 {
  147. nvmem-cells = <&macaddr_factory_4 0>;
  148. nvmem-cell-names = "mac-address";
  149. };
  150. &gmac1 {
  151. status = "okay";
  152. label = "wan";
  153. phy-handle = <&ethphy0>;
  154. nvmem-cells = <&macaddr_factory_4 2>;
  155. nvmem-cell-names = "mac-address";
  156. };
  157. &mdio {
  158. ethphy0: ethernet-phy@0 {
  159. reg = <0>;
  160. };
  161. };
  162. &switch0 {
  163. ports {
  164. port@1 {
  165. status = "okay";
  166. label = "lan2";
  167. };
  168. port@2 {
  169. status = "okay";
  170. label = "lan1";
  171. };
  172. };
  173. };
  174. &pcie {
  175. status = "okay";
  176. };
  177. /*
  178. * pcie0: MT7915 HIF (14c3,7916)
  179. * pcie1: MT7915 (14c3,7915)
  180. */
  181. &pcie1 {
  182. wifi@0,0 {
  183. compatible = "mediatek,mt76";
  184. reg = <0x0000 0 0 0 0>;
  185. nvmem-cells = <&eeprom>;
  186. nvmem-cell-names = "eeprom";
  187. };
  188. };
  189. &state_default {
  190. gpio {
  191. groups = "i2c", "jtag", "uart2", "uart3";
  192. function = "gpio";
  193. };
  194. };
  195. &xhci {
  196. status = "disabled";
  197. };