intel-ixp42x-linksys-wrv54g.dts 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175
  1. // SPDX-License-Identifier: ISC
  2. /*
  3. * Device Tree file for the Linksys WRV54G router
  4. * Also known as Gemtek GTWX5715
  5. * Based on a board file by George T. Joseph and other patches.
  6. * This machine is based on IXP425.
  7. */
  8. /dts-v1/;
  9. #include "intel-ixp42x.dtsi"
  10. #include <dt-bindings/input/input.h>
  11. / {
  12. model = "Linksys WRV54G / Gemtek GTWX5715";
  13. compatible = "linksys,wrv54g", "gemtek,gtwx5715", "intel,ixp42x";
  14. #address-cells = <1>;
  15. #size-cells = <1>;
  16. memory@0 {
  17. /* 32 MB memory */
  18. device_type = "memory";
  19. reg = <0x00000000 0x2000000>;
  20. };
  21. chosen {
  22. bootargs = "console=ttyS0,115200n8";
  23. stdout-path = "uart1:115200n8";
  24. };
  25. aliases {
  26. /* UART2 is the primary console */
  27. serial0 = &uart1;
  28. serial1 = &uart0;
  29. };
  30. /* There is an unpopulated LED slot (3) connected to GPIO 8 */
  31. leds {
  32. compatible = "gpio-leds";
  33. led-power {
  34. label = "wrv54g:yellow:power";
  35. gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
  36. default-state = "on";
  37. linux,default-trigger = "heartbeat";
  38. };
  39. led-wireless {
  40. label = "wrv54g:yellow:wireless";
  41. gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
  42. default-state = "on";
  43. };
  44. led-internet {
  45. label = "wrv54g:yellow:internet";
  46. gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
  47. default-state = "on";
  48. };
  49. led-dmz {
  50. label = "wrv54g:green:dmz";
  51. gpios = <&gpio0 4 GPIO_ACTIVE_LOW>;
  52. default-state = "on";
  53. };
  54. };
  55. /* This set-up comes from an OpenWrt patch */
  56. spi {
  57. compatible = "spi-gpio";
  58. #address-cells = <1>;
  59. #size-cells = <0>;
  60. sck-gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
  61. miso-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
  62. mosi-gpios = <&gpio0 6 GPIO_ACTIVE_HIGH>;
  63. cs-gpios = <&gpio0 5 GPIO_ACTIVE_LOW>;
  64. num-chipselects = <1>;
  65. switch@0 {
  66. compatible = "micrel,ks8995";
  67. reg = <0>;
  68. spi-max-frequency = <50000000>;
  69. };
  70. };
  71. soc {
  72. bus@c4000000 {
  73. flash@0,0 {
  74. compatible = "intel,ixp4xx-flash", "cfi-flash";
  75. bank-width = <2>;
  76. /* Enable writes on the expansion bus */
  77. intel,ixp4xx-eb-write-enable = <1>;
  78. /* 8 MB of Flash mapped in at CS0 */
  79. reg = <0 0x00000000 0x00800000>;
  80. partitions {
  81. compatible = "fixed-partitions";
  82. /*
  83. * Partition info from a boot log
  84. * CHECKME: not using redboot? FIS index 0x3f @7e00000?
  85. */
  86. #address-cells = <1>;
  87. #size-cells = <1>;
  88. partition@0 {
  89. label = "boot";
  90. reg = <0x0 0x140000>;
  91. read-only;
  92. };
  93. partition@140000 {
  94. label = "linux";
  95. reg = <0x140000 0x100000>;
  96. read-only;
  97. };
  98. partition@240000 {
  99. label = "root";
  100. reg = <0x240000 0x480000>;
  101. read-write;
  102. };
  103. };
  104. };
  105. };
  106. pci@c0000000 {
  107. status = "ok";
  108. /*
  109. * We have up to 2 slots (IDSEL) with 2 swizzled IRQs.
  110. * Derived from the GTWX5715 PCI boardfile.
  111. */
  112. #interrupt-cells = <1>;
  113. interrupt-map-mask = <0xf800 0 0 7>;
  114. interrupt-map =
  115. /* IDSEL 0 */
  116. <0x0000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 0 is irq 10 */
  117. <0x0000 0 0 2 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 0 is irq 11 */
  118. /* IDSEL 1 */
  119. <0x0800 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 1 is irq 11 */
  120. <0x0800 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>; /* INT B on slot 1 is irq 10 */
  121. };
  122. /*
  123. * EthB - connected to the KS8995 switch ports 1-4
  124. * FIXME: the boardfile defines .phy_mask = 0x1e for this port to enable output to
  125. * all four switch ports, also using an out of tree multiphy patch.
  126. * Do we need a new binding and property for this?
  127. */
  128. ethernet@c8009000 {
  129. status = "ok";
  130. queue-rx = <&qmgr 3>;
  131. queue-txready = <&qmgr 20>;
  132. phy-mode = "rgmii";
  133. phy-handle = <&phy4>;
  134. mdio {
  135. #address-cells = <1>;
  136. #size-cells = <0>;
  137. /* Should be ports 1-4 on the KS8995 switch */
  138. phy4: ethernet-phy@4 {
  139. reg = <4>;
  140. };
  141. /* Should be port 5 on the KS8995 switch */
  142. phy5: ethernet-phy@5 {
  143. reg = <5>;
  144. };
  145. };
  146. };
  147. /* EthC - connected to KS8995 switch port 5 */
  148. ethernet@c800a000 {
  149. status = "ok";
  150. queue-rx = <&qmgr 4>;
  151. queue-txready = <&qmgr 21>;
  152. phy-mode = "rgmii";
  153. phy-handle = <&phy5>;
  154. };
  155. };
  156. };