GB-PC2.dts 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. /dts-v1/;
  2. #include "mt7621.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "gnubee,gb-pc2", "mediatek,mt7621-soc";
  7. model = "GB-PC2";
  8. aliases {
  9. led-boot = &led_status;
  10. led-failsafe = &led_status;
  11. led-running = &led_status;
  12. led-upgrade = &led_status;
  13. };
  14. memory@0 {
  15. device_type = "memory";
  16. reg = <0x0 0x1c000000>, <0x20000000 0x4000000>;
  17. };
  18. chosen {
  19. bootargs = "console=ttyS0,57600";
  20. };
  21. keys {
  22. compatible = "gpio-keys-polled";
  23. poll-interval = <20>;
  24. reset {
  25. label = "reset";
  26. gpios = <&gpio0 18 GPIO_ACTIVE_HIGH>;
  27. linux,code = <KEY_RESTART>;
  28. };
  29. };
  30. leds {
  31. compatible = "gpio-leds";
  32. system {
  33. label = "gb-pc2:green:system";
  34. gpios = <&gpio0 6 GPIO_ACTIVE_LOW>;
  35. };
  36. led_status: status {
  37. label = "gb-pc2:green:status";
  38. gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
  39. };
  40. lan1 {
  41. label = "gb-pc2:green:lan1";
  42. gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
  43. };
  44. lan2 {
  45. label = "gb-pc2:green:lan2";
  46. gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
  47. };
  48. lan3-yellow {
  49. label = "gb-pc2:yellow:lan3";
  50. gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  51. };
  52. lan3-green {
  53. label = "gb-pc2:green:lan3";
  54. gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
  55. };
  56. };
  57. };
  58. &sdhci {
  59. status = "okay";
  60. };
  61. &spi0 {
  62. status = "okay";
  63. m25p80@0 {
  64. compatible = "jedec,spi-nor";
  65. reg = <0>;
  66. spi-max-frequency = <80000000>;
  67. m25p,fast-read;
  68. partitions {
  69. compatible = "fixed-partitions";
  70. #address-cells = <1>;
  71. #size-cells = <1>;
  72. partition@0 {
  73. label = "u-boot";
  74. reg = <0x0 0x30000>;
  75. read-only;
  76. };
  77. partition@30000 {
  78. label = "u-boot-env";
  79. reg = <0x30000 0x10000>;
  80. read-only;
  81. };
  82. factory: partition@40000 {
  83. label = "factory";
  84. reg = <0x40000 0x10000>;
  85. read-only;
  86. };
  87. partition@50000 {
  88. compatible = "denx,uimage";
  89. label = "firmware";
  90. reg = <0x50000 0x1fb0000>;
  91. };
  92. };
  93. };
  94. };
  95. &pcie {
  96. status = "okay";
  97. };
  98. &ethernet {
  99. mtd-mac-address = <&factory 0xe000>;
  100. };
  101. &pinctrl {
  102. state_default: pinctrl0 {
  103. gpio {
  104. ralink,group = "jtag", "rgmii2", "uart3", "wdt";
  105. ralink,function = "gpio";
  106. };
  107. };
  108. };