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