ar9341_openmesh_om2p-hs.dtsi 2.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. #include "ar9341.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. / {
  6. chosen {
  7. /delete-property/ bootargs;
  8. };
  9. aliases {
  10. led-boot = &led_power_blue;
  11. led-failsafe = &led_power_blue;
  12. led-running = &led_power_blue;
  13. led-upgrade = &led_power_blue;
  14. label-mac-device = &eth1;
  15. };
  16. keys {
  17. compatible = "gpio-keys";
  18. pinctrl-names = "default";
  19. pinctrl-0 = <&jtag_disable_pins &led_lan_wan_blue_pin>;
  20. reset {
  21. label = "reset";
  22. linux,code = <KEY_RESTART>;
  23. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  24. };
  25. };
  26. leds {
  27. compatible = "gpio-leds";
  28. led_power_blue: power_blue {
  29. label = "blue:power";
  30. gpios = <&gpio 0 GPIO_ACTIVE_LOW>;
  31. default-state = "on";
  32. };
  33. wifi_green {
  34. label = "green:wifi";
  35. gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
  36. linux,default-trigger = "phy0tpt";
  37. };
  38. wifi_red {
  39. label = "red:wifi";
  40. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  41. };
  42. wifi_yellow {
  43. label = "yellow:wifi";
  44. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  45. };
  46. lan_blue {
  47. label = "blue:lan";
  48. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  49. };
  50. wan_blue {
  51. label = "blue:wan";
  52. gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
  53. };
  54. };
  55. watchdog {
  56. compatible = "linux,wdt-gpio";
  57. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  58. hw_algo = "toggle";
  59. /* hw_margin_ms is actually 300s but driver limits it to 60s */
  60. hw_margin_ms = <60000>;
  61. always-running;
  62. };
  63. };
  64. &ref {
  65. clock-frequency = <40000000>;
  66. };
  67. &pinmux {
  68. led_lan_wan_blue_pin: pinmux_lan_wan_blue_pin {
  69. pinctrl-single,bits = <0x10 0x0 0x0000ffff>;
  70. };
  71. };
  72. &spi {
  73. status = "okay";
  74. flash@0 {
  75. compatible = "jedec,spi-nor";
  76. reg = <0>;
  77. spi-max-frequency = <40000000>;
  78. /* partitions are passed via bootloader */
  79. partitions {
  80. compatible = "fixed-partitions";
  81. #address-cells = <1>;
  82. #size-cells = <1>;
  83. partition@0 {
  84. label = "u-boot";
  85. reg = <0x000000 0x040000>;
  86. read-only;
  87. };
  88. partition@40000 {
  89. label = "u-boot-env";
  90. reg = <0x040000 0x040000>;
  91. };
  92. partition@80000 {
  93. label = "custom";
  94. reg = <0x080000 0x140000>;
  95. read-only;
  96. };
  97. partition@1c0000 {
  98. label = "inactive";
  99. reg = <0x1c0000 0x700000>;
  100. };
  101. partition@8c0000 {
  102. label = "inactive2";
  103. reg = <0x8c0000 0x700000>;
  104. };
  105. art: partition@fc0000 {
  106. label = "ART";
  107. reg = <0xfc0000 0x040000>;
  108. read-only;
  109. nvmem-layout {
  110. compatible = "fixed-layout";
  111. #address-cells = <1>;
  112. #size-cells = <1>;
  113. macaddr_art_0: macaddr@0 {
  114. reg = <0x0 0x6>;
  115. };
  116. macaddr_art_6: macaddr@6 {
  117. reg = <0x6 0x6>;
  118. };
  119. };
  120. };
  121. };
  122. };
  123. };
  124. &eth0 {
  125. status = "okay";
  126. phy-handle = <&swphy4>;
  127. nvmem-cells = <&macaddr_art_6>;
  128. nvmem-cell-names = "mac-address";
  129. };
  130. &eth1 {
  131. nvmem-cells = <&macaddr_art_0>;
  132. nvmem-cell-names = "mac-address";
  133. };
  134. &wmac {
  135. status = "okay";
  136. mtd-cal-data = <&art 0x1000>;
  137. };