1
0

FONERA20N.dts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156
  1. /dts-v1/;
  2. #include "rt3050.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "fon,fonera20n", "ralink,rt3052-soc";
  7. model = "La Fonera 2.0N";
  8. aliases {
  9. led-boot = &led_power;
  10. led-failsafe = &led_power;
  11. led-running = &led_power;
  12. led-upgrade = &led_power;
  13. };
  14. cfi@1f000000 {
  15. compatible = "cfi-flash";
  16. reg = <0x1f000000 0x800000>;
  17. bank-width = <2>;
  18. device-width = <2>;
  19. partitions {
  20. compatible = "fixed-partitions";
  21. #address-cells = <1>;
  22. #size-cells = <1>;
  23. partition@0 {
  24. label = "u-boot";
  25. reg = <0x0 0x30000>;
  26. read-only;
  27. };
  28. partition@30000 {
  29. label = "u-boot-env";
  30. reg = <0x30000 0x10000>;
  31. read-only;
  32. };
  33. factory: partition@40000 {
  34. label = "factory";
  35. reg = <0x40000 0x10000>;
  36. read-only;
  37. };
  38. partition@50000 {
  39. label = "firmware";
  40. reg = <0x50000 0x7b0000>;
  41. };
  42. };
  43. };
  44. gpio-leds {
  45. compatible = "gpio-leds";
  46. wifi {
  47. label = "fonera20n:orange:wifi";
  48. gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
  49. };
  50. led_power: power {
  51. label = "fonera20n:green:power";
  52. gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
  53. };
  54. usb {
  55. label = "fonera20n:orange:usb";
  56. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  57. trigger-sources = <&otg_port1>;
  58. linux,default-trigger = "usbport";
  59. };
  60. };
  61. gpio-keys-polled {
  62. compatible = "gpio-keys-polled";
  63. poll-interval = <20>;
  64. reset {
  65. label = "reset";
  66. gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  67. linux,code = <KEY_RESTART>;
  68. };
  69. switch {
  70. label = "switch";
  71. gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
  72. linux,code = <KEY_RFKILL>;
  73. linux,input-type = <EV_SW>;
  74. };
  75. };
  76. };
  77. &pinctrl {
  78. state_default: pinctrl0 {
  79. gpio {
  80. ralink,group = "i2c", "spi", "jtag", "mdio", "rgmii", "uartf";
  81. ralink,function = "gpio";
  82. };
  83. };
  84. };
  85. &ethernet {
  86. mtd-mac-address = <&factory 0x28>;
  87. };
  88. &esw {
  89. #address-cells = <1>;
  90. #size-cells = <0>;
  91. mediatek,portmap = <0x2f>;
  92. port@0 {
  93. compatible = "swconfig,port";
  94. reg = <0>;
  95. swconfig,segment = "lan";
  96. swconfig,portmap = <0 4>;
  97. };
  98. port@1 {
  99. compatible = "swconfig,port";
  100. reg = <1>;
  101. swconfig,segment = "lan";
  102. swconfig,portmap = <1 3>;
  103. };
  104. port@2 {
  105. compatible = "swconfig,port";
  106. reg = <2>;
  107. swconfig,segment = "lan";
  108. swconfig,portmap = <2 2>;
  109. };
  110. port@3 {
  111. compatible = "swconfig,port";
  112. reg = <3>;
  113. swconfig,segment = "lan";
  114. swconfig,portmap = <3 1>;
  115. };
  116. port@4 {
  117. compatible = "swconfig,port";
  118. reg = <4>;
  119. swconfig,segment = "wan";
  120. swconfig,portmap = <4 0>;
  121. };
  122. };
  123. &wmac {
  124. ralink,mtd-eeprom = <&factory 0>;
  125. };
  126. &otg {
  127. status = "okay";
  128. };