ar7240_tplink_tl-wr74xn-v1.dtsi 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. #include <dt-bindings/gpio/gpio.h>
  3. #include <dt-bindings/input/input.h>
  4. #include "ar7240.dtsi"
  5. / {
  6. aliases {
  7. led-boot = &led_system;
  8. led-failsafe = &led_system;
  9. led-running = &led_system;
  10. led-upgrade = &led_system;
  11. };
  12. keys {
  13. compatible = "gpio-keys-polled";
  14. poll-interval = <20>;
  15. reset {
  16. label = "reset";
  17. linux,code = <KEY_RESTART>;
  18. gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
  19. debounce-interval = <60>;
  20. };
  21. wps {
  22. label = "wps";
  23. linux,code = <KEY_WPS_BUTTON>;
  24. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  25. debounce-interval = <60>;
  26. };
  27. };
  28. gpio-leds {
  29. compatible = "gpio-leds";
  30. pinctrl-names = "default";
  31. pinctrl-0 = <&switch_led_pins>;
  32. led_system: system {
  33. label = "tp-link:green:system";
  34. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  35. };
  36. qss {
  37. label = "tp-link:green:qss";
  38. gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
  39. };
  40. lan1 {
  41. label = "tp-link:green:lan1";
  42. gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
  43. };
  44. lan2 {
  45. label = "tp-link:green:lan2";
  46. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  47. };
  48. lan3 {
  49. label = "tp-link:green:lan3";
  50. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  51. };
  52. lan4 {
  53. label = "tp-link:green:lan4";
  54. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  55. };
  56. wan {
  57. label = "tp-link:green:wan";
  58. gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
  59. };
  60. };
  61. ath9k-leds {
  62. compatible = "gpio-leds";
  63. wlan {
  64. label = "tp-link:green:wlan";
  65. gpios = <&ath9k 1 GPIO_ACTIVE_LOW>;
  66. linux,default-trigger = "phy0tpt";
  67. };
  68. };
  69. };
  70. &spi {
  71. status = "okay";
  72. num-cs = <1>;
  73. flash@0 {
  74. compatible = "jedec,spi-nor";
  75. reg = <0>;
  76. spi-max-frequency = <25000000>;
  77. partitions {
  78. compatible = "fixed-partitions";
  79. #address-cells = <1>;
  80. #size-cells = <1>;
  81. uboot: partition@0 {
  82. reg = <0x0 0x20000>;
  83. label = "u-boot";
  84. read-only;
  85. };
  86. firmware: partition@20000 {
  87. compatible = "tplink,firmware";
  88. reg = <0x20000 0x3d0000>;
  89. label = "firmware";
  90. };
  91. art: partition@3f0000 {
  92. reg = <0x3f0000 0x10000>;
  93. label = "art";
  94. read-only;
  95. };
  96. };
  97. };
  98. };
  99. &eth0 {
  100. status = "okay";
  101. mtd-mac-address = <&uboot 0x1fc00>;
  102. mtd-mac-address-increment = <(-1)>;
  103. };
  104. &eth1 {
  105. status = "okay";
  106. mtd-mac-address = <&uboot 0x1fc00>;
  107. mtd-mac-address-increment = <1>;
  108. };
  109. &pcie {
  110. status = "okay";
  111. ath9k: wifi@0,0 {
  112. compatible = "pci168c,002b";
  113. reg = <0x0000 0 0 0 0>;
  114. qca,no-eeprom;
  115. mtd-mac-address = <&uboot 0x1fc00>;
  116. #gpio-cells = <2>;
  117. gpio-controller;
  118. };
  119. };
  120. &pinmux {
  121. switch_led_pins: pinmux_switch_led_pins {
  122. pinctrl-single,bits = <0x0 0x0 0xf8>;
  123. };
  124. };
  125. &uart {
  126. status = "okay";
  127. };