1
0

kng_rc.dts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. compatible = "zyxel,keenetic-viva", "ralink,mt7620a-soc";
  7. model = "ZyXEL Keenetic Viva";
  8. aliases {
  9. led-boot = &led_power_green;
  10. led-failsafe = &led_power_green;
  11. led-running = &led_power_green;
  12. led-upgrade = &led_power_green;
  13. };
  14. gpio-leds {
  15. compatible = "gpio-leds";
  16. wan {
  17. label = "kng_rc:green:wan";
  18. gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
  19. };
  20. usb {
  21. label = "kng_rc:green:usb";
  22. gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
  23. trigger-sources = <&ohci_port1>, <&ehci_port1>;
  24. linux,default-trigger = "usbport";
  25. };
  26. power_alert {
  27. label = "kng_rc:red:power";
  28. gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  29. };
  30. wifi {
  31. label = "kng_rc:green:wifi";
  32. gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
  33. };
  34. led_power_green: power {
  35. label = "kng_rc:green:power";
  36. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  37. };
  38. };
  39. gpio-keys-polled {
  40. compatible = "gpio-keys";
  41. poll-interval = <20>;
  42. reset {
  43. label = "reset";
  44. gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  45. linux,code = <KEY_RESTART>;
  46. };
  47. wps {
  48. label = "wps";
  49. gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  50. linux,code = <KEY_WPS_BUTTON>;
  51. };
  52. fn {
  53. label = "fn";
  54. gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
  55. linux,code = <BTN_0>;
  56. };
  57. };
  58. gpio_export {
  59. compatible = "gpio-export";
  60. #size-cells = <0>;
  61. usb_power {
  62. gpio-export,name = "usb";
  63. gpio-export,output = <1>;
  64. gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  65. };
  66. };
  67. rtl8367rb {
  68. compatible = "realtek,rtl8367b";
  69. cpu_port = <7>;
  70. realtek,extif2 = <1 0 1 1 1 1 1 1 2>;
  71. mii-bus = <&mdio0>;
  72. };
  73. };
  74. &spi0 {
  75. status = "okay";
  76. m25p80@0 {
  77. compatible = "jedec,spi-nor";
  78. reg = <0>;
  79. spi-max-frequency = <10000000>;
  80. partitions {
  81. compatible = "fixed-partitions";
  82. #address-cells = <1>;
  83. #size-cells = <1>;
  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. };
  106. &pinctrl {
  107. state_default: pinctrl0 {
  108. gpio {
  109. ralink,group = "i2c", "uartf";
  110. ralink,function = "gpio";
  111. };
  112. };
  113. };
  114. &ethernet {
  115. status = "okay";
  116. pinctrl-names = "default";
  117. pinctrl-0 = <&rgmii2_pins &mdio_pins>;
  118. mtd-mac-address = <&factory 0x00004>;
  119. port@4 {
  120. status = "okay";
  121. mediatek,fixed-link = <1000 1 1 1>;
  122. phy-mode = "rgmii";
  123. phy-handle = <&phy4>;
  124. };
  125. mdio0: mdio-bus {
  126. status = "okay";
  127. phy4: ethernet-phy@4 {
  128. reg = <4>;
  129. phy-mode = "rgmii";
  130. };
  131. };
  132. };
  133. &gsw {
  134. mediatek,port4 = "gmac";
  135. };
  136. &wmac {
  137. ralink,mtd-eeprom = <&factory 0>;
  138. };
  139. &ehci {
  140. status = "okay";
  141. };
  142. &ohci {
  143. status = "okay";
  144. };