HT-TM02.dts 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123
  1. /dts-v1/;
  2. #include "rt5350.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "hootoo,ht-tm02", "ralink,rt5350-soc";
  7. model = "HooToo HT-TM02";
  8. aliases {
  9. led-boot = &led_wlan;
  10. led-failsafe = &led_wlan;
  11. led-running = &led_wlan;
  12. led-upgrade = &led_wlan;
  13. };
  14. gpio-leds {
  15. compatible = "gpio-leds";
  16. led_wlan: wlan {
  17. label = "ht-tm02:blue:wlan";
  18. gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
  19. };
  20. lan {
  21. label = "ht-tm02:green:lan";
  22. gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  23. };
  24. };
  25. gpio-keys-polled {
  26. compatible = "gpio-keys-polled";
  27. poll-interval = <20>;
  28. reset {
  29. label = "reset";
  30. gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  31. linux,code = <KEY_RESTART>;
  32. };
  33. modeswitch {
  34. label = "modeswitch";
  35. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  36. linux,code = <BTN_0>;
  37. linux,input-type = <EV_SW>;
  38. };
  39. };
  40. };
  41. &gpio0 {
  42. status = "okay";
  43. };
  44. &spi0 {
  45. status = "okay";
  46. m25p80@0 {
  47. compatible = "jedec,spi-nor";
  48. reg = <0>;
  49. spi-max-frequency = <10000000>;
  50. partitions {
  51. compatible = "fixed-partitions";
  52. #address-cells = <1>;
  53. #size-cells = <1>;
  54. partition@0 {
  55. label = "u-boot";
  56. reg = <0x0 0x30000>;
  57. read-only;
  58. };
  59. partition@30000 {
  60. label = "u-boot-env";
  61. reg = <0x30000 0x10000>;
  62. read-only;
  63. };
  64. factory: partition@40000 {
  65. label = "factory";
  66. reg = <0x40000 0x10000>;
  67. read-only;
  68. };
  69. partition@50000 {
  70. label = "firmware";
  71. reg = <0x50000 0x7b0000>;
  72. };
  73. };
  74. };
  75. };
  76. &pinctrl {
  77. state_default: pinctrl0 {
  78. gpio {
  79. ralink,group = "i2c", "jtag", "uartf";
  80. ralink,function = "gpio";
  81. };
  82. };
  83. };
  84. &ethernet {
  85. mtd-mac-address = <&factory 0x28>;
  86. };
  87. &esw {
  88. mediatek,portmap = <0x10>;
  89. mediatek,portdisable = <0x2f>;
  90. };
  91. &wmac {
  92. ralink,mtd-eeprom = <&factory 0>;
  93. };
  94. &ehci {
  95. status = "okay";
  96. };
  97. &ohci {
  98. status = "okay";
  99. };