mt7620n_hootoo_ht-tm05.dts 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /dts-v1/;
  3. #include "mt7620n.dtsi"
  4. #include <dt-bindings/gpio/gpio.h>
  5. #include <dt-bindings/input/input.h>
  6. / {
  7. compatible = "hootoo,ht-tm05", "ralink,mt7620n-soc";
  8. model = "HooToo HT-TM05";
  9. aliases {
  10. led-boot = &led_power;
  11. led-failsafe = &led_power;
  12. led-running = &led_power;
  13. led-upgrade = &led_power;
  14. label-mac-device = &ethernet;
  15. };
  16. leds {
  17. compatible = "gpio-leds";
  18. led_power: power {
  19. label = "ht-tm05:blue:power";
  20. gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  21. default-state = "on";
  22. };
  23. wifi {
  24. label = "ht-tm05:green:wifi";
  25. gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
  26. linux,default-trigger = "phy0tpt";
  27. };
  28. };
  29. keys {
  30. compatible = "gpio-keys";
  31. reset {
  32. label = "reset";
  33. gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
  34. linux,code = <KEY_RESTART>;
  35. };
  36. };
  37. virtual_flash {
  38. compatible = "mtd-concat";
  39. devices = <&firmware1 &firmware2 &firmware3>;
  40. partitions {
  41. compatible = "fixed-partitions";
  42. #address-cells = <1>;
  43. #size-cells = <1>;
  44. partition@0 {
  45. compatible = "openwrt,okli";
  46. label = "firmware";
  47. reg = <0x0 0x0>;
  48. };
  49. };
  50. };
  51. };
  52. &gpio2 {
  53. status = "okay";
  54. };
  55. &gpio3 {
  56. status = "okay";
  57. };
  58. &i2c {
  59. status = "okay";
  60. };
  61. &spi0 {
  62. status = "okay";
  63. flash@0 {
  64. compatible = "jedec,spi-nor";
  65. reg = <0>;
  66. spi-max-frequency = <50000000>;
  67. m25p,fast-read;
  68. partitions {
  69. compatible = "fixed-partitions";
  70. #address-cells = <1>;
  71. #size-cells = <1>;
  72. partition@0 {
  73. label = "u-boot";
  74. reg = <0x0 0x30000>;
  75. read-only;
  76. };
  77. partition@30000 {
  78. label = "config";
  79. reg = <0x30000 0x10000>;
  80. read-only;
  81. };
  82. factory: partition@40000 {
  83. label = "factory";
  84. reg = <0x40000 0x10000>;
  85. read-only;
  86. };
  87. partition@50000 {
  88. label = "loader";
  89. reg = <0x50000 0x10000>;
  90. read-only;
  91. };
  92. firmware2: partition@60000 {
  93. label = "firmware2";
  94. reg = <0x60000 0x170000>;
  95. };
  96. partition@1d0000 {
  97. label = "u-boot-env";
  98. reg = <0x1d0000 0x10000>;
  99. };
  100. firmware3: partition@1e0000 {
  101. label = "firmware3";
  102. reg = <0x1e0000 0x20000>;
  103. };
  104. firmware1: partition@200000 {
  105. label = "firmware1";
  106. reg = <0x200000 0x600000>;
  107. };
  108. };
  109. };
  110. };
  111. &ehci {
  112. status = "okay";
  113. };
  114. &ohci {
  115. status = "okay";
  116. };
  117. &ethernet {
  118. mtd-mac-address = <&factory 0x28>;
  119. };
  120. &wmac {
  121. ralink,mtd-eeprom = <&factory 0x0>;
  122. };
  123. &state_default {
  124. gpio {
  125. groups = "wled", "ephy";
  126. function = "gpio";
  127. };
  128. };