X5.dts 2.1 KB

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