Advertisement
Guest User

DAP-1720 .dts draft

a guest
Jun 9th, 2023
42
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.09 KB | None | 0 0
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2.  
  3. #include "qca956x.dtsi"
  4.  
  5. #include <dt-bindings/gpio/gpio.h>
  6. #include <dt-bindings/input/input.h>
  7. #include <dt-bindings/leds/common.h>
  8.  
  9. / {
  10. model = "D-Link DAP-1720 A1";
  11. compatible = "dlink,dap-1720-a1", "qca,qca9563";
  12.  
  13. aliases {
  14. led-boot = &led_power;
  15. led-failsafe = &led_status;
  16. led-running = &led_power;
  17. led-upgrade = &led_status;
  18.  
  19. label-mac-device = &eth0;
  20. };
  21.  
  22. keys {
  23. compatible = "gpio-keys";
  24.  
  25. reset {
  26. label = "reset";
  27. gpios = <&gpio 1 GPIO_ACTIVE_LOW>;
  28. linux,code = <KEY_RESTART>;
  29. debounce-interval = <60>;
  30. };
  31.  
  32. wps {
  33. label = "wps";
  34. gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
  35. linux,code = <KEY_WPS_BUTTON>;
  36. debounce-interval = <60>;
  37. };
  38.  
  39. modeswitch {
  40. label = "mode";
  41. gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
  42. linux,code = <BTN_0>;
  43. linux,input-type = <EV_SW>;
  44. debounce-interval = <60>;
  45. };
  46. };
  47.  
  48. leds {
  49. compatible = "gpio-leds";
  50.  
  51. led_status: status {
  52. function = LED_FUNCTION_STATUS;
  53. color = <LED_COLOR_ID_RED>;
  54. gpios = <&gpio 5 GPIO_ACTIVE_LOW>;
  55. panic-indicator;
  56. };
  57.  
  58. led_power: power {
  59. function = LED_FUNCTION_POWER;
  60. color = <LED_COLOR_ID_GREEN>;
  61. gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
  62. };
  63.  
  64. rssilow {
  65. label = "red:rssilow";
  66. function = LED_FUNCTION_INDICATOR;
  67. color = <LED_COLOR_ID_RED>;
  68. gpios = <&gpio 20 GPIO_ACTIVE_LOW>;
  69. };
  70.  
  71. rssimediumlow {
  72. label = "green:rssimediumlow";
  73. function = LED_FUNCTION_INDICATOR;
  74. color = <LED_COLOR_ID_GREEN>;
  75. gpios = <&gpio 19 GPIO_ACTIVE_LOW>;
  76. };
  77.  
  78. rssimediumhigh {
  79. label = "green:rssimediumhigh";
  80. function = LED_FUNCTION_INDICATOR;
  81. function-enumerator = <1>;
  82. color = <LED_COLOR_ID_GREEN>;
  83. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  84. };
  85.  
  86. rssihigh {
  87. label = "green:rssihigh";
  88. function = LED_FUNCTION_INDICATOR;
  89. function-enumerator = <2>;
  90. color = <LED_COLOR_ID_GREEN>;
  91. gpios = <&gpio 16 GPIO_ACTIVE_LOW>;
  92. };
  93. };
  94. };
  95.  
  96. &spi {
  97. status = "okay";
  98.  
  99. flash@0 {
  100. compatible = "jedec,spi-nor";
  101. reg = <0>;
  102. spi-max-frequency = <25000000>;
  103.  
  104. partitions: partitions {
  105. compatible = "fixed-partitions";
  106. #address-cells = <1>;
  107. #size-cells = <1>;
  108.  
  109. partition@0 {
  110. label = "bootloader";
  111. reg = <0x000000 0x40000>;
  112. read-only;
  113. };
  114.  
  115. partition@40000 {
  116. compatible = "u-boot,env";
  117. label = "bdcfg";
  118. reg = <0x040000 0x10000>;
  119. read-only;
  120.  
  121. /*lanmac: ethaddr {
  122. #nvmem-cell-cells = <1>;
  123. };*/
  124. };
  125.  
  126. partition@50000 {
  127. label = "devdata";
  128. reg = <0x050000 0x10000>;
  129. read-only;
  130.  
  131. compatible = "nvmem-cells";
  132. #address-cells = <1>;
  133. #size-cells = <1>;
  134.  
  135. wlan5mac: macaddr@94 {
  136. reg = <0x94 0x11>;
  137. };
  138.  
  139. wlan24mac: macaddr@b0 {
  140. reg = <0xb0 0x11>;
  141. };
  142.  
  143. /*lanmac: macaddr@c9 {
  144. reg = <0xc9 0x11>; //not working
  145. };*/
  146. };
  147.  
  148. partition@60000 {
  149. label = "devconf";
  150. reg = <0x060000 0x10000>;
  151. read-only;
  152. };
  153.  
  154. partition@70000 {
  155. compatible = "seama";
  156. label = "firmware";
  157. reg = <0x070000 0xf80000>;
  158. };
  159.  
  160. partition@ff0000 {
  161. label = "radiocfg"; // AKA art
  162. reg = <0xff0000 0x010000>;
  163. read-only;
  164.  
  165. calibration_ath9k: calibration@1000 {
  166. reg = <0x1000 0x440>;
  167. };
  168.  
  169. calibration_ath10k: calibration@5000 {
  170. reg = <0x5000 0x844>;
  171. };
  172. };
  173. };
  174. };
  175. };
  176.  
  177. &mdio0 {
  178. status = "okay";
  179.  
  180. phy0: ethernet-phy@0 {
  181. reg = <0>;
  182. phy-mode = "sgmii";
  183. //qca,mib-poll-interval = <500>;
  184.  
  185. reset-gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
  186. };
  187. };
  188.  
  189. &eth0 {
  190. status = "okay";
  191. phy-handle = <&phy0>;
  192.  
  193. //phy-mode = "sgmii";
  194. /*nvmem-cells = <&lanmac 0>;
  195. nvmem-cell-names = "mac-address";*/
  196. };
  197.  
  198. &wmac {
  199. status = "okay";
  200.  
  201. nvmem-cells = <&calibration_ath9k>, <&wlan24mac>;
  202. nvmem-cell-names = "calibration", "mac-address-ascii";
  203. };
  204.  
  205. &pcie {
  206. status = "okay";
  207.  
  208. wifi@0,0 {
  209. compatible = "qcom,ath10k";
  210. reg = <0x0000 0 0 0 0>;
  211.  
  212. nvmem-cells = <&calibration_ath10k>, <&wlan5mac>;
  213. nvmem-cell-names = "calibration", "mac-address-ascii";
  214. };
  215. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement