0004-ARM-dts-ixp4xx-Add-USRobotics-USR8200-device-tree.patch 6.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260
  1. From 02693ffdb93bffcbe772bd91a399dabd123b8c19 Mon Sep 17 00:00:00 2001
  2. From: Linus Walleij <[email protected]>
  3. Date: Tue, 19 Sep 2023 16:02:15 +0200
  4. Subject: [PATCH 4/4] ARM: dts: ixp4xx: Add USRobotics USR8200 device tree
  5. This is a USRobotics NAS/Firewall/router that has been supported
  6. by OpenWrt in the past. It had dedicated users so let's get it
  7. properly supported.
  8. Signed-off-by: Linus Walleij <[email protected]>
  9. ---
  10. arch/arm/boot/dts/Makefile | 3 +-
  11. .../dts/intel-ixp42x-usrobotics-usr8200.dts | 229 ++++++++++++++++++
  12. 2 files changed, 231 insertions(+), 1 deletion(-)
  13. create mode 100644 arch/arm/boot/dts/intel-ixp42x-usrobotics-usr8200.dts
  14. --- a/arch/arm/boot/dts/Makefile
  15. +++ b/arch/arm/boot/dts/Makefile
  16. @@ -292,7 +292,8 @@ dtb-$(CONFIG_ARCH_IXP4XX) += \
  17. intel-ixp43x-gateworks-gw2358.dtb \
  18. intel-ixp42x-netgear-wg302v1.dtb \
  19. intel-ixp42x-arcom-vulcan.dtb \
  20. - intel-ixp42x-gateway-7001.dtb
  21. + intel-ixp42x-gateway-7001.dtb \
  22. + intel-ixp42x-usrobotics-usr8200.dtb
  23. dtb-$(CONFIG_ARCH_KEYSTONE) += \
  24. keystone-k2hk-evm.dtb \
  25. keystone-k2l-evm.dtb \
  26. --- /dev/null
  27. +++ b/arch/arm/boot/dts/intel-ixp42x-usrobotics-usr8200.dts
  28. @@ -0,0 +1,229 @@
  29. +// SPDX-License-Identifier: ISC
  30. +/*
  31. + * Device Tree file for the USRobotics USR8200 firewall
  32. + * VPN and NAS. Based on know-how from Peter Denison.
  33. + *
  34. + * This machine is based on IXP422, the USR internal codename
  35. + * is "Jeeves".
  36. + */
  37. +
  38. +/dts-v1/;
  39. +
  40. +#include "intel-ixp42x.dtsi"
  41. +#include <dt-bindings/input/input.h>
  42. +
  43. +/ {
  44. + model = "USRobotics USR8200";
  45. + compatible = "usr,usr8200", "intel,ixp42x";
  46. + #address-cells = <1>;
  47. + #size-cells = <1>;
  48. +
  49. + memory@0 {
  50. + device_type = "memory";
  51. + reg = <0x00000000 0x4000000>;
  52. + };
  53. +
  54. + chosen {
  55. + bootargs = "console=ttyS0,115200n8";
  56. + stdout-path = "uart1:115200n8";
  57. + };
  58. +
  59. + aliases {
  60. + /* These are switched around */
  61. + serial0 = &uart1;
  62. + serial1 = &uart0;
  63. + };
  64. +
  65. + leds {
  66. + compatible = "gpio-leds";
  67. + ieee1394_led: led-1394 {
  68. + label = "usr8200:green:1394";
  69. + gpios = <&gpio0 0 GPIO_ACTIVE_LOW>;
  70. + default-state = "off";
  71. + };
  72. + usb1_led: led-usb1 {
  73. + label = "usr8200:green:usb1";
  74. + gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  75. + default-state = "off";
  76. + };
  77. + usb2_led: led-usb2 {
  78. + label = "usr8200:green:usb2";
  79. + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  80. + default-state = "off";
  81. + };
  82. + wireless_led: led-wireless {
  83. + /*
  84. + * This LED is mounted inside the case but cannot be
  85. + * seen from the outside: probably USR planned at one
  86. + * point for the device to have a wireless card, then
  87. + * changed their mind and didn't mount it, leaving the
  88. + * LED in place.
  89. + */
  90. + label = "usr8200:green:wireless";
  91. + gpios = <&gpio0 3 GPIO_ACTIVE_LOW>;
  92. + default-state = "off";
  93. + };
  94. + pwr_led: led-pwr {
  95. + label = "usr8200:green:pwr";
  96. + gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
  97. + default-state = "on";
  98. + linux,default-trigger = "heartbeat";
  99. + };
  100. + };
  101. +
  102. + gpio_keys {
  103. + compatible = "gpio-keys";
  104. +
  105. + button-reset {
  106. + wakeup-source;
  107. + linux,code = <KEY_RESTART>;
  108. + label = "reset";
  109. + gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
  110. + };
  111. + };
  112. +
  113. + soc {
  114. + bus@c4000000 {
  115. + flash@0,0 {
  116. + compatible = "intel,ixp4xx-flash", "cfi-flash";
  117. + bank-width = <2>;
  118. + /* Enable writes on the expansion bus */
  119. + intel,ixp4xx-eb-write-enable = <1>;
  120. + /* 16 MB of Flash mapped in at CS0 */
  121. + reg = <0 0x00000000 0x1000000>;
  122. +
  123. + partitions {
  124. + compatible = "redboot-fis";
  125. + /* Eraseblock at 0x0fe0000 */
  126. + fis-index-block = <0x7f>;
  127. + };
  128. + };
  129. + rtc@2,0 {
  130. + /* EPSON RTC7301 DG DIL-capsule */
  131. + compatible = "epson,rtc7301dg";
  132. + /*
  133. + * These timing settings were found in the boardfile patch:
  134. + * IXP4XX_EXP_CS2 = 0x3fff000 | IXP4XX_EXP_BUS_SIZE(0) | IXP4XX_EXP_BUS_WR_EN |
  135. + * IXP4XX_EXP_BUS_CS_EN | IXP4XX_EXP_BUS_BYTE_EN;
  136. + */
  137. + intel,ixp4xx-eb-t1 = <0>; // no cycles extra address phase
  138. + intel,ixp4xx-eb-t2 = <0>; // no cycles extra setup phase
  139. + intel,ixp4xx-eb-t3 = <15>; // 15 cycles extra strobe phase
  140. + intel,ixp4xx-eb-t4 = <3>; // 3 cycles extra hold phase
  141. + intel,ixp4xx-eb-t5 = <15>; // 15 cycles extra recovery phase
  142. + intel,ixp4xx-eb-cycle-type = <0>; // Intel cycle
  143. + intel,ixp4xx-eb-byte-access-on-halfword = <0>;
  144. + intel,ixp4xx-eb-mux-address-and-data = <0>;
  145. + intel,ixp4xx-eb-ahb-split-transfers = <0>;
  146. + intel,ixp4xx-eb-write-enable = <1>;
  147. + intel,ixp4xx-eb-byte-access = <1>;
  148. + /* 512 bytes at CS2 */
  149. + reg = <2 0x00000000 0x0000200>;
  150. + reg-io-width = <1>;
  151. + native-endian;
  152. + /* FIXME: try to check if there is an IRQ for the RTC? */
  153. + };
  154. + };
  155. +
  156. + pci@c0000000 {
  157. + status = "okay";
  158. +
  159. + /*
  160. + * Taken from USR8200 boardfile from OpenWrt
  161. + *
  162. + * We have 3 slots (IDSEL) with partly swizzled IRQs on slot 16.
  163. + * We assume the same IRQ for all pins on the remaining slots, that
  164. + * is what the boardfile was doing.
  165. + */
  166. + #interrupt-cells = <1>;
  167. + interrupt-map-mask = <0xf800 0 0 7>;
  168. + interrupt-map =
  169. + /* IDSEL 14 used for "Wireless" in the board file */
  170. + <0x7000 0 0 1 &gpio0 7 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 14 is irq 7 */
  171. + /* IDSEL 15 used for VIA VT6307 IEEE 1394 Firewire */
  172. + <0x7800 0 0 1 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 15 is irq 8 */
  173. + /* IDSEL 16 used for VIA VT6202 USB 2.0 4+1 */
  174. + <0x8000 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 16 is irq 11 */
  175. + <0x8000 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 16 is irq 10 */
  176. + <0x8000 0 0 3 &gpio0 9 IRQ_TYPE_LEVEL_LOW>; /* INT C on slot 16 is irq 9 */
  177. + };
  178. +
  179. + gpio@c8004000 {
  180. + /* Enable clock out on GPIO 15 */
  181. + intel,ixp4xx-gpio15-clkout;
  182. + };
  183. +
  184. + /* EthB WAN */
  185. + ethernet@c8009000 {
  186. + status = "okay";
  187. + queue-rx = <&qmgr 3>;
  188. + queue-txready = <&qmgr 20>;
  189. + phy-mode = "rgmii";
  190. + phy-handle = <&phy9>;
  191. +
  192. + mdio {
  193. + #address-cells = <1>;
  194. + #size-cells = <0>;
  195. +
  196. + phy9: ethernet-phy@9 {
  197. + reg = <9>;
  198. + };
  199. +
  200. + /* The switch uses MDIO addresses 16 thru 31 */
  201. + switch@16 {
  202. + compatible = "marvell,mv88e6060";
  203. + reg = <16>;
  204. +
  205. + ports {
  206. + #address-cells = <1>;
  207. + #size-cells = <0>;
  208. +
  209. + port@0 {
  210. + reg = <0>;
  211. + label = "lan1";
  212. + };
  213. +
  214. + port@1 {
  215. + reg = <1>;
  216. + label = "lan2";
  217. + };
  218. +
  219. + port@2 {
  220. + reg = <2>;
  221. + label = "lan3";
  222. + };
  223. +
  224. + port@3 {
  225. + reg = <3>;
  226. + label = "lan4";
  227. + };
  228. +
  229. + port@5 {
  230. + /* Port 5 is the CPU port according to the MV88E6060 datasheet */
  231. + reg = <5>;
  232. + phy-mode = "rgmii-id";
  233. + ethernet = <&ethc>;
  234. + label = "cpu";
  235. + fixed-link {
  236. + speed = <100>;
  237. + full-duplex;
  238. + };
  239. + };
  240. + };
  241. + };
  242. + };
  243. + };
  244. +
  245. + /* EthC LAN connected to the Marvell DSA Switch */
  246. + ethc: ethernet@c800a000 {
  247. + status = "okay";
  248. + queue-rx = <&qmgr 4>;
  249. + queue-txready = <&qmgr 21>;
  250. + phy-mode = "rgmii";
  251. + fixed-link {
  252. + speed = <100>;
  253. + full-duplex;
  254. + };
  255. + };
  256. + };
  257. +};