RBM33G.dts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  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,rbm33g", "mediatek,mt7621-soc";
  7. model = "MikroTik RouterBOARD M33G";
  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 = "rbm33g:green:usr";
  25. gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
  26. };
  27. };
  28. gpio-keys-polled {
  29. compatible = "gpio-keys-polled";
  30. poll-interval = <20>;
  31. res {
  32. label = "res";
  33. gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
  34. linux,code = <KEY_RESTART>;
  35. };
  36. };
  37. pcie0_vcc_reg {
  38. compatible = "regulator-fixed";
  39. regulator-name = "pcie0_vcc";
  40. regulator-min-microvolt = <3300000>;
  41. regulator-max-microvolt = <3300000>;
  42. gpio = <&gpio0 9 GPIO_ACTIVE_HIGH>;
  43. enable-active-high;
  44. regulator-boot-on;
  45. regulator-always-on;
  46. };
  47. pcie1_vcc_reg {
  48. compatible = "regulator-fixed";
  49. regulator-name = "pcie1_vcc";
  50. regulator-min-microvolt = <3300000>;
  51. regulator-max-microvolt = <3300000>;
  52. gpio = <&gpio0 10 GPIO_ACTIVE_HIGH>;
  53. enable-active-high;
  54. regulator-boot-on;
  55. regulator-always-on;
  56. };
  57. pcie2_vcc_reg {
  58. compatible = "regulator-fixed";
  59. regulator-name = "pcie2_vcc";
  60. regulator-min-microvolt = <3300000>;
  61. regulator-max-microvolt = <3300000>;
  62. gpio = <&gpio0 11 GPIO_ACTIVE_HIGH>;
  63. enable-active-high;
  64. regulator-boot-on;
  65. regulator-always-on;
  66. };
  67. usb_vcc_reg {
  68. compatible = "regulator-fixed";
  69. regulator-name = "usb_vcc";
  70. regulator-min-microvolt = <5000000>;
  71. regulator-max-microvolt = <5000000>;
  72. gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  73. enable-active-high;
  74. regulator-always-on;
  75. };
  76. };
  77. &spi0 {
  78. status = "okay";
  79. w25q40@0 {
  80. compatible = "jedec,spi-nor";
  81. reg = <0>;
  82. spi-max-frequency = <3125000>;
  83. partitions {
  84. compatible = "fixed-partitions";
  85. #address-cells = <1>;
  86. #size-cells = <1>;
  87. partition@0 {
  88. label = "RouterBoot";
  89. reg = <0x0 0x40000>;
  90. read-only;
  91. compatible = "fixed-partitions";
  92. #address-cells = <1>;
  93. #size-cells = <1>;
  94. partition@0 {
  95. label = "bootloader1";
  96. reg = <0x0 0xf000>;
  97. read-only;
  98. };
  99. hard_config: partition@f000 {
  100. label = "hard_config";
  101. reg = <0xf000 0x1000>;
  102. read-only;
  103. };
  104. partition@10000 {
  105. label = "bootloader2";
  106. reg = <0x10000 0xf000>;
  107. read-only;
  108. };
  109. partition@20000 {
  110. label = "soft_config";
  111. reg = <0x20000 0x1000>;
  112. };
  113. partition@30000 {
  114. label = "bios";
  115. reg = <0x30000 0x1000>;
  116. read-only;
  117. };
  118. };
  119. };
  120. };
  121. w25q128@1 {
  122. compatible = "jedec,spi-nor";
  123. reg = <1>;
  124. // XXX empiric value to obtain actual 10MHz SCK at the chip
  125. spi-max-frequency = <3125000>;
  126. partitions {
  127. compatible = "fixed-partitions";
  128. #address-cells = <1>;
  129. #size-cells = <1>;
  130. // Region <0x0 0x40000> seems reserved by OEM
  131. partition@40000 {
  132. label = "firmware";
  133. reg = <0x040000 0xFC0000>;
  134. };
  135. };
  136. };
  137. };
  138. &ethernet {
  139. mtd-mac-address = <&hard_config 0x0010>;
  140. mtd-mac-address-increment = <1>;
  141. };
  142. &pinctrl {
  143. state_default: pinctrl0 {
  144. gpio {
  145. ralink,group = "uart2", "wdt";
  146. ralink,function = "gpio";
  147. };
  148. };
  149. };
  150. &sdhci {
  151. status = "okay";
  152. };
  153. &i2c {
  154. status = "okay";
  155. };
  156. &pcie {
  157. status = "okay";
  158. };