ar7241_tplink.dtsi 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117
  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 "ar7241.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. gpio-keys-polled {
  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. qss {
  22. label = "qss";
  23. linux,code = <KEY_WPS_BUTTON>;
  24. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  25. debounce-interval = <60>;
  26. };
  27. };
  28. gpio_leds: gpio-leds {
  29. compatible = "gpio-leds";
  30. led_system: system {
  31. label = "tp-link:green:system";
  32. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  33. };
  34. qss {
  35. label = "tp-link:green:qss";
  36. gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
  37. };
  38. };
  39. };
  40. &spi {
  41. status = "okay";
  42. num-cs = <1>;
  43. flash@0 {
  44. compatible = "jedec,spi-nor";
  45. reg = <0>;
  46. spi-max-frequency = <25000000>;
  47. partitions {
  48. compatible = "fixed-partitions";
  49. #address-cells = <1>;
  50. #size-cells = <1>;
  51. uboot: partition@0 {
  52. reg = <0x0 0x20000>;
  53. label = "u-boot";
  54. read-only;
  55. };
  56. partition@20000 {
  57. compatible = "tplink,firmware";
  58. reg = <0x20000 0x3d0000>;
  59. label = "firmware";
  60. };
  61. partition@3f0000 {
  62. reg = <0x3f0000 0x10000>;
  63. label = "art";
  64. read-only;
  65. };
  66. };
  67. };
  68. };
  69. &pcie {
  70. status = "okay";
  71. ath9k: wifi@0,0 {
  72. reg = <0x0000 0 0 0 0>;
  73. #gpio-cells = <2>;
  74. gpio-controller;
  75. qca,no-eeprom;
  76. mtd-mac-address = <&uboot 0x1fc00>;
  77. };
  78. };
  79. &eth0 {
  80. status = "okay";
  81. mtd-mac-address = <&uboot 0x1fc00>;
  82. mtd-mac-address-increment = <(-1)>;
  83. };
  84. &eth1 {
  85. status = "okay";
  86. mtd-mac-address = <&uboot 0x1fc00>;
  87. mtd-mac-address-increment = <1>;
  88. };
  89. &gpio {
  90. status = "okay";
  91. };
  92. &uart {
  93. status = "okay";
  94. };