1
0

WE1026-5G.dtsi 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125
  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. #include "mt7620a.dtsi"
  34. #include <dt-bindings/gpio/gpio.h>
  35. #include <dt-bindings/input/input.h>
  36. / {
  37. compatible = "zbtlink,we1026-5g", "ralink,mt7620a-soc";
  38. chosen {
  39. bootargs = "console=ttyS0,115200";
  40. };
  41. gpio-leds {
  42. compatible = "gpio-leds";
  43. lan {
  44. label = "we1026-5g:green:lan";
  45. gpios = <&gpio2 0 GPIO_ACTIVE_LOW>;
  46. };
  47. usb {
  48. label = "we1026-5g:green:usb";
  49. gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
  50. trigger-sources = <&ohci_port1>, <&ehci_port1>;
  51. linux,default-trigger = "usbport";
  52. };
  53. wifi {
  54. label = "we1026-5g:green:wifi";
  55. gpios = <&gpio3 0 GPIO_ACTIVE_LOW>;
  56. };
  57. };
  58. gpio-keys-polled {
  59. compatible = "gpio-keys-polled";
  60. poll-interval = <20>;
  61. reset {
  62. label = "reset";
  63. gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  64. linux,code = <KEY_RESTART>;
  65. };
  66. };
  67. };
  68. &gpio2 {
  69. status = "okay";
  70. };
  71. &gpio3 {
  72. status = "okay";
  73. };
  74. &sdhci {
  75. status = "okay";
  76. };
  77. &ehci {
  78. status = "okay";
  79. };
  80. &ohci {
  81. status = "okay";
  82. };
  83. &ethernet {
  84. mtd-mac-address = <&factory 0x28>;
  85. };
  86. &wmac {
  87. ralink,mtd-eeprom = <&factory 0>;
  88. };
  89. &pinctrl {
  90. state_default: pinctrl0 {
  91. default {
  92. ralink,group = "i2c", "uartf", "spi refclk", "ephy", "wled";
  93. ralink,function = "gpio";
  94. };
  95. };
  96. };
  97. &pcie {
  98. status = "okay";
  99. };
  100. &pcie0 {
  101. wifi@0,0 {
  102. compatible = "pci14c3,7662";
  103. reg = <0x0000 0 0 0 0>;
  104. mediatek,mtd-eeprom = <&factory 0x8000>;
  105. ieee80211-freq-limit = <5000000 6000000>;
  106. };
  107. };