HPM.dts 2.3 KB

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