D240.dts 3.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157
  1. /*
  2. * BSD LICENSE
  3. *
  4. * Copyright(c) 2017 Kristian Evensen <kristian.evensen@gmail.com>.
  5. * All rights reserved.
  6. *
  7. * Redistribution and use in source and binary forms, with or without
  8. * modification, are permitted provided that the following conditions
  9. * are met:
  10. *
  11. * * Redistributions of source code must retain the above copyright
  12. * notice, this list of conditions and the following disclaimer.
  13. * * Redistributions in binary form must reproduce the above copyright
  14. * notice, this list of conditions and the following disclaimer in
  15. * the documentation and/or other materials provided with the
  16. * distribution.
  17. * * Neither the name of Broadcom Corporation nor the names of its
  18. * contributors may be used to endorse or promote products derived
  19. * from this software without specific prior written permission.
  20. *
  21. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
  22. * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
  23. * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
  24. * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
  25. * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
  26. * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
  27. * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
  28. * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
  29. * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
  30. * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  31. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  32. */
  33. /dts-v1/;
  34. #include "mt7620a.dtsi"
  35. #include <dt-bindings/gpio/gpio.h>
  36. #include <dt-bindings/input/input.h>
  37. / {
  38. compatible = "d240", "ralink,mt7620a-soc";
  39. model = "Sanlinking Technologies D240";
  40. chosen {
  41. bootargs = "console=ttyS0,115200";
  42. };
  43. gpio-leds {
  44. compatible = "gpio-leds";
  45. power {
  46. label = "d240:blue:power";
  47. gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>;
  48. };
  49. usb {
  50. label = "d240:blue:usb";
  51. gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
  52. };
  53. air {
  54. label = "d240:blue:wifi";
  55. gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  56. };
  57. };
  58. gpio-keys-polled {
  59. compatible = "gpio-keys-polled";
  60. #address-cells = <1>;
  61. #size-cells = <0>;
  62. poll-interval = <20>;
  63. reset {
  64. label = "reset";
  65. gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  66. linux,code = <KEY_RESTART>;
  67. };
  68. };
  69. };
  70. &gpio1 {
  71. status = "okay";
  72. };
  73. &gpio3 {
  74. status = "okay";
  75. };
  76. &spi0 {
  77. status = "okay";
  78. en25q128@0 {
  79. #address-cells = <1>;
  80. #size-cells = <1>;
  81. compatible = "jedec,spi-nor";
  82. reg = <0>;
  83. spi-max-frequency = <10000000>;
  84. partition@0 {
  85. label = "u-boot";
  86. reg = <0x0 0x30000>;
  87. read-only;
  88. };
  89. partition@30000 {
  90. label = "u-boot-env";
  91. reg = <0x30000 0x10000>;
  92. read-only;
  93. };
  94. factory: partition@40000 {
  95. label = "factory";
  96. reg = <0x40000 0x10000>;
  97. read-only;
  98. };
  99. partition@50000 {
  100. label = "firmware";
  101. reg = <0x50000 0xfb0000>;
  102. };
  103. };
  104. };
  105. &sdhci {
  106. status = "okay";
  107. };
  108. &ehci {
  109. status = "okay";
  110. };
  111. &ohci {
  112. status = "okay";
  113. };
  114. &ethernet {
  115. mtd-mac-address = <&factory 0x4>;
  116. ralink,port-map = "wllll";
  117. };
  118. &wmac {
  119. ralink,mtd-eeprom = <&factory 0>;
  120. };
  121. &pinctrl {
  122. state_default: pinctrl0 {
  123. default {
  124. ralink,group = "i2c", "uartf", "wled", "spi refclk", "pa";
  125. ralink,function = "gpio";
  126. };
  127. };
  128. };
  129. &pcie {
  130. status = "okay";
  131. };