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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340
  1. From 3f902645280baf0d7dab57c227cc14f43edb45ef Mon Sep 17 00:00:00 2001
  2. From: Matthew Hagan <[email protected]>
  3. Date: Fri, 6 Aug 2021 21:44:34 +0100
  4. Subject: [PATCH] ARM: dts: NSP: Add DT files for Meraki MX64 series
  5. MX64 & MX64W 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 internal switch (5x 1GbE ports)
  10. - USB: 1x USB2.0
  11. - Serial: Internal header
  12. - WLAN(MX64W only): 2x Broadcom BCM43520KMLG on the PCI bus
  13. This patch adds the Meraki MX64 series-specific bindings. Since some
  14. devices make use of the older A0 SoC, changes need to be made to
  15. accommodate this case, including removal of coherency options and
  16. modification to the secondary-boot-reg.
  17. Signed-off-by: Matthew Hagan <[email protected]>
  18. Signed-off-by: Florian Fainelli <[email protected]>
  19. ---
  20. arch/arm/boot/dts/Makefile | 4 +
  21. .../boot/dts/bcm958625-meraki-kingpin.dtsi | 163 ++++++++++++++++++
  22. .../arm/boot/dts/bcm958625-meraki-mx64-a0.dts | 25 +++
  23. arch/arm/boot/dts/bcm958625-meraki-mx64.dts | 24 +++
  24. .../boot/dts/bcm958625-meraki-mx64w-a0.dts | 33 ++++
  25. arch/arm/boot/dts/bcm958625-meraki-mx64w.dts | 32 ++++
  26. 6 files changed, 281 insertions(+)
  27. create mode 100644 arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
  28. create mode 100644 arch/arm/boot/dts/bcm958625-meraki-mx64-a0.dts
  29. create mode 100644 arch/arm/boot/dts/bcm958625-meraki-mx64.dts
  30. create mode 100644 arch/arm/boot/dts/bcm958625-meraki-mx64w-a0.dts
  31. create mode 100644 arch/arm/boot/dts/bcm958625-meraki-mx64w.dts
  32. --- a/arch/arm/boot/dts/Makefile
  33. +++ b/arch/arm/boot/dts/Makefile
  34. @@ -158,6 +158,10 @@ dtb-$(CONFIG_ARCH_BCM_NSP) += \
  35. bcm958525xmc.dtb \
  36. bcm958622hr.dtb \
  37. bcm958623hr.dtb \
  38. + bcm958625-meraki-mx64.dtb \
  39. + bcm958625-meraki-mx64-a0.dtb \
  40. + bcm958625-meraki-mx64w.dtb \
  41. + bcm958625-meraki-mx64w-a0.dtb \
  42. bcm958625hr.dtb \
  43. bcm988312hr.dtb \
  44. bcm958625k.dtb
  45. --- /dev/null
  46. +++ b/arch/arm/boot/dts/bcm958625-meraki-kingpin.dtsi
  47. @@ -0,0 +1,163 @@
  48. +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  49. +/*
  50. + * Device Tree Bindings for Cisco Meraki MX64 series (Kingpin).
  51. + *
  52. + * Copyright (C) 2020-2021 Matthew Hagan <[email protected]>
  53. + */
  54. +
  55. +#include "bcm958625-meraki-mx6x-common.dtsi"
  56. +
  57. +/ {
  58. +
  59. + keys {
  60. + compatible = "gpio-keys-polled";
  61. + autorepeat;
  62. + poll-interval = <20>;
  63. +
  64. + reset {
  65. + label = "reset";
  66. + linux,code = <KEY_RESTART>;
  67. + gpios = <&gpioa 6 GPIO_ACTIVE_LOW>;
  68. + };
  69. + };
  70. +
  71. + leds {
  72. + compatible = "gpio-leds";
  73. +
  74. + led-0 {
  75. + /* green:lan1-left */
  76. + function = LED_FUNCTION_ACTIVITY;
  77. + function-enumerator = <0>;
  78. + color = <LED_COLOR_ID_GREEN>;
  79. + gpios = <&gpioa 19 GPIO_ACTIVE_LOW>;
  80. + };
  81. +
  82. + led-1 {
  83. + /* green:lan1-right */
  84. + function = LED_FUNCTION_ACTIVITY;
  85. + function-enumerator = <1>;
  86. + color = <LED_COLOR_ID_GREEN>;
  87. + gpios = <&gpioa 18 GPIO_ACTIVE_LOW>;
  88. + };
  89. +
  90. + led-2 {
  91. + /* green:lan2-left */
  92. + function = LED_FUNCTION_ACTIVITY;
  93. + function-enumerator = <2>;
  94. + color = <LED_COLOR_ID_GREEN>;
  95. + gpios = <&gpioa 24 GPIO_ACTIVE_LOW>;
  96. + };
  97. +
  98. + led-3 {
  99. + /* green:lan2-right */
  100. + function = LED_FUNCTION_ACTIVITY;
  101. + function-enumerator = <3>;
  102. + color = <LED_COLOR_ID_GREEN>;
  103. + gpios = <&gpioa 20 GPIO_ACTIVE_LOW>;
  104. + };
  105. +
  106. + led-4 {
  107. + /* green:lan3-left */
  108. + function = LED_FUNCTION_ACTIVITY;
  109. + function-enumerator = <4>;
  110. + color = <LED_COLOR_ID_GREEN>;
  111. + gpios = <&gpioa 26 GPIO_ACTIVE_LOW>;
  112. + };
  113. +
  114. + led-5 {
  115. + /* green:lan3-right */
  116. + function = LED_FUNCTION_ACTIVITY;
  117. + function-enumerator = <5>;
  118. + color = <LED_COLOR_ID_GREEN>;
  119. + gpios = <&gpioa 25 GPIO_ACTIVE_LOW>;
  120. + };
  121. +
  122. + led-6 {
  123. + /* green:lan4-left */
  124. + function = LED_FUNCTION_ACTIVITY;
  125. + function-enumerator = <6>;
  126. + color = <LED_COLOR_ID_GREEN>;
  127. + gpios = <&gpioa 28 GPIO_ACTIVE_LOW>;
  128. + };
  129. +
  130. + led-7 {
  131. + /* green:lan4-right */
  132. + function = LED_FUNCTION_ACTIVITY;
  133. + function-enumerator = <7>;
  134. + color = <LED_COLOR_ID_GREEN>;
  135. + gpios = <&gpioa 27 GPIO_ACTIVE_LOW>;
  136. + };
  137. +
  138. + led-8 {
  139. + /* green:wan-left */
  140. + function = LED_FUNCTION_ACTIVITY;
  141. + function-enumerator = <8>;
  142. + color = <LED_COLOR_ID_GREEN>;
  143. + gpios = <&gpioa 30 GPIO_ACTIVE_LOW>;
  144. + };
  145. +
  146. + led-9 {
  147. + /* green:wan-right */
  148. + function = LED_FUNCTION_ACTIVITY;
  149. + function-enumerator = <9>;
  150. + color = <LED_COLOR_ID_GREEN>;
  151. + gpios = <&gpioa 29 GPIO_ACTIVE_LOW>;
  152. + };
  153. +
  154. + led-a {
  155. + /* amber:power */
  156. + function = LED_FUNCTION_POWER;
  157. + color = <LED_COLOR_ID_AMBER>;
  158. + gpios = <&gpioa 0 GPIO_ACTIVE_LOW>;
  159. + default-state = "on";
  160. + };
  161. +
  162. + led-b {
  163. + /* white:status */
  164. + function = LED_FUNCTION_STATUS;
  165. + color = <LED_COLOR_ID_WHITE>;
  166. + gpios = <&gpioa 31 GPIO_ACTIVE_HIGH>;
  167. + };
  168. + };
  169. +};
  170. +
  171. +&srab {
  172. + compatible = "brcm,bcm58625-srab", "brcm,nsp-srab";
  173. + status = "okay";
  174. +
  175. + ports {
  176. + port@0 {
  177. + label = "lan1";
  178. + reg = <0>;
  179. + };
  180. +
  181. + port@1 {
  182. + label = "lan2";
  183. + reg = <1>;
  184. + };
  185. +
  186. + port@2 {
  187. + label = "lan3";
  188. + reg = <2>;
  189. + };
  190. +
  191. + port@3 {
  192. + label = "lan4";
  193. + reg = <3>;
  194. + };
  195. +
  196. + port@4 {
  197. + label = "wan";
  198. + reg = <4>;
  199. + };
  200. +
  201. + port@8 {
  202. + ethernet = <&amac2>;
  203. + reg = <8>;
  204. + fixed-link {
  205. + speed = <1000>;
  206. + full-duplex;
  207. + };
  208. + };
  209. + };
  210. +};
  211. --- /dev/null
  212. +++ b/arch/arm/boot/dts/bcm958625-meraki-mx64-a0.dts
  213. @@ -0,0 +1,25 @@
  214. +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  215. +/*
  216. + * Device Tree Bindings for Cisco Meraki MX64 with A0 SoC.
  217. + *
  218. + * Copyright (C) 2020-2021 Matthew Hagan <[email protected]>
  219. + */
  220. +
  221. +/dts-v1/;
  222. +
  223. +#include "bcm958625-meraki-kingpin.dtsi"
  224. +#include "bcm-nsp-ax.dtsi"
  225. +
  226. +/ {
  227. + model = "Cisco Meraki MX64(A0)";
  228. + compatible = "meraki,mx64-a0", "brcm,bcm58625", "brcm,nsp";
  229. +
  230. + chosen {
  231. + stdout-path = "serial0:115200n8";
  232. + };
  233. +
  234. + memory@60000000 {
  235. + device_type = "memory";
  236. + reg = <0x60000000 0x80000000>;
  237. + };
  238. +};
  239. --- /dev/null
  240. +++ b/arch/arm/boot/dts/bcm958625-meraki-mx64.dts
  241. @@ -0,0 +1,24 @@
  242. +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  243. +/*
  244. + * Device Tree Bindings for Cisco Meraki MX64 with B0+ SoC.
  245. + *
  246. + * Copyright (C) 2020-2021 Matthew Hagan <[email protected]>
  247. + */
  248. +
  249. +/dts-v1/;
  250. +
  251. +#include "bcm958625-meraki-kingpin.dtsi"
  252. +
  253. +/ {
  254. + model = "Cisco Meraki MX64";
  255. + compatible = "meraki,mx64", "brcm,bcm58625", "brcm,nsp";
  256. +
  257. + chosen {
  258. + stdout-path = "serial0:115200n8";
  259. + };
  260. +
  261. + memory@60000000 {
  262. + device_type = "memory";
  263. + reg = <0x60000000 0x80000000>;
  264. + };
  265. +};
  266. --- /dev/null
  267. +++ b/arch/arm/boot/dts/bcm958625-meraki-mx64w-a0.dts
  268. @@ -0,0 +1,33 @@
  269. +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  270. +/*
  271. + * Device Tree Bindings for Cisco Meraki MX64W with A0 SoC.
  272. + *
  273. + * Copyright (C) 2020-2021 Matthew Hagan <[email protected]>
  274. + */
  275. +
  276. +/dts-v1/;
  277. +
  278. +#include "bcm958625-meraki-kingpin.dtsi"
  279. +#include "bcm-nsp-ax.dtsi"
  280. +
  281. +/ {
  282. + model = "Cisco Meraki MX64W(A0)";
  283. + compatible = "meraki,mx64w-a0", "brcm,bcm58625", "brcm,nsp";
  284. +
  285. + chosen {
  286. + stdout-path = "serial0:115200n8";
  287. + };
  288. +
  289. + memory@60000000 {
  290. + device_type = "memory";
  291. + reg = <0x60000000 0x80000000>;
  292. + };
  293. +};
  294. +
  295. +&pcie0 {
  296. + status = "okay";
  297. +};
  298. +
  299. +&pcie1 {
  300. + status = "okay";
  301. +};
  302. --- /dev/null
  303. +++ b/arch/arm/boot/dts/bcm958625-meraki-mx64w.dts
  304. @@ -0,0 +1,32 @@
  305. +// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
  306. +/*
  307. + * Device Tree Bindings for Cisco Meraki MX64W with B0+ SoC.
  308. + *
  309. + * Copyright (C) 2020-2021 Matthew Hagan <[email protected]>
  310. + */
  311. +
  312. +/dts-v1/;
  313. +
  314. +#include "bcm958625-meraki-kingpin.dtsi"
  315. +
  316. +/ {
  317. + model = "Cisco Meraki MX64W";
  318. + compatible = "meraki,mx64w", "brcm,bcm58625", "brcm,nsp";
  319. +
  320. + chosen {
  321. + stdout-path = "serial0:115200n8";
  322. + };
  323. +
  324. + memory@60000000 {
  325. + device_type = "memory";
  326. + reg = <0x60000000 0x80000000>;
  327. + };
  328. +};
  329. +
  330. +&pcie0 {
  331. + status = "okay";
  332. +};
  333. +
  334. +&pcie1 {
  335. + status = "okay";
  336. +};