mt7621_dlink_dap-x1860-a1.dts 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220
  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. / {
  6. compatible = "dlink,dap-x1860-a1", "mediatek,mt7621-soc";
  7. model = "D-Link DAP-X1860 A1";
  8. chosen {
  9. bootargs = "console=ttyS0,115200";
  10. };
  11. aliases {
  12. label-mac-device = &gmac0;
  13. led-boot = &led_power_green;
  14. led-failsafe = &led_power_red;
  15. led-running = &led_power_green;
  16. led-upgrade = &led_power_red;
  17. };
  18. keys {
  19. compatible = "gpio-keys";
  20. wps {
  21. label = "wps";
  22. gpios = <&gpio 4 GPIO_ACTIVE_LOW>;
  23. linux,code = <KEY_WPS_BUTTON>;
  24. };
  25. reset {
  26. label = "reset";
  27. gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
  28. linux,code = <KEY_RESTART>;
  29. };
  30. };
  31. leds {
  32. compatible = "gpio-leds";
  33. led_power_green: power_green {
  34. label = "green:power";
  35. gpios = <&gpio 3 GPIO_ACTIVE_LOW>;
  36. default-state = "on";
  37. };
  38. led_power_red: power_red {
  39. label = "red:power";
  40. gpios = <&gpio 7 GPIO_ACTIVE_LOW>;
  41. };
  42. power_orange {
  43. label = "orange:power";
  44. gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
  45. };
  46. rssihigh {
  47. label = "green:rssihigh";
  48. gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
  49. };
  50. rssimedium {
  51. label = "green:rssimedium";
  52. gpios = <&gpio 23 GPIO_ACTIVE_LOW>;
  53. };
  54. rssilow_orange {
  55. label = "orange:rssilow";
  56. gpios = <&gpio 26 GPIO_ACTIVE_LOW>;
  57. };
  58. rssilow_green {
  59. label = "green:rssilow";
  60. gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
  61. };
  62. };
  63. virtual_flash {
  64. compatible = "mtd-concat";
  65. devices = <&fwconcat0 &fwconcat1>;
  66. partitions {
  67. compatible = "fixed-partitions";
  68. #address-cells = <1>;
  69. #size-cells = <1>;
  70. partition@0 {
  71. label = "ubi";
  72. reg = <0x0 0x0>;
  73. };
  74. };
  75. };
  76. };
  77. &nand {
  78. status = "okay";
  79. mediatek,nmbm;
  80. /* rsvd = Remapping Range / NAND Erase-Size */
  81. /* rsvd = 0x800000 / 0x20000 */
  82. mediatek,bmt-max-reserved-blocks = <64>;
  83. /* Remapping should include raw-nand we operate upon without UBI layer. */
  84. /* This includes (at least) the kernel which has to be loaded by U-Boot.*/
  85. mediatek,bmt-remap-range =
  86. <0x0 0x980000>;
  87. partitions {
  88. compatible = "fixed-partitions";
  89. #address-cells = <1>;
  90. #size-cells = <1>;
  91. partition@0 {
  92. label = "bootloader";
  93. reg = <0x0 0x80000>;
  94. read-only;
  95. };
  96. partition@80000 {
  97. label = "config";
  98. reg = <0x80000 0x80000>;
  99. read-only;
  100. };
  101. factory: partition@100000 {
  102. label = "factory";
  103. reg = <0x100000 0x80000>;
  104. read-only;
  105. nvmem-layout {
  106. compatible = "fixed-layout";
  107. #address-cells = <1>;
  108. #size-cells = <1>;
  109. eeprom_factory_0: eeprom@0 {
  110. reg = <0x0 0xe00>;
  111. };
  112. macaddr_factory_4: macaddr@4 {
  113. reg = <0x4 0x6>;
  114. };
  115. precal_factory_e10: precal@e10 {
  116. reg = <0xe10 0x19c10>;
  117. };
  118. };
  119. };
  120. partition@180000 {
  121. label = "kernel";
  122. reg = <0x180000 0x0800000>;
  123. };
  124. fwconcat0: partition@980000 {
  125. label = "fwconcat0";
  126. reg = <0x980000 0x2c00000>;
  127. };
  128. partition@3580000 {
  129. label = "manufacture";
  130. reg = <0x3580000 0x400000>;
  131. read-only;
  132. };
  133. partition@3980000 {
  134. label = "storage";
  135. reg = <0x3980000 0x680000>;
  136. read-only;
  137. };
  138. fwconcat1: partition@4000000 {
  139. label = "fwconcat1";
  140. reg = <0x4000000 0x3800000>;
  141. };
  142. };
  143. };
  144. &pcie {
  145. status = "okay";
  146. };
  147. &pcie1 {
  148. wifi@0,0 {
  149. compatible = "mediatek,mt76";
  150. reg = <0x0000 0 0 0 0>;
  151. nvmem-cells = <&eeprom_factory_0>, <&precal_factory_e10>;
  152. nvmem-cell-names = "eeprom", "precal";
  153. mediatek,disable-radar-background;
  154. };
  155. };
  156. &ethernet {
  157. pinctrl-0 = <&mdio_pins>, <&rgmii1_pins>;
  158. };
  159. &gmac0 {
  160. nvmem-cells = <&macaddr_factory_4>;
  161. nvmem-cell-names = "mac-address";
  162. };
  163. &switch0 {
  164. gpio-controller;
  165. #gpio-cells = <2>;
  166. ports {
  167. port@0 {
  168. status = "okay";
  169. label = "lan";
  170. };
  171. };
  172. };
  173. &state_default {
  174. gpio {
  175. groups = "uart2";
  176. function = "gpio";
  177. };
  178. };