1
0

X5.dts 2.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147
  1. /dts-v1/;
  2. #include "rt5350.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "poray,x5", "ralink,rt5350-soc";
  7. model = "Poray X5";
  8. aliases {
  9. led-boot = &led_power;
  10. led-failsafe = &led_power;
  11. led-running = &led_power;
  12. led-upgrade = &led_power;
  13. };
  14. gpio-leds {
  15. compatible = "gpio-leds";
  16. led_power: power {
  17. label = "x5:green:power";
  18. gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  19. };
  20. 20 {
  21. label = "x5:green:20";
  22. gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  23. };
  24. 50 {
  25. label = "x5:green:50";
  26. gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
  27. };
  28. 80 {
  29. label = "x5:green:80";
  30. gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
  31. };
  32. };
  33. gpio-keys-polled {
  34. compatible = "gpio-keys-polled";
  35. poll-interval = <20>;
  36. bat {
  37. label = "bat";
  38. gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
  39. linux,code = <KEY_WPS_BUTTON>;
  40. };
  41. reset {
  42. label = "reset";
  43. gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  44. linux,code = <KEY_RESTART>;
  45. };
  46. mode {
  47. label = "mode";
  48. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  49. linux,code = <BTN_0>;
  50. linux,input-type = <EV_SW>;
  51. };
  52. };
  53. gpio_export {
  54. compatible = "gpio-export";
  55. #size-cells = <0>;
  56. usb-mode {
  57. gpio-export,name = "usb-mode";
  58. gpio-export,output = <0>;
  59. gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
  60. };
  61. };
  62. };
  63. &spi0 {
  64. status = "okay";
  65. m25p80@0 {
  66. compatible = "jedec,spi-nor";
  67. reg = <0>;
  68. spi-max-frequency = <10000000>;
  69. partitions {
  70. compatible = "fixed-partitions";
  71. #address-cells = <1>;
  72. #size-cells = <1>;
  73. partition@0 {
  74. label = "u-boot";
  75. reg = <0x0 0x30000>;
  76. read-only;
  77. };
  78. partition@30000 {
  79. label = "u-boot-env";
  80. reg = <0x30000 0x10000>;
  81. read-only;
  82. };
  83. factory: partition@40000 {
  84. label = "factory";
  85. reg = <0x40000 0x10000>;
  86. read-only;
  87. };
  88. partition@50000 {
  89. label = "firmware";
  90. reg = <0x50000 0x7b0000>;
  91. };
  92. };
  93. };
  94. };
  95. &pinctrl {
  96. state_default: pinctrl0 {
  97. gpio {
  98. ralink,group = "i2c", "jtag", "uartf";
  99. ralink,function = "gpio";
  100. };
  101. };
  102. };
  103. &ethernet {
  104. mtd-mac-address = <&factory 0x4>;
  105. };
  106. &esw {
  107. mediatek,portmap = <0x2f>;
  108. mediatek,led_polarity = <1>;
  109. };
  110. &wmac {
  111. ralink,mtd-eeprom = <&factory 0>;
  112. ralink,led-polarity = <1>;
  113. };
  114. &ehci {
  115. status = "okay";
  116. };
  117. &ohci {
  118. status = "okay";
  119. };