030-v5.15-0009-ARM-dts-NSP-Add-DT-files-for-Meraki-MX65-series.patch 7.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386
  1. From 702a8f4744ed5b480f2b2411858184afdb10f9fd Mon Sep 17 00:00:00 2001
  2. From: Matthew Hagan <[email protected]>
  3. Date: Fri, 6 Aug 2021 21:44:35 +0100
  4. Subject: [PATCH] ARM: dts: NSP: Add DT files for Meraki MX65 series
  5. MX65 & MX65W Hardware info:
  6. - CPU: Broadcom BCM58625 Cortex A9 @ 1200Mhz
  7. - RAM: 2 GB (4 x 4Gb SK Hynix H5TC4G83CFR)
  8. - Storage: 1 GB (Micron MT29F8G08ABACA)
  9. - Networking: BCM58625 switch (2x 1GbE ports)
  10. 2x Qualcomm QCA8337 switches (10x 1GbE ports total)
  11. - PSE: Broadcom BCM59111KMLG connected to LAN ports 11 & 12
  12. - USB: 1x USB2.0
  13. - Serial: Internal header
  14. - WLAN(MX65W Only): 2x Broadcom BCM43520KMLG on the PCI bus.
  15. Note that a driver and firmware image for the BCM59111 PSE has been
  16. released under GPL, but this is not present in the kernel.
  17. Signed-off-by: Matthew Hagan <[email protected]>
  18. Signed-off-by: Florian Fainelli <[email protected]>
  19. ---
  20. arch/arm/boot/dts/Makefile | 2 +
  21. arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi | 279 ++++++++++++++++++
  22. arch/arm/boot/dts/bcm958625-meraki-mx65.dts | 24 ++
  23. arch/arm/boot/dts/bcm958625-meraki-mx65w.dts | 32 ++
  24. 4 files changed, 337 insertions(+)
  25. create mode 100644 arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
  26. create mode 100644 arch/arm/boot/dts/bcm958625-meraki-mx65.dts
  27. create mode 100644 arch/arm/boot/dts/bcm958625-meraki-mx65w.dts
  28. --- a/arch/arm/boot/dts/Makefile
  29. +++ b/arch/arm/boot/dts/Makefile
  30. @@ -162,6 +162,8 @@ dtb-$(CONFIG_ARCH_BCM_NSP) += \
  31. bcm958625-meraki-mx64-a0.dtb \
  32. bcm958625-meraki-mx64w.dtb \
  33. bcm958625-meraki-mx64w-a0.dtb \
  34. + bcm958625-meraki-mx65.dtb \
  35. + bcm958625-meraki-mx65w.dtb \
  36. bcm958625hr.dtb \
  37. bcm988312hr.dtb \
  38. bcm958625k.dtb
  39. --- /dev/null
  40. +++ b/arch/arm/boot/dts/bcm958625-meraki-alamo.dtsi
  41. @@ -0,0 +1,279 @@
  42. +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  43. +/*
  44. + * Device Tree Bindings for Cisco Meraki MX65 series (Alamo).
  45. + *
  46. + * Copyright (C) 2020-2021 Matthew Hagan <[email protected]>
  47. + */
  48. +
  49. +#include "bcm958625-meraki-mx6x-common.dtsi"
  50. +
  51. +/ {
  52. + keys {
  53. + compatible = "gpio-keys-polled";
  54. + autorepeat;
  55. + poll-interval = <20>;
  56. +
  57. + reset {
  58. + label = "reset";
  59. + linux,code = <KEY_RESTART>;
  60. + gpios = <&gpioa 8 GPIO_ACTIVE_LOW>;
  61. + };
  62. + };
  63. +
  64. + leds {
  65. + compatible = "gpio-leds";
  66. +
  67. + led-0 {
  68. + /* green:wan1-left */
  69. + function = LED_FUNCTION_ACTIVITY;
  70. + function-enumerator = <0>;
  71. + color = <LED_COLOR_ID_GREEN>;
  72. + gpios = <&gpioa 25 GPIO_ACTIVE_LOW>;
  73. + };
  74. +
  75. + led-1 {
  76. + /* green:wan1-right */
  77. + function = LED_FUNCTION_ACTIVITY;
  78. + function-enumerator = <1>;
  79. + color = <LED_COLOR_ID_GREEN>;
  80. + gpios = <&gpioa 24 GPIO_ACTIVE_LOW>;
  81. + };
  82. +
  83. + led-2 {
  84. + /* green:wan2-left */
  85. + function = LED_FUNCTION_ACTIVITY;
  86. + function-enumerator = <2>;
  87. + color = <LED_COLOR_ID_GREEN>;
  88. + gpios = <&gpioa 27 GPIO_ACTIVE_LOW>;
  89. + };
  90. +
  91. + led-3 {
  92. + /* green:wan2-right */
  93. + function = LED_FUNCTION_ACTIVITY;
  94. + function-enumerator = <3>;
  95. + color = <LED_COLOR_ID_GREEN>;
  96. + gpios = <&gpioa 26 GPIO_ACTIVE_LOW>;
  97. + };
  98. +
  99. + led-4 {
  100. + /* amber:power */
  101. + function = LED_FUNCTION_POWER;
  102. + color = <LED_COLOR_ID_AMBER>;
  103. + gpios = <&gpioa 3 GPIO_ACTIVE_HIGH>;
  104. + default-state = "on";
  105. + };
  106. +
  107. + led-5 {
  108. + /* white:status */
  109. + function = LED_FUNCTION_STATUS;
  110. + color = <LED_COLOR_ID_WHITE>;
  111. + gpios = <&gpioa 31 GPIO_ACTIVE_HIGH>;
  112. + };
  113. + };
  114. +
  115. + mdio-mii-mux {
  116. + compatible = "mdio-mux-mmioreg";
  117. + reg = <0x1803f1c0 0x4>;
  118. + mux-mask = <0x2000>;
  119. + mdio-parent-bus = <&mdio_ext>;
  120. + #address-cells = <1>;
  121. + #size-cells = <0>;
  122. +
  123. + mdio@0 {
  124. + reg = <0x0>;
  125. + #address-cells = <1>;
  126. + #size-cells = <0>;
  127. +
  128. + phy_port6: phy@0 {
  129. + reg = <0>;
  130. + };
  131. +
  132. + phy_port7: phy@1 {
  133. + reg = <1>;
  134. + };
  135. +
  136. + phy_port8: phy@2 {
  137. + reg = <2>;
  138. + };
  139. +
  140. + phy_port9: phy@3 {
  141. + reg = <3>;
  142. + };
  143. +
  144. + phy_port10: phy@4 {
  145. + reg = <4>;
  146. + };
  147. +
  148. + switch@10 {
  149. + compatible = "qca,qca8337";
  150. + reg = <0x10>;
  151. + dsa,member = <1 0>;
  152. +
  153. + ports {
  154. + #address-cells = <1>;
  155. + #size-cells = <0>;
  156. + port@0 {
  157. + reg = <0>;
  158. + ethernet = <&sgmii1>;
  159. + phy-mode = "sgmii";
  160. + fixed-link {
  161. + speed = <1000>;
  162. + full-duplex;
  163. + };
  164. + };
  165. +
  166. + port@1 {
  167. + reg = <1>;
  168. + label = "lan8";
  169. + phy-handle = <&phy_port6>;
  170. + };
  171. +
  172. + port@2 {
  173. + reg = <2>;
  174. + label = "lan9";
  175. + phy-handle = <&phy_port7>;
  176. + };
  177. +
  178. + port@3 {
  179. + reg = <3>;
  180. + label = "lan10";
  181. + phy-handle = <&phy_port8>;
  182. + };
  183. +
  184. + port@4 {
  185. + reg = <4>;
  186. + label = "lan11";
  187. + phy-handle = <&phy_port9>;
  188. + };
  189. +
  190. + port@5 {
  191. + reg = <5>;
  192. + label = "lan12";
  193. + phy-handle = <&phy_port10>;
  194. + };
  195. + };
  196. + };
  197. + };
  198. +
  199. + mdio-mii@2000 {
  200. + reg = <0x2000>;
  201. + #address-cells = <1>;
  202. + #size-cells = <0>;
  203. +
  204. + phy_port1: phy@0 {
  205. + reg = <0>;
  206. + };
  207. +
  208. + phy_port2: phy@1 {
  209. + reg = <1>;
  210. + };
  211. +
  212. + phy_port3: phy@2 {
  213. + reg = <2>;
  214. + };
  215. +
  216. + phy_port4: phy@3 {
  217. + reg = <3>;
  218. + };
  219. +
  220. + phy_port5: phy@4 {
  221. + reg = <4>;
  222. + };
  223. +
  224. + switch@10 {
  225. + compatible = "qca,qca8337";
  226. + reg = <0x10>;
  227. + dsa,member = <2 0>;
  228. +
  229. + ports {
  230. + #address-cells = <1>;
  231. + #size-cells = <0>;
  232. + port@0 {
  233. + reg = <0>;
  234. + ethernet = <&sgmii0>;
  235. + phy-mode = "sgmii";
  236. + fixed-link {
  237. + speed = <1000>;
  238. + full-duplex;
  239. + };
  240. + };
  241. +
  242. + port@1 {
  243. + reg = <1>;
  244. + label = "lan3";
  245. + phy-handle = <&phy_port1>;
  246. + };
  247. +
  248. + port@2 {
  249. + reg = <2>;
  250. + label = "lan4";
  251. + phy-handle = <&phy_port2>;
  252. + };
  253. +
  254. + port@3 {
  255. + reg = <3>;
  256. + label = "lan5";
  257. + phy-handle = <&phy_port3>;
  258. + };
  259. +
  260. + port@4 {
  261. + reg = <4>;
  262. + label = "lan6";
  263. + phy-handle = <&phy_port4>;
  264. + };
  265. +
  266. + port@5 {
  267. + reg = <5>;
  268. + label = "lan7";
  269. + phy-handle = <&phy_port5>;
  270. + };
  271. + };
  272. + };
  273. + };
  274. + };
  275. +};
  276. +
  277. +&srab {
  278. + compatible = "brcm,bcm58625-srab", "brcm,nsp-srab";
  279. + status = "okay";
  280. + dsa,member = <0 0>;
  281. +
  282. + ports {
  283. + port@0 {
  284. + label = "wan1";
  285. + reg = <0>;
  286. + };
  287. +
  288. + port@1 {
  289. + label = "wan2";
  290. + reg = <1>;
  291. + };
  292. +
  293. + sgmii0: port@4 {
  294. + label = "sw0";
  295. + reg = <4>;
  296. + fixed-link {
  297. + speed = <1000>;
  298. + full-duplex;
  299. + };
  300. + };
  301. +
  302. + sgmii1: port@5 {
  303. + label = "sw1";
  304. + reg = <5>;
  305. + fixed-link {
  306. + speed = <1000>;
  307. + full-duplex;
  308. + };
  309. + };
  310. +
  311. + port@8 {
  312. + ethernet = <&amac2>;
  313. + reg = <8>;
  314. + fixed-link {
  315. + speed = <1000>;
  316. + full-duplex;
  317. + };
  318. + };
  319. + };
  320. +};
  321. --- /dev/null
  322. +++ b/arch/arm/boot/dts/bcm958625-meraki-mx65.dts
  323. @@ -0,0 +1,24 @@
  324. +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  325. +/*
  326. + * Device Tree Bindings for Cisco Meraki MX65.
  327. + *
  328. + * Copyright (C) 2020-2021 Matthew Hagan <[email protected]>
  329. + */
  330. +
  331. +/dts-v1/;
  332. +
  333. +#include "bcm958625-meraki-alamo.dtsi"
  334. +
  335. +/ {
  336. + model = "Cisco Meraki MX65";
  337. + compatible = "meraki,mx65", "brcm,bcm58625", "brcm,nsp";
  338. +
  339. + chosen {
  340. + stdout-path = "serial0:115200n8";
  341. + };
  342. +
  343. + memory@60000000 {
  344. + device_type = "memory";
  345. + reg = <0x60000000 0x80000000>;
  346. + };
  347. +};
  348. --- /dev/null
  349. +++ b/arch/arm/boot/dts/bcm958625-meraki-mx65w.dts
  350. @@ -0,0 +1,32 @@
  351. +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  352. +/*
  353. + * Device Tree Bindings for Cisco Meraki MX65W.
  354. + *
  355. + * Copyright (C) 2020-2021 Matthew Hagan <[email protected]>
  356. + */
  357. +
  358. +/dts-v1/;
  359. +
  360. +#include "bcm958625-meraki-alamo.dtsi"
  361. +
  362. +/ {
  363. + model = "Cisco Meraki MX65W";
  364. + compatible = "meraki,mx65w", "brcm,bcm58625", "brcm,nsp";
  365. +
  366. + chosen {
  367. + stdout-path = "serial0:115200n8";
  368. + };
  369. +
  370. + memory@60000000 {
  371. + device_type = "memory";
  372. + reg = <0x60000000 0x80000000>;
  373. + };
  374. +};
  375. +
  376. +&pcie0 {
  377. + status = "okay";
  378. +};
  379. +
  380. +&pcie1 {
  381. + status = "okay";
  382. +};