xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/bus/socionext,uniphier-system-bus.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
2*4882a593Smuzhiyun%YAML 1.2
3*4882a593Smuzhiyun---
4*4882a593Smuzhiyun$id: http://devicetree.org/schemas/bus/socionext,uniphier-system-bus.yaml#
5*4882a593Smuzhiyun$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4882a593Smuzhiyun
7*4882a593Smuzhiyuntitle: UniPhier System Bus
8*4882a593Smuzhiyun
9*4882a593Smuzhiyundescription: |
10*4882a593Smuzhiyun  The UniPhier System Bus is an external bus that connects on-board devices to
11*4882a593Smuzhiyun  the UniPhier SoC. It is a simple (semi-)parallel bus with address, data, and
12*4882a593Smuzhiyun  some control signals. It supports up to 8 banks (chip selects).
13*4882a593Smuzhiyun
14*4882a593Smuzhiyun  Before any access to the bus, the bus controller must be configured; the bus
15*4882a593Smuzhiyun  controller registers provide the control for the translation from the offset
16*4882a593Smuzhiyun  within each bank to the CPU-viewed address. The needed setup includes the
17*4882a593Smuzhiyun  base address, the size of each bank. Optionally, some timing parameters can
18*4882a593Smuzhiyun  be optimized for faster bus access.
19*4882a593Smuzhiyun
20*4882a593Smuzhiyunmaintainers:
21*4882a593Smuzhiyun  - Masahiro Yamada <yamada.masahiro@socionext.com>
22*4882a593Smuzhiyun
23*4882a593Smuzhiyunproperties:
24*4882a593Smuzhiyun  compatible:
25*4882a593Smuzhiyun    const: socionext,uniphier-system-bus
26*4882a593Smuzhiyun
27*4882a593Smuzhiyun  reg:
28*4882a593Smuzhiyun    maxItems: 1
29*4882a593Smuzhiyun
30*4882a593Smuzhiyun  "#address-cells":
31*4882a593Smuzhiyun    description: |
32*4882a593Smuzhiyun      The first cell is the bank number (chip select).
33*4882a593Smuzhiyun      The second cell is the address offset within the bank.
34*4882a593Smuzhiyun    const: 2
35*4882a593Smuzhiyun
36*4882a593Smuzhiyun  "#size-cells":
37*4882a593Smuzhiyun    const: 1
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun  ranges:
40*4882a593Smuzhiyun    description: |
41*4882a593Smuzhiyun      Provide address translation from the System Bus to the parent bus.
42*4882a593Smuzhiyun
43*4882a593Smuzhiyun      Note:
44*4882a593Smuzhiyun      The address region(s) that can be assigned for the System Bus is
45*4882a593Smuzhiyun      implementation defined. Some SoCs can use 0x00000000-0x0fffffff and
46*4882a593Smuzhiyun      0x40000000-0x4fffffff, while other SoCs only 0x40000000-0x4fffffff.
47*4882a593Smuzhiyun      There might be additional limitations depending on SoCs and the boot mode.
48*4882a593Smuzhiyun      The address translation is arbitrary as long as the banks are assigned in
49*4882a593Smuzhiyun      the supported address space with the required alignment and they do not
50*4882a593Smuzhiyun      overlap one another.
51*4882a593Smuzhiyun
52*4882a593Smuzhiyun      For example, it is possible to map:
53*4882a593Smuzhiyun        bank 0 to 0x42000000-0x43ffffff, bank 5 to 0x46000000-0x46ffffff
54*4882a593Smuzhiyun      It is also possible to map:
55*4882a593Smuzhiyun        bank 0 to 0x48000000-0x49ffffff, bank 5 to 0x44000000-0x44ffffff
56*4882a593Smuzhiyun      There is no reason to stick to a particular translation mapping, but the
57*4882a593Smuzhiyun      "ranges" property should provide a "reasonable" default that is known to
58*4882a593Smuzhiyun      work. The software should initialize the bus controller according to it.
59*4882a593Smuzhiyun
60*4882a593SmuzhiyunpatternProperties:
61*4882a593Smuzhiyun  "^.*@[1-5],[1-9a-f][0-9a-f]+$":
62*4882a593Smuzhiyun    description: Devices attached to chip selects
63*4882a593Smuzhiyun    type: object
64*4882a593Smuzhiyun
65*4882a593Smuzhiyunrequired:
66*4882a593Smuzhiyun  - compatible
67*4882a593Smuzhiyun  - reg
68*4882a593Smuzhiyun  - "#address-cells"
69*4882a593Smuzhiyun  - "#size-cells"
70*4882a593Smuzhiyun  - ranges
71*4882a593Smuzhiyun
72*4882a593SmuzhiyunadditionalProperties: false
73*4882a593Smuzhiyun
74*4882a593Smuzhiyunexamples:
75*4882a593Smuzhiyun  - |
76*4882a593Smuzhiyun    // In this example,
77*4882a593Smuzhiyun    // - the Ethernet device is connected at the offset 0x01f00000 of CS1 and
78*4882a593Smuzhiyun    //   mapped to 0x43f00000 of the parent bus.
79*4882a593Smuzhiyun    // - the UART device is connected at the offset 0x00200000 of CS5 and
80*4882a593Smuzhiyun    //   mapped to 0x46200000 of the parent bus.
81*4882a593Smuzhiyun
82*4882a593Smuzhiyun    system-bus@58c00000 {
83*4882a593Smuzhiyun        compatible = "socionext,uniphier-system-bus";
84*4882a593Smuzhiyun        reg = <0x58c00000 0x400>;
85*4882a593Smuzhiyun        #address-cells = <2>;
86*4882a593Smuzhiyun        #size-cells = <1>;
87*4882a593Smuzhiyun        ranges = <1 0x00000000 0x42000000 0x02000000>,
88*4882a593Smuzhiyun                 <5 0x00000000 0x46000000 0x01000000>;
89*4882a593Smuzhiyun
90*4882a593Smuzhiyun        ethernet@1,1f00000 {
91*4882a593Smuzhiyun            compatible = "smsc,lan9115";
92*4882a593Smuzhiyun            reg = <1 0x01f00000 0x1000>;
93*4882a593Smuzhiyun            interrupts = <0 48 4>;
94*4882a593Smuzhiyun            phy-mode = "mii";
95*4882a593Smuzhiyun        };
96*4882a593Smuzhiyun
97*4882a593Smuzhiyun        serial@5,200000 {
98*4882a593Smuzhiyun            compatible = "ns16550a";
99*4882a593Smuzhiyun            reg = <5 0x00200000 0x20>;
100*4882a593Smuzhiyun            interrupts = <0 49 4>;
101*4882a593Smuzhiyun            clock-frequency = <12288000>;
102*4882a593Smuzhiyun        };
103*4882a593Smuzhiyun    };
104