X5.dts 2.2 KB

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