faraday,ftpci100.txt 4.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135
  1. Faraday Technology FTPCI100 PCI Host Bridge
  2. This PCI bridge is found inside that Cortina Systems Gemini SoC platform and
  3. is a generic IP block from Faraday Technology. It exists in two variants:
  4. plain and dual PCI. The plain version embeds a cascading interrupt controller
  5. into the host bridge. The dual version routes the interrupts to the host
  6. chips interrupt controller.
  7. The host controller appear on the PCI bus with vendor ID 0x159b (Faraday
  8. Technology) and product ID 0x4321.
  9. Mandatory properties:
  10. - compatible: ranging from specific to generic, should be one of
  11. "cortina,gemini-pci", "faraday,ftpci100"
  12. "cortina,gemini-pci-dual", "faraday,ftpci100-dual"
  13. "faraday,ftpci100"
  14. "faraday,ftpci100-dual"
  15. - reg: memory base and size for the host bridge
  16. - #address-cells: set to <3>
  17. - #size-cells: set to <2>
  18. - #interrupt-cells: set to <1>
  19. - bus-range: set to <0x00 0xff>
  20. - device_type, set to "pci"
  21. - ranges: see pci.txt
  22. - interrupt-map-mask: see pci.txt
  23. - interrupt-map: see pci.txt
  24. - dma-ranges: three ranges for the inbound memory region. The ranges must
  25. be aligned to a 1MB boundary, and may be 1MB, 2MB, 4MB, 8MB, 16MB, 32MB, 64MB,
  26. 128MB, 256MB, 512MB, 1GB or 2GB in size. The memory should be marked as
  27. pre-fetchable.
  28. Optional properties:
  29. - clocks: when present, this should contain the peripheral clock (PCLK) and the
  30. PCI clock (PCICLK). If these are not present, they are assumed to be
  31. hard-wired enabled and always on. The PCI clock will be 33 or 66 MHz.
  32. - clock-names: when present, this should contain "PCLK" for the peripheral
  33. clock and "PCICLK" for the PCI-side clock.
  34. Mandatory subnodes:
  35. - For "faraday,ftpci100" a node representing the interrupt-controller inside the
  36. host bridge is mandatory. It has the following mandatory properties:
  37. - interrupt: see interrupt-controller/interrupts.txt
  38. - interrupt-controller: see interrupt-controller/interrupts.txt
  39. - #address-cells: set to <0>
  40. - #interrupt-cells: set to <1>
  41. I/O space considerations:
  42. The plain variant has 128MiB of non-prefetchable memory space, whereas the
  43. "dual" variant has 64MiB. Take this into account when describing the ranges.
  44. Interrupt map considerations:
  45. The "dual" variant will get INT A, B, C, D from the system interrupt controller
  46. and should point to respective interrupt in that controller in its
  47. interrupt-map.
  48. The code which is the only documentation of how the Faraday PCI (the non-dual
  49. variant) interrupts assigns the default interrupt mapping/swizzling has
  50. typically been like this, doing the swizzling on the interrupt controller side
  51. rather than in the interconnect:
  52. interrupt-map-mask = <0xf800 0 0 7>;
  53. interrupt-map =
  54. <0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
  55. <0x4800 0 0 2 &pci_intc 1>,
  56. <0x4800 0 0 3 &pci_intc 2>,
  57. <0x4800 0 0 4 &pci_intc 3>,
  58. <0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
  59. <0x5000 0 0 2 &pci_intc 2>,
  60. <0x5000 0 0 3 &pci_intc 3>,
  61. <0x5000 0 0 4 &pci_intc 0>,
  62. <0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
  63. <0x5800 0 0 2 &pci_intc 3>,
  64. <0x5800 0 0 3 &pci_intc 0>,
  65. <0x5800 0 0 4 &pci_intc 1>,
  66. <0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
  67. <0x6000 0 0 2 &pci_intc 0>,
  68. <0x6000 0 0 3 &pci_intc 1>,
  69. <0x6000 0 0 4 &pci_intc 2>;
  70. Example:
  71. pci@50000000 {
  72. compatible = "cortina,gemini-pci", "faraday,ftpci100";
  73. reg = <0x50000000 0x100>;
  74. interrupts = <8 IRQ_TYPE_LEVEL_HIGH>, /* PCI A */
  75. <26 IRQ_TYPE_LEVEL_HIGH>, /* PCI B */
  76. <27 IRQ_TYPE_LEVEL_HIGH>, /* PCI C */
  77. <28 IRQ_TYPE_LEVEL_HIGH>; /* PCI D */
  78. #address-cells = <3>;
  79. #size-cells = <2>;
  80. #interrupt-cells = <1>;
  81. bus-range = <0x00 0xff>;
  82. ranges = /* 1MiB I/O space 0x50000000-0x500fffff */
  83. <0x01000000 0 0 0x50000000 0 0x00100000>,
  84. /* 128MiB non-prefetchable memory 0x58000000-0x5fffffff */
  85. <0x02000000 0 0x58000000 0x58000000 0 0x08000000>;
  86. /* DMA ranges */
  87. dma-ranges =
  88. /* 128MiB at 0x00000000-0x07ffffff */
  89. <0x02000000 0 0x00000000 0x00000000 0 0x08000000>,
  90. /* 64MiB at 0x00000000-0x03ffffff */
  91. <0x02000000 0 0x00000000 0x00000000 0 0x04000000>,
  92. /* 64MiB at 0x00000000-0x03ffffff */
  93. <0x02000000 0 0x00000000 0x00000000 0 0x04000000>;
  94. interrupt-map-mask = <0xf800 0 0 7>;
  95. interrupt-map =
  96. <0x4800 0 0 1 &pci_intc 0>, /* Slot 9 */
  97. <0x4800 0 0 2 &pci_intc 1>,
  98. <0x4800 0 0 3 &pci_intc 2>,
  99. <0x4800 0 0 4 &pci_intc 3>,
  100. <0x5000 0 0 1 &pci_intc 1>, /* Slot 10 */
  101. <0x5000 0 0 2 &pci_intc 2>,
  102. <0x5000 0 0 3 &pci_intc 3>,
  103. <0x5000 0 0 4 &pci_intc 0>,
  104. <0x5800 0 0 1 &pci_intc 2>, /* Slot 11 */
  105. <0x5800 0 0 2 &pci_intc 3>,
  106. <0x5800 0 0 3 &pci_intc 0>,
  107. <0x5800 0 0 4 &pci_intc 1>,
  108. <0x6000 0 0 1 &pci_intc 3>, /* Slot 12 */
  109. <0x6000 0 0 2 &pci_intc 0>,
  110. <0x6000 0 0 3 &pci_intc 0>,
  111. <0x6000 0 0 4 &pci_intc 0>;
  112. pci_intc: interrupt-controller {
  113. interrupt-parent = <&intcon>;
  114. interrupt-controller;
  115. #address-cells = <0>;
  116. #interrupt-cells = <1>;
  117. };
  118. };