1
0

ar7242_buffalo_wzr-bhr.dtsi 2.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. /dts-v1/;
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include "ar7242.dtsi"
  6. / {
  7. aliases {
  8. led-boot = &diag;
  9. led-failsafe = &diag;
  10. led-upgrade = &diag;
  11. };
  12. extosc: ref {
  13. compatible = "fixed-clock";
  14. #clock-cells = <0>;
  15. clock-frequency = <40000000>;
  16. };
  17. keys: keys {
  18. compatible = "gpio-keys-polled";
  19. poll-interval = <20>;
  20. usb {
  21. label = "usb";
  22. linux,code = <BTN_2>;
  23. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  24. debounce-interval = <60>;
  25. };
  26. reset {
  27. label = "reset";
  28. linux,code = <KEY_RESTART>;
  29. gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
  30. debounce-interval = <60>;
  31. };
  32. };
  33. leds {
  34. compatible = "gpio-leds";
  35. sec_vpn: sec_vpn {
  36. gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
  37. };
  38. diag: diag {
  39. label = "buffalo:red:diag";
  40. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  41. };
  42. usb {
  43. label = "buffalo:green:usb";
  44. gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
  45. trigger-sources = <&hub_port>;
  46. linux,default-trigger = "usbport";
  47. };
  48. };
  49. gpio-export {
  50. compatible = "gpio-export";
  51. #size-cells = <0>;
  52. gpio_usb_power {
  53. gpio-export,name = "buffalo:usb-power";
  54. gpio-export,output = <1>;
  55. gpios = <&gpio 16 GPIO_ACTIVE_HIGH>;
  56. };
  57. };
  58. virtual_flash {
  59. compatible = "mtd-concat";
  60. devices = <&flash0 &flash1>;
  61. partitions {
  62. compatible = "fixed-partitions";
  63. #address-cells = <1>;
  64. #size-cells = <1>;
  65. partition@0 {
  66. reg = <0x0 0x40000>;
  67. label = "u-boot";
  68. read-only;
  69. };
  70. partition@40000 {
  71. reg = <0x40000 0x10000>;
  72. label = "u-boot-env";
  73. };
  74. art: partition@50000 {
  75. reg = <0x50000 0x10000>;
  76. label = "art";
  77. read-only;
  78. };
  79. partition@60000 {
  80. compatible = "denx,uimage";
  81. reg = <0x60000 0x1f80000>;
  82. label = "firmware";
  83. };
  84. partition@1fe0000 {
  85. reg = <0x1fe0000 0x20000>;
  86. label = "user_property";
  87. read-only;
  88. };
  89. };
  90. };
  91. };
  92. &spi {
  93. status = "okay";
  94. cs-gpios = <0>, <0>;
  95. num-cs = <2>;
  96. flash0: flash@0 {
  97. compatible = "jedec,spi-nor";
  98. reg = <0>;
  99. spi-max-frequency = <25000000>;
  100. };
  101. flash1: flash@1 {
  102. compatible = "jedec,spi-nor";
  103. reg = <1>;
  104. spi-max-frequency = <25000000>;
  105. };
  106. };
  107. &mdio0 {
  108. status = "okay";
  109. phy-mask = <0x1>;
  110. phy0: ethernet-phy@0 {
  111. reg = <0>;
  112. phy-mode = "rgmii";
  113. };
  114. };
  115. &eth0 {
  116. status = "okay";
  117. phy-mode = "rgmii";
  118. phy-handle = <&phy0>;
  119. };
  120. &pll {
  121. clocks = <&extosc>;
  122. };
  123. &uart {
  124. status = "okay";
  125. };
  126. &usb_phy {
  127. status = "okay";
  128. };
  129. &usb {
  130. #address-cells = <1>;
  131. #size-cells = <0>;
  132. status = "okay";
  133. hub_port: port@1 {
  134. reg = <1>;
  135. #trigger-source-cells = <0>;
  136. };
  137. };