1
0

qca9561_avm_fritz4020.dts 2.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  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 "qca956x.dtsi"
  6. / {
  7. compatible = "avm,fritz4020", "qca,qca9560";
  8. model = "AVM FRITZ!Box 4020";
  9. aliases {
  10. led-boot = &power;
  11. led-failsafe = &info_red;
  12. led-running = &power;
  13. led-upgrade = &info_red;
  14. };
  15. chosen {
  16. bootargs = "console=ttyS0,115200n8";
  17. };
  18. led_spi {
  19. compatible = "spi-gpio";
  20. #address-cells = <1>;
  21. #size-cells = <0>;
  22. gpio-sck = <&gpio 20 GPIO_ACTIVE_HIGH>;
  23. gpio-mosi = <&gpio 19 GPIO_ACTIVE_HIGH>;
  24. num-chipselects = <0>;
  25. led_gpio: led_gpio@0 {
  26. compatible = "fairchild,74hc595";
  27. reg = <0>;
  28. gpio-controller;
  29. #gpio-cells = <2>;
  30. registers-number = <1>;
  31. lines-initial-states = /bits/ 8 <0xff>;
  32. spi-max-frequency = <10000000>;
  33. gpio_latch_bit {
  34. gpio-hog;
  35. gpios = <7 GPIO_ACTIVE_HIGH>;
  36. output-high;
  37. line-name = "gpio-latch-bit";
  38. };
  39. };
  40. };
  41. leds {
  42. compatible = "gpio-leds";
  43. power: power {
  44. label = "fritz4020:green:power";
  45. gpios = <&led_gpio 2 GPIO_ACTIVE_LOW>;
  46. default-state = "on";
  47. };
  48. wlan {
  49. label = "fritz4020:green:wlan";
  50. gpios = <&led_gpio 3 GPIO_ACTIVE_LOW>;
  51. linux,default-trigger = "phy0tpt";
  52. };
  53. lan {
  54. label = "fritz4020:green:lan";
  55. gpios = <&led_gpio 0 GPIO_ACTIVE_LOW>;
  56. };
  57. wan {
  58. label = "fritz4020:green:wan";
  59. gpios = <&led_gpio 4 GPIO_ACTIVE_LOW>;
  60. };
  61. info {
  62. label = "fritz4020:green:info";
  63. gpios = <&led_gpio 6 GPIO_ACTIVE_LOW>;
  64. };
  65. info_red: info_red {
  66. label = "fritz4020:red:info";
  67. gpios = <&led_gpio 1 GPIO_ACTIVE_LOW>;
  68. };
  69. };
  70. keys {
  71. compatible = "gpio-keys-polled";
  72. poll-interval = <100>;
  73. wps_button {
  74. label = "WPS button";
  75. linux,code = <KEY_WPS_BUTTON>;
  76. gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
  77. };
  78. wlan_button {
  79. label = "WLAN button";
  80. linux,code = <KEY_RFKILL>;
  81. gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
  82. };
  83. };
  84. };
  85. &uart {
  86. status = "okay";
  87. };
  88. &gpio {
  89. status = "okay";
  90. };
  91. &spi {
  92. status = "okay";
  93. num-cs = <1>;
  94. flash@0 {
  95. compatible = "jedec,spi-nor";
  96. reg = <0>;
  97. spi-max-frequency = <25000000>;
  98. partitions {
  99. compatible = "fixed-partitions";
  100. #address-cells = <1>;
  101. #size-cells = <1>;
  102. partition@0 {
  103. label = "urlader";
  104. reg = <0x000000 0x020000>;
  105. read-only;
  106. };
  107. partition@1 {
  108. compatible = "avm,eva-firmware";
  109. label = "firmware";
  110. reg = <0x020000 0xee0000>;
  111. };
  112. partition@2 {
  113. label = "tffs (1)";
  114. reg = <0xf00000 0x080000>;
  115. read-only;
  116. };
  117. partition@3 {
  118. label = "tffs (2)";
  119. reg = <0xf80000 0x080000>;
  120. read-only;
  121. };
  122. };
  123. };
  124. };
  125. &eth0 {
  126. status = "okay";
  127. phy-mode = "mii";
  128. phy-handle = <&swphy0>;
  129. gmac-config {
  130. device = <&gmac>;
  131. switch-phy-addr-swap = <1>;
  132. switch-phy-swap = <1>;
  133. };
  134. };
  135. &eth1 {
  136. status = "okay";
  137. };
  138. &wmac {
  139. status = "okay";
  140. qca,no-eeprom;
  141. };