1
0

HPM.dts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161
  1. /dts-v1/;
  2. #include "rt3883.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "omnima,hpm", "ralink,rt3883-soc";
  7. model = "Omnima HPM";
  8. aliases {
  9. led-boot = &led_status;
  10. led-failsafe = &led_status;
  11. led-running = &led_status;
  12. led-upgrade = &led_status;
  13. };
  14. chosen {
  15. bootargs = "console=ttyS0,115200";
  16. };
  17. gpio-keys-polled {
  18. compatible = "gpio-keys-polled";
  19. poll-interval = <100>;
  20. reset {
  21. label = "reset";
  22. gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
  23. linux,code = <KEY_RESTART>;
  24. };
  25. };
  26. gpio-leds {
  27. compatible = "gpio-leds";
  28. power {
  29. label = "hpm:orange:power";
  30. gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
  31. default-state = "on";
  32. };
  33. led_status: status {
  34. label = "hpm:green:status";
  35. gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
  36. default-state = "on";
  37. };
  38. eth {
  39. label = "hpm:green:eth";
  40. gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
  41. };
  42. eth2 {
  43. label = "hpm:red:eth";
  44. gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
  45. };
  46. wifi {
  47. label = "hpm:green:wifi";
  48. gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
  49. };
  50. wifi2 {
  51. label = "hpm:red:wifi";
  52. gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
  53. };
  54. };
  55. gpio_export {
  56. compatible = "gpio-export";
  57. #size-cells = <0>;
  58. /* gpio 12 and 13 handle the OC input */
  59. usb0 {
  60. gpio-export,name = "usb0";
  61. gpio-export,output = <1>;
  62. gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
  63. };
  64. usb1 {
  65. gpio-export,name = "usb1";
  66. gpio-export,output = <1>;
  67. gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
  68. };
  69. };
  70. };
  71. &spi0 {
  72. status = "okay";
  73. m25p80@0 {
  74. compatible = "jedec,spi-nor";
  75. spi-max-frequency = <25000000>;
  76. reg = <0>;
  77. partitions {
  78. compatible = "fixed-partitions";
  79. #address-cells = <1>;
  80. #size-cells = <1>;
  81. partition@0 {
  82. reg = <0x0 0x0030000>;
  83. label = "u-boot";
  84. read-only;
  85. };
  86. partition@30000 {
  87. reg = <0x00030000 0x00010000>;
  88. label = "config";
  89. read-only;
  90. };
  91. factory: partition@40000 {
  92. reg = <0x00040000 0x00010000>;
  93. label = "factory";
  94. read-only;
  95. };
  96. partition@50000 {
  97. reg = <0x00050000 0x00fb0000>;
  98. label = "firmware";
  99. };
  100. };
  101. };
  102. };
  103. &pinctrl {
  104. state_default: pinctrl0 {
  105. gpio {
  106. ralink,group = "i2c", "jtag", "uartf";
  107. ralink,function = "gpio";
  108. };
  109. };
  110. };
  111. &ethernet {
  112. phy-handle = <&phy0>;
  113. phy-mode = "rgmii";
  114. mtd-mac-address = <&factory 0x28>;
  115. mdio-bus {
  116. status = "okay";
  117. phy0: ethernet-phy@4 {
  118. reg = <4>;
  119. };
  120. };
  121. };
  122. &wmac {
  123. ralink,mtd-eeprom = <&factory 0>;
  124. };
  125. &ehci {
  126. status = "okay";
  127. };
  128. &ohci {
  129. status = "okay";
  130. };