Advertisement
jfrog

RBM33G.dts

Nov 17th, 2020
261
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.07 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,name = "pcie0_vcc";
  53. gpio-export,output = <0>;
  54. gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>;
  55. };
  56.  
  57. gpio_pcie1_power {
  58. gpio-export,name = "pcie1_vcc";
  59. gpio-export,output = <0>;
  60. gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
  61. };
  62.  
  63. gpio_pcie2_power {
  64. gpio-export,name = "pcie2_vcc";
  65. gpio-export,output = <1>;
  66. gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
  67. };
  68.  
  69. gpio_usb_vcc {
  70. gpio-export,name = "usb_vcc";
  71. gpio-export,output = <1>;
  72. gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  73. };
  74. };
  75. };
  76.  
  77. &spi0 {
  78. status = "okay";
  79.  
  80. w25q40@0 {
  81. compatible = "jedec,spi-nor";
  82. reg = <0>;
  83. spi-max-frequency = <3125000>;
  84.  
  85. partitions {
  86. compatible = "fixed-partitions";
  87. #address-cells = <1>;
  88. #size-cells = <1>;
  89.  
  90. partition@0 {
  91. label = "RouterBoot";
  92. reg = <0x0 0x40000>;
  93. read-only;
  94. compatible = "fixed-partitions";
  95. #address-cells = <1>;
  96. #size-cells = <1>;
  97.  
  98. partition@0 {
  99. label = "bootloader1";
  100. reg = <0x0 0xf000>;
  101. read-only;
  102. };
  103.  
  104. hard_config: partition@f000 {
  105. label = "hard_config";
  106. reg = <0xf000 0x1000>;
  107. read-only;
  108. };
  109.  
  110. partition@10000 {
  111. label = "bootloader2";
  112. reg = <0x10000 0xf000>;
  113. read-only;
  114. };
  115.  
  116. partition@20000 {
  117. label = "soft_config";
  118. reg = <0x20000 0x1000>;
  119. };
  120.  
  121. partition@30000 {
  122. label = "bios";
  123. reg = <0x30000 0x1000>;
  124. read-only;
  125. };
  126. };
  127. };
  128. };
  129.  
  130. w25q128@1 {
  131. compatible = "jedec,spi-nor";
  132. reg = <1>;
  133. // XXX empiric value to obtain actual 10MHz SCK at the chip
  134. spi-max-frequency = <3125000>;
  135.  
  136. partitions {
  137. compatible = "fixed-partitions";
  138. #address-cells = <1>;
  139. #size-cells = <1>;
  140.  
  141. // Region <0x0 0x40000> seems reserved by OEM
  142.  
  143. partition@40000 {
  144. compatible = "mikrotik,minor";
  145. label = "firmware";
  146. reg = <0x040000 0xFC0000>;
  147. };
  148. };
  149. };
  150. };
  151.  
  152. &ethernet {
  153. mtd-mac-address = <&hard_config 0x0010>;
  154. mtd-mac-address-increment = <1>;
  155. };
  156.  
  157.  
  158. &pinctrl {
  159. state_default: pinctrl0 {
  160. gpio {
  161. ralink,group = "uart2", "wdt";
  162. ralink,function = "gpio";
  163. };
  164. };
  165. };
  166.  
  167. &sdhci {
  168. status = "okay";
  169. };
  170.  
  171. &i2c {
  172. status = "okay";
  173. };
  174.  
  175. &pcie {
  176. status = "okay";
  177. };
  178.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement