1
0

RBM11G.dts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. /dts-v1/;
  2. #include "mt7621.dtsi"
  3. #include <dt-bindings/input/input.h>
  4. #include <dt-bindings/gpio/gpio.h>
  5. / {
  6. compatible = "mikrotik,rbm11g", "mediatek,mt7621-soc";
  7. model = "MikroTik RouterBOARD M11G";
  8. aliases {
  9. led-boot = &led_usr;
  10. led-failsafe = &led_usr;
  11. led-running = &led_usr;
  12. led-upgrade = &led_usr;
  13. };
  14. memory@0 {
  15. device_type = "memory";
  16. reg = <0x0 0x10000000>;
  17. };
  18. chosen {
  19. bootargs = "console=ttyS0,115200";
  20. };
  21. gpio-leds {
  22. compatible = "gpio-leds";
  23. led_usr: usr {
  24. label = "rbm11g:green:usr";
  25. gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
  26. };
  27. rssi0 {
  28. label = "rbm11g:green:rssi0";
  29. gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
  30. };
  31. rssi1 {
  32. label = "rbm11g:green:rssi1";
  33. gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
  34. };
  35. rssi2 {
  36. label = "rbm11g:green:rssi2";
  37. gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
  38. };
  39. rssi3 {
  40. label = "rbm11g:green:rssi3";
  41. gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
  42. };
  43. rssi4 {
  44. label = "rbm11g:green:rssi4";
  45. gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
  46. };
  47. };
  48. gpio-keys-polled {
  49. compatible = "gpio-keys-polled";
  50. poll-interval = <20>;
  51. res {
  52. label = "reset";
  53. gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
  54. linux,code = <KEY_RESTART>;
  55. };
  56. };
  57. pcie0_vcc_reg {
  58. compatible = "regulator-fixed";
  59. regulator-name = "pcie0_vcc";
  60. regulator-min-microvolt = <3300000>;
  61. regulator-max-microvolt = <3300000>;
  62. gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
  63. enable-active-high;
  64. regulator-boot-on;
  65. regulator-always-on;
  66. };
  67. };
  68. &spi0 {
  69. status = "okay";
  70. w25q128@0 {
  71. compatible = "jedec,spi-nor";
  72. reg = <0>;
  73. // XXX empiric value to obtain actual 10MHz SCK at the chip
  74. spi-max-frequency = <3125000>;
  75. partitions {
  76. compatible = "fixed-partitions";
  77. #address-cells = <1>;
  78. #size-cells = <1>;
  79. partition@0 {
  80. label = "RouterBoot";
  81. reg = <0x0 0x40000>;
  82. read-only;
  83. compatible = "fixed-partitions";
  84. #address-cells = <1>;
  85. #size-cells = <1>;
  86. partition@0 {
  87. label = "bootloader1";
  88. reg = <0x0 0xf000>;
  89. read-only;
  90. };
  91. hard_config: partition@f000 {
  92. label = "hard_config";
  93. reg = <0xf000 0x1000>;
  94. read-only;
  95. };
  96. partition@10000 {
  97. label = "bootloader2";
  98. reg = <0x10000 0xf000>;
  99. read-only;
  100. };
  101. partition@20000 {
  102. label = "soft_config";
  103. reg = <0x20000 0x1000>;
  104. };
  105. partition@30000 {
  106. label = "bios";
  107. reg = <0x30000 0x1000>;
  108. read-only;
  109. };
  110. };
  111. partition@40000 {
  112. label = "firmware";
  113. reg = <0x040000 0xFC0000>;
  114. };
  115. };
  116. };
  117. };
  118. &ethernet {
  119. mtd-mac-address = <&hard_config 0x0010>;
  120. mtd-mac-address-increment = <1>;
  121. };
  122. &pinctrl {
  123. state_default: pinctrl0 {
  124. gpio {
  125. ralink,group = "uart2", "wdt", "rgmii2";
  126. ralink,function = "gpio";
  127. };
  128. };
  129. };
  130. &i2c {
  131. status = "okay";
  132. };
  133. &pcie {
  134. status = "okay";
  135. };