Guest User

FAP221B DTS

a guest
Dec 24th, 2022
28
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.83 KB | None | 0 0
  1. // SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  2.  
  3. #include "ar9344.dtsi"
  4.  
  5. #include <dt-bindings/gpio/gpio.h>
  6. #include <dt-bindings/input/input.h>
  7.  
  8. / {
  9. compatible = "fortinet,fap221b", "qca,ar9344";
  10. model = "Fortinet FAP221B";
  11.  
  12. chosen {
  13. bootargs = "console=ttyS0,9600n8";
  14. };
  15.  
  16. aliases {
  17. led-boot = &led_power_green;
  18. led-failsafe = &led_power_red;
  19. led-running = &led_power_green;
  20. led-upgrade = &led_power_red;
  21. label-mac-device = &eth0;
  22. };
  23.  
  24. leds {
  25. compatible = "gpio-leds";
  26.  
  27. pinctrl-names = "default";
  28. pinctrl-0 = <&enable_gpio_11 &enable_gpio_16>;
  29.  
  30. led_power_green: power_green {
  31. label = "green:power";
  32. gpios = <&gpio 12 GPIO_ACTIVE_LOW>;
  33. };
  34.  
  35. led_power_red: power_red {
  36. label = "red:power";
  37. gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
  38. };
  39.  
  40. lan_red {
  41. label = "red:lan";
  42. gpios = <&gpio 15 GPIO_ACTIVE_LOW>;
  43. };
  44.  
  45. lan_green {
  46. label = "green:lan";
  47. gpios = <&gpio 10 GPIO_ACTIVE_LOW>;
  48. };
  49.  
  50. wifi_amber {
  51. label = "amber:radio2";
  52. gpios = <&gpio 8 GPIO_ACTIVE_LOW>;
  53. linux,default-trigger = "phy0tpt";
  54. };
  55.  
  56. wifi_green {
  57. label = "green:radio2";
  58. gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
  59. linux,default-trigger = "phy0tpt";
  60. };
  61. };
  62.  
  63. keys {
  64. compatible = "gpio-keys";
  65.  
  66. reset {
  67. label = "Reset button";
  68. linux,code = <KEY_RESTART>;
  69. gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
  70. };
  71. };
  72. };
  73.  
  74. &ref {
  75. clock-frequency = <25000000>;
  76. };
  77.  
  78. &pinmux {
  79. enable_gpio_16: pinmux_enable_gpio_16 {
  80. pinctrl-single,bits = <0x10 0x0 0x000000ff>;
  81. };
  82.  
  83. enable_gpio_11: pinmux_enable_gpio_11 {
  84. pinctrl-single,bits = <0x8 0x0 0xff000000>;
  85. };
  86. };
  87.  
  88. &wmac {
  89. status = "okay";
  90. qca,no-eeprom;
  91. };
  92.  
  93. &spi {
  94. status = "okay";
  95.  
  96. flash@0 {
  97. compatible = "jedec,spi-nor";
  98. reg = <0>;
  99. spi-max-frequency = <25000000>;
  100.  
  101. partitions {
  102. compatible = "fixed-partitions";
  103. #address-cells = <1>;
  104. #size-cells = <1>;
  105.  
  106. partition@0 {
  107. label = "u-boot";
  108. reg = <0x000000 0x40000>;
  109. read-only;
  110. };
  111.  
  112. partition@40000 {
  113. label = "rootfs";
  114. reg = <0x40000 0x900000>;
  115. };
  116.  
  117. partition@940000 {
  118. label = "kernel";
  119. reg = <0x940000 0x6B0000>;
  120. read-only;
  121. };
  122.  
  123. partition@FF0000 {
  124. label = "art";
  125. reg = <0xff0000 0x00010000>;
  126. read-only;
  127. };
  128. };
  129. };
  130. };
  131.  
  132. &pcie {
  133. status = "okay";
  134.  
  135. ath9k: wifi@0,0 {
  136. compatible = "pci168c,0033";
  137. reg = <0x0000 0 0 0 0>;
  138. qca,no-eeprom;
  139. #gpio-cells = <2>;
  140. gpio-controller;
  141. };
  142. };
  143.  
  144. &mdio0 {
  145. status = "okay";
  146.  
  147. phy0: ethernet-phy@0 {
  148. reg = <0>;
  149. };
  150. };
  151.  
  152. &eth0 {
  153. status = "okay";
  154.  
  155. pll-data = <0x1e000000 0x08000101 0x08001313>;
  156.  
  157. phy-mode = "rgmii";
  158. phy-handle = <&phy0>;
  159.  
  160. gmac-config {
  161. device = <&gmac>;
  162. rgmii-gmac0 = <1>;
  163. rxd-delay = <0>;
  164. rxdv-delay = <0>;
  165. txen-delay = <0>;
  166. txd-delay = <0>;
  167. };
  168. };
  169.  
Add Comment
Please, Sign In to add comment