2
0

131-0002-arm64-dts-broadcom-bcm4908-add-TP-Link-Archer-C2300-.patch 4.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207
  1. From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <[email protected]>
  2. Date: Fri, 5 Mar 2021 13:36:25 +0100
  3. Subject: [PATCH] arm64: dts: broadcom: bcm4908: add TP-Link Archer C2300 V1
  4. Archer C2300 V1 is a home router based on the BCM4906 (2 CPU cores). It
  5. has 512 MiB of RAM, NAND flash, USB 2.0 and USB 3.0 ports, 4 LAN ports,
  6. 1 WAN port.
  7. Signed-off-by: Rafał Miłecki <[email protected]>
  8. ---
  9. arch/arm64/boot/dts/broadcom/bcm4908/Makefile | 1 +
  10. .../bcm4906-tplink-archer-c2300-v1.dts | 182 ++++++++++++++++++
  11. 2 files changed, 183 insertions(+)
  12. create mode 100644 arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts
  13. --- a/arch/arm64/boot/dts/broadcom/bcm4908/Makefile
  14. +++ b/arch/arm64/boot/dts/broadcom/bcm4908/Makefile
  15. @@ -1,3 +1,4 @@
  16. # SPDX-License-Identifier: GPL-2.0
  17. dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-netgear-r8000p.dtb
  18. +dtb-$(CONFIG_ARCH_BCM4908) += bcm4906-tplink-archer-c2300-v1.dtb
  19. dtb-$(CONFIG_ARCH_BCM4908) += bcm4908-asus-gt-ac5300.dtb
  20. --- /dev/null
  21. +++ b/arch/arm64/boot/dts/broadcom/bcm4908/bcm4906-tplink-archer-c2300-v1.dts
  22. @@ -0,0 +1,182 @@
  23. +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  24. +
  25. +#include <dt-bindings/gpio/gpio.h>
  26. +#include <dt-bindings/input/input.h>
  27. +#include <dt-bindings/leds/common.h>
  28. +
  29. +#include "bcm4906.dtsi"
  30. +
  31. +/ {
  32. + compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908";
  33. + model = "TP-Link Archer C2300 V1";
  34. +
  35. + memory@0 {
  36. + device_type = "memory";
  37. + reg = <0x00 0x00 0x00 0x20000000>;
  38. + };
  39. +
  40. + leds {
  41. + compatible = "gpio-leds";
  42. +
  43. + power-white {
  44. + function = LED_FUNCTION_POWER;
  45. + color = <LED_COLOR_ID_BLUE>;
  46. + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
  47. + };
  48. +
  49. + 2ghz {
  50. + function = "2ghz";
  51. + color = <LED_COLOR_ID_BLUE>;
  52. + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  53. + };
  54. +
  55. + 5ghz {
  56. + function = "5ghz";
  57. + color = <LED_COLOR_ID_BLUE>;
  58. + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
  59. + };
  60. +
  61. + wan-amber {
  62. + function = LED_FUNCTION_WAN;
  63. + color = <LED_COLOR_ID_AMBER>;
  64. + gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>;
  65. + };
  66. +
  67. + wan-blue {
  68. + function = LED_FUNCTION_WAN;
  69. + color = <LED_COLOR_ID_BLUE>;
  70. + gpios = <&gpio0 10 GPIO_ACTIVE_LOW>;
  71. + };
  72. +
  73. + lan {
  74. + function = LED_FUNCTION_LAN;
  75. + color = <LED_COLOR_ID_BLUE>;
  76. + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  77. + };
  78. +
  79. + wps {
  80. + function = LED_FUNCTION_WPS;
  81. + color = <LED_COLOR_ID_BLUE>;
  82. + gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
  83. + };
  84. +
  85. + usb-high-white {
  86. + function = "usbup";
  87. + color = <LED_COLOR_ID_BLUE>;
  88. + gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
  89. + };
  90. +
  91. + usb-low-white {
  92. + function = "usbdown";
  93. + color = <LED_COLOR_ID_BLUE>;
  94. + gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
  95. + };
  96. +
  97. + brightness {
  98. + function = LED_FUNCTION_BACKLIGHT;
  99. + color = <LED_COLOR_ID_WHITE>;
  100. + gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
  101. + };
  102. + };
  103. +
  104. + gpio-keys-polled {
  105. + compatible = "gpio-keys-polled";
  106. + poll-interval = <100>;
  107. +
  108. + brightness {
  109. + label = "LEDs";
  110. + linux,code = <KEY_BRIGHTNESS_ZERO>;
  111. + gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
  112. + };
  113. +
  114. + wps {
  115. + label = "WPS";
  116. + linux,code = <KEY_WPS_BUTTON>;
  117. + gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
  118. + };
  119. +
  120. + wifi {
  121. + label = "WiFi";
  122. + linux,code = <KEY_RFKILL>;
  123. + gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
  124. + };
  125. +
  126. + restart {
  127. + label = "Reset";
  128. + linux,code = <KEY_RESTART>;
  129. + gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
  130. + };
  131. + };
  132. +};
  133. +
  134. +&usb_phy {
  135. + brcm,ioc = <1>;
  136. + status = "okay";
  137. +};
  138. +
  139. +&ehci {
  140. + status = "okay";
  141. +};
  142. +
  143. +&ohci {
  144. + status = "okay";
  145. +};
  146. +
  147. +&xhci {
  148. + status = "okay";
  149. +};
  150. +
  151. +&ports {
  152. + port@0 {
  153. + label = "lan4";
  154. + };
  155. +
  156. + port@1 {
  157. + label = "lan3";
  158. + };
  159. +
  160. + port@2 {
  161. + label = "lan2";
  162. + };
  163. +
  164. + port@3 {
  165. + label = "lan1";
  166. + };
  167. +
  168. + port@7 {
  169. + reg = <7>;
  170. + phy-mode = "internal";
  171. + phy-handle = <&phy12>;
  172. + label = "wan";
  173. + };
  174. +};
  175. +
  176. +&nandcs {
  177. + nand-ecc-strength = <4>;
  178. + nand-ecc-step-size = <512>;
  179. + nand-on-flash-bbt;
  180. +
  181. + #address-cells = <1>;
  182. + #size-cells = <0>;
  183. +
  184. + partitions {
  185. + compatible = "brcm,bcm4908-partitions";
  186. + #address-cells = <1>;
  187. + #size-cells = <1>;
  188. +
  189. + partition@0 {
  190. + label = "cferom";
  191. + reg = <0x0 0x100000>;
  192. + };
  193. +
  194. + partition@100000 {
  195. + compatible = "brcm,bcm4908-firmware";
  196. + reg = <0x100000 0x3900000>;
  197. + };
  198. +
  199. + partition@5800000 {
  200. + compatible = "brcm,bcm4908-firmware";
  201. + reg = <0x3a00000 0x3900000>;
  202. + };
  203. + };
  204. +};