1
0

kng_rc.dts 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165
  1. /dts-v1/;
  2. #include "mt7620a.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. model = "ZyXEL Keenetic Viva";
  7. gpio-leds {
  8. compatible = "gpio-leds";
  9. wan {
  10. label = "kng_rc:green:wan";
  11. gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
  12. };
  13. usb {
  14. label = "kng_rc:green:usb";
  15. gpios = <&gpio0 8 GPIO_ACTIVE_LOW>;
  16. };
  17. power_alert {
  18. label = "kng_rc:red:power";
  19. gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  20. };
  21. wifi {
  22. label = "kng_rc:green:wifi";
  23. gpios = <&gpio0 11 GPIO_ACTIVE_LOW>;
  24. };
  25. power {
  26. label = "kng_rc:green:power";
  27. gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  28. };
  29. };
  30. gpio-keys-polled {
  31. compatible = "gpio-keys";
  32. #address-cells = <1>;
  33. #size-cells = <0>;
  34. poll-interval = <20>;
  35. reset {
  36. label = "reset";
  37. gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  38. linux,code = <KEY_RESTART>;
  39. };
  40. wps {
  41. label = "wps";
  42. gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  43. linux,code = <KEY_WPS_BUTTON>;
  44. };
  45. fn {
  46. label = "fn";
  47. gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
  48. linux,code = <BTN_0>;
  49. };
  50. };
  51. gpio_export {
  52. compatible = "gpio-export";
  53. #size-cells = <0>;
  54. usb_power {
  55. gpio-export,name = "usb";
  56. gpio-export,output = <1>;
  57. gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  58. };
  59. };
  60. rtl8367rb {
  61. compatible = "realtek,rtl8367b";
  62. cpu_port = <7>;
  63. realtek,extif2 = <1 0 1 1 1 1 1 1 2>;
  64. mdio = <&mdio0>;
  65. };
  66. };
  67. &spi0 {
  68. status = "okay";
  69. m25p80@0 {
  70. #address-cells = <1>;
  71. #size-cells = <1>;
  72. compatible = "jedec,spi-nor";
  73. reg = <0>;
  74. spi-max-frequency = <10000000>;
  75. partition@0 {
  76. label = "u-boot";
  77. reg = <0x0 0x30000>;
  78. read-only;
  79. };
  80. partition@30000 {
  81. label = "u-boot-env";
  82. reg = <0x30000 0x10000>;
  83. read-only;
  84. };
  85. factory: partition@40000 {
  86. label = "factory";
  87. reg = <0x40000 0x10000>;
  88. read-only;
  89. };
  90. partition@50000 {
  91. label = "firmware";
  92. reg = <0x50000 0xfb0000>;
  93. };
  94. };
  95. };
  96. &pinctrl {
  97. state_default: pinctrl0 {
  98. gpio {
  99. ralink,group = "i2c", "uartf";
  100. ralink,function = "gpio";
  101. };
  102. };
  103. };
  104. &ethernet {
  105. status = "okay";
  106. pinctrl-names = "default";
  107. pinctrl-0 = <&rgmii2_pins &mdio_pins>;
  108. mtd-mac-address = <&factory 0x00004>;
  109. port@4 {
  110. status = "okay";
  111. mediatek,fixed-link = <1000 1 1 1>;
  112. phy-mode = "rgmii";
  113. phy-handle = <&phy4>;
  114. };
  115. mdio0: mdio-bus {
  116. status = "okay";
  117. phy4: ethernet-phy@4 {
  118. reg = <4>;
  119. phy-mode = "rgmii";
  120. };
  121. };
  122. };
  123. &gsw {
  124. mediatek,port4 = "gmac";
  125. };
  126. &wmac {
  127. ralink,mtd-eeprom = <&factory 0>;
  128. };
  129. &ehci {
  130. status = "okay";
  131. };
  132. &ohci {
  133. status = "okay";
  134. };