intel-ixp43x-gateworks-gw2358.dts 5.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199
  1. // SPDX-License-Identifier: ISC
  2. /*
  3. * Device Tree file for Gateworks IXP43x-based Cambria GW2358
  4. */
  5. /dts-v1/;
  6. #include "intel-ixp43x.dtsi"
  7. / {
  8. model = "Gateworks Cambria GW2358";
  9. compatible = "gateworks,gw2358", "intel,ixp43x";
  10. #address-cells = <1>;
  11. #size-cells = <1>;
  12. memory@0 {
  13. /* 128 MB SDRAM */
  14. device_type = "memory";
  15. reg = <0x00000000 0x8000000>;
  16. };
  17. chosen {
  18. bootargs = "console=ttyS0,115200n8 root=/dev/mtdblock2 rw rootfstype=squashfs,jffs2 rootwait";
  19. stdout-path = "uart0:115200n8";
  20. };
  21. aliases {
  22. serial0 = &uart0;
  23. };
  24. leds {
  25. compatible = "gpio-leds";
  26. led-user {
  27. label = "gw2358:green:LED";
  28. gpios = <&pld1 0 GPIO_ACTIVE_LOW>;
  29. default-state = "on";
  30. linux,default-trigger = "heartbeat";
  31. };
  32. };
  33. i2c {
  34. compatible = "i2c-gpio";
  35. sda-gpios = <&gpio0 7 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  36. scl-gpios = <&gpio0 6 (GPIO_ACTIVE_HIGH|GPIO_OPEN_DRAIN)>;
  37. #address-cells = <1>;
  38. #size-cells = <0>;
  39. hwmon@28 {
  40. compatible = "adi,ad7418";
  41. reg = <0x28>;
  42. };
  43. rtc: ds1672@68 {
  44. compatible = "dallas,ds1672";
  45. reg = <0x68>;
  46. };
  47. eeprom@51 {
  48. compatible = "atmel,24c08";
  49. reg = <0x51>;
  50. pagesize = <16>;
  51. size = <1024>;
  52. read-only;
  53. };
  54. pld0: pld@56 {
  55. compatible = "gateworks,pld-gpio";
  56. reg = <0x56>;
  57. gpio-controller;
  58. #gpio-cells = <2>;
  59. };
  60. /* This PLD just handles the LED and user button */
  61. pld1: pld@57 {
  62. compatible = "gateworks,pld-gpio";
  63. reg = <0x57>;
  64. gpio-controller;
  65. #gpio-cells = <2>;
  66. };
  67. };
  68. soc {
  69. bus@c4000000 {
  70. flash@0,0 {
  71. compatible = "intel,ixp4xx-flash", "cfi-flash";
  72. bank-width = <2>;
  73. /* Enable writes on the expansion bus */
  74. intel,ixp4xx-eb-write-enable = <1>;
  75. /*
  76. * 32 MB of Flash in 0x20000 byte blocks
  77. * mapped in at CS0 and CS1
  78. */
  79. reg = <0 0x00000000 0x2000000>;
  80. partitions {
  81. compatible = "redboot-fis";
  82. /* Eraseblock at 0x1fe0000 */
  83. fis-index-block = <0xff>;
  84. };
  85. };
  86. ide@3,0 {
  87. compatible = "intel,ixp4xx-compact-flash";
  88. /*
  89. * Set up expansion bus config to a really slow timing.
  90. * The CF driver will dynamically reconfigure these timings
  91. * depending on selected PIO mode (0-4).
  92. */
  93. intel,ixp4xx-eb-t1 = <3>; // 3 cycles extra address phase
  94. intel,ixp4xx-eb-t2 = <3>; // 3 cycles extra setup phase
  95. intel,ixp4xx-eb-t3 = <15>; // 15 cycles extra strobe phase
  96. intel,ixp4xx-eb-t4 = <3>; // 3 cycles extra hold phase
  97. intel,ixp4xx-eb-t5 = <15>; // 15 cycles extra recovery phase
  98. intel,ixp4xx-eb-cycle-type = <0>; // Intel cycle type
  99. intel,ixp4xx-eb-byte-access-on-halfword = <1>;
  100. intel,ixp4xx-eb-mux-address-and-data = <0>;
  101. intel,ixp4xx-eb-ahb-split-transfers = <0>;
  102. intel,ixp4xx-eb-write-enable = <1>;
  103. intel,ixp4xx-eb-byte-access = <1>;
  104. /* First register set is CMD second is CTL */
  105. reg = <3 0xe00000 0x40000>, <3 0xe40000 0x40000>;
  106. interrupt-parent = <&gpio0>;
  107. interrupts = <12 IRQ_TYPE_EDGE_RISING>;
  108. };
  109. };
  110. pci@c0000000 {
  111. status = "ok";
  112. /*
  113. * In the boardfile for the Cambria from OpenWRT the interrupts
  114. * are assigned one per IDSEL, so all 4 interrupts from IDSEL
  115. * 1 are connected to IRQ 11, all 4 interrupts from IDSEL 2
  116. * connected to IRQ 10 etc. I find this highly unlikely so I
  117. * have instead assumed that they are rotated (swizzled) like
  118. * this with 11, 10, 9, 8 for the 4 pins on IDSEL 1 etc.
  119. */
  120. #interrupt-cells = <1>;
  121. interrupt-map-mask = <0xf800 0 0 7>;
  122. interrupt-map =
  123. /* IDSEL 1 */
  124. <0x0800 0 0 1 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 1 is irq 11 */
  125. <0x0800 0 0 2 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 1 is irq 10 */
  126. <0x0800 0 0 3 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 1 is irq 9 */
  127. <0x0800 0 0 4 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 1 is irq 8 */
  128. /* IDSEL 2 */
  129. <0x1000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 2 is irq 10 */
  130. <0x1000 0 0 2 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 2 is irq 9 */
  131. <0x1000 0 0 3 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 2 is irq 8 */
  132. <0x1000 0 0 4 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 2 is irq 11 */
  133. /* IDSEL 3 */
  134. <0x1800 0 0 1 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 3 is irq 9 */
  135. <0x1800 0 0 2 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 8 */
  136. <0x1800 0 0 3 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 11 */
  137. <0x1800 0 0 4 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 3 is irq 10 */
  138. /* IDSEL 4 */
  139. <0x2000 0 0 1 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 3 is irq 8 */
  140. <0x2000 0 0 2 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 11 */
  141. <0x2000 0 0 3 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 10 */
  142. <0x2000 0 0 4 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 3 is irq 9 */
  143. /* IDSEL 6 */
  144. <0x3000 0 0 1 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 3 is irq 10 */
  145. <0x3000 0 0 2 &gpio0 9 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 9 */
  146. <0x3000 0 0 3 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 8 */
  147. <0x3000 0 0 4 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT D on slot 3 is irq 11 */
  148. /* IDSEL 15 */
  149. <0x7800 0 0 1 &gpio0 8 IRQ_TYPE_LEVEL_LOW>, /* INT A on slot 3 is irq 8 */
  150. <0x7800 0 0 2 &gpio0 11 IRQ_TYPE_LEVEL_LOW>, /* INT B on slot 3 is irq 11 */
  151. <0x7800 0 0 3 &gpio0 10 IRQ_TYPE_LEVEL_LOW>, /* INT C on slot 3 is irq 10 */
  152. <0x7800 0 0 4 &gpio0 9 IRQ_TYPE_LEVEL_LOW>; /* INT D on slot 3 is irq 9 */
  153. };
  154. ethernet@c800a000 {
  155. status = "ok";
  156. queue-rx = <&qmgr 4>;
  157. queue-txready = <&qmgr 21>;
  158. phy-mode = "rgmii";
  159. phy-handle = <&phy1>;
  160. mdio {
  161. #address-cells = <1>;
  162. #size-cells = <0>;
  163. phy1: ethernet-phy@1 {
  164. reg = <1>;
  165. };
  166. phy2: ethernet-phy@2 {
  167. reg = <2>;
  168. };
  169. };
  170. };
  171. ethernet@c800c000 {
  172. status = "ok";
  173. queue-rx = <&qmgr 2>;
  174. queue-txready = <&qmgr 19>;
  175. phy-mode = "rgmii";
  176. phy-handle = <&phy2>;
  177. intel,npe-handle = <&npe 0>;
  178. };
  179. };
  180. };