ar9344_atheros_db120.dts 4.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2. #include "ar9344.dtsi"
  3. #include <dt-bindings/gpio/gpio.h>
  4. #include <dt-bindings/input/input.h>
  5. #include <dt-bindings/mtd/partitions/uimage.h>
  6. / {
  7. model = "Atheros DB120 reference board";
  8. compatible = "atheros,db120", "qca,ar9344";
  9. aliases {
  10. led-boot = &led_system;
  11. led-failsafe = &led_system;
  12. led-running = &led_system;
  13. led-upgrade = &led_system;
  14. };
  15. leds {
  16. compatible = "gpio-leds";
  17. wlan2g {
  18. label = "green:wlan2g";
  19. gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
  20. linux,default-trigger = "phy0tpt";
  21. };
  22. wlan5g {
  23. label = "green:wlan5g";
  24. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  25. linux,default-trigger = "phy1tpt";
  26. };
  27. led_system: system {
  28. label = "green:system";
  29. gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
  30. default-state = "on";
  31. };
  32. usb {
  33. label = "green:usb";
  34. gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
  35. trigger-sources = <&hub_port1>;
  36. linux,default-trigger = "usbport";
  37. };
  38. };
  39. leds-ath9k {
  40. compatible = "gpio-leds";
  41. wlan5g-ath {
  42. label = "green:wlan5g-ath";
  43. gpios = <&ath9k 0 GPIO_ACTIVE_LOW>;
  44. linux,default-trigger = "phy1tpt";
  45. };
  46. };
  47. keys {
  48. compatible = "gpio-keys";
  49. wps {
  50. linux,code = <KEY_WPS_BUTTON>;
  51. label = "WPS button";
  52. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  53. debounce-interval = <60>;
  54. };
  55. };
  56. virtual_flash {
  57. compatible = "mtd-concat";
  58. devices = <&fwconcat0 &fwconcat1>;
  59. partitions {
  60. compatible = "fixed-partitions";
  61. #address-cells = <1>;
  62. #size-cells = <1>;
  63. partition@0 {
  64. reg = <0x0 0x0>;
  65. label = "firmware";
  66. compatible = "openwrt,uimage", "denx,uimage";
  67. openwrt,ih-magic = <IH_MAGIC_OKLI>;
  68. };
  69. };
  70. };
  71. };
  72. &ref {
  73. clock-frequency = <40000000>;
  74. };
  75. &spi {
  76. status = "okay";
  77. flash@0 {
  78. compatible = "jedec,spi-nor";
  79. reg = <0>;
  80. spi-max-frequency = <25000000>;
  81. partitions {
  82. compatible = "fixed-partitions";
  83. #address-cells = <1>;
  84. #size-cells = <1>;
  85. uboot: partition@0 {
  86. label = "u-boot";
  87. reg = <0x000000 0x040000>;
  88. read-only;
  89. };
  90. partition@40000 {
  91. label = "u-boot-env";
  92. reg = <0x040000 0x010000>;
  93. read-only;
  94. };
  95. fwconcat0: partition@50000 {
  96. label = "fwconcat0";
  97. reg = <0x050000 0x630000>;
  98. };
  99. partition@680000 {
  100. label = "loader";
  101. reg = <0x680000 0x010000>;
  102. };
  103. fwconcat1: partition@690000 {
  104. label = "fwconcat1";
  105. reg = <0x690000 0x150000>;
  106. };
  107. partition@7e0000 {
  108. label = "nvram";
  109. reg = <0x7e0000 0x010000>;
  110. };
  111. art: partition@7f0000 {
  112. label = "art";
  113. reg = <0x7f0000 0x010000>;
  114. read-only;
  115. };
  116. };
  117. };
  118. };
  119. &eth0 {
  120. status = "okay";
  121. pll-data = <0x06000000 0x00000101 0x00001616>;
  122. nvmem-cells = <&macaddr_art_0>;
  123. nvmem-cell-names = "mac-address";
  124. phy-mode = "rgmii";
  125. phy-handle = <&phy0>;
  126. };
  127. &mdio0 {
  128. status = "okay";
  129. phy-mask = <0>;
  130. phy0: ethernet-phy@0 {
  131. reg = <0>;
  132. qca,ar8327-initvals = <
  133. 0x04 0x07600000 /* PORT0 PAD MODE CTRL */
  134. 0x10 0xc1000000 /* POWER_ON_STRAP */
  135. 0x7c 0x0000007e /* PORT0_STATUS */
  136. 0x94 0x0000007e /* PORT6_STATUS */
  137. >;
  138. };
  139. };
  140. &pinmux {
  141. pmx_led_wan_lan: pinmux_led_wan_lan {
  142. pinctrl-single,bits = <0x10 0x2c2d0000 0xffff0000>,
  143. <0x14 0x292a2b 0xffffff>;
  144. };
  145. };
  146. &builtin_switch {
  147. pinctrl-names = "default";
  148. pinctrl-0 = <&pmx_led_wan_lan>;
  149. /delete-property/qca,phy4-mii-enable;
  150. };
  151. &eth1 {
  152. status = "okay";
  153. nvmem-cells = <&macaddr_art_6>;
  154. nvmem-cell-names = "mac-address";
  155. gmac-config {
  156. device = <&gmac>;
  157. switch-phy-swap = <0>;
  158. switch-only-mode = <1>;
  159. };
  160. };
  161. &pcie {
  162. status = "okay";
  163. ath9k: wifi@0,0 {
  164. compatible = "pci168c,0030";
  165. reg = <0x0000 0 0 0 0>;
  166. qca,no-eeprom;
  167. ieee80211-freq-limit = <4900000 5990000>;
  168. #gpio-cells = <2>;
  169. gpio-controller;
  170. };
  171. };
  172. &wmac {
  173. status = "okay";
  174. mtd-cal-data = <&art 0x1000>;
  175. };
  176. &usb {
  177. status = "okay";
  178. #address-cells = <1>;
  179. #size-cells = <0>;
  180. hub_port1: port@1 {
  181. reg = <1>;
  182. #trigger-source-cells = <0>;
  183. };
  184. };
  185. &usb_phy {
  186. status = "okay";
  187. };
  188. &art {
  189. compatible = "nvmem-cells";
  190. #address-cells = <1>;
  191. #size-cells = <1>;
  192. macaddr_art_0: macaddr@0 {
  193. reg = <0x0 0x6>;
  194. };
  195. macaddr_art_6: macaddr@6 {
  196. reg = <0x6 0x6>;
  197. };
  198. };