|
| 1 | +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | +%YAML 1.2 |
| 3 | +--- |
| 4 | +$id: http://devicetree.org/schemas/pci/renesas,pci-rcar-gen2.yaml# |
| 5 | +$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | + |
| 7 | +title: Renesas AHB to PCI bridge |
| 8 | + |
| 9 | +maintainers: |
| 10 | + |
| 11 | + - Yoshihiro Shimoda <[email protected]> |
| 12 | + |
| 13 | +description: | |
| 14 | + This is the bridge used internally to connect the USB controllers to the |
| 15 | + AHB. There is one bridge instance per USB port connected to the internal |
| 16 | + OHCI and EHCI controllers. |
| 17 | +
|
| 18 | +allOf: |
| 19 | + - $ref: /schemas/pci/pci-bus.yaml# |
| 20 | + |
| 21 | +properties: |
| 22 | + compatible: |
| 23 | + oneOf: |
| 24 | + - items: |
| 25 | + - enum: |
| 26 | + - renesas,pci-r8a7742 # RZ/G1H |
| 27 | + - renesas,pci-r8a7743 # RZ/G1M |
| 28 | + - renesas,pci-r8a7744 # RZ/G1N |
| 29 | + - renesas,pci-r8a7745 # RZ/G1E |
| 30 | + - renesas,pci-r8a7790 # R-Car H2 |
| 31 | + - renesas,pci-r8a7791 # R-Car M2-W |
| 32 | + - renesas,pci-r8a7793 # R-Car M2-N |
| 33 | + - renesas,pci-r8a7794 # R-Car E2 |
| 34 | + - const: renesas,pci-rcar-gen2 # R-Car Gen2 and RZ/G1 |
| 35 | + |
| 36 | + reg: |
| 37 | + items: |
| 38 | + - description: Operational registers for the OHCI/EHCI controllers. |
| 39 | + - description: Bridge configuration and control registers. |
| 40 | + |
| 41 | + interrupts: |
| 42 | + maxItems: 1 |
| 43 | + |
| 44 | + clocks: |
| 45 | + items: |
| 46 | + - description: Device clock |
| 47 | + |
| 48 | + clock-names: |
| 49 | + items: |
| 50 | + - const: pclk |
| 51 | + |
| 52 | + resets: |
| 53 | + maxItems: 1 |
| 54 | + |
| 55 | + power-domains: |
| 56 | + maxItems: 1 |
| 57 | + |
| 58 | + bus-range: |
| 59 | + description: | |
| 60 | + The PCI bus number range; as this is a single bus, the range |
| 61 | + should be specified as the same value twice. |
| 62 | +
|
| 63 | + dma-ranges: |
| 64 | + description: | |
| 65 | + A single range for the inbound memory region. If not supplied, |
| 66 | + defaults to 1GiB at 0x40000000. Note there are hardware restrictions on |
| 67 | + the allowed combinations of address and size. |
| 68 | + maxItems: 1 |
| 69 | + |
| 70 | +patternProperties: |
| 71 | + 'usb@[0-1],0': |
| 72 | + type: object |
| 73 | + |
| 74 | + description: |
| 75 | + This a USB controller PCI device |
| 76 | + |
| 77 | + properties: |
| 78 | + reg: |
| 79 | + description: |
| 80 | + Identify the correct bus, device and function number in the |
| 81 | + form <bdf 0 0 0 0>. |
| 82 | + |
| 83 | + items: |
| 84 | + minItems: 5 |
| 85 | + maxItems: 5 |
| 86 | + |
| 87 | + phys: |
| 88 | + description: |
| 89 | + Reference to the USB phy |
| 90 | + maxItems: 1 |
| 91 | + |
| 92 | + phy-names: |
| 93 | + maxItems: 1 |
| 94 | + |
| 95 | + required: |
| 96 | + - reg |
| 97 | + - phys |
| 98 | + - phy-names |
| 99 | + |
| 100 | + unevaluatedProperties: false |
| 101 | + |
| 102 | +required: |
| 103 | + - compatible |
| 104 | + - reg |
| 105 | + - interrupts |
| 106 | + - interrupt-map |
| 107 | + - interrupt-map-mask |
| 108 | + - clocks |
| 109 | + - resets |
| 110 | + - power-domains |
| 111 | + - bus-range |
| 112 | + - "#address-cells" |
| 113 | + - "#size-cells" |
| 114 | + - "#interrupt-cells" |
| 115 | + |
| 116 | +unevaluatedProperties: false |
| 117 | + |
| 118 | +examples: |
| 119 | + - | |
| 120 | + #include <dt-bindings/interrupt-controller/arm-gic.h> |
| 121 | + #include <dt-bindings/clock/r8a7790-cpg-mssr.h> |
| 122 | + #include <dt-bindings/power/r8a7790-sysc.h> |
| 123 | +
|
| 124 | + pci@ee090000 { |
| 125 | + compatible = "renesas,pci-r8a7790", "renesas,pci-rcar-gen2"; |
| 126 | + device_type = "pci"; |
| 127 | + reg = <0xee090000 0xc00>, |
| 128 | + <0xee080000 0x1100>; |
| 129 | + clocks = <&cpg CPG_MOD 703>; |
| 130 | + power-domains = <&sysc R8A7790_PD_ALWAYS_ON>; |
| 131 | + resets = <&cpg 703>; |
| 132 | + interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; |
| 133 | +
|
| 134 | + bus-range = <0 0>; |
| 135 | + #address-cells = <3>; |
| 136 | + #size-cells = <2>; |
| 137 | + #interrupt-cells = <1>; |
| 138 | + ranges = <0x02000000 0 0xee080000 0xee080000 0 0x00010000>; |
| 139 | + dma-ranges = <0x42000000 0 0x40000000 0x40000000 0 0x40000000>; |
| 140 | + interrupt-map-mask = <0xf800 0 0 0x7>; |
| 141 | + interrupt-map = <0x0000 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, |
| 142 | + <0x0800 0 0 1 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, |
| 143 | + <0x1000 0 0 2 &gic GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; |
| 144 | +
|
| 145 | + usb@1,0 { |
| 146 | + reg = <0x800 0 0 0 0>; |
| 147 | + phys = <&usb0 0>; |
| 148 | + phy-names = "usb"; |
| 149 | + }; |
| 150 | +
|
| 151 | + usb@2,0 { |
| 152 | + reg = <0x1000 0 0 0 0>; |
| 153 | + phys = <&usb0 0>; |
| 154 | + phy-names = "usb"; |
| 155 | + }; |
| 156 | + }; |
0 commit comments