Advertisement
jfrog

RBM33G.dts

Nov 17th, 2020
58
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.93 KB | None | 0 0
  1. /dts-v1/;
  2.  
  3. #include "mt7621.dtsi"
  4.  
  5. #include <dt-bindings/input/input.h>
  6. #include <dt-bindings/gpio/gpio.h>
  7.  
  8. / {
  9. compatible = "mikrotik,rbm33g", "mediatek,mt7621-soc";
  10. model = "MikroTik RouterBOARD M33G";
  11.  
  12. aliases {
  13. led-boot = &led_usr;
  14. led-failsafe = &led_usr;
  15. led-running = &led_usr;
  16. led-upgrade = &led_usr;
  17. };
  18.  
  19. memory@0 {
  20. device_type = "memory";
  21. reg = <0x0 0x10000000>;
  22. };
  23.  
  24. chosen {
  25. bootargs = "console=ttyS0,115200";
  26. };
  27.  
  28. leds {
  29. compatible = "gpio-leds";
  30.  
  31. led_usr: usr {
  32. label = "rbm33g:green:usr";
  33. gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
  34. };
  35. };
  36.  
  37. keys {
  38. compatible = "gpio-keys-polled";
  39. poll-interval = <20>;
  40.  
  41. res {
  42. label = "res";
  43. gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
  44. linux,code = <KEY_RESTART>;
  45. };
  46. };
  47.  
  48. gpio-export {
  49. compatible = "gpio-export";
  50.  
  51. gpio_pcie0_power {
  52. gpio-export,output = <0>;
  53. gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
  54. };
  55.  
  56. gpio_pcie1_power {
  57. gpio-export,output = <0>;
  58. gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
  59. };
  60.  
  61. gpio_pcie2_power {
  62. gpio-export,output = <1>;
  63. gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
  64. };
  65.  
  66. gpio_usb_vcc {
  67. gpio-export,output = <1>;
  68. gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  69. };
  70. };
  71. };
  72.  
  73. &spi0 {
  74. status = "okay";
  75.  
  76. w25q40@0 {
  77. compatible = "jedec,spi-nor";
  78. reg = <0>;
  79. spi-max-frequency = <3125000>;
  80.  
  81. partitions {
  82. compatible = "fixed-partitions";
  83. #address-cells = <1>;
  84. #size-cells = <1>;
  85.  
  86. partition@0 {
  87. label = "RouterBoot";
  88. reg = <0x0 0x40000>;
  89. read-only;
  90. compatible = "fixed-partitions";
  91. #address-cells = <1>;
  92. #size-cells = <1>;
  93.  
  94. partition@0 {
  95. label = "bootloader1";
  96. reg = <0x0 0xf000>;
  97. read-only;
  98. };
  99.  
  100. hard_config: partition@f000 {
  101. label = "hard_config";
  102. reg = <0xf000 0x1000>;
  103. read-only;
  104. };
  105.  
  106. partition@10000 {
  107. label = "bootloader2";
  108. reg = <0x10000 0xf000>;
  109. read-only;
  110. };
  111.  
  112. partition@20000 {
  113. label = "soft_config";
  114. reg = <0x20000 0x1000>;
  115. };
  116.  
  117. partition@30000 {
  118. label = "bios";
  119. reg = <0x30000 0x1000>;
  120. read-only;
  121. };
  122. };
  123. };
  124. };
  125.  
  126. w25q128@1 {
  127. compatible = "jedec,spi-nor";
  128. reg = <1>;
  129. // XXX empiric value to obtain actual 10MHz SCK at the chip
  130. spi-max-frequency = <3125000>;
  131.  
  132. partitions {
  133. compatible = "fixed-partitions";
  134. #address-cells = <1>;
  135. #size-cells = <1>;
  136.  
  137. // Region <0x0 0x40000> seems reserved by OEM
  138.  
  139. partition@40000 {
  140. compatible = "mikrotik,minor";
  141. label = "firmware";
  142. reg = <0x040000 0xFC0000>;
  143. };
  144. };
  145. };
  146. };
  147.  
  148. &ethernet {
  149. mtd-mac-address = <&hard_config 0x0010>;
  150. mtd-mac-address-increment = <1>;
  151. };
  152.  
  153.  
  154. &pinctrl {
  155. state_default: pinctrl0 {
  156. gpio {
  157. ralink,group = "uart2", "wdt";
  158. ralink,function = "gpio";
  159. };
  160. };
  161. };
  162.  
  163. &sdhci {
  164. status = "okay";
  165. };
  166.  
  167. &i2c {
  168. status = "okay";
  169. };
  170.  
  171. &pcie {
  172. status = "okay";
  173. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement