FONERA20N.dts 2.1 KB

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